var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;function n(n){return n.stack?n.stack.match(e)?function(t){return t.stack.split("\n").filter((t=>!!t.match(e))).map((e=>{let t=e.replace(/^\s+/,"").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;let i=o(n?n[1]:t);return{method:n&&t||void 0,file:["eval",""].indexOf(i[0])>-1?void 0:i[0],lineNumber:i[1],columnNumber:i[2]}}))}(n):function(e){return e.stack.split("\n").filter((e=>!e.match(t))).map((e=>{if(-1===e.indexOf("@")&&-1===e.indexOf(":"))return{method:e};let t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),i=n&&n[1]?n[1]:void 0,s=o(e.replace(t,""));return{method:i,file:s[0],lineNumber:s[1],columnNumber:s[2]}}))}(n):[]}function o(e){if(-1===e.indexOf(":"))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]?Number(t[2]):void 0,t[3]?Number(t[3]):void 0]}var i,s=class{breadcrumbs=[];apiKey;plugins;appId;appType;appVersion;releaseStage;locale;userAgent;metadata;persistedMetadata;onError;onPostErrorListeners=[];constructor(e){this.apiKey=e.apiKey,this.appType=e.appType,this.appId=e.appId,this.appVersion=e.appVersion,this.releaseStage=e.releaseStage,this.locale=e.locale,this.userAgent=e.userAgent,this.metadata=e.metadata,this.onError=e.onError,this.persistedMetadata={},this.plugins=e.plugins??[],this.plugins.forEach((e=>e.load(this))),this.leaveBreadcrumb("Bugsnag started",void 0,"state")}addMetadata(e){for(let t of Object.keys(e))this.persistedMetadata[t]=e[t]}leaveBreadcrumb(e,t,n="manual"){this.breadcrumbs.push({name:e,metaData:t,type:n,timestamp:(new Date).toISOString()})}notify(e,{errorClass:t,severity:n,severityType:o,handled:i=!0,metadata:s,context:a}={}){let r={...this.metadata,...this.persistedMetadata,...s},l=this.buildBugsnagEvent({error:e,errorClass:t,severityType:o,handled:i,severity:n,metadata:r,context:a});if((this.onError?.(l,e)??1)&&"development"!==this.releaseStage){let e=this.sendToBugsnag(l);return this.onPostErrorListeners.forEach((e=>e(l))),e}return Promise.resolve()}addOnPostError(e){this.onPostErrorListeners.push(e)}buildBugsnagEvent({error:e,errorClass:t,severity:n="error",severityType:o="handledException",handled:i,metadata:s={},context:r}){let l=(new Date).toISOString(),{breadcrumbs:c,appId:d,appType:u,appVersion:h,releaseStage:p,locale:m,userAgent:f}=this;return{payloadVersion:"5",exceptions:[{errorClass:t??e.name,stacktrace:a(d,e),message:e.message}],severity:n,severityReason:{type:o},unhandled:!i,app:{id:d,type:u,version:h,releaseStage:p},device:{time:l,locale:m,userAgent:f},breadcrumbs:c,context:r,metaData:s}}async sendToBugsnag(e){let{apiKey:t}=this,n={apiKey:t,notifier:{name:"Bugsnag JavaScript",version:"7.22.2",url:"https://github.com/bugsnag/bugsnag-js"},events:[e]};try{await fetch("https://notify.bugsnag.com/",{method:"POST",headers:{"Content-Type":"application/json","Bugsnag-Api-Key":t,"Bugsnag-Payload-Version":"5","Bugsnag-Sent-At":e.device.time},body:JSON.stringify(n)})}catch(e){console.warn("[bugsnag-light] failed to send an event"),console.warn(e)}}};function a(e,t){return n(t).map((t=>{let n=t.file?.includes(e);return{method:t.method??"",file:t.file??"",lineNumber:t.lineNumber??0,columnNumber:t.columnNumber,inProject:n}}))}!function(e){e.Default="loginWithShop",e.CheckoutModal="loginWithShopCheckoutModal",e.ClassicCustomerAccounts="loginWithShopClassicCustomerAccounts",e.Prequal="loginWithShopPrequal",e.Web="loginWithShopShopWeb",e.SelfServe="loginWithShopSelfServe",e.CheckoutExtension="loginWithShopCheckoutExtension",e.PaymentRequest="loginWithShopPaymentRequest",e.CheckoutSheet="checkout_sheet"}(i||(i={}));const r={[i.Default]:"default",[i.SelfServe]:"default",[i.ClassicCustomerAccounts]:"classic_customer_accounts",[i.Prequal]:"shop_pay_installments_prequal",[i.PaymentRequest]:"payment_request",[i.CheckoutExtension]:"default",[i.CheckoutModal]:"checkout_modal",[i.CheckoutSheet]:"checkout_sheet",[i.Web]:""},l="shop-login-default",c=`${l}-iframe`,d=`${l}-iframe-compact`,u=`${l}-header`,h=`${u}-contents-container`,p=`${u}-title`,m=`${u}-description`,f=`${u}-divider`,g=`${l}-footer`,_=`${g}-content`,y=`${l}-hidden`,b="20px",v=`\n \n`,w=[i.CheckoutModal,i.ClassicCustomerAccounts,i.Web,i.SelfServe];function C(e){return!!e&&w.includes(e)}var S="e35d7136cee78d344ccffdbd5ca710fa";const k="1.0.30",T="show_login_with_shop",E="sign_in_with_shop_modal_dismissed",x="form[data-login-with-shop-sign-in]",A="form[data-login-with-shop-sign-up]",O='input[name="customer[email]"',L='input[name="customer[first_name]"',M='input[name="customer[last_name]"',I=`${x} input[type="email"],${x} ${O}`,P=`${A} input[type="email"],${A} ${O}`,N="2147483647",D={dev:"development",spin:"spin",staging:"staging",prod:"production"};function R(){return D.prod}function $(e,t){e.metaData=Object.assign(Object.assign({},e.metaData),t)}function U(e){!function(e){$(e,{shopJsUrls:Array.from(document.querySelectorAll('script[src*="/shop-js/"]')).map((e=>e.src))})}(e),function(e){var t,n;const o=null===(n=null===(t=window.Shopify)||void 0===t?void 0:t.featureAssets)||void 0===n?void 0:n["shop-js"];$(e,{shopJsFeatureAssetsExist:Boolean(o&&Object.keys(o).length>0)})}(e),function(e){const t=Array.from(document.querySelectorAll("shop-login-button[compact]"));t.filter((e=>C(e.getAttribute("analytics-context")))),$(e,{compactUX:t.length>0})}(e),function(e){var t;$(e,{domain:null===(t=null===window||void 0===window?void 0:window.location)||void 0===t?void 0:t.hostname})}(e),function(e){const t=`${e.exceptions[0].errorClass}:${e.exceptions[0].message}`;e.groupingHash=t}(e),function(e){e.request={url:window.location.href}}(e),function(e){var t,n;const o=(new Date).toISOString();e.device={locale:navigator.userLanguage||navigator.language,userAgent:navigator.userAgent,orientation:null===(n=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===n?void 0:n.type,time:o}}(e)}function V(e){window&&window.addEventListener("error",(t=>{const{error:o}=t;o&&function(e){const t=n(e);return 0!==t.length&&t.some((e=>{var t;return null===(t=e.file)||void 0===t?void 0:t.includes("shopifycloud/shop-js")}))}(o)&&e.notify(o)}))}let j;const H={start:({metadata:e})=>{j?console.log("Bugsnag.start() has already been called. Ignoring."):(j=new s(function(e){return{apiKey:S,appId:"shop-js",appVersion:k,metadata:Object.assign({bundleLocale:"en"},e),onError:U,releaseStage:R()}}(e)),V(j))},leaveBreadcrumb:(e,t,n)=>{j?R()!==D.spin?j.leaveBreadcrumb(e,t,n):console.log("[Bugsnag leaveBreadcrumb called]",e,t,n):console.log("Bugsnag.leaveBreadcrumb() called before start().")},notify:(e,t)=>{j?R()!==D.spin?j.notify(e,t):console.log("[Bugsnag notify called]",e):console.log("Bugsnag.notify() called before start().")}};function F(){return Boolean(window.customElements)}function B(e,t){window.customElements&&(customElements.get(e)||customElements.define(e,t))}function z(e={}){H.start({metadata:e})}function W(){window.Shopify||(window.Shopify={}),window.Shopify.SignInWithShop||(window.Shopify.SignInWithShop={})}function q(e,t){W(),window.Shopify.SignInWithShop[e]=t}function G(e){var t,n;return Boolean(null===(n=null===(t=window.Shopify)||void 0===t?void 0:t.SignInWithShop)||void 0===n?void 0:n[`${e}Called`])}function K(e){W(),window.Shopify.SignInWithShop[`${e}Called`]=!0}function Z(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);ie.toString(16))).join("")}function ce(e,t=!0){return e&&Object.keys(e).length&&t?Object.keys(e).map((t=>({[de(t)]:e[t]}))).reduce(((e,t)=>te(te({},e),t))):e}function de(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}function ue(e){return e.events.map((e=>{let t=!0,n=!0;return e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertEventCase")&&(t=Boolean(e.options.convertEventCase)),e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertMetaDataCase")&&(n=Boolean(e.options.convertMetaDataCase)),{schema_id:e.schemaId,payload:ce(e.payload,t),metadata:ce(e.metadata,n)}}))}class he extends Error{constructor(e){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(e)}`),this.response=e,Object.setPrototypeOf(this,he.prototype)}}class pe extends Error{constructor(e){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(e)}`),Object.setPrototypeOf(this,pe.prototype),this.response=e}}class me extends Error{constructor(e){super(`Error completing request. A network failure may have prevented the request from completing. Error: ${e}`),Object.setPrototypeOf(this,me.prototype)}}class fe{static withEndpoint(e){return new fe(`https://${new URL(e).hostname}`)}constructor(e=ie,t=!1){this.edgeDomain=e,this.keepalive=t}async produceBatch(e){const t={events:ue(e),metadata:ce(e.metadata)};let n;try{n=await fetch(this.produceBatchEndpoint(),{method:"post",headers:ge(e.metadata),body:JSON.stringify(t),keepalive:this.keepalive})}catch(e){throw new me(e)}if(207===n.status){const e=await n.json();throw new pe(e)}if(!n.ok)throw new he({status:n.status,message:await n.text()});return{status:n.status}}async produce(e){let t,n=!0;e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertEventCase")&&(n=Boolean(e.options.convertEventCase));try{t=await async function({endpoint:e,event:t,keepalive:n}){return fetch(null!=e?e:se+ae,{method:"post",headers:ge(t.metadata),body:JSON.stringify({schema_id:t.schemaId,payload:t.payload}),keepalive:n})}({endpoint:this.produceEndpoint(),keepalive:this.keepalive,event:te(te({},e),{},{payload:ce(e.payload,n)})})}catch(e){throw new me(e)}if(!t)throw new he({message:"No response from edge"});if(!t.ok)throw new he({status:t.status,message:await t.text()});return{status:t.status}}produceBatchEndpoint(){return this.edgeDomain+"/unstable/produce_batch"}produceEndpoint(){return this.edgeDomain+ae}}function ge(e){const t={"Content-Type":"application/json; charset=utf-8","X-Monorail-Edge-Event-Created-At-Ms":(e&&e.eventCreatedAtMs||Date.now()).toString(),"X-Monorail-Edge-Event-Sent-At-Ms":Date.now().toString(),"X-Monorail-Edge-Client-Message-Id":(e&&e.clientMessageId||le()).toString()};return e&&e.userAgent&&(t["User-Agent"]=e.userAgent),e&&e.remoteIp&&(t["X-Forwarded-For"]=e.remoteIp),t}class _e{static printWelcomeMessage(e){console.log(`%c👋 from Monorail%c\n\nWe've noticed that you're${e?"":" not"} running in debug mode. As such, we will ${e?"produce":"not produce"} Monorail events to the console. \n\nIf you want Monorail events to ${e?"stop":"start"} appearing here, %cset debugMode=${(!e).toString()}%c, for the Monorail Log Producer in your code.`,"font-size: large;","font-size: normal;","font-weight: bold;","font-weight: normal;")}constructor(e){this.sendToConsole=e,e&&_e.printWelcomeMessage(e)}produce(e){return this.sendToConsole&&console.log("Monorail event produced",e),new Promise((t=>{t(e)}))}produceBatch(e){return this.sendToConsole&&console.log("Monorail Batch event produced",e),new Promise((t=>{t(e)}))}}class ye{static createLogProducer(e){return new ye(new _e(e.debugMode),e.middleware||[])}static createHttpProducerWithEndpoint(e,t=[]){return new ye(fe.withEndpoint(e),t)}static createHttpProducer(e){const t=e.options&&e.options.keepalive;return new ye(e.production?new fe(se,t):new fe(ie,t),e.middleware||[])}static buildMiddlewareChain(e,t=0){return t===e.length?this.identityFn:n=>e[t].do(n,this.buildMiddlewareChain(e,t+1))}constructor(e,t){this.producer=e,this.middleware=t,this.executeChain=ye.buildMiddlewareChain(this.middleware.concat(new re(e)))}produce(e){return e.metadata=te({eventCreatedAtMs:Date.now(),clientMessageId:le()},e.metadata),this.executeChain(e)}produceBatch(e){return this.executeChain(e)}}var be,ve,we;!function(e){e.Histogram="Histogram",e.Counter="Counter",e.UpDownCounter="UpDownCounter"}(be||(be={})),function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(ve||(ve={})),function(e){e.InvalidStorefrontOrigin="shop_js_invalid_storefront_origin",e.RequestShowCalledBeforeIframeLoaded="shop_js_request_show_called_before_iframe_loaded",e.HandleSilentError="shop_js_handle_silent_error",e.MonorailProducerError="shop_js_monorail_producer_error"}(we||(we={}));const Ce={serviceName:"shop-js",throttleLimit:1e3,prefixMetric:!1,metrics:{[we.InvalidStorefrontOrigin]:{type:be.Counter,description:"Number of times the storefront origin is invalid",valueType:ve.INT},[we.RequestShowCalledBeforeIframeLoaded]:{type:be.Counter,description:"Number of times requestShow is called before iframe is loaded",valueType:ve.INT},[we.HandleSilentError]:{type:be.Counter,description:"Number of times silent errors are handled",valueType:ve.INT},[we.MonorailProducerError]:{type:be.Counter,description:"Number of times Monorail Producer failed to send event",valueType:ve.INT}},env:"production"};let Se,ke=3;const Te=(e=!1)=>(Se&&!e||(Se=new Promise(((e,t)=>{import("./chunk.index_BF8QgsDJ.esm.js").then((t=>{const n=new(0,t.DefaultOtelService)(Ce);e(n)})).catch((e=>{t(e)}))}))),Se),Ee=()=>Y(void 0,void 0,void 0,(function*(){try{return yield Te(!0)}catch(e){if(ke--,ke>0)return Ee();throw e}})),xe=(e,t,n)=>{Ee().then((o=>{o.record(e,t,n)})).catch((e=>{H.notify(e)}))};function Ae(e,t,n){document.cookie=`${e}=${t};expires=session;path=/`}function Oe(e){try{const t=new RegExp(`(${e})=([^;]+)`).exec(document.cookie);return t?t[2]:null}catch(e){return null}}function Le(e,t,n){Oe(e)&&(document.cookie=`${e}=;path=${t};expires=Thu, 01 Jan 1970 00:00:01 GMT`)}function Me(e=window.location.origin,t){const n=`${e}/services/login_with_shop/finalize`;return fetch(n).catch(t)}function Ie(e){const t=e?"sessionStorage":"localStorage";try{const e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(e){return!1}}function Pe(e,t,{session:n}={}){if(!Ie(n))return!1;return window[n?"sessionStorage":"localStorage"].setItem(e,t),!0}function Ne(e,{session:t}={}){if(!Ie(t))return null;return window[t?"sessionStorage":"localStorage"].getItem(e)}function De(e,{session:t}={}){if(!Ie(t))return!1;return window[t?"sessionStorage":"localStorage"].removeItem(e),!0}for(var Re,$e=[],Ue=0;Ue<256;++Ue)$e.push((Ue+256).toString(16).slice(1));var Ve=new Uint8Array(16);function je(){if(!Re&&!(Re="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Re(Ve)}var He={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fe(e,t,n){if(He.randomUUID&&!t&&!e)return He.randomUUID();var o=(e=e||{}).random||(e.rng||je)();return o[6]=15&o[6]|64,o[8]=63&o[8]|128,function(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}(o)}const Be=()=>({width:window.innerWidth||document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight});function ze({url:e,width:t,height:n,windowName:o,onClose:i}){const s={left:void 0===window.screenLeft?window.screenX:window.screenLeft,top:void 0===window.screenTop?window.screenY:window.screenTop},a=Be(),r=a.width||screen.width,l=a.height||screen.height,c=screen.width&&window.screen.availWidth?screen.width/window.screen.availWidth:1,d=(r-t)/2/c+s.left,u=(l-n)/2/c+s.top,h=window.open(e,o,`scrollbars=yes,width=${t},height=${n},top=${u},left=${d}`);if(!h)return null;if(h.focus(),i){const e=setInterval((()=>{h.closed&&(i(),clearInterval(e))}),1e3)}return h}function We(e,t,n,o){(o||e.getAttribute(t)!==n)&&!0!==e[t]&&e.setAttribute(t,n)}function qe(e,t,n){const o=n.includes(t);e&&!o?n.push(t):!e&&o&&n.splice(n.indexOf(t),1)}function Ge(e,t,n){if(!n&&e.src===t)return;const o=e.parentNode;o&&(o.removeChild(e),e.setAttribute("src",t),o.appendChild(e))}function Ke(){return Fe()}function Ze(){return Y(this,arguments,void 0,(function*(e=location.origin){const t=fetch(`${e}/meta.json`);try{const e=yield t;return yield e.json()}catch(e){return null}}))}function Ye(e){try{return new URL(e).hostname}catch(t){return console.error(`[Shop Pay] Store URL (${e}) is not valid`,t),null}}function Xe(e){return new URLSearchParams(window.location.search).get(e)}function Je(e,t){let n;return(...o)=>{clearTimeout(n),n=setTimeout((()=>{e(...o)}),t)}}function Qe(e){return"/"===e?e:e.endsWith("/")?e.slice(0,-1):e}function et(){return Boolean(navigator.userAgent)&&/(android|iphone|ipad|mobile|phone)/i.test(navigator.userAgent)}function tt(e){if(!function(){const e=window.navigator.userAgent,t=Boolean(e.match(/iPad/i))||Boolean(e.match(/iPhone/i)),n=Boolean(e.match(/WebKit/i));return t&&n&&!e.match(/CriOS/i)}())return;const t=document.getElementById(e);if(t)return t.focus();const n=document.createElement("input");n.id=e,n.style.fontSize="16px",n.style.position="absolute",n.style.left="-100px",n.setAttribute("aria-hidden","true"),document.body.appendChild(n),n.focus({preventScroll:!0})}function nt(e){return null===e||""===e.trim()}function ot(e,t){let n;const o=new Promise((e=>{n=setTimeout((()=>{e()}),t)}));return Promise.race([e,o]).finally((()=>{clearTimeout(n)}))}function it(){var e;const t=null===(e=document.querySelector("script#shop-js-features"))||void 0===e?void 0:e.innerHTML;return t?JSON.parse(t):{}}function st(){var e;const t=null===(e=document.querySelector("script#shop-js-analytics"))||void 0===e?void 0:e.innerHTML;return t?JSON.parse(t):{}}const at=/^[^@]+@[^@]+\.[^@]{2,}$/i;function rt(e){return!!e&&RegExp(at).test(e)}function lt({selector:e,onElementFound:t}){const n=new WeakSet,o=new MutationObserver((e=>{let t=!1;for(const n of e)if(n.addedNodes.length>0){t=!0;break}t&&i()}));function i(){document.querySelectorAll(e).forEach((e=>{n.has(e)||(t(e),n.add(e))}))}return function(){Y(this,void 0,void 0,(function*(){yield function(){if(document.body)return Promise.resolve();return new Promise((e=>{window.addEventListener("DOMContentLoaded",(()=>e()))}))}(),i(),o.observe(document.body||document.documentElement,{childList:!0,subtree:!0})}))}(),o}function ct({onVisible:e,onFallback:t}){const n=new IntersectionObserver((i=>{for(const s of i){const{target:i,isIntersecting:a}=s;a&&(o(i)?e(i):t(i),n.unobserve(i))}}),{threshold:1});function o(e){let t=e;for(;t;){if(!["","1"].includes(getComputedStyle(t).opacity))return!1;t=t.parentElement}return!0}return n}function dt(e,t=!0){const n=Boolean(e);return!n&&t&&H.notify(new Error("HTML Element was not provided")),n}function ut(e,t,n){const o=n.querySelector(`#${t}`),i=null==o?void 0:o.parentElement,s=null!=i?i:document.createElement("div");s.innerHTML=e,s.style.display="none","innerHTML"in n&&(n.innerHTML=""),n.prepend(s);const a=n.querySelector(`#${t}`).content;n.appendChild(a.cloneNode(!0))}const ht=Math.min,pt=Math.max,mt=Math.round,ft=Math.floor,gt=e=>({x:e,y:e}),_t={left:"right",right:"left",bottom:"top",top:"bottom"},yt={start:"end",end:"start"};function bt(e,t,n){return pt(e,ht(t,n))}function vt(e,t){return"function"==typeof e?e(t):e}function wt(e){return e.split("-")[0]}function Ct(e){return e.split("-")[1]}function St(e){return"x"===e?"y":"x"}function kt(e){return"y"===e?"height":"width"}function Tt(e){return["top","bottom"].includes(wt(e))?"y":"x"}function Et(e){return St(Tt(e))}function xt(e){return e.replace(/start|end/g,(e=>yt[e]))}function At(e){return e.replace(/left|right|bottom|top/g,(e=>_t[e]))}function Ot(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Lt(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Mt(e,t,n){let{reference:o,floating:i}=e;const s=Tt(t),a=Et(t),r=kt(a),l=wt(t),c="y"===s,d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[r]/2-i[r]/2;let p;switch(l){case"top":p={x:d,y:o.y-i.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:u};break;case"left":p={x:o.x-i.width,y:u};break;default:p={x:o.x,y:o.y}}switch(Ct(t)){case"start":p[a]-=h*(n&&c?-1:1);break;case"end":p[a]+=h*(n&&c?-1:1)}return p}async function It(e,t){var n;void 0===t&&(t={});const{x:o,y:i,platform:s,rects:a,elements:r,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=vt(t,e),m=Ot(p),f=r[h?"floating"===u?"reference":"floating":u],g=Lt(await s.getClippingRect({element:null==(n=await(null==s.isElement?void 0:s.isElement(f)))||n?f:f.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(r.floating)),boundary:c,rootBoundary:d,strategy:l})),_="floating"===u?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==s.getOffsetParent?void 0:s.getOffsetParent(r.floating)),b=await(null==s.isElement?void 0:s.isElement(y))&&await(null==s.getScale?void 0:s.getScale(y))||{x:1,y:1},v=Lt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:_,offsetParent:y,strategy:l}):_);return{top:(g.top-v.top+m.top)/b.y,bottom:(v.bottom-g.bottom+m.bottom)/b.y,left:(g.left-v.left+m.left)/b.x,right:(v.right-g.right+m.right)/b.x}}function Pt(e){return Rt(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Dt(e){var t;return null==(t=(Rt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Rt(e){return e instanceof Node||e instanceof Nt(e).Node}function $t(e){return e instanceof Element||e instanceof Nt(e).Element}function Ut(e){return e instanceof HTMLElement||e instanceof Nt(e).HTMLElement}function Vt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot)}function jt(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Ht(e){return["table","td","th"].includes(Pt(e))}function Ft(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Bt(e){const t=zt(),n=qt(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function zt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Wt(e){return["html","body","#document"].includes(Pt(e))}function qt(e){return Nt(e).getComputedStyle(e)}function Gt(e){return $t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kt(e){if("html"===Pt(e))return e;const t=e.assignedSlot||e.parentNode||Vt(e)&&e.host||Dt(e);return Vt(t)?t.host:t}function Zt(e){const t=Kt(e);return Wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ut(t)&&jt(t)?t:Zt(t)}function Yt(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=Zt(e),s=i===(null==(o=e.ownerDocument)?void 0:o.body),a=Nt(i);return s?t.concat(a,a.visualViewport||[],jt(i)?i:[],a.frameElement&&n?Yt(a.frameElement):[]):t.concat(i,Yt(i,[],n))}function Xt(e){const t=qt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Ut(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:o,r=mt(n)!==s||mt(o)!==a;return r&&(n=s,o=a),{width:n,height:o,$:r}}function Jt(e){return $t(e)?e:e.contextElement}function Qt(e){const t=Jt(e);if(!Ut(t))return gt(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=Xt(t);let a=(s?mt(n.width):n.width)/o,r=(s?mt(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),r&&Number.isFinite(r)||(r=1),{x:a,y:r}}const en=gt(0);function tn(e){const t=Nt(e);return zt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:en}function nn(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),s=Jt(e);let a=gt(1);t&&(o?$t(o)&&(a=Qt(o)):a=Qt(e));const r=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Nt(e))&&t}(s,n,o)?tn(s):gt(0);let l=(i.left+r.x)/a.x,c=(i.top+r.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(s){const e=Nt(s),t=o&&$t(o)?Nt(o):o;let n=e,i=n.frameElement;for(;i&&o&&t!==n;){const e=Qt(i),t=i.getBoundingClientRect(),o=qt(i),s=t.left+(i.clientLeft+parseFloat(o.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=s,c+=a,n=Nt(i),i=n.frameElement}}return Lt({width:d,height:u,x:l,y:c})}function on(e){return nn(Dt(e)).left+Gt(e).scrollLeft}function sn(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=Nt(e),o=Dt(e),i=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,r=0,l=0;if(i){s=i.width,a=i.height;const e=zt();(!e||e&&"fixed"===t)&&(r=i.offsetLeft,l=i.offsetTop)}return{width:s,height:a,x:r,y:l}}(e,n);else if("document"===t)o=function(e){const t=Dt(e),n=Gt(e),o=e.ownerDocument.body,i=pt(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=pt(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+on(e);const r=-n.scrollTop;return"rtl"===qt(o).direction&&(a+=pt(t.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:r}}(Dt(e));else if($t(t))o=function(e,t){const n=nn(e,!0,"fixed"===t),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=Ut(e)?Qt(e):gt(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:i*s.x,y:o*s.y}}(t,n);else{const n=tn(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return Lt(o)}function an(e,t){const n=Kt(e);return!(n===t||!$t(n)||Wt(n))&&("fixed"===qt(n).position||an(n,t))}function rn(e,t,n){const o=Ut(t),i=Dt(t),s="fixed"===n,a=nn(e,!0,s,t);let r={scrollLeft:0,scrollTop:0};const l=gt(0);if(o||!o&&!s)if(("body"!==Pt(t)||jt(i))&&(r=Gt(t)),o){const e=nn(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=on(i));return{x:a.left+r.scrollLeft-l.x,y:a.top+r.scrollTop-l.y,width:a.width,height:a.height}}function ln(e){return"static"===qt(e).position}function cn(e,t){return Ut(e)&&"fixed"!==qt(e).position?t?t(e):e.offsetParent:null}function dn(e,t){const n=Nt(e);if(Ft(e))return n;if(!Ut(e)){let t=Kt(e);for(;t&&!Wt(t);){if($t(t)&&!ln(t))return t;t=Kt(t)}return n}let o=cn(e,t);for(;o&&Ht(o)&&ln(o);)o=cn(o,t);return o&&Wt(o)&&ln(o)&&!Bt(o)?n:o||function(e){let t=Kt(e);for(;Ut(t)&&!Wt(t);){if(Ft(t))return null;if(Bt(t))return t;t=Kt(t)}return null}(e)||n}const un={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s="fixed"===i,a=Dt(o),r=!!t&&Ft(t.floating);if(o===a||r&&s)return n;let l={scrollLeft:0,scrollTop:0},c=gt(1);const d=gt(0),u=Ut(o);if((u||!u&&!s)&&(("body"!==Pt(o)||jt(a))&&(l=Gt(o)),Ut(o))){const e=nn(o);c=Qt(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x,y:n.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:Dt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[..."clippingAncestors"===n?Ft(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=Yt(e,[],!1).filter((e=>$t(e)&&"body"!==Pt(e))),i=null;const s="fixed"===qt(e).position;let a=s?Kt(e):e;for(;$t(a)&&!Wt(a);){const t=qt(a),n=Bt(a);n||"fixed"!==t.position||(i=null),(s?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||jt(a)&&!n&&an(e,a))?o=o.filter((e=>e!==a)):i=t,a=Kt(a)}return t.set(e,o),o}(t,this._c):[].concat(n),o],a=s[0],r=s.reduce(((e,n)=>{const o=sn(t,n,i);return e.top=pt(o.top,e.top),e.right=ht(o.right,e.right),e.bottom=ht(o.bottom,e.bottom),e.left=pt(o.left,e.left),e}),sn(t,a,i));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:dn,getElementRects:async function(e){const t=this.getOffsetParent||dn,n=this.getDimensions,o=await n(e.floating);return{reference:rn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Xt(e);return{width:t,height:n}},getScale:Qt,isElement:$t,isRTL:function(e){return"rtl"===qt(e).direction}};function hn(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=Jt(e),d=i||s?[...c?Yt(c):[],...Yt(t)]:[];d.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));const u=c&&r?function(e,t){let n,o=null;const i=Dt(e);function s(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function a(r,l){void 0===r&&(r=!1),void 0===l&&(l=1),s();const{left:c,top:d,width:u,height:h}=e.getBoundingClientRect();if(r||t(),!u||!h)return;const p={rootMargin:-ft(d)+"px "+-ft(i.clientWidth-(c+u))+"px "+-ft(i.clientHeight-(d+h))+"px "+-ft(c)+"px",threshold:pt(0,ht(1,l))||1};let m=!0;function f(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}m=!1}try{o=new IntersectionObserver(f,{...p,root:i.ownerDocument})}catch(e){o=new IntersectionObserver(f,p)}o.observe(e)}(!0),s}(c,n):null;let h,p=-1,m=null;a&&(m=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let f=l?nn(e):null;return l&&function t(){const o=nn(e);!f||o.x===f.x&&o.y===f.y&&o.width===f.width&&o.height===f.height||n();f=o,h=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{i&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const pn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:a,middlewareData:r}=t,l=await async function(e,t){const{placement:n,platform:o,elements:i}=e,s=await(null==o.isRTL?void 0:o.isRTL(i.floating)),a=wt(n),r=Ct(n),l="y"===Tt(n),c=["left","top"].includes(a)?-1:1,d=s&&l?-1:1,u=vt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return r&&"number"==typeof m&&(p="end"===r?-1*m:m),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}(t,e);return a===(null==(n=r.offset)?void 0:n.placement)&&null!=(o=r.arrow)&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},mn=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:r={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=vt(e,t),c={x:n,y:o},d=await It(t,l),u=Tt(wt(i)),h=St(u);let p=c[h],m=c[u];if(s){const e="y"===h?"bottom":"right";p=bt(p+d["y"===h?"top":"left"],p,p-d[e])}if(a){const e="y"===u?"bottom":"right";m=bt(m+d["y"===u?"top":"left"],m,m-d[e])}const f=r.fn({...t,[h]:p,[u]:m});return{...f,data:{x:f.x-n,y:f.y-o}}}}},fn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:r,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...g}=vt(e,t);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};const _=wt(i),y=Tt(r),b=wt(r)===r,v=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(b||!f?[At(r)]:function(e){const t=At(e);return[xt(e),t,xt(t)]}(r)),C="none"!==m;!h&&C&&w.push(...function(e,t,n,o){const i=Ct(e);let s=function(e,t,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?s:a;default:return[]}}(wt(e),"start"===n,o);return i&&(s=s.map((e=>e+"-"+i)),t&&(s=s.concat(s.map(xt)))),s}(r,f,m,v));const S=[r,...w],k=await It(t,g),T=[];let E=(null==(o=s.flip)?void 0:o.overflows)||[];if(d&&T.push(k[_]),u){const e=function(e,t,n){void 0===n&&(n=!1);const o=Ct(e),i=Et(e),s=kt(i);let a="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=At(a)),[a,At(a)]}(i,a,v);T.push(k[e[0]],k[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every((e=>e<=0))){var x,A;const e=((null==(x=s.flip)?void 0:x.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(A=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=E.filter((e=>{if(C){const t=Tt(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=r}if(i!==n)return{reset:{placement:n}}}return{}}}},gn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:s,platform:a,elements:r,middlewareData:l}=t,{element:c,padding:d=0}=vt(e,t)||{};if(null==c)return{};const u=Ot(d),h={x:n,y:o},p=Et(i),m=kt(p),f=await a.getDimensions(c),g="y"===p,_=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",v=s.reference[m]+s.reference[p]-h[p]-s.floating[m],w=h[p]-s.reference[p],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=C?C[b]:0;S&&await(null==a.isElement?void 0:a.isElement(C))||(S=r.floating[b]||s.floating[m]);const k=v/2-w/2,T=S/2-f[m]/2-1,E=ht(u[_],T),x=ht(u[y],T),A=E,O=S-f[m]-x,L=S/2-f[m]/2+k,M=bt(A,L,O),I=!l.arrow&&null!=Ct(i)&&L!==M&&s.reference[m]/2-(Ln&&(p=n)}if(c){var _,y;const e="y"===h?"width":"height",t=["top","left"].includes(wt(i)),n=s.reference[u]-s.floating[e]+(t&&(null==(_=a.offset)?void 0:_[u])||0)+(t?0:g.crossAxis),o=s.reference[u]+s.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[u])||0)-(t?g.crossAxis:0);mo&&(m=o)}return{[h]:p,[u]:m}}}},yn=(e,t,n)=>{const o=new Map,i={platform:un,...n},s={...i.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,r=s.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Mt(c,o,l),h=o,p={},m=0;for(let n=0;n\n.sda-overlay {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: ${N} !important;\n will-change: opacity, transform;\n}\n\n.sda-modal {\n background-color: #fff;\n min-width: 340px;\n border-radius: 20px;\n padding: 0;\n will-change: opacity, transform, overflow;\n}\n\n.sda-modal:focus {\n outline: 0;\n}\n\n.sda-modal.disable-popup {\n ${wn}\n}\n\n.${bn} {\n padding: 16px 16px 8px;\n display: flex;\n align-items: center;\n}\n\n.${bn} shop-logo {\n flex: 1 0 1px;\n display: flex;\n line-height: 18px;\n}\n\n.sda-modal-close-button {\n border: none;\n border-radius: 50%;\n position: relative;\n padding: 0;\n cursor: pointer;\n display: flex;\n}\n\n.sda-modal-close-button:focus,\n.sda-modal-close-button:hover {\n color: #E3E3E3;\n outline: none;\n\n --icon-color: #E3E3E3;\n}\n\n.sda-modal-close-button:before {\n position: absolute;\n content: '';\n top: 1px;\n left: 1px;\n right: 1px;\n bottom: 1px;\n border-radius: 50%;\n background-color: #707070;\n}\n.sda-modal-close-button shop-close-icon {\n pointer-events: none;\n z-index: 1;\n}\n\n.${bn}.${vn} {\n display: block;\n padding: 0;\n height: 0;\n}\n\n.${bn}.${vn} shop-logo {\n display: none;\n}\n\n.${bn}.${vn} .sda-modal-close-button {\n position: absolute;\n top: 26px;\n right: 16px;\n}\n\n.sda-landing {\n width: 340px;\n margin: auto;\n}\n\n.sda-hidden {\n height: 0 !important;\n border: 0;\n padding: 0;\n margin: 0;\n visibility: hidden;\n overflow: hidden;\n}\n\n.focus-trap {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@media (forced-colors: active) {\n .sda-modal {\n border: 1px solid;\n }\n}\n\n.arrow {\n position: absolute;\n background-color: #fff;\n width: 24px;\n height: 24px;\n transform: rotate(45deg);\n z-index: -1;\n}\n\n@media screen and (max-width: 448px) {\n .sda-landing {\n width: 100%;\n }\n\n .sda-modal {\n position: absolute;\n ${wn}\n min-width: 340px;\n max-width: unset;\n box-sizing: border-box;\n }\n\n .arrow {\n display: none;\n }\n}\n\n@media screen and (min-width: 449px) {\n .sda-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n\n .sda-modal {\n position: absolute;\n bottom: unset !important;\n right: unset !important;\n margin: 0 auto !important;\n max-width: 400px;\n box-sizing: border-box;\n }\n\n .sda-overlay.sda-cornered {\n background: linear-gradient(rgba(0,0,0,0.95) 70px, rgba(0,0,0,0.2) 100%);\n box-sizing: border-box;\n box-shadow: inset 0 70px #000;\n display: flex;\n align-items: flex-start;\n justify-content: flex-end;\n padding: 25px;\n }\n\n .sda-overlay.sda-cornered .sda-modal {\n box-shadow: 0 12px 30px rgba(0,0,0,0.2);\n }\n}\n\n\n
\n \n \n \n
\n`;var Sn,kn;!function(e){e.Dynamic="DYNAMIC",e.Mobile="MOBILE",e.Center="CENTER",e.Corner="CORNER"}(Sn||(Sn={})),function(e){e.Corner="corner",e.Default="default"}(kn||(kn={}));const Tn=new Map([["top","bottom"],["top-end","bottom"],["top-start","bottom"],["right","left"],["right-end","left"],["right-start","left"],["bottom","top"],["bottom-end","top"],["bottom-start","top"],["left","right"],["left-end","right"],["left-start","right"]]),En={[Sn.Dynamic]:(e,t,n,o)=>{let i=e.querySelector(".arrow");return e.style.position="absolute",null===i&&(i=document.createElement("div"),i.className="arrow",e.appendChild(i)),{config:{placement:null!=o?o:"right",middleware:[pn(22),o?void 0:mn({limiter:_n({offset:64})}),fn({fallbackPlacements:o?[]:["left","top","bottom"]}),gn({element:i,padding:32}),{name:"center",fn(){return Y(this,void 0,void 0,(function*(){return{data:{center:window.matchMedia("screen and (((min-width: 401px) and (max-width: 999px)) or (max-height: 750px))").matches}}}))}}]},fn:({x:t,y:n,placement:o,strategy:s,middlewareData:a})=>{const{center:r}=a;if(r.center)return null!==i&&(i.style.display="none"),Object.assign(e.style,{top:(window.innerHeight-e.offsetHeight)/2+"px",left:(window.innerWidth-e.offsetWidth)/2+"px",bottom:"",right:""}),null;Object.assign(e.style,{left:`${t}px`,top:`${n}px`,right:"",bottom:""});const{arrow:l}=a,c=Tn.get(o);return null!==i&&Object.assign(i.style,{left:void 0===(null==l?void 0:l.x)?"":`${null==l?void 0:l.x}px`,top:void 0===(null==l?void 0:l.y)?"":`${null==l?void 0:l.y}px`,right:"",bottom:"",display:"",[c]:"-12px"}),{x:t,y:n,strategy:s,placement:o,staticSide:c,middlewareData:a}}}},[Sn.Center]:(e,t,n={})=>({config:{},fn:()=>{const o=e.querySelector(".arrow");null!==o&&(o.style.display="none");const i=Object.keys(n).length>0;return i&&Object.assign(e.style,n,{position:"absolute"}),t.classList.toggle("centered",!i),null}}),[Sn.Mobile]:e=>({config:{},fn:()=>(Object.assign(e.style,{top:"auto !important",right:"0 !important",bottom:"0 !important",left:"auto"}),null)}),[Sn.Corner]:(e,t,n={})=>({config:{},fn:()=>{const o=e.querySelector(".arrow");null!==o&&(o.style.display="none");const i=Object.keys(n).length>0;return i&&Object.assign(e.style,n,{position:"absolute"}),t.classList.toggle("sda-cornered",!i),null}})},xn={cleanup:()=>{},updatePosition:()=>Y(void 0,void 0,void 0,(function*(){return Promise.resolve(null)}))};var An;!function(e){e.UserStatusIdentity="userstatuschange:identity",e.UserStatusScope="userstatuschange:scope",e.UserSessionCreate="usersession:create"}(An||(An={}));const On=(()=>{class e{constructor(){this._topics={}}subscribe(e,t,n){this._topics[e]=[...this._topics[e]||[],{publisherId:t,callback:n}]}unsubscribe(e,t){this._topics[e]=(this._topics[e]||[]).filter((e=>e.publisherId!==t))}unsubscribeAll(e){Object.keys(this._topics).forEach((t=>{this.unsubscribe(t,e)}))}publish(e,t,n){var o;null===(o=this._topics[e])||void 0===o||o.forEach((e=>{e.publisherId!==t&&e.callback(n)}))}}let t;return{getInstance:()=>(t||(t=new e),t)}})();class Ln extends Error{constructor(e,t=Ke()){super(e),this.analyticsTraceId=t,this.name="MonorailProducerError",this.code="monorail_producer_error"}}class Mn extends Error{constructor(e,t=Ke()){super(e),this.analyticsTraceId=t,this.name="AbortSignalReceivedError",this.code="abort_signal_received_error"}}function In(){var e;null===(e=document.querySelector("com-1password-notification"))||void 0===e||e.remove()}function Pn(...e){return Y(this,void 0,void 0,(function*(){var t;if(!window.ShopifyAnalytics&&!window.analytics)return{};let n;Boolean(null===(t=window.trekkie)||void 0===t?void 0:t.ready)?n=Nn():(window.trekkie=window.trekkie||[],n=new Promise((e=>{window.trekkie.push(["ready",()=>{e(Nn())}])})));const o=yield n;return e.reduce(((e,t)=>{const n=o[t];return void 0!==n&&(e[t]=n),e}),{})}))}function Nn(){let e;const t=Promise.race([new Promise((t=>e=setTimeout((()=>t({})),1e4))),new Promise((e=>{var t,n,o;const i=(null===(n=null===(t=window.ShopifyAnalytics)||void 0===t?void 0:t.lib)||void 0===n?void 0:n.ready)||(null===(o=window.analytics)||void 0===o?void 0:o.ready);null==i||i((()=>{var t,n,o;const i=(null===(n=null===(t=window.ShopifyAnalytics)||void 0===t?void 0:t.lib)||void 0===n?void 0:n.trekkie)||(null===(o=window.analytics)||void 0===o?void 0:o.trekkie);e(i.defaultAttributes)}))}))]);return t.finally((()=>clearTimeout(e)))}var Dn,Rn,$n,Un;!function(e){e.UiImpression="shop_js_ui_impression/1.1",e.InstallmentsModalOpened="shop_pay_installments_dynamic_modal_impression/1.0",e.InstallmentsModalUserAction="shop_pay_installments_dynamic_modal_user_actions/1.0",e.InstallmentsBannerImpression="shop_pay_installments_banner_ui_impression/3.0",e.InstallmentsPrequalPopupPageImpression="shop_pay_installments_prequal_popup_page_impression/3.0",e.InstallmentsBannerPrequalInteraction="shop_pay_installments_banner_prequal_interaction/3.0",e.InstallmentsInvalidMetadata="shop_pay_installments_banner_invalid_metadata/1.0",e.ShopLoginFirstTimeRender="shop_js_ui_shop_login_first_time_render/1.0",e.ShopifyLoginWithShopSdkDiscountStatus="shopify_pay_login_with_shop_sdk_discount_status/2.0",e.LoginWithShopSdkPageImpression="shopify_pay_login_with_shop_sdk_page_impressions/3.3",e.LoginWithShopSdkUserAction="shopify_pay_login_with_shop_sdk_user_actions/2.2",e.LoginWithShopSdkErrorEvents="shopify_pay_login_with_shop_sdk_error_events/1.0",e.ShopifyPayModalStateChange="shopify_pay_modal_state_change/1.3",e.ShopifyPayPaymentPageUiInteraction="shopify_pay_payment_page_ui_interaction/1.1",e.LoginWithShopModalStateChange="shop_identity_modal_state_change/1.2",e.LoginWithShopFeatureInitialize="shopify_pay_login_with_shop_sdk_feature_initialize/1.0"}(Dn||(Dn={})),function(e){e.AuthorizeModal="AUTHORIZE_MODAL",e.ClassicCustomerAccount="CLASSIC_CUSTOMER_ACCOUNTS_ACCOUNT_PAGE",e.ClassicCustomerAccountCreateAccount="CLASSIC_CUSTOMER_ACCOUNTS_CREATE_ACCOUNT_PAGE",e.ClassicCustomerAccountLogin="CLASSIC_CUSTOMER_ACCOUNTS_LOGIN_PAGE",e.ComponentLoadedFollowing="COMPONENT_LOADED_FOLLOWING",e.ComponentLoadedNotFollowing="COMPONENT_LOADED_NOT_FOLLOWING",e.ContinueWithShop="CONTINUE_WITH_SHOP_PAGE",e.DiscountSaved="DISCOUNT_SAVE_CONFIRMATION_PAGE",e.DiscountShown="DISCOUNT_SHOWN",e.FollowButtonShownInViewport="FOLLOW_BUTTON_SHOWN_IN_VIEWPORT",e.FollowingGetShopAppCta="FOLLOWING_GET_SHOP_APP_CTA",e.PartnerEmailInputShown="PARTNER_EMAIL_INPUT_SHOWN",e.PhoneConsent="TEXT_MARKETING_SIGN_UP",e.PhoneConsentConfirmed="TEXT_MARKETING_CONFIRMED_PAGE",e.PhoneConsentDeclined="TEXT_MARKETING_DECLINED_PAGE",e.SdkLoaded="SDK_HAS_LOADED_INITIAL_PAGE",e.SignInWithShopButton="SIGN_IN_WITH_SHOP_BUTTON"}(Rn||(Rn={})),function(e){e.CreateAccountLinkClicked="CREATE_ACCOUNT_CLICK",e.EmailEntered="EMAIL_ENTERED",e.FollowOnShopClicked="FOLLOW_ON_SHOP_CLICKED",e.FollowingGetShopAppClick="FOLLOWING_GET_SHOP_APP_CLICK",e.PasswordManagerAutofillDetected="PASSWORD_MANAGER_AUTOFILL_DETECTED",e.PhoneConsentDeclined="DO_NOT_SHARE_PHONE_CLICK",e.PhoneConsentProvided="SHARE_PHONE_CLICK",e.SignInWithShopClicked="SIGN_IN_WITH_SHOP_BUTTON_CLICK",e.ThirdPartyFormSubmission="3RD_PARTY_EMAIL_CAPTURE_FORM_SUBMISSION_CLICK"}($n||($n={})),function(e){e.Loaded="loaded",e.Shown="shown",e.Hidden="hidden"}(Un||(Un={}));const Vn={errorParsingCreatedAtMs:"Error parsing: X-Monorail-Edge-Event-Created-At-Ms",emptyeEventCreatedAtMs:"event_created_at_ms metadata field cannot be empty",noPermissionToGetURL:"Your client does not have permission to get URL",noResponseFromEdge:"No response from edge",incorrectContentType:"Incorrect Content-Type. Expected: application/json or text/plain",blockedRequest:"Blocked Request",failedToReadRequestBody:"Failed to read request body",methodNotAllowed:"Method Not Allowed",schemaValidationError:"Schema validation error"};const jn=ye.createHttpProducer({production:!0});let Hn=class{constructor({elementName:e,analyticsTraceId:t,flow:n="",flowVersion:o="unspecified",shopId:i,shopPermanentDomain:s,checkoutVersion:a,checkoutToken:r}){var l;this._shopPermanentDomain="",this._impressionTracked=!1,this._shopLoginFirstTimeRenderTracked={},this._pageImpressionTracked={AUTHORIZE_MODAL:!1,CLASSIC_CUSTOMER_ACCOUNTS_ACCOUNT_PAGE:!1,CLASSIC_CUSTOMER_ACCOUNTS_CREATE_ACCOUNT_PAGE:!1,CLASSIC_CUSTOMER_ACCOUNTS_LOGIN_PAGE:!1,COMPONENT_LOADED_FOLLOWING:!1,COMPONENT_LOADED_NOT_FOLLOWING:!1,CONTINUE_WITH_SHOP_PAGE:!1,DISCOUNT_SAVE_CONFIRMATION_PAGE:!1,DISCOUNT_SHOWN:!1,FOLLOWING_GET_SHOP_APP_CTA:!1,FOLLOW_BUTTON_SHOWN_IN_VIEWPORT:!1,PARTNER_EMAIL_INPUT_SHOWN:!1,SDK_HAS_LOADED_INITIAL_PAGE:!1,SIGN_IN_WITH_SHOP_BUTTON:!1,TEXT_MARKETING_SIGN_UP:!1,TEXT_MARKETING_CONFIRMED_PAGE:!1,TEXT_MARKETING_DECLINED_PAGE:!1},this._elementName=e,this._flow=n,this._analyticsTraceId=t,this._initTimestamp=(new Date).getTime(),this._flowVersion=o,this._checkoutVersion=a,this._checkoutToken=r,this._shopId=i,this._shopPermanentDomain=s||(null===(l=window.Shopify)||void 0===l?void 0:l.shop)||""}get analyticsTraceId(){return this._analyticsTraceId}trackElementImpression(e){return Y(this,void 0,void 0,(function*(){if(this._impressionTracked)return;this._impressionTracked=!0;const t=yield Pn("uniqToken","visitToken","microSessionId","microSessionCount","shopId","themeId","themeCityHash","contentLanguage","referer"),n=Object.assign(Object.assign({},t),{elementType:e,elementName:this._elementName,shopJsVersion:k});Fn({schemaId:Dn.UiImpression,payload:n},t,(()=>{this._impressionTracked=!1}))}))}trackPageImpression(e){return Y(this,arguments,void 0,(function*({shopAccountUuid:e,apiKey:t,page:n}){var o;if(this._pageImpressionTracked[n])return;this._pageImpressionTracked[n]=!0;const i=yield Pn("uniqToken","visitToken","isPersistentCookie","path","customerId"),s=st(),a=null!==(o=null==s?void 0:s.pageType)&&void 0!==o?o:"",r=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i),{analyticsTraceId:this._analyticsTraceId,flow:this._flow,flowVersion:this._flowVersion,pageName:n,sdkVersion:k,shopPermanentDomain:this._shopPermanentDomain,storefrontPageType:a}),t&&{apiKey:t}),e&&{shopAccountUuid:e}),this._checkoutToken&&{checkoutToken:this._checkoutToken});Fn({schemaId:Dn.LoginWithShopSdkPageImpression,payload:r},i,(()=>{this._pageImpressionTracked[n]=!1}))}))}trackShopLoginFirstTimeRender(){return Y(this,arguments,void 0,(function*(e=this._flowVersion,t=this._initTimestamp){if(this._shopLoginFirstTimeRenderTracked[e])return;this._shopLoginFirstTimeRenderTracked[e]=!0;const n=(new Date).getTime()-t,o=yield Pn("shopId"),i=Object.assign(Object.assign({analyticsTraceId:this._analyticsTraceId,duration:n},o),{shopLoginVersion:e,url:window.location.href,userAgent:navigator.userAgent});Fn({schemaId:Dn.ShopLoginFirstTimeRender,payload:i},o,(()=>{this._shopLoginFirstTimeRenderTracked[e]=!1}))}))}trackShopPayLoginWithShopSdkUserAction({apiKey:e,userAction:t}){const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e&&{apiKey:e}),{flow:this._flow,flowVersion:this._flowVersion,sdkVersion:k,analyticsTraceId:this._analyticsTraceId}),this._checkoutVersion&&{checkoutVersion:this._checkoutVersion}),this._shopId&&{shopId:this._shopId}),{shopPermanentDomain:this._shopPermanentDomain,userAction:t});Fn({schemaId:Dn.LoginWithShopSdkUserAction,payload:n})}trackShopPayLoginWithSdkErrorEvents({apiKey:e,errorCode:t,errorMessage:n}){const o={apiKey:e,flow:this._flow,flowVersion:this._flowVersion,sdkVersion:k,analyticsTraceId:this._analyticsTraceId,shopPermanentDomain:this._shopPermanentDomain,errorCode:t,errorMessage:n};Fn({schemaId:Dn.LoginWithShopSdkErrorEvents,payload:o})}trackShopPayModalStateChange({currentState:e}){if(this._checkoutToken){const t={checkoutToken:this._checkoutToken,checkoutVersion:this._checkoutVersion,shopId:this._shopId,shopifyDomain:this._shopPermanentDomain,previousState:"",currentState:e,analyticsTraceId:this._analyticsTraceId,clientTimestampMs:(new Date).getTime()};Fn({schemaId:Dn.ShopifyPayModalStateChange,payload:t})}this._flow&&this._flowVersion&&Fn({schemaId:Dn.LoginWithShopModalStateChange,payload:{currentState:e,flow:this._flow,flowVersion:this._flowVersion,analyticsTraceId:this._analyticsTraceId}})}trackFeatureInitialization(e){return Y(this,arguments,void 0,(function*({apiKey:e,source:t}){var n;const o=yield Pn("uniqToken","visitToken","isPersistentCookie","path","customerId"),i=st(),s=null!==(n=null==i?void 0:i.pageType)&&void 0!==n?n:"",a=Object.assign(Object.assign(Object.assign(Object.assign({},o),{analyticsTraceId:this._analyticsTraceId,flow:this._flow,flowVersion:this._flowVersion,sdkVersion:k,shopPermanentDomain:this._shopPermanentDomain,source:t,storefrontPageType:s}),e&&{apiKey:e}),this._checkoutToken&&{checkoutToken:this._checkoutToken});Fn({schemaId:Dn.LoginWithShopFeatureInitialize,payload:a},o)}))}};function Fn(e,t,n){!t||Object.keys(t).length?(e.payload=Object.assign(e.payload,t),jn.produce(e).catch((e=>{if(null==n||n(e),function(e){var t;return!(e instanceof me||(null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.includes("Invalid agent:")))}(e)){const t=e instanceof Error?e:new Ln(String(e)),n=function(e){const t=Object.entries(Vn).find((([t,n])=>e.message.includes(n)));return(null==t?void 0:t[0])||"otherErrors"}(t);H.notify(t),xe(we.MonorailProducerError,1,{error:n})}}))):null==n||n({message:"trekkie attributes are empty"})}var Bn,zn;class Wn{constructor(e,t){Bn.set(this,void 0),zn.set(this,void 0),e&&(J(this,Bn,e,"f"),J(this,zn,(e=>{t(e.target.value)}),"f"),X(this,Bn,"f").addEventListener("input",X(this,zn,"f")))}destroy(){X(this,Bn,"f")&&X(this,zn,"f")&&X(this,Bn,"f").removeEventListener("input",X(this,zn,"f"))}}function qn(e){console.error(`[shop-js] ${e}`),H.notify(new Error(e))}function Gn(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}Bn=new WeakMap,zn=new WeakMap;class Kn{constructor(e){this._source=e}isSourceOf(e){return e.source===this._source.contentWindow}}class Zn{constructor(e){this._source=e}isSourceOf(e){return e.source===this._source}}class Yn{constructor(e,t,n,o=window){this._subscribers=new Set,this._eventSource=e,this._subscribers.add(n),this._eventListener=e=>{this._eventSource&&this._eventSource.isSourceOf(e)&&(t.some((t=>function(e,t){try{const n=new URL(e).host.split(".").reverse(),o=new URL(t).host.split(".").reverse();for(let e=0;e{const s=()=>{i(new Mn("Abort signal received"))};(null==t?void 0:t.aborted)&&s(),n=n=>{n.type===e&&(null==t||t.removeEventListener("abort",s),o(n))},this._subscribers.add(n),null==t||t.addEventListener("abort",s)})).finally((()=>{this._subscribers.delete(n)}))}_notify(e){this._subscribers.forEach((t=>t(e)))}}const Xn="https://shop.app",Jn="https://pay.shopify.com",Qn="https://shop.app";var eo,to,no,oo,io,so,ao,ro,lo,co,uo,ho,po,mo,fo;function go(e){let t;try{const n=new URL(e);"localhost"!==n.hostname&&"127.0.0.1"!==n.hostname||"https:"===n.protocol?"https:"!==n.protocol?t=eo.NotUsingHttps:"/"!==n.pathname?t=eo.HasPath:n.hash?t=eo.HasHash:n.search&&(t=eo.HasSearch):t=eo.UsingLocalhost}catch(e){t=eo.InvalidUrl}finally{t&&(console.error(`[shop-js] Invalid storefront origin: ${e}`),xe(we.InvalidStorefrontOrigin,1,{error:t}))}return void 0===t}!function(e){e.UsingLocalhost="using_localhost",e.NotUsingHttps="not_using_https",e.HasPath="has_path",e.HasHash="has_hash",e.HasSearch="has_search",e.InvalidUrl="invalid_url"}(eo||(eo={}));class _o{static getDefaultLanguage(){return"en"}constructor(e){to.add(this),oo.set(this,void 0),io.set(this,"en"),J(this,oo,e,"f")}get locale(){return X(this,io,"f")}set locale(e){no.allowedLocales.includes(e)&&J(this,io,e,"f")}translate(e,t={}){const n=e.split(".");let o=X(this,oo,"f")[X(this,io,"f")];try{for(const e of n)switch(typeof o){case"object":o=o[e];break;case"string":case"undefined":throw new ReferenceError}if(void 0===o)throw new ReferenceError;return X(this,to,"m",so).call(this,o,t)&&(o=o[X(this,to,"m",ao).call(this,o,t.count)]),X(this,to,"m",ro).call(this,o,t)}catch(n){return t.defaultValue?t.defaultValue:e}}isEnglish(){return"en"===X(this,io,"f")}}no=_o,oo=new WeakMap,io=new WeakMap,to=new WeakSet,so=function(e,t={}){return"string"!=typeof e&&"undefined"!==t.count},ao=function(e,t){let n=1===t?"one":"other";return 0===t&&"string"!=typeof e&&"undefined"!==e.zero&&(n="zero"),n},ro=function(e,t={}){const n=e.match(/\{.+?\}/g);return n?n.reduce(((n,o)=>{const i=o.replace(/\{(.*)\}/,"$1");return t[i]?n.replace(o,t[i]):(H.notify(new Error(`i18n: Missing translation key '${i}' for '${e}'`)),n)}),e):e},_o.allowedLocales=["en","bg-BG","cs","da","de","el","es","fi","fr","hi","hr-HR","hu","id","it","ja","ko","lt-LT","ms","nb","nl","pl","pt-BR","pt-PT","ro-RO","ru","sk-SK","sl-SI","sv","th","tr","vi","zh-CN","zh-TW"],function(e){e.Source="src",e.Initial="initial"}(lo||(lo={})),function(e){e.Email="email",e.Phone="phone",e.PhoneOwnershipVerified="phone_ownership_verified"}(co||(co={})),function(e){e.Follow="follow",e.Default="default",e.Custom="custom",e.Prequal="prequal",e.PopUp="pop_up",e.CheckoutSheet="checkout_sheet"}(uo||(uo={})),function(e){e.Start="start",e.SignUp="signup",e.Verify="verify",e.Captcha="captcha",e.OneClick="one-click"}(ho||(ho={})),function(e){e.ApiUnavailable="api_unavailable",e.InvalidApiKey="invalid_api_key",e.ServerError="server_error",e.UserBlocked="user_blocked",e.NoDiscountReceived="no_discount_received",e.InvalidAnalyticsContext="invalid_analytics_context",e.InstallmentsIneligible="installments_ineligible",e.CaptchaChallenge="captcha_challenge"}(po||(po={})),function(e){e.Init="init",e.Restart="restart",e.UserMatched="user_matched",e.UserNotMatched="user_not_matched",e.VerificationStepChanged="verification_step_changed",e.CustomizationValidityChanged="customization_validity_changed",e.PopUpOpened="pop_up_opened"}(mo||(mo={})),function(e){e.Start="start",e.SignUp="signup",e.EmailVerification="email_verification",e.PhoneVerification="phone_verification",e.WebAuthnVerification="webauthn_verification",e.PopUpOpened="pop_up_opened",e.OneClick="one_click",e.PersonalizeConsent="personalize_consent"}(fo||(fo={}));const yo="setheight";var bo,vo,wo,Co,So,ko,To,Eo,xo;!function(e){e.Interest="interest",e.SplitPay="split_pay",e.ZeroPercent="zero_percent"}(bo||(bo={})),function(e){e.Cart="cart",e.Product="product",e.Checkout="checkout"}(vo||(vo={})),function(e){e.IntroPageLoaded="prequal_intro_page_loaded",e.AuthorizeLoaded="prequal_authorize_loaded",e.BuyerFormOverlayLoaded="prequal_buyer_form_overlay_loaded",e.ResultsPageLoading="prequal_results_page_loading",e.ResultsPageLoaded="prequal_results_page_loaded",e.ContinueToCheckoutClicked="prequal_continue_to_checkout_clicked"}(wo||(wo={})),function(e){e.PayInFour="pay_in_4",e.AsLowAs="as_low_as",e.PayInFourAsLowAs="pay_in_4_or_as_low_as"}(Co||(Co={})),function(e){e.Standard="standard",e.CustomizedByMerchant="customized_by_merchant"}(So||(So={})),function(e){e.SplitPay="split_pay",e.ZeroInterest="zero_interest",e.InterestOnly="interest_only",e.ZeroInterestOnly="zero_interest_only",e.Adaptive="adaptive",e.Ineligible="ineligible"}(ko||(ko={})),function(e){e.Close="close",e.ContinueToCheckout="continue_to_checkout",e.CloseAuth="close_auth_modal"}(To||(To={})),function(e){e.SplitPay="split_pay",e.Monthly="monthly"}(Eo||(Eo={})),function(e){e.SignIn="sign_in",e.SignUp="sign_up"}(xo||(xo={}));class Ao extends HTMLElement{constructor(){super()}updateAttribute(e,t){this.getAttribute(e)!==t&&(t?this.setAttribute(e,t):this.removeAttribute(e))}getBooleanAttribute(e){const t=this.getAttribute(e);return null!=t}dispatchCustomEvent(e,t){const n=new CustomEvent(e,{bubbles:"error"!==e,cancelable:!1,composed:!0,detail:t});this.dispatchEvent(n)}}class Oo extends Ao{constructor(){super(...arguments),this._shopHub=On.getInstance(),this._publisherId=Fe()}subscribeToHub(e,t){this._shopHub.subscribe(e,this._publisherId,t)}unsubscribeAllFromHub(){this._shopHub.unsubscribeAll(this._publisherId)}unsubscribeFromHub(e){this._shopHub.unsubscribe(e,this._publisherId)}publishToHub(e,t){this._shopHub.publish(e,this._publisherId,t),e===An.UserSessionCreate&&(this.dispatchCustomEvent(An.UserSessionCreate,t),this._dispatchStorefrontSignInCompleted(t))}_dispatchStorefrontSignInCompleted(e){const{avatar:t,initial:n}=e,o=document.createElement("shop-user-avatar");o.setAttribute(lo.Source,t||""),o.setAttribute(lo.Initial,n),this.dispatchCustomEvent("storefront:signincompleted",{avatar:o})}}class Lo{constructor(e,t){this._eventDestination=e,this._eventOrigins=t}postMessage(e){const t=this._eventDestination instanceof HTMLIFrameElement?this._eventDestination.contentWindow:this._eventDestination;this._eventOrigins.forEach((n=>{null==t||t.postMessage(e,n)}))}set eventDestination(e){e&&this._eventDestination!==e&&(this._eventDestination=e)}}class Mo extends Lo{constructor(e){super(e,[Xn,Jn])}}const Io=1e4,Po={temporarilyUnavailable:{code:"temporarily_unavailable",message:"Shop login is temporarily unavailable"}},No="client-id",Do="version",Ro="action",$o="storefront-origin",Uo="keep-modal-open",Vo="email-verification-required",jo="hide-button",Ho="disable-sign-up",Fo="redirect-uri",Bo="ux-mode",zo="redirect-type",Wo="auto-open",qo="analytics-context",Go="analytics-trace-id",Ko="compact",Zo="defer-modal-on-autofill",Yo="position-variant",Xo="response-type",Jo="response-mode",Qo="code-challenge",ei="code-challenge-method",ti="state",ni="scope",oi="avoid-pay-alt-domain",ii="avoid-sdk-session",si="flow",ai="flow-version",ri="email",li="anchor-to",ci="dev-mode",di="modal-title",ui="modal-description",hi="modal-logo-src",pi="api-key",mi="pop-up-name",fi="pop-up-features",gi="modal-brand",_i="consent-challenge",yi="checkout-redirect-url",bi="checkout-version",vi="shop-id",wi="require-verification",Ci="first-name",Si="last-name",ki="checkout-token",Ti="transaction-params",Ei="shop-permanent-domain",xi="source",Ai=448,Oi="\n bottom: 0;\n top: auto !important;\n left: 0 !important;\n right: 0 !important;\n border-radius: 32px 32px 0 0;\n",Li=`\n\n\n
\n \n \n \n
\n`,Mi="",Ii=(e,t)=>`${t}`,Pi=(e,t,n)=>`\n\n
\n
\n
${e}
\n
\n ${n}\n
\n \n
\n`;class Ni extends Hn{constructor({elementName:e,analyticsTraceId:t}){super({elementName:e,analyticsTraceId:t,flow:"follow"})}trackFollowButtonPageImpression(e){this.trackPageImpression({page:e?Rn.ComponentLoadedFollowing:Rn.ComponentLoadedNotFollowing})}trackFollowButtonInViewport(){this.trackPageImpression({page:Rn.FollowButtonShownInViewport})}trackFollowingGetAppButtonPageImpression(){this.trackPageImpression({page:Rn.FollowingGetShopAppCta})}trackFollowButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:$n.FollowOnShopClicked})}trackFollowingGetAppButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:$n.FollowingGetShopAppClick})}}class Di extends Hn{constructor({elementName:e,analyticsTraceId:t,analyticsContext:n=i.Default,flowVersion:o="unspecified",checkoutVersion:s,checkoutToken:a,shopId:l,shopPermanentDomain:c}){super({elementName:e,analyticsTraceId:t,flow:r[n],flowVersion:o,checkoutVersion:s,checkoutToken:a,shopId:l,shopPermanentDomain:c}),this._emailEnteredUserActionTracked=!1,this._passwordManagerAutofillDetected=!1}trackLoginDefaultButtonClicked(){this.trackShopPayLoginWithShopSdkUserAction({userAction:$n.SignInWithShopClicked})}trackEmailEnteredAction(){this._emailEnteredUserActionTracked||(this._emailEnteredUserActionTracked=!0,this.trackShopPayLoginWithShopSdkUserAction({userAction:$n.EmailEntered}))}trackPasswordManagerAutofillDetected(){this._passwordManagerAutofillDetected||(this._passwordManagerAutofillDetected=!0,this.trackShopPayLoginWithShopSdkUserAction({userAction:$n.PasswordManagerAutofillDetected}))}}class Ri extends Di{constructor({elementName:e,flowVersion:t,analyticsTraceId:n}){super({elementName:e,analyticsTraceId:n,analyticsContext:i.ClassicCustomerAccounts,flowVersion:t})}trackClassicCustomerAccountsLoginPageImpression(){this.trackPageImpression({page:Rn.ClassicCustomerAccountLogin})}trackClassicCustomerAccountsCreateAccountPageImpression(){this.trackPageImpression({page:Rn.ClassicCustomerAccountCreateAccount})}trackClassicCustomerAccountsAccountPageImpression(){this.trackPageImpression({page:Rn.ClassicCustomerAccount})}trackClassicCustomerAccountsContinueWithShopPageImpression(){this.trackPageImpression({page:Rn.ContinueWithShop})}trackClassicCustomerAccountsCreateAccountAction(){this.trackShopPayLoginWithShopSdkUserAction({userAction:$n.CreateAccountLinkClicked})}}function $i(e,t){return void 0===t?null:{[e]:t?"true":"false"}}const Ui=window.location.origin,Vi=()=>Ui,ji=({version:e,apiKey:t,analyticsTraceId:n,analyticsContext:o,isCompactLayout:i,isFullView:s,flow:a,flowVersion:r,emailVerificationRequired:l,signUpEnabled:c,oauthParams:d,avoidPayAltDomain:u,avoidSdkSession:h,hideCopy:p,modalCustomized:m,popupWindowParams:f,consentChallenge:g,checkoutRedirectUrl:_,checkoutVersion:y,checkoutToken:b,transactionParams:v,shopId:w,requireVerification:C,uxMode:S})=>"1"===e||"redirect"===S?function(e){return Boolean(void 0!==e&&"clientId"in e&&(null==e?void 0:e.clientId))}(d)?(({oauthParams:e,analyticsTraceId:t,analyticsContext:n,isCompactLayout:o,isFullView:i,flow:s,flowVersion:a,emailVerificationRequired:r,signUpEnabled:l,avoidPayAltDomain:c,hideCopy:d,modalCustomized:u,apiKey:h,popupWindowParams:p,consentChallenge:m,checkoutVersion:f,checkoutToken:g,transactionParams:_,shopId:y,requireVerification:b,uxMode:v})=>{const{clientId:w,redirectType:C}=e,S=e.scope||"openid email profile",k=e.responseType||"id_token",T=e.responseMode||"web_message",E=e.redirectUri||window.location.origin,{popUpName:x,popUpFeatures:A}=p||{},O="redirect"!==v&&d,L=new URLSearchParams(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({target_origin:window.location.origin,response_mode:T,response_type:k,scope:S,version:"1",client_id:w},C&&{redirect_type:C}),{redirect_uri:E,locale:"en"}),t&&{analytics_trace_id:t}),n&&{analytics_context:n}),$i("compact_layout",o)),h&&{apiKey:h}),s&&{flow:s}),a&&{flow_version:a}),e.codeChallenge&&{code_challenge:e.codeChallenge}),e.codeChallengeMethod&&{code_challenge_method:e.codeChallengeMethod}),e.state&&{state:e.state}),f&&{checkout_version:f}),g&&{checkout_token:g}),_&&{transaction_params:_}),y&&{shop_id:y}),$i("full_view",i)),$i("email_verification_required",r)),$i("sign_up_enabled",l)),$i("hide_copy",O)),$i("customize-modal",u)),$i("consent_challenge",m)),$i("require_verification",b)),"pop_up"===C?{pop_up_name:x,pop_up_features:A}:{}));return`${Xn}${c?"/pay/sdk-authorize":"/pay/sdk-session"}?${L}`})({popupWindowParams:f,oauthParams:d,analyticsTraceId:n,analyticsContext:o,isCompactLayout:i,isFullView:s,flow:a,flowVersion:r,emailVerificationRequired:l,signUpEnabled:c,avoidPayAltDomain:u,hideCopy:p,modalCustomized:m,apiKey:t,consentChallenge:g,checkoutVersion:y,checkoutToken:b,transactionParams:v,shopId:w,requireVerification:C,uxMode:S}):"":(({analyticsTraceId:e,analyticsContext:t,isCompactLayout:n,isFullView:o,flow:i,flowVersion:s,emailVerificationRequired:a,signUpEnabled:r,avoidSdkSession:l,hideCopy:c,modalCustomized:d,apiKey:u,consentChallenge:h,checkoutRedirectUrl:p,checkoutVersion:m,checkoutToken:f,transactionParams:g,shopId:_,requireVerification:y,oauthParams:b})=>{const v=new URLSearchParams(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({target_origin:window.location.origin,api_key:null!=u?u:"123",locale:"en"},e&&{analytics_trace_id:e}),t&&{analytics_context:t}),$i("compact_layout",n)),i&&{flow:i}),s&&{flow_version:s}),p&&{checkout_redirect_url:p}),m&&{checkout_version:m}),f&&{checkout_token:f}),g&&{transaction_params:g}),_&&{shop_id:_}),$i("full_view",o)),$i("email_verification_required",a)),$i("sign_up_enabled",r)),$i("avoid_sdk_session",l)),$i("hide_copy",c)),$i("customize-modal",d)),$i("consent_challenge",h)),$i("require_verification",y)),(null==b?void 0:b.responseType)&&{response_type:b.responseType}),(null==b?void 0:b.redirectType)&&{redirect_type:b.redirectType}));return`${Ui}/services/login_with_shop/authorize?${v}`})({analyticsTraceId:n,analyticsContext:o,isCompactLayout:i,isFullView:s,flow:a,flowVersion:r,emailVerificationRequired:l,signUpEnabled:c,avoidSdkSession:h,hideCopy:p,modalCustomized:m,apiKey:t,consentChallenge:g,checkoutRedirectUrl:_,checkoutVersion:y,checkoutToken:b,transactionParams:v,shopId:w,requireVerification:C,oauthParams:d});const Hi={brand:"#5a31f4",white:"#fff",black:"#000",warning:"#d02e11",close:"#707070",foregroundSecondary:"#3F454D",backgroundSubdued:"#F2F3F5",backgroundError:"#FFECE9",backgroundFaint:"#F2F4F5",error:"#D02E11"};function Fi(e){let t=0,n=0,o=0;return 4===e.length?(t=Number(`0x${e[1]}${e[1]}`),n=Number(`0x${e[2]}${e[2]}`),o=Number(`0x${e[3]}${e[3]}`)):7===e.length&&(t=Number(`0x${e[1]}${e[2]}`),n=Number(`0x${e[3]}${e[4]}`),o=Number(`0x${e[5]}${e[6]}`)),[t,n,o]}function Bi(e){const t=e.match(/\d+/g)||[],[n=0,o=0,i=0]=t.map((e=>Number(e)));return[n,o,i]}function zi(e){const t=[90,49,244],n=[255,255,255];let o=[255,255,255];return e.startsWith("#")?o=Fi(e):e.startsWith("rgb(")&&(o=Bi(e)),Gi(o,t)>Gi(o,n)?t:n}function Wi(e,t){return Gi(e.startsWith("#")?Fi(e):Bi(e),t.startsWith("#")?Fi(t):Bi(t))}function qi(e,t,n){const o=[e,t,n].map((function(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}));return.2126*o[0]+.7152*o[1]+.0722*o[2]}function Gi(e,t){const n=qi(e[0],e[1],e[2]),o=qi(t[0],t[1],t[2]);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function Ki(e){var t;const n=null===(t=window.getComputedStyle(e).getPropertyValue("--color-background"))||void 0===t?void 0:t.trim();if(n)return n;for(const t of function*(e){let t=e;for(;t;){if(t.parentElement)t=t.parentElement;else if(t instanceof ShadowRoot)t=t.host;else{if(!(t instanceof Element))break;{const e=t.getRootNode();if(!(e instanceof ShadowRoot))break;t=e.host}}if(yield t,t===document.body)break}}(e)){const e=window.getComputedStyle(t).getPropertyValue("background-color");if(e&&"rgba(0, 0, 0, 0)"!==e)return e}return"#ffffff"}class Zi extends HTMLElement{constructor(){super();const e=document.createElement("template"),t=this.getAttribute("size")||"",n=this.getAttribute("background-color")||"#FFF";e.innerHTML=function(e,t){const n="large"===e?"shop-pay-logo-large":"shop-pay-logo",[o,i,s]=zi(t),a=`rgb(${o}, ${i}, ${s})`;return`\n \n \n `}(t,n),this.attachShadow({mode:"open"}).appendChild(e.content.cloneNode(!0))}}var Yi,Xi,Ji,Qi;class es extends HTMLElement{constructor(){super(),Yi.set(this,void 0),J(this,Yi,this.attachShadow({mode:"open"}),"f")}connectedCallback(){const e=document.createElement("template"),t=this.getAttribute("size")||"",n=this.getAttribute("color")||"",o=this.getAttribute("label")||"";e.innerHTML=function(e,t="brand",n){return`\n \n \n ${n}\n