document.widgetServerBaseUrl = "https://widget.sezzle.com";
document.SezzleDynamicModalURL =  "https://dynamic-modal.sezzle.com";
document.sezzleButtonVersion = "sezzle-widget.js";
document.sezzleCssVersionOverride = "sezzle-styles-global.css";
document.sezzleDefaultModalVersion = "sezzle-modal.html";
document.sezzleModalAvailableLanguages = "en,fr,es";

document.isSezzlePayIn5 = true;

// Sezzle's merchant widget config override
document.sezzleConfig = {
"configGroups": [{
"targetXPath": "#price/.price/.money",
"urlMatch": "product"
},{
"targetXPath": ".a-right/STRONG-0/.price/.money",
"renderToPath": "../../../../../..",
"urlMatch": "cart"
}]
}

if (document.sezzleConfig){
   document.sezzleConfig.merchantID = 'dfeb9f62-01c7-4425-bd0d-a904b7ef2f1a';

   // Sezzle's merchant payment settings override

   // Sezzle's merchant local config override
   try {document.sezzleConfig = Object.assign(document.localSezzleConfig, document.sezzleConfig); } catch(e) {}
 }
(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`.sezzle-shopify-info-button{background:0 0;border:none;margin:0;padding:0;display:block;overflow:hidden}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper{box-sizing:border-box;width:100%;color:inherit;background:0 0;border:none;padding:0;display:block}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper:focus{outline:5px auto}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-left{text-align:left;float:left}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-center{text-align:center;float:none}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper.sezzle-right{text-align:right;float:right}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text{width:unset;vertical-align:baseline;word-wrap:normal;color:inherit;background:0 0;border:0;margin:auto;padding:0;font-family:inherit;font-size:14px;font-weight:500;line-height:18px}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-left{text-align:left;margin:0}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-center{text-align:center}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text.sezzle-right{float:right;text-align:right}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text sup{vertical-align:super;font-size:.5em}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-payment-amount{zoom:1;float:none;vertical-align:baseline;background:0 0;border:0;margin:0;padding:0;font-size:1.2em;font-weight:900}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-logo{box-sizing:border-box;opacity:1;float:none;vertical-align:baseline;background:0 0;border:0;width:auto;height:18px;margin:0 0 -5px;padding:0;display:inline-block}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-info-icon{width:auto;box-shadow:none;vertical-align:baseline;line-height:initial;font-size:inherit;color:inherit;cursor:pointer;background:0 0;border:none;margin:0;padding:0 0 0 3px;display:contents;position:absolute}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-info-link{cursor:pointer;background:0 0;border:none;padding:0;text-decoration:underline;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-giveaway-timer,.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-giveaway-award{font-weight:700}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-ap-logo{vertical-align:middle;border:0;height:45px;margin:-5px;padding:0;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text button.ap-modal-info-link{width:auto;box-shadow:none;vertical-align:middle;line-height:inherit;font-size:inherit;color:inherit;cursor:pointer;background:0 0;border:none;margin:0;padding:0;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-klarna-logo{vertical-align:middle;border:0;height:25px;margin:0;padding:0;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text button.klarna-modal-info-link{width:auto;box-shadow:none;vertical-align:middle;line-height:inherit;font-size:inherit;color:inherit;cursor:pointer;background:0 0;border:none;margin:0;padding:0;display:inline}.sezzle-hidden{visibility:hidden;display:none}.sezzle-checkout-modal-lightbox{z-index:99999998;width:100vw;height:100vh;color:unset;background-color:#051f3491;display:none;position:fixed;top:0;left:0;overflow:hidden auto}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
(function(){var Bt=Object.create,nt=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,jt=Object.getOwnPropertyNames,Rt=Object.getPrototypeOf,Yt=Object.prototype.hasOwnProperty,Le=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Xt=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=jt(t),c=0,o=a.length,u;c<o;c++)u=a[c],!Yt.call(e,u)&&u!==n&&nt(e,u,{get:(p=>t[p]).bind(null,u),enumerable:!(i=Ht(t,u))||i.enumerable});return e},qe=(e,t,n)=>(n=e!=null?Bt(Rt(e)):{},Xt(t||!e||!e.__esModule?nt(n,"default",{value:e,enumerable:!0}):n,e)),Kt=document.widgetServerBaseUrl?`${document.widgetServerBaseUrl}/v1/event/log`:"http://widget.sezzle.com/v1/event/log",Vt="sezzle-shopify-info-button",B=class{static httpRequestWrapper(e,t,n=null){return new Promise((i,a)=>{const c=new XMLHttpRequest;c.open(e,t,!0),n!==null&&c.setRequestHeader("Content-Type","application/json"),c.onload=function(){this.status>=200&&this.status<300?i(c.response):a(new Error(`An error occurred when calling ${t}. Status code: ${this.status} Response text: ${c.responseText}`))},c.onerror=function(o){let u="";o instanceof ErrorEvent?u=`An error occurred when calling ${t}. Error message: ${o.message} Filename: ${o.filename} Line#: ${o.lineno}`:u=`An error occurred when calling ${t}. Error type: ${o.type}`,a(new Error(u))},n===null?c.send():c.send(JSON.stringify(n))})}static getCookie(e){let t;try{t=`${document.cookie}`}catch{return}if(!t)return;const n=t.split(`${e}=`);if(n.length===2)return n.pop().split(";").shift()}static isWidgetDuplicateFound(){return document.querySelectorAll(`.${Vt}:not([style*='display: none'])`).length>1}static sendEvents(e){this.httpRequestWrapper("post",Kt,e)}static breakXPath(e){return e.split("/").filter(t=>t!=="")}static getWidgetBaseUrl(){return document.widgetServerBaseUrl||"https://widget.sezzle.com"}static getDynamicModalURL(){return document.SezzleDynamicModalURL||"https://dynamic-modal.sezzle.com"}static predictBackgroundTheme(){let e=window.getComputedStyle(document.body).getPropertyValue("background-color");if(e==="transparent"||e==="rgba(0, 0, 0, 0)")return"light";let t,n,i;e.match(/^rgb/)?(e=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/),t=e[1],n=e[2],i=e[3]):(e=+`0x${e.slice(1).replace(e.length<5&&/./g,"$&$&")}`,t=e>>16,n=e>>8&255,i=e&255);const a=t*.2126+n*.7152+i*.0722,c=(Math.max(t,n,i)+Math.min(t,n,i))/2;return Math.sqrt(.299*(t*t)+.587*(n*n)+.114*(i*i))<=180&&a<=180&&c<=180?"dark":"light"}static matchAll(e,t){let n;const i=[];for(;n=e.exec(t);)i.push(n[0]);return i}static waitForBodyToBeReady(){return new Promise(e=>{document.body&&e();const t=new MutationObserver(()=>{document.body&&(t.disconnect(),e())});t.observe(document.documentElement,{childList:!0})})}};function Jt(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ee(e,t){Jt(e,t),t.add(e)}function d(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var te=new WeakSet,Zt=class{constructor(e,t,n){ee(this,te),this.basicWidgetConfig=e,this.propsNotInConfigGroup=["merchantID","minPrice","maxPrice","apModalHTML","klarnaModalHTML","language","apDualInstall","klarnaDualInstall","isLongTermOnly"],this.widgetConfig={config:null,configGroups:null,merchantID:null,minPrice:null,maxPrice:null,apModalHTML:null,klarnaModalHTML:null,fingerprint:null,apDualInstall:null,klarnaDualInstall:null,isLongTermOnly:null,mutationObserverConfig:{attributes:!0,childList:!0,characterData:!0},apiEndpoints:{dynamicModalURL:B.getDynamicModalURL(),sezzleAssetsCDN:"https://media.sezzle.com/shopify-app/assets/",cssForMerchantURL:`${B.getWidgetBaseUrl()}/v1/css/price-widget?uuid=${e.merchantID}`},observeElements:null},this.widgetEventLogger=n,d(te,this,Gt).call(this),this.language=t,this.language.setLanguage(this.widgetConfig.config.language)}get getSezzleConfig(){return this.widgetConfig}async setAPModalHTML(){if(!this.widgetConfig.apDualInstall)return;const e=`https://media.sezzle.com/afterpay/modal/${this.language.getLanguage()}.html`;await B.httpRequestWrapper("GET",e).then(t=>{this.widgetConfig.apModalHTML=t}).catch(t=>{this.widgetEventLogger.logEvent("error",t.message)})}async setKlarnaModalHTML(){if(!this.widgetConfig.klarnaDualInstall)return;const e=`https://media.sezzle.com/klarna/modal/${this.language.getLanguage()}.html`;await B.httpRequestWrapper("GET",e).then(t=>{this.widgetConfig.klarnaModalHTML=t}).catch(t=>{this.widgetEventLogger.logEvent("error",t.message)})}};function Gt(){d(te,this,Qt).call(this),d(te,this,nn).call(this),d(te,this,rn).call(this),d(te,this,an).call(this)}function Qt(){if(Array.isArray(this.basicWidgetConfig.configGroups)){if(!this.basicWidgetConfig.configGroups.length)throw new Error("options.configGroups must have at least one config object")}else throw new Error("options.configGroups is not an array");const e=["targetXPath"];this.basicWidgetConfig.configGroups.forEach(t=>{e.forEach(n=>{if(!t.hasOwnProperty(n))throw new Error(`${n} must be specified in all configs in options.configGroups`)})}),d(te,this,en).call(this),d(te,this,tn).call(this)}function en(){const e={targetXPath:"string",renderToPath:"string",urlMatch:"string"};this.basicWidgetConfig.configGroups.forEach(t=>{Object.keys(e).forEach(n=>{if(t.hasOwnProperty(n)&&typeof t[n]!=typeof e[n])throw new Error(`${n} must be of type ${e[n]}`)})})}function tn(){this.basicWidgetConfig.configGroups.forEach(e=>{Object.keys(e).forEach(t=>{if(this.propsNotInConfigGroup.indexOf(t)>=0)throw new Error(`${t} is not a property of a configGroup. Specify this key at the outermost layer`)})})}function nn(){this.basicWidgetConfig.configGroups=this.basicWidgetConfig.configGroups.filter(e=>!e.urlMatch||RegExp(e.urlMatch,"i").test(window.location.href))}function rn(){const e={config:this.basicWidgetConfig,merchantID:this.basicWidgetConfig.merchantID||"",minPrice:this.basicWidgetConfig.minPrice||0,maxPrice:this.basicWidgetConfig.maxPrice||25e4,observeElements:this.basicWidgetConfig.observeElements||[],apDualInstall:this.basicWidgetConfig.apDualInstall||!1,klarnaDualInstall:this.basicWidgetConfig.klarnaDualInstall||!1,isLongTermOnly:this.basicWidgetConfig.isLongTermOnly||!1};this.widgetConfig={...this.widgetConfig,...e}}function on(e){const t={};switch(t.xpath=B.breakXPath(e.targetXPath),t.rendertopath=e.renderToPath||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.renderToPath||"..",t.relatedElementActions=e.relatedElementActions||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.relatedElementActions||[],t.ignoredPriceElements=e.ignoredPriceElements||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.ignoredPriceElements||[],typeof t.ignoredPriceElements=="string"?t.ignoredPriceElements=[B.breakXPath(t.ignoredPriceElements.trim())]:t.ignoredPriceElements=t.ignoredPriceElements.map(n=>B.breakXPath(n.trim())),t.alignment=e.alignment||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignment||"auto",t.alignmentSwitchMinWidth=e.alignmentSwitchMinWidth||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignmentSwitchMinWidth,t.alignmentSwitchType=e.alignmentSwitchType||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.alignmentSwitchType,t.containerStyle=e.containerStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.containerStyle||{},t.textStyle=e.textStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.textStyle||{},t.logoStyle=e.logoStyle||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.logoStyle||{},t.theme=e.theme||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.theme||"",t.theme){case"dark":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor_WhiteWM.svg",t.imageClassName="szl-dark-image";break;case"light":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",t.imageClassName="szl-light-image";break;case"white-flat":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_WhiteAlt.svg",t.imageClassName="szl-dark-image";break;case"black-flat":t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_BlackAlt.svg",t.imageClassName="szl-light-image";break;default:B.predictBackgroundTheme()==="dark"?(t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor_WhiteWM.svg",t.imageClassName="szl-dark-image"):(t.imageURL="https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",t.imageClassName="szl-light-image");break}return t.hideClasses=e.hideClasses||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.hideClasses||[],typeof t.hideClasses=="string"?t.hideClasses=[B.breakXPath(t.hideClasses.trim())]:t.hideClasses=t.hideClasses.map(n=>B.breakXPath(n.trim())),t.ignoredFormattedPriceText=e.ignoredFormattedPriceText||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.ignoredFormattedPriceText||["Subtotal","Total:","Sold Out"],Array.isArray(t.ignoredFormattedPriceText)||(t.ignoredFormattedPriceText=[t.ignoredFormattedPriceText]),t.widgetIsFirstChild=!1,t}function an(){this.widgetConfig.configGroups=[],this.basicWidgetConfig.configGroups.forEach(e=>{this.widgetConfig.configGroups.push(d(te,this,on).call(this,e))})}var sn=class{constructor(e){this.config=e}getElementsByXPath(e,t=0,n=null){if(!e.length)return[];if(t===e.length)return n||[];n===null&&(n=[document]);let i=[];const a=Array.prototype.slice.call(n);for(let c=0;c<a.length;c++){const o=a[c];if(e[t]==="..")i.push(o.parentElement);else if(e[t][0]==="#")i.push(o.getElementById(e[t].substr(1)));else if(e[t][0]===".")e[t].trim().length===1&&i.push(o),Array.prototype.forEach.call(o.getElementsByClassName(e[t].substr(1)),u=>{i.push(u)});else if(e[t].indexOf("child")===0){const u=e[t].split("-")[1],p=o.childNodes[u];if(typeof p<"u")if(p.nodeName==="#text"){const C=document.createElement("span");C.appendChild(document.createTextNode(p.nodeValue)),o.replaceChild(C,p),i.push(C)}else i.push(p);else i.push(o)}else{const u=e[t].split("-");let p=0;u.length>1&&u[u.length-1]>=0&&(p=parseInt(u[u.length-1],10));const C=e[t].replace(`-${p}`,"");Array.prototype.forEach.call(o.getElementsByTagName(C),(D,L)=>{L===p&&i.push(D)})}}return i=i.filter(c=>c!==null),this.getElementsByXPath(e,t+1,i)}getElementToRender(e,t=0){const n=document.querySelector("#sezzle-widget-v2-render-reference");if(n)return n;let i=null;if(this.config.configGroups[t].rendertopath!==null){const a=B.breakXPath(this.config.configGroups[t].rendertopath);i=e;for(let c=0;c<a.length;c++){const o=a[c];if(i===null)break;if(o===".")continue;if(o==="..")i=i.parentElement;else if(o[0]===".")i=i.getElementsByClassName(o.substr(1)).length?i.getElementsByClassName(o.substr(1))[0]:null;else if(o[0]==="#")i=document.getElementById(o.substr(1));else if(o==="::first-child")i=i.children.length>0?i.firstElementChild:null,this.config.configGroups[t].widgetIsFirstChild=!0;else{let u=0;o.split("-").length>1&&o.split("-")[1]>=0&&(u=parseInt(o.split("-")[1],10)),i=i.getElementsByTagName(o.split("-")[0]).length>u?i.getElementsByTagName(o.split("-")[0])[u]:null}}}return i||e.parentElement}getPriceText(e,t){if(!t||t.length===0||(t.forEach(i=>{this.getElementsByXPath(i,0,[e]).forEach(a=>{a.classList.add("sezzle-ignored-price-element")})}),!e.getElementsByClassName("sezzle-ignored-price-element").length))return e.textContent;const n=e.cloneNode(!0);return Array.prototype.forEach.call(n.getElementsByTagName("*"),i=>{Array.prototype.slice.call(i.classList).indexOf("sezzle-ignored-price-element")!==-1&&n.removeChild(i)}),Array.prototype.forEach.call(e.getElementsByClassName("sezzle-ignored-price-element"),i=>{i.classList.remove("sezzle-ignored-price-element")}),n.textContent}startObserve(e,t){const n=new MutationObserver(t);return n.observe(e,this.config.mutationObserverConfig),n}observeRelatedElements(e,t,n){n&&n.forEach(i=>{if(typeof i.relatedPath=="string"&&(typeof i.action=="function"||typeof i.initialAction=="function")){const a=this.getElementsByXPath(B.breakXPath(i.relatedPath),0,[e]);a.length>0&&(typeof i.action=="function"&&this.startObserve(a[0],c=>{i.action(c,t)}),typeof i.initialAction=="function"&&i.initialAction(a[0],t))}})}hideSezzleHideElements(e){this.config.configGroups[e].hideClasses.forEach(t=>{this.getElementsByXPath(t).forEach(n=>{n.classList.contains("sezzle-hidden")||n.classList.add("sezzle-hidden")})})}},ln=["en","fr","es"],cn={languages:ln},P=new WeakSet,un=class{constructor(e,t,n,i,a,c){ee(this,P),this.widgetConfig=e,this.widgetEventLogger=t,this.scrollDistance=0,this.modalNode=null,this.sezzleElement=null,this.promotion=i,this.giveaway=n,this.priceProcessor=a,this.languageConfig=c,this.messageEventHandler=this.messageEventHandler.bind(this),this.modalIframe=null,this.activeTab=1,this.pi5MinPriceInCents=5e3}addClickEventForModal(e){this.sezzleElement=e.widget,d(P,this,fn).call(this,e),d(P,this,gn).call(this,e),d(P,this,pn).call(this),d(P,this,yn).call(this)}renderModals(){d(P,this,vn).call(this),d(P,this,zn).call(this),d(P,this,bn).call(this)}messageEventHandler(e){const{origin:t,data:n}=e;t==this.widgetConfig.apiEndpoints.dynamicModalURL&&n=="close-modal"&&(d(P,this,Ue).call(this),window.removeEventListener("message",this.messageEventHandler))}};async function dn(){if(window.ModalUI)return;cn.languages.indexOf(this.languageConfig.language)>-1?document.modalLanguage=this.languageConfig.language:document.modalLanguage="en";const e=`${this.widgetConfig.apiEndpoints.sezzleAssetsCDN}sezzle-modal.html`,t=await B.httpRequestWrapper("GET",e);this.modalNode.innerHTML=t,d(P,this,wn).call(this),d(P,this,Ue).call(this)}function rt(e,t){if(e.preventDefault(),d(P,this,Pn).call(this,t),e.target.id="sezzle-modal-return",!e.target.classList.contains("no-sezzle-info")){let n;const i=document.getElementsByClassName("sezzle-checkout-modal-lightbox");if(Array.prototype.forEach.call(i,a=>{a.classList.contains("close-sezzle-modal")&&(n=a)}),n){d(P,this,ce).call(this,!0),n.style.display="block",n.getElementsByClassName("close-sezzle-modal")[0].focus();const a=n.getElementsByClassName("sezzle-modal");a.length&&(a[0].className="sezzle-modal"),d(P,this,hn).call(this),this.widgetEventLogger.logEvent("onclick")}}}function hn(){let e=Array.prototype.slice.call(document.querySelector(".sezzle-modal-content").childNodes);e.unshift(document.querySelector("button.close-sezzle-modal"));const t=e[0],n=e[e.length-1];let i={};document.addEventListener("keydown",a=>{if((a.key==="Shift"||a.key==="Control")&&(a.stopImmediatePropagation(),i[a.key]=!0),document.addEventListener("keyup",c=>{delete i[c.key]}),i.Control&&!i.Shift&&a.key==="Tab"&&document.activeElement===n)t.focus();else if(i.Shift&&a.key==="Tab"&&document.activeElement===t)n.focus();else if(a.key==="Escape"){const c=document.getElementsByClassName("sezzle-checkout-modal-lightbox");for(let u=0;u<c.length;u++)c[u].style.display="none",d(P,this,ce).call(this,!1);const o=document.querySelector("#sezzle-modal-return");o?(o.focus(),o.removeAttribute("id")):document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".sezzle-info-icon")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".sezzle-info-icon").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus()}})}function mn(){const e=this.modalNode.getElementsByClassName("arrow");for(let t=0;t<e.length;t++)e[t].addEventListener("click",n=>{let i=n.currentTarget;if(i.className.indexOf("disabled")===-1){i.className.indexOf("arrow-right")>-1?(this.activeTab++,i.parentElement.firstElementChild.className="arrow arrow-left",this.activeTab===3&&(i.className="arrow arrow-right disabled")):(this.activeTab--,i.parentElement.lastElementChild.className="arrow arrow-right",this.activeTab===1&&(i.className="arrow arrow-left disabled"));let a=i.parentElement.parentElement.parentElement;a.querySelector(".carousel").className="carousel position-"+this.activeTab;let c=a.querySelector(".carousel-dots").children;for(let o=0;o<c.length;o++)this.activeTab-1===o?c[o].className="dot active":c[o].className="dot"}})}function Ue(){Array.prototype.forEach.call(document.querySelectorAll(".close-sezzle-modal, .close-btn"),t=>{t.addEventListener("click",n=>{d(P,this,ce).call(this,!1),this.modalNode.style.display="none",this.modalNode.getElementsByClassName("sezzle-modal")[0].className="sezzle-modal sezzle-checkout-modal-hidden";const i=document.querySelector("#sezzle-modal-return")||document.querySelector(".sezzle-checkout-button-wrapper");i&&(i.focus(),i.removeAttribute("id"))})});let e=document.getElementsByClassName("sezzle-modal")[0];e||(e=document.getElementsByClassName("sezzle-checkout-modal-lightbox")[0]),e.addEventListener("click",t=>t.stopPropagation())}function gn(e){e.widget.addEventListener("keydown",t=>{(t.key==="Enter"||t.key===" ")&&d(P,this,rt).call(this,t,e)})}function fn(e){e.widget.addEventListener("click",t=>{d(P,this,rt).call(this,t,e)})}function pn(){if(!this.widgetConfig.apModalHTML)return;const e=this.sezzleElement.getElementsByClassName("ap-modal-info-link");Array.prototype.forEach.call(e,t=>{t.addEventListener("click",n=>{n.target.id="sezzle-modal-return",d(P,this,ce).call(this,!0),document.querySelector(".sezzle-ap-modal").style.display="block",document.querySelector(".sezzle-ap-modal").focus(),this.widgetEventLogger.logEvent("onclick-ap")})})}function yn(){if(!this.widgetConfig.klarnaModalHTML)return;const e=this.sezzleElement.getElementsByClassName("klarna-modal-info-link");Array.prototype.forEach.call(e,t=>{t.addEventListener("click",n=>{n.target.id="sezzle-modal-return",d(P,this,ce).call(this,!0),document.querySelector(".sezzle-klarna-modal").style.display="block",document.querySelector(".sezzle-klarna-modal").focus(),this.widgetEventLogger.logEvent("onclick-klarna")})})}function ce(e){const t=document.body;if(e)this.scrollDistance=window.pageYOffset||(document.documentElement.clientHeight?document.documentElement.scrollTop:document.body.scrollTop)||0,t.classList.add("sezzle-modal-open"),t.style.top=`${this.scrollDistance*-1}px`;else{t.classList.remove("sezzle-modal-open"),window.scrollTo(0,this.scrollDistance),t.style.top=0;const n=document.querySelector(".sezzle-checkout-modal-lightbox");n&&(n.scrollTop=0)}}function vn(){try{const e=document.getElementsByClassName("sezzle-checkout-modal-lightbox");e.length?this.modalNode=e[0]:(this.modalNode=document.createElement("section"),this.modalNode.className="sezzle-checkout-modal-lightbox close-sezzle-modal",this.modalNode.style.display="none",this.modalNode.role="dialog",this.modalNode.ariaLabel=this.languageConfig.translations.sezzleInformation,this.modalNode.style.maxHeight="100%",this.modalNode.lang=this.languageConfig.language,document.querySelector("body").appendChild(this.modalNode)),d(P,this,dn).call(this)}catch(e){this.widgetEventLogger.logEvent("error",e.message)}}function zn(){if(document.querySelector(".ap-modal-info-link")){const e=document.createElement("section");e.className="sezzle-checkout-modal-lightbox sezzle-ap-modal",e.style="position: center",e.style.display="none",e.role="dialog",e.ariaLabel=`${this.languageConfig.translations.clickToLearnMore} Afterpay`,e.name=`${this.languageConfig.translations.clickToLearnMore} Afterpay`,e.innerHTML=this.widgetConfig.apModalHTML||"",document.querySelector("body").appendChild(e),document.querySelector("#afterpay-modal-close-button")?.addEventListener("click",t=>{d(P,this,ce).call(this,!1),e.style.display="none";const n=document.querySelector("#sezzle-modal-return");n?(n.focus(),n.removeAttribute("id")):document.querySelector(".ap-modal-info-link")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".ap-modal-info-link").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus(),t.stopPropagation()})}}function bn(){if(document.querySelector(".klarna-modal-info-link")){const e=document.createElement("section");e.className="sezzle-checkout-modal-lightbox sezzle-klarna-modal",e.style="position: center",e.style.display="none",e.role="dialog",e.ariaLabel=`${this.languageConfig.translations.clickToLearnMore} Klarna`,e.name=`${this.languageConfig.translations.clickToLearnMore} Klarna`,e.innerHTML=this.widgetConfig.klarnaModalHTML||"",document.querySelector("body").appendChild(e),document.querySelector("button#payment-calculator-interstitial-default__nav-bar__right-icon")?.addEventListener("click",t=>{d(P,this,ce).call(this,!1),e.style.display="none";const n=document.querySelector("#sezzle-modal-return");n?(n.focus(),n.removeAttribute("id")):document.querySelector(".klarna-modal-info-link")?document.querySelector(".sezzle-checkout-button-wrapper").querySelector(".klarna-modal-info-link").focus():document.querySelector(".sezzle-checkout-button-wrapper").focus(),t.stopPropagation()})}}function wn(){const e=document.head,t=document.createElement("script");t.innerHTML=this.modalNode.querySelector("script").innerHTML,e.appendChild(t)}function it(e,t){for(let n=0;n<e.length;n++)e[n].textContent=t}function Cn(e,t){const n=this.priceProcessor.convertToNumber(e.target.value),i=document.isSezzlePayIn5&&n.prices[0].value>=this.pi5MinPriceInCents/100,a=this.priceProcessor.getFormattedShortTermPaymentInfo(n,i),c=t.getElementsByClassName("4-pay-installment"),o=t.getElementsByClassName("5-pay-installment");d(P,this,it).call(this,c,a.pi4InstallmentAmount),d(P,this,it).call(this,o,a.pi5InstallmentAmount);const u=t.getElementsByClassName("5-pay-installment-card");u.length&&(i?u[0].style.display="flex":u[0].style.display="none")}function Tn(e,t,n){const i=e.querySelector(".sezzle-lt-payments")||e.querySelector(".payment-cards-monthly");if(!i)return;const a=this.priceProcessor.longTermPaymentConfig,c=n*100,o=a&&c>=a.minPrice&&c<=a.maxPrice,u=e.querySelector(".lt-terms");if(!o){i.style.display="none",u&&(u.style.display="none");return}i.style.display="",u&&(u.style.display="");const p=this.priceProcessor.getFormattedLongTermPaymentInfo(t),C=i.querySelectorAll(".monthly-installment-card");p.paymentTerms.forEach((D,L)=>{if(!C[L])return;const E=C[L];E.setAttribute("data-months",D.durationInMonths),E.querySelector(".monthly-amount").textContent=D.monthlyPayment;const _=E.querySelector(".pill"),T=_.textContent.replace(/^\d+\s*/,"");_.textContent=`${D.durationInMonths} ${T}`,E.querySelector(".monthly-apr").textContent=`${D.apr}%`,E.querySelector(".monthly-interest").textContent=D.totalInterest,E.querySelector(".monthly-total").textContent=D.totalAmount})}function En(e,t){const n=e.target;n.value.length>9&&(n.value=n.value.substring(0,9));const i=this.priceProcessor.convertToNumber(n.value),a=i&&i.prices&&i.prices.length>0?i.prices[0].value:0,c=this.priceProcessor.getCurrency(n.value);if(n.value===c||!i||!i.prices||i.prices.length===0){n.classList.add("input-amount-error");return}const o=this.priceProcessor.longTermPaymentConfig,u=this.widgetConfig.isLongTermOnly,p=u&&o?o.minPrice/100:this.widgetConfig.minPrice/100;let C;if(o&&o.maxPrice?C=o.maxPrice/100:C=this.widgetConfig.maxPrice/100,a<p||a>C){n.classList.add("input-amount-error");return}else n.classList.remove("input-amount-error");const D=this.widgetConfig.maxPrice/100,L=t.querySelector(".payment-cards-biweekly");!u&&L&&a<=D?(L.style.display="block",d(P,this,Cn).call(this,e,t)):L&&(L.style.display="none"),d(P,this,Tn).call(this,t,i,a)}function Sn(){const e=document.querySelector("#sezzle-modal-core-content"),t=e?.querySelector(".input-amount");t&&t.addEventListener("input",n=>{d(P,this,En).call(this,n,e)})}function Pn(e){const t=this.priceProcessor.getParsedPrice(e.priceElement,e.configGroup.ignoredPriceElements,e.configGroup.ignoredFormattedPriceText);if(!t)return this.widgetEventLogger.logEvent("warning",`Cannot render modal. Failed to parse price for the element ${e.id||e.className}`),null;const n=this.priceProcessor.getProductPriceEligibility(t);document.isLongTermOnly=this.widgetConfig.isLongTermOnly||!1;const i=!this.widgetConfig.isLongTermOnly&&!n.isPriceGreaterThanMaxPrice;document.modalMultiPlan=this.priceProcessor.getFormattedShortTermPaymentInfo(t,n.is5PayEligible,i),this.priceProcessor.longTermPaymentConfig?(document.longTermPayment=this.priceProcessor.getFormattedLongTermPaymentInfo(t),document.longTermPayment.isEligible=n.isLongTermPaymentEligible):document.longTermPayment=null,d(P,this,$n).call(this)}function _n(){const e=document.querySelector("#sezzle-modal-core-content");if(!e)return;const t=e.querySelector(".accordion-toggle"),n=e.querySelector(".features-drawer");if(!t||!n)return;const i=t.querySelector(".accordion-icon-expand"),a=t.querySelector(".accordion-icon-collapse");n.style.display="none",t.addEventListener("click",()=>{const c=t.getAttribute("aria-expanded")==="true";t.setAttribute("aria-expanded",String(!c)),t.setAttribute("aria-label",c?t.dataset.labelExpand:t.dataset.labelCollapse),n.style.display=c?"none":"",n.setAttribute("aria-hidden",String(c)),i&&(i.style.display=c?"":"none"),a&&(a.style.display=c?"none":"")})}function $n(){window.ModalUI?window.ModalUI.load():this.widgetEventLogger.logEvent("error","ModalUI is undefined. Problem adding modal script to the document"),d(P,this,Ue).call(this),d(P,this,Sn).call(this),d(P,this,mn).call(this),d(P,this,_n).call(this)}function Te(e){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(e)}function Ln(e,t){if(Te(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(Te(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mn(e){var t=Ln(e,"string");return Te(t)=="symbol"?t:t+""}function ne(e,t,n){return(t=Mn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ee=new WeakSet,Me=class ae{constructor(t){if(ee(this,Ee),ne(this,"merchantUUID",void 0),ne(this,"events",void 0),ne(this,"sentEvents",void 0),ne(this,"currentWidgetType",void 0),!ae.initializing)throw new Error("Use static initializer to initialize the logger");this.merchantUUID=t,this.events=[],this.sentEvents=[],this.currentWidgetType=null}setWidgetContext(t,n){const i=new Set(["widget","promo","dualInstall","giveaway"]);this.currentWidgetType=t?t+(i.has(t)&&n!==null?`-${n}`:""):""}logEvent(t,n){const i={name:t,description:n||"",createdAt:new Date().toJSON()},a=i.name.startsWith("onclick");!a&&d(Ee,this,kn).call(this,i.name,i.description)||(this.events.push(i),a&&(d(Ee,this,ot).call(this),this.events=[]))}forceSendEvents(){d(Ee,this,ot).call(this),this.events=[]}static NewWidgetEventLogger(t){return ae.widgetEventLogger||(ae.initializing=!0,ae.widgetEventLogger=new ae(t)),ae.widgetEventLogger}static destruct(){ae.widgetEventLogger=null}};function kn(e,t){return this.events.some(n=>n.name===e&&n.description===t)}function xn(e,t){return this.sentEvents.some(n=>n.name===e&&n.description===t)}function ot(){try{const e=[];this.events.forEach(t=>{d(Ee,this,xn).call(this,t.name,t.description)||(e.push({event_name:t.name,description:t.description,widget_type:this.currentWidgetType||"",merchant_uuid:this.merchantUUID??"",merchant_site:window.location.hostname,created_at:t.createdAt,theme:{name:window?.Shopify?.theme?.name||"",id:window?.Shopify?.theme?.theme_store_id||0,role:window?.Shopify?.theme?.role||"",block_type:document.querySelector("#sezzle-widget-v2-render-reference")?"app":"embed"}}),t.name.startsWith("onclick")||this.sentEvents.push(t))}),e.length>0&&B.sendEvents(e)}catch(e){console.log(e)}}ne(Me,"initializing",void 0),ne(Me,"widgetEventLogger",void 0);var Dn=class{constructor(){this.promoTranslations={main:{reward:{is_new_user_only:{true:{threshold:{true:{promocode:{true:[{en:" and get {money} back on first Sezzle order of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} en retour sur la premier achat Sezzle de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} back on first Sezzle order of {threshold} or more"},{fr:" et recevez {money} en retour sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} back on first Sezzle order using promo code {promocode}"},{fr:" et recevez {money} en retour sur la premier achat Sezzle en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle usando el código promocional {promocode}"}],false:[{en:" and get {money} back on first Sezzle order"},{fr:" et recevez {money} en retour sur la premier achat Sezzle"},{es:" y recibe {money} de vuelta en el primera compra de Sezzle"}]}}}},false:{threshold:{true:{promocode:{true:[{en:" and get {money} back on purchases of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} en retour sur les achats de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta en compras de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} back on purchases of {threshold} or more"},{fr:" et recevez {money} en retour sur les achats de {threshold} ou plus"},{es:" y recibe {money} de vuelta en compras de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} back using promo code {promocode}"},{fr:" et recevez {money} en retour en utilisant le code promo {promocode}"},{es:" y recibe {money} de vuelta usando el código promocional {promocode}"}],false:[{en:" and get {money} back"},{fr:" et recevez {money} en retour"},{es:" y recibe {money} de vuelta"}]}}}}}},discount:{is_new_user_only:{true:{threshold:{true:{promocode:{true:[{en:" and get {money} off first Sezzle order of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} off first Sezzle order of {threshold} or more"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} off first Sezzle order using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle usando el código promocional {promocode}"}],false:[{en:" and get {money} off first Sezzle order"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle"},{es:" y recibe {money} de descuento en el primera compra de Sezzle"}]}}}},false:{threshold:{true:{promocode:{true:[{en:" and get {money} off on purchases of {threshold} or more using promo code {promocode}"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más usando el código promocional {promocode}"}],false:[{en:" and get {money} off on purchases of {threshold} or more"},{fr:" et recevez {money} de réduction sur la premier achat Sezzle de {threshold} ou plus"},{es:" y recibe {money} de descuento en el primera compra de Sezzle de {threshold} o más"}]}},false:{promocode:{true:[{en:" and get {money} off using promo code {promocode}"},{fr:" et recevez {money} de réduction en utilisant le code promo {promocode}"},{es:" y recibe {money} de descuento usando el código promocional {promocode}"}],false:[{en:" and get {money} off"},{fr:" et recevez {money} de réduction"},{es:" y recibe {money} de descuento"}]}}}}}}}}}getMainViewTranslationTextByLanguage(e,t,n,i,a,c){const o=this.promoTranslations.main[e].is_new_user_only[t].threshold[n].promocode[i];if(o){let u=o.find(p=>p[`${a}`]);return u?u[`${a}`]:(u=o.find(p=>p[`${c}`]),u[`${c}`])}return""}getModalViewTranslationTextByLanguage(e,t){const n=this.promoTranslations.modal;if(n){let i=n.find(a=>a[`${e}`]);return i?i[`${e}`]:(i=n.find(a=>a[`${t}`]),i[`${t}`])}return""}},On=class Fe{constructor(t,n){this.promoConfig=t,this.promoConfig&&(this.promoInitiative={name:this.promoConfig.promo_initiative_name,link:this.promoConfig.promo_initiative_link}),this.language=n.language,this.defaultLanguage=n.defaultLanguage,this.promoTranslations=new Dn}getPromotionString(){return this.promoConfig?Fe.getPromotionString(this.promoConfig,this.language,this.defaultLanguage,this.promoTranslations):""}static getPromotionString(t,n,i,a){const c=In[t.type],o=!!t.spend_award_threshold_in_cents,u=t.is_new_user_only?t.is_new_user_only:!1,p=!!t.promo_code;let C=a.getMainViewTranslationTextByLanguage(c,u,o,p,n,i);return C=C.replace("{money}",Fe.format(n,t.currency_code,t.spend_award_in_cents)),o&&(C=C.replace("{threshold}",Fe.format(n,t.currency_code,t.spend_award_threshold_in_cents))),p&&(C=C.replace("{promocode}",t.promo_code)),C}static format(t,n,i){const a=new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:0,maximumFractionDigits:0}),c=new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}),o=parseInt(i)/100;return o%1===0?a.format(o):c.format(o)}},In={1:"reward",2:"discount"},Nn=Le(((e,t)=>{(function(n,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(n=typeof globalThis<"u"?globalThis:n||self).dayjs=i()})(e,(function(){"use strict";var n=1e3,i=6e4,a=36e5,c="millisecond",o="second",u="minute",p="hour",C="day",D="week",L="month",E="quarter",_="year",T="date",y="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,W={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(b){var f=["th","st","nd","rd"],h=b%100;return"["+b+(f[(h-20)%10]||f[h]||f[0])+"]"}},O=function(b,f,h){var v=String(b);return!v||v.length>=f?b:""+Array(f+1-v.length).join(h)+b},F={s:O,z:function(b){var f=-b.utcOffset(),h=Math.abs(f),v=Math.floor(h/60),m=h%60;return(f<=0?"+":"-")+O(v,2,"0")+":"+O(m,2,"0")},m:function b(f,h){if(f.date()<h.date())return-b(h,f);var v=12*(h.year()-f.year())+(h.month()-f.month()),m=f.clone().add(v,L),w=h-m<0,g=f.clone().add(v+(w?-1:1),L);return+(-(v+(h-m)/(w?m-g:g-m))||0)},a:function(b){return b<0?Math.ceil(b)||0:Math.floor(b)},p:function(b){return{M:L,y:_,w:D,d:C,D:T,h:p,m:u,s:o,ms:c,Q:E}[b]||String(b||"").toLowerCase().replace(/s$/,"")},u:function(b){return b===void 0}},H="en",q={};q[H]=W;var R="$isDayjsObject",J=function(b){return b instanceof de||!(!b||!b[R])},Y=function b(f,h,v){var m;if(!f)return H;if(typeof f=="string"){var w=f.toLowerCase();q[w]&&(m=w),h&&(q[w]=h,m=w);var g=f.split("-");if(!m&&g.length>1)return b(g[0])}else{var k=f.name;q[k]=f,m=k}return!v&&m&&(H=m),m||!v&&H},M=function(b,f){if(J(b))return b.clone();var h=typeof f=="object"?f:{};return h.date=b,h.args=arguments,new de(h)},S=F;S.l=Y,S.i=J,S.w=function(b,f){return M(b,{locale:f.$L,utc:f.$u,x:f.$x,$offset:f.$offset})};var de=(function(){function b(h){this.$L=Y(h.locale,null,!0),this.parse(h),this.$x=this.$x||h.x||{},this[R]=!0}var f=b.prototype;return f.parse=function(h){this.$d=(function(v){var m=v.date,w=v.utc;if(m===null)return new Date(NaN);if(S.u(m))return new Date;if(m instanceof Date)return new Date(m);if(typeof m=="string"&&!/Z$/i.test(m)){var g=m.match($);if(g){var k=g[2]-1||0,A=(g[7]||"0").substring(0,3);return w?new Date(Date.UTC(g[1],k,g[3]||1,g[4]||0,g[5]||0,g[6]||0,A)):new Date(g[1],k,g[3]||1,g[4]||0,g[5]||0,g[6]||0,A)}}return new Date(m)})(h),this.init()},f.init=function(){var h=this.$d;this.$y=h.getFullYear(),this.$M=h.getMonth(),this.$D=h.getDate(),this.$W=h.getDay(),this.$H=h.getHours(),this.$m=h.getMinutes(),this.$s=h.getSeconds(),this.$ms=h.getMilliseconds()},f.$utils=function(){return S},f.isValid=function(){return this.$d.toString()!==y},f.isSame=function(h,v){var m=M(h);return this.startOf(v)<=m&&m<=this.endOf(v)},f.isAfter=function(h,v){return M(h)<this.startOf(v)},f.isBefore=function(h,v){return this.endOf(v)<M(h)},f.$g=function(h,v,m){return S.u(h)?this[v]:this.set(m,h)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(h,v){var m=this,w=!!S.u(v)||v,g=S.p(h),k=function(ie,X){var Q=S.w(m.$u?Date.UTC(m.$y,X,ie):new Date(m.$y,X,ie),m);return w?Q:Q.endOf(C)},A=function(ie,X){return S.w(m.toDate()[ie].apply(m.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(X)),m)},x=this.$W,U=this.$M,K=this.$D,se="set"+(this.$u?"UTC":"");switch(g){case _:return w?k(1,0):k(31,11);case L:return w?k(1,U):k(0,U+1);case D:var re=this.$locale().weekStart||0,he=(x<re?x+7:x)-re;return k(w?K-he:K+(6-he),U);case C:case T:return A(se+"Hours",0);case p:return A(se+"Minutes",1);case u:return A(se+"Seconds",2);case o:return A(se+"Milliseconds",3);default:return this.clone()}},f.endOf=function(h){return this.startOf(h,!1)},f.$set=function(h,v){var m,w=S.p(h),g="set"+(this.$u?"UTC":""),k=(m={},m[C]=g+"Date",m[T]=g+"Date",m[L]=g+"Month",m[_]=g+"FullYear",m[p]=g+"Hours",m[u]=g+"Minutes",m[o]=g+"Seconds",m[c]=g+"Milliseconds",m)[w],A=w===C?this.$D+(v-this.$W):v;if(w===L||w===_){var x=this.clone().set(T,1);x.$d[k](A),x.init(),this.$d=x.set(T,Math.min(this.$D,x.daysInMonth())).$d}else k&&this.$d[k](A);return this.init(),this},f.set=function(h,v){return this.clone().$set(h,v)},f.get=function(h){return this[S.p(h)]()},f.add=function(h,v){var m,w=this;h=Number(h);var g=S.p(v),k=function(U){var K=M(w);return S.w(K.date(K.date()+Math.round(U*h)),w)};if(g===L)return this.set(L,this.$M+h);if(g===_)return this.set(_,this.$y+h);if(g===C)return k(1);if(g===D)return k(7);var A=(m={},m[u]=i,m[p]=a,m[o]=n,m)[g]||1,x=this.$d.getTime()+h*A;return S.w(x,this)},f.subtract=function(h,v){return this.add(-1*h,v)},f.format=function(h){var v=this,m=this.$locale();if(!this.isValid())return m.invalidDate||y;var w=h||"YYYY-MM-DDTHH:mm:ssZ",g=S.z(this),k=this.$H,A=this.$m,x=this.$M,U=m.weekdays,K=m.months,se=m.meridiem,re=function(X,Q,me,ve){return X&&(X[Q]||X(v,w))||me[Q].slice(0,ve)},he=function(X){return S.s(k%12||12,X,"0")},ie=se||function(X,Q,me){var ve=X<12?"AM":"PM";return me?ve.toLowerCase():ve};return w.replace(I,(function(X,Q){return Q||(function(me){switch(me){case"YY":return String(v.$y).slice(-2);case"YYYY":return S.s(v.$y,4,"0");case"M":return x+1;case"MM":return S.s(x+1,2,"0");case"MMM":return re(m.monthsShort,x,K,3);case"MMMM":return re(K,x);case"D":return v.$D;case"DD":return S.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return re(m.weekdaysMin,v.$W,U,2);case"ddd":return re(m.weekdaysShort,v.$W,U,3);case"dddd":return U[v.$W];case"H":return String(k);case"HH":return S.s(k,2,"0");case"h":return he(1);case"hh":return he(2);case"a":return ie(k,A,!0);case"A":return ie(k,A,!1);case"m":return String(A);case"mm":return S.s(A,2,"0");case"s":return String(v.$s);case"ss":return S.s(v.$s,2,"0");case"SSS":return S.s(v.$ms,3,"0");case"Z":return g}return null})(X)||g.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(h,v,m){var w,g=this,k=S.p(v),A=M(h),x=(A.utcOffset()-this.utcOffset())*i,U=this-A,K=function(){return S.m(g,A)};switch(k){case _:w=K()/12;break;case L:w=K();break;case E:w=K()/3;break;case D:w=(U-x)/6048e5;break;case C:w=(U-x)/864e5;break;case p:w=U/a;break;case u:w=U/i;break;case o:w=U/n;break;default:w=U}return m?w:S.a(w)},f.daysInMonth=function(){return this.endOf(L).$D},f.$locale=function(){return q[this.$L]},f.locale=function(h,v){if(!h)return this.$L;var m=this.clone(),w=Y(h,v,!0);return w&&(m.$L=w),m},f.clone=function(){return S.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},b})(),Pe=de.prototype;return M.prototype=Pe,[["$ms",c],["$s",o],["$m",u],["$H",p],["$W",C],["$M",L],["$y",_],["$D",T]].forEach((function(b){Pe[b[1]]=function(f){return this.$g(f,b[0],b[1])}})),M.extend=function(b,f){return b.$i||(b(f,de,M),b.$i=!0),M},M.locale=Y,M.isDayjs=J,M.unix=function(b){return M(1e3*b)},M.en=q[H],M.Ls=q,M.p={},M}))})),An=Le(((e,t)=>{(function(n,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_utc=i()})(e,(function(){"use strict";var n="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(c,o,u){var p=o.prototype;u.utc=function(y){return new o({date:y,utc:!0,args:arguments})},p.utc=function(y){var $=u(this.toDate(),{locale:this.$L,utc:!0});return y?$.add(this.utcOffset(),n):$},p.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var C=p.parse;p.parse=function(y){y.utc&&(this.$u=!0),this.$utils().u(y.$offset)||(this.$offset=y.$offset),C.call(this,y)};var D=p.init;p.init=function(){if(this.$u){var y=this.$d;this.$y=y.getUTCFullYear(),this.$M=y.getUTCMonth(),this.$D=y.getUTCDate(),this.$W=y.getUTCDay(),this.$H=y.getUTCHours(),this.$m=y.getUTCMinutes(),this.$s=y.getUTCSeconds(),this.$ms=y.getUTCMilliseconds()}else D.call(this)};var L=p.utcOffset;p.utcOffset=function(y,$){var I=this.$utils().u;if(I(y))return this.$u?0:I(this.$offset)?L.call(this):this.$offset;if(typeof y=="string"&&(y=(function(H){H===void 0&&(H="");var q=H.match(i);if(!q)return null;var R=(""+q[0]).match(a)||["-",0,0],J=R[0],Y=60*+R[1]+ +R[2];return Y===0?0:J==="+"?Y:-Y})(y),y===null))return this;var W=Math.abs(y)<=16?60*y:y;if(W===0)return this.utc($);var O=this.clone();if($)return O.$offset=W,O.$u=!1,O;var F=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(O=this.local().add(W+F,n)).$offset=W,O.$x.$localOffset=F,O};var E=p.format;p.format=function(y){var $=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return E.call(this,$)},p.valueOf=function(){var y=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*y},p.isUTC=function(){return!!this.$u},p.toISOString=function(){return this.toDate().toISOString()},p.toString=function(){return this.toDate().toUTCString()};var _=p.toDate;p.toDate=function(y){return y==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():_.call(this)};var T=p.diff;p.diff=function(y,$,I){if(y&&this.$u===y.$u)return T.call(this,y,$,I);var W=this.local(),O=u(y).local();return T.call(W,O,$,I)}}}))})),Wn=Le(((e,t)=>{(function(n,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_timezone=i()})(e,(function(){"use strict";var n={year:0,month:1,day:2,hour:3,minute:4,second:5},i={};return function(a,c,o){var u,p=function(E,_,T){T===void 0&&(T={});var y=new Date(E);return(function($,I){I===void 0&&(I={});var W=I.timeZoneName||"short",O=$+"|"+W,F=i[O];return F||(F=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:$,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:W}),i[O]=F),F})(_,T).formatToParts(y)},C=function(E,_){for(var T=p(E,_),y=[],$=0;$<T.length;$+=1){var I=T[$],W=I.type,O=I.value,F=n[W];F>=0&&(y[F]=parseInt(O,10))}var H=y[3],q=H===24?0:H,R=y[0]+"-"+y[1]+"-"+y[2]+" "+q+":"+y[4]+":"+y[5]+":000",J=+E;return(o.utc(R).valueOf()-(J-=J%1e3))/6e4},D=c.prototype;D.tz=function(E,_){E===void 0&&(E=u);var T,y=this.utcOffset(),$=this.toDate(),I=$.toLocaleString("en-US",{timeZone:E}),W=Math.round(($-new Date(I))/1e3/60),O=15*-Math.round($.getTimezoneOffset()/15)-W;if(!Number(O))T=this.utcOffset(0,_);else if(T=o(I,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(O,!0),_){var F=T.utcOffset();T=T.add(y-F,"minute")}return T.$x.$timezone=E,T},D.offsetName=function(E){var _=this.$x.$timezone||o.tz.guess(),T=p(this.valueOf(),_,{timeZoneName:E}).find((function(y){return y.type.toLowerCase()==="timezonename"}));return T&&T.value};var L=D.startOf;D.startOf=function(E,_){if(!this.$x||!this.$x.$timezone)return L.call(this,E,_);var T=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return L.call(T,E,_).tz(this.$x.$timezone,!0)},o.tz=function(E,_,T){var y=T&&_,$=T||_||u,I=C(+o(),$);if(typeof E!="string")return o(E).tz($);var W=(function(q,R,J){var Y=q-60*R*1e3,M=C(Y,J);if(R===M)return[Y,R];var S=C(Y-=60*(M-R)*1e3,J);return M===S?[Y,M]:[q-60*Math.min(M,S)*1e3,Math.max(M,S)]})(o.utc(E,y).valueOf(),I,$),O=W[0],F=W[1],H=o(O).utcOffset(F);return H.$x.$timezone=$,H},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(E){u=E}}}))})),ye=qe(Nn()),Fn=qe(An()),qn=qe(Wn());ye.default.extend(Fn.default),ye.default.extend(qn.default);var Un=class{constructor(e){this.giveawayConfig=e}getTimeLeftInDay(){ye.default.tz.setDefault("America/Chicago");const e=ye.default.tz(),t=ye.default.tz().endOf("day").diff(e,"seconds");return ye.default.tz.setDefault(),new Date(t*1e3).toISOString().substring(11,19)}},ue=new WeakSet,at=class{constructor(e){ee(this,ue),this.terms=e||[{price:1e3,options:[[48,8.99],[36,7.99],[3,0]]},{price:500,options:[[24,7.99],[12,6.99],[3,0]]},{price:250,options:[[12,6.99],[9,5.99],[3,0]]},{price:100,options:[[9,5.99],[6,5.99],[3,0]]}]}getPaymentInfo(e){if(!e||e<=0)throw new Error("Unable to calculate Long Term payments: product price is undefined or non-positive");const t=d(ue,this,lt).call(this,e),n={productPrice:e,paymentTerms:[]};return n.paymentTerms=t.map(i=>{const a=i[0],c=i[1],o=d(ue,this,st).call(this,e,a,c),u=d(ue,this,Hn).call(this,o*a);return{durationInMonths:a,apr:c,monthlyPayment:o,totalAmount:u,totalInterest:u-e}}),n.paymentTerms.sort((i,a)=>i.monthlyPayment-a.monthlyPayment),n}calculateLowestAvailablePayment(e){if(!e||e<=0)throw new Error("Unable to calculate lowest Long Term payment: product price is undefined or non-positive");const t=d(ue,this,Bn).call(this,e);return d(ue,this,st).call(this,e,t[0],t[1])}};function st(e,t,n){if(n>0){const i=n/100/12,a=Math.pow(1+i,t);return e*i*a/(a-1)}else return e/t}function Bn(e){return d(ue,this,lt).call(this,e)[0]}function lt(e){for(const t of this.terms)if(e>t.price)return t.options;return this.terms[this.terms.length-1].options}function Hn(e){return Math.round(e*100)/100}var Se=new WeakSet,jn=class{constructor(e,t,n,i){ee(this,Se),this.sezzleDOMFunctions=n,this.widgetEventLogger=i,this.widgetConfig=e,this.longTermPaymentConfig=t,this.placeholder="{price}",this.numberOfDecimals=2,this.pi5MinPriceInCents=5e3,this.thousandDelimiter=/\B(?=(\d{3})+(?!\d))/g,this.naFormat=/^\d{1,3}(,\d{3})+(\.\d+)?$/,this.euFormat=/^\d{1,3}(\.\d{3})+(,\d+)?$/,this.euFormatWithSpace=/^\d{1,3}(\s\d{3})+(,\d+)?$/,this.euDecimalsNoThousandDelimiterFormat=/(^\d+((,\d{1,2})|(,\d{4,}))$)|(^\d{4,},\d+$)/}getParsedPrice(e,t,n){let i=this.sezzleDOMFunctions.getPriceText(e,t);return i?(i=d(Se,this,Rn).call(this,i,n),this.convertToNumber(i)):(this.widgetEventLogger.logEvent("warning","No price text after ignored price elements."),null)}convertToNumber(e){const t=new RegExp(/\d+((\.|,|\s)\d+)*/g),n=B.matchAll(t,e);if(n.length===0||n.length>2)return this.widgetEventLogger.logEvent("warning",`priceText ${n} contains unexpected number of values`),null;const i={formatter:e.replace(t,this.placeholder),prices:[],currency:this.getCurrency(e)};return i.prices=n.map(a=>{let c=a,o;return this.naFormat.test(a)&&(c=a.replaceAll(",",""),o=this.naFormat),this.euFormat.test(a)&&(c=a.replaceAll(".","").replaceAll(",","."),o=this.euFormat),this.euFormatWithSpace.test(a)&&(c=a.replaceAll("/s","").replaceAll(",",".").replaceAll(" ",""),o=this.euFormatWithSpace),this.euDecimalsNoThousandDelimiterFormat.test(a)&&(c=a.replaceAll(",","."),o=this.euDecimalsNoThousandDelimiterFormat),parseFloat(c)===NaN&&this.widgetEventLogger.logEvent("warning",`parsed price element text ${c} is not a number`),{value:parseFloat(c),format:o}}),i}getCurrency(e){if(!e)return"";const t=e.match(/\p{Sc}/gu);return t?t[0]:"$"}getFormattedWidgetPrice(e,t,n){if(!e.prices||e.prices.length===0)throw new Error("Cannot get formatted widget price: no product prices are provided");let i=e.formatter;for(const a of e.prices){let c,o;if(t)c=new at(this.longTermPaymentConfig.paymentTerms).calculateLowestAvailablePayment(a.value).toFixed(this.numberOfDecimals);else{const u=n?5:4;c=(a.value/u).toFixed(this.numberOfDecimals)}o=d(Se,this,ct).call(this,c,a.format),i=i.replace(this.placeholder,o)}return i}getFormattedMinPrice(e){const t=e.prices[0].format,n=e.formatter,i=d(Se,this,ct).call(this,this.widgetConfig.minPrice/100,t),a=d(Se,this,Yn).call(this,n);return a?n.split(a)[0].replace(this.placeholder,i).trim():n.replace(this.placeholder,i)}getProductPriceEligibility(e){const t=this.getProductPriceInCents(e);return{isPriceLessThanMinPrice:t<this.widgetConfig.minPrice,isPriceGreaterThanMaxPrice:t>this.widgetConfig.maxPrice,is5PayEligible:document.isSezzlePayIn5&&t>=this.pi5MinPriceInCents,isLongTermPaymentEligible:!!(this.longTermPaymentConfig&&t>=this.longTermPaymentConfig.minPrice&&t<=this.longTermPaymentConfig.maxPrice)}}getFormattedLongTermPaymentInfo(e){if(!e.currency)throw new Error("Cannot get formatted long term payment info: the currency symbol is not provided");const t=e.prices[0].value,n=new at(this.longTermPaymentConfig.paymentTerms).getPaymentInfo(t),i=Number(this.longTermPaymentConfig.minAPR)>0?this.longTermPaymentConfig.minAPR:"9.99",a=Number(this.longTermPaymentConfig.minTermMonths)>0?this.longTermPaymentConfig.minTermMonths:3,c={productPrice:e.currency+n.productPrice.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),minAPR:i,maxAPR:Number(this.longTermPaymentConfig.maxAPR)>Number(i)?this.longTermPaymentConfig.maxAPR:"34.99",minTermMonths:a,maxTermMonths:Number(this.longTermPaymentConfig.maxTermMonths)>Number(a)?this.longTermPaymentConfig.maxTermMonths:48,paymentTerms:[]};return c.paymentTerms=n.paymentTerms.map(o=>({durationInMonths:o.durationInMonths,apr:o.apr,monthlyPayment:e.currency+o.monthlyPayment.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),totalAmount:e.currency+o.totalAmount.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),totalInterest:e.currency+o.totalInterest.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,",")})),c}getFormattedShortTermPaymentInfo(e,t,n=!0){if(!e.currency)throw new Error("Cannot get formatted short term payment info: the currency symbol is not provided");const i=e.prices[0].value;return{productPrice:e.currency+i.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),pi4InstallmentAmount:n?e.currency+(i/4).toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","):"",pi5InstallmentAmount:t?e.currency+(i/5).toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","):""}}getProductPriceInCents(e){if(!e.prices||e.prices.length===0)throw new Error("Cannot get formatted widget price: no product prices are provided");return e.prices[0].value*100}};function Rn(e,t){return e=e.replace(`
`,"").replace(/\u00a0/g," ").trim(),t&&t.forEach(n=>{const i=new RegExp(n,"ig");e=e.replace(i,"")}),e}function ct(e,t){switch(t){case this.naFormat:return e.toString().replace(this.thousandDelimiter,",");case this.euFormat:return e.toString().replace(".",",").replace(this.thousandDelimiter,".");case this.euFormatWithSpace:return e.toString().replace(".",",").replace(this.thousandDelimiter," ");case this.euDecimalsNoThousandDelimiterFormat:return e.toString().replace(".",",");default:return e.toString()}}function Yn(e){const t=["–","-"];let n="";return t.forEach(i=>{e.includes(i)&&(n=i)}),n}var ke,ut=new WeakSet,xe=class Ut{constructor(t){ee(this,ut),this.widgetEventLogger=t}logCompetitorEvents(){for(const t in Ut.competitorWidgets)d(ut,this,Xn).call(this,t)&&this.widgetEventLogger.logEvent("competitor-widget",t)}};ke=xe;function Xn(e){for(const t of ke.competitorWidgets[e].tagNames)if(document.getElementsByTagName(t).length)return!0;for(const t of ke.competitorWidgets[e].ids)if(document.getElementById(t))return!0;for(const t of ke.competitorWidgets[e].classes)if(document.getElementsByClassName(t).length)return!0}ne(xe,"competitorWidgets",{klarna:{tagNames:["klarna-placement"],ids:[],classes:[]},afterpay:{tagNames:["afterpay-placement"],ids:[],classes:["afterpay-paragraph"]},shoppay:{tagNames:["shopify-payment-terms","shop-pay-installments-banner"],ids:["shopify-installments"],classes:["shopify-installments"]},affirm:{tagNames:[],ids:["afffirm-promo-box"],classes:["affirm-as-low-as"]},paypal:{tagNames:[],ids:["paypal-commerce-proddetails-messaging-banner","paypal_message","paypal_message_container"],classes:["paypal-message","paypal-message-container"]},quadpay:{tagNames:["quadpay-widget"],ids:["qp-container"],classes:["qp-widget-container","qp-container"]},zip:{tagNames:["quadpay-widget-v3"],ids:["qp-container"],classes:["qp-container"]}});var dt=Le(((e,t)=>{var n=200,i="__lodash_hash_undefined__",a=9007199254740991,c="[object Arguments]",o="[object Array]",u="[object Boolean]",p="[object Date]",C="[object Error]",D="[object Function]",L="[object GeneratorFunction]",E="[object Map]",_="[object Number]",T="[object Object]",y="[object Promise]",$="[object RegExp]",I="[object Set]",W="[object String]",O="[object Symbol]",F="[object WeakMap]",H="[object ArrayBuffer]",q="[object DataView]",R="[object Float32Array]",J="[object Float64Array]",Y="[object Int8Array]",M="[object Int16Array]",S="[object Int32Array]",de="[object Uint8Array]",Pe="[object Uint8ClampedArray]",b="[object Uint16Array]",f="[object Uint32Array]",h=/[\\^$.*+?()[\]{}|]/g,v=/\w*$/,m=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,g={};g[c]=g[o]=g[H]=g[q]=g[u]=g[p]=g[R]=g[J]=g[Y]=g[M]=g[S]=g[E]=g[_]=g[T]=g[$]=g[I]=g[W]=g[O]=g[de]=g[Pe]=g[b]=g[f]=!0,g[C]=g[D]=g[F]=!1;var k=typeof global=="object"&&global&&global.Object===Object&&global,A=typeof self=="object"&&self&&self.Object===Object&&self,x=k||A||Function("return this")(),U=typeof e=="object"&&e&&!e.nodeType&&e,K=U&&typeof t=="object"&&t&&!t.nodeType&&t,se=K&&K.exports===U;function re(r,s){return r.set(s[0],s[1]),r}function he(r,s){return r.add(s),r}function ie(r,s){for(var l=-1,z=r?r.length:0;++l<z&&s(r[l],l,r)!==!1;);return r}function X(r,s){for(var l=-1,z=s.length,j=r.length;++l<z;)r[j+l]=s[l];return r}function Q(r,s,l,z){var j=-1,V=r?r.length:0;for(z&&V&&(l=r[++j]);++j<V;)l=s(l,r[j],j,r);return l}function me(r,s){for(var l=-1,z=Array(r);++l<r;)z[l]=s(l);return z}function ve(r,s){return r?.[s]}function zt(r){var s=!1;if(r!=null&&typeof r.toString!="function")try{s=!!(r+"")}catch{}return s}function bt(r){var s=-1,l=Array(r.size);return r.forEach(function(z,j){l[++s]=[j,z]}),l}function Re(r,s){return function(l){return r(s(l))}}function wt(r){var s=-1,l=Array(r.size);return r.forEach(function(z){l[++s]=z}),l}var Rr=Array.prototype,Yr=Function.prototype,De=Object.prototype,Ye=x["__core-js_shared__"],Ct=(function(){var r=/[^.]+$/.exec(Ye&&Ye.keys&&Ye.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),Tt=Yr.toString,le=De.hasOwnProperty,Oe=De.toString,Xr=RegExp("^"+Tt.call(le).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Et=se?x.Buffer:void 0,St=x.Symbol,Pt=x.Uint8Array,Kr=Re(Object.getPrototypeOf,Object),Vr=Object.create,Jr=De.propertyIsEnumerable,Zr=Rr.splice,_t=Object.getOwnPropertySymbols,Gr=Et?Et.isBuffer:void 0,Qr=Re(Object.keys,Object),Xe=we(x,"DataView"),_e=we(x,"Map"),Ke=we(x,"Promise"),Ve=we(x,"Set"),Je=we(x,"WeakMap"),$e=we(Object,"create"),ei=pe(Xe),ti=pe(_e),ni=pe(Ke),ri=pe(Ve),ii=pe(Je),$t=St?St.prototype:void 0,Lt=$t?$t.valueOf:void 0;function ge(r){var s=-1,l=r?r.length:0;for(this.clear();++s<l;){var z=r[s];this.set(z[0],z[1])}}function oi(){this.__data__=$e?$e(null):{}}function ai(r){return this.has(r)&&delete this.__data__[r]}function si(r){var s=this.__data__;if($e){var l=s[r];return l===i?void 0:l}return le.call(s,r)?s[r]:void 0}function li(r){var s=this.__data__;return $e?s[r]!==void 0:le.call(s,r)}function ci(r,s){var l=this.__data__;return l[r]=$e&&s===void 0?i:s,this}ge.prototype.clear=oi,ge.prototype.delete=ai,ge.prototype.get=si,ge.prototype.has=li,ge.prototype.set=ci;function oe(r){var s=-1,l=r?r.length:0;for(this.clear();++s<l;){var z=r[s];this.set(z[0],z[1])}}function ui(){this.__data__=[]}function di(r){var s=this.__data__,l=Ie(s,r);return l<0?!1:(l==s.length-1?s.pop():Zr.call(s,l,1),!0)}function hi(r){var s=this.__data__,l=Ie(s,r);return l<0?void 0:s[l][1]}function mi(r){return Ie(this.__data__,r)>-1}function gi(r,s){var l=this.__data__,z=Ie(l,r);return z<0?l.push([r,s]):l[z][1]=s,this}oe.prototype.clear=ui,oe.prototype.delete=di,oe.prototype.get=hi,oe.prototype.has=mi,oe.prototype.set=gi;function ze(r){var s=-1,l=r?r.length:0;for(this.clear();++s<l;){var z=r[s];this.set(z[0],z[1])}}function fi(){this.__data__={hash:new ge,map:new(_e||oe),string:new ge}}function pi(r){return Ne(this,r).delete(r)}function yi(r){return Ne(this,r).get(r)}function vi(r){return Ne(this,r).has(r)}function zi(r,s){return Ne(this,r).set(r,s),this}ze.prototype.clear=fi,ze.prototype.delete=pi,ze.prototype.get=yi,ze.prototype.has=vi,ze.prototype.set=zi;function be(r){this.__data__=new oe(r)}function bi(){this.__data__=new oe}function wi(r){return this.__data__.delete(r)}function Ci(r){return this.__data__.get(r)}function Ti(r){return this.__data__.has(r)}function Ei(r,s){var l=this.__data__;if(l instanceof oe){var z=l.__data__;if(!_e||z.length<n-1)return z.push([r,s]),this;l=this.__data__=new ze(z)}return l.set(r,s),this}be.prototype.clear=bi,be.prototype.delete=wi,be.prototype.get=Ci,be.prototype.has=Ti,be.prototype.set=Ei;function Si(r,s){var l=Qe(r)||Vi(r)?me(r.length,String):[],z=l.length,j=!!z;for(var V in r)(s||le.call(r,V))&&!(j&&(V=="length"||Ri(V,z)))&&l.push(V);return l}function Mt(r,s,l){var z=r[s];(!(le.call(r,s)&&Ot(z,l))||l===void 0&&!(s in r))&&(r[s]=l)}function Ie(r,s){for(var l=r.length;l--;)if(Ot(r[l][0],s))return l;return-1}function Pi(r,s){return r&&kt(s,et(s),r)}function Ze(r,s,l,z,j,V,G){var Z;if(z&&(Z=V?z(r,j,V,G):z(r)),Z!==void 0)return Z;if(!Ae(r))return r;var At=Qe(r);if(At){if(Z=Bi(r),!s)return Fi(r,Z)}else{var Ce=fe(r),Wt=Ce==D||Ce==L;if(Zi(r))return xi(r,s);if(Ce==T||Ce==c||Wt&&!V){if(zt(r))return V?r:{};if(Z=Hi(Wt?{}:r),!s)return qi(r,Pi(Z,r))}else{if(!g[Ce])return V?r:{};Z=ji(r,Ce,Ze,s)}}G||(G=new be);var Ft=G.get(r);if(Ft)return Ft;if(G.set(r,Z),!At)var qt=l?Ui(r):et(r);return ie(qt||r,function(tt,We){qt&&(We=tt,tt=r[We]),Mt(Z,We,Ze(tt,s,l,z,We,r,G))}),Z}function _i(r){return Ae(r)?Vr(r):{}}function $i(r,s,l){var z=s(r);return Qe(r)?z:X(z,l(r))}function Li(r){return Oe.call(r)}function Mi(r){return!Ae(r)||Xi(r)?!1:(Nt(r)||zt(r)?Xr:m).test(pe(r))}function ki(r){if(!Dt(r))return Qr(r);var s=[];for(var l in Object(r))le.call(r,l)&&l!="constructor"&&s.push(l);return s}function xi(r,s){if(s)return r.slice();var l=new r.constructor(r.length);return r.copy(l),l}function Ge(r){var s=new r.constructor(r.byteLength);return new Pt(s).set(new Pt(r)),s}function Di(r,s){var l=s?Ge(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.byteLength)}function Oi(r,s,l){return Q(s?l(bt(r),!0):bt(r),re,new r.constructor)}function Ii(r){var s=new r.constructor(r.source,v.exec(r));return s.lastIndex=r.lastIndex,s}function Ni(r,s,l){return Q(s?l(wt(r),!0):wt(r),he,new r.constructor)}function Ai(r){return Lt?Object(Lt.call(r)):{}}function Wi(r,s){var l=s?Ge(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.length)}function Fi(r,s){var l=-1,z=r.length;for(s||(s=Array(z));++l<z;)s[l]=r[l];return s}function kt(r,s,l,z){l||(l={});for(var j=-1,V=s.length;++j<V;){var G=s[j],Z=z?z(l[G],r[G],G,l,r):void 0;Mt(l,G,Z===void 0?r[G]:Z)}return l}function qi(r,s){return kt(r,xt(r),s)}function Ui(r){return $i(r,et,xt)}function Ne(r,s){var l=r.__data__;return Yi(s)?l[typeof s=="string"?"string":"hash"]:l.map}function we(r,s){var l=ve(r,s);return Mi(l)?l:void 0}var xt=_t?Re(_t,Object):eo,fe=Li;(Xe&&fe(new Xe(new ArrayBuffer(1)))!=q||_e&&fe(new _e)!=E||Ke&&fe(Ke.resolve())!=y||Ve&&fe(new Ve)!=I||Je&&fe(new Je)!=F)&&(fe=function(r){var s=Oe.call(r),l=s==T?r.constructor:void 0,z=l?pe(l):void 0;if(z)switch(z){case ei:return q;case ti:return E;case ni:return y;case ri:return I;case ii:return F}return s});function Bi(r){var s=r.length,l=r.constructor(s);return s&&typeof r[0]=="string"&&le.call(r,"index")&&(l.index=r.index,l.input=r.input),l}function Hi(r){return typeof r.constructor=="function"&&!Dt(r)?_i(Kr(r)):{}}function ji(r,s,l,z){var j=r.constructor;switch(s){case H:return Ge(r);case u:case p:return new j(+r);case q:return Di(r,z);case R:case J:case Y:case M:case S:case de:case Pe:case b:case f:return Wi(r,z);case E:return Oi(r,z,l);case _:case W:return new j(r);case $:return Ii(r);case I:return Ni(r,z,l);case O:return Ai(r)}}function Ri(r,s){return s=s??a,!!s&&(typeof r=="number"||w.test(r))&&r>-1&&r%1==0&&r<s}function Yi(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}function Xi(r){return!!Ct&&Ct in r}function Dt(r){var s=r&&r.constructor;return r===(typeof s=="function"&&s.prototype||De)}function pe(r){if(r!=null){try{return Tt.call(r)}catch{}try{return r+""}catch{}}return""}function Ki(r){return Ze(r,!0,!0)}function Ot(r,s){return r===s||r!==r&&s!==s}function Vi(r){return Ji(r)&&le.call(r,"callee")&&(!Jr.call(r,"callee")||Oe.call(r)==c)}var Qe=Array.isArray;function It(r){return r!=null&&Gi(r.length)&&!Nt(r)}function Ji(r){return Qi(r)&&It(r)}var Zi=Gr||to;function Nt(r){var s=Ae(r)?Oe.call(r):"";return s==D||s==L}function Gi(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=a}function Ae(r){var s=typeof r;return!!r&&(s=="object"||s=="function")}function Qi(r){return!!r&&typeof r=="object"}function et(r){return It(r)?Si(r):ki(r)}function eo(){return[]}function to(){return!1}t.exports=Ki})),Be,Kn=dt(),N=new WeakSet,He=class{constructor(e,t,n){ee(this,N),ne(this,"intervalInMs",void 0),this.intervalInMs=2e3,this.widgetConfig=e,this.widgetEventLogger=t,this.competitor=new xe(this.widgetEventLogger),this.sezzleDOMFunctions=new sn(e),this.language=n,this.promotion=new On(document.sezzlePromotion,this.language),this.giveaway=new Un(document.giveawayConfig),this.priceProcessor=new jn(e,document.longTermPaymentConfig,this.sezzleDOMFunctions,this.widgetEventLogger),this.modal=new un(e,t,this.giveaway,this.promotion,this.priceProcessor,this.language)}initializeRendering(){d(N,this,or).call(this,this.widgetConfig.observeElements),d(N,this,ht).call(this,[]),this.modal.renderModals()}};Be=He;function ht(e){e=e.filter(n=>n.widget!=null),this.widgetConfig.configGroups.forEach((n,i)=>{this.sezzleDOMFunctions.getElementsByXPath(n.xpath).forEach(a=>{if(!a.hasAttribute("data-sezzleindex")){const c=d(N,this,Jn).call(this,a,i,n);if(c){this.widgetEventLogger.logEvent("onload");try{const o={priceElement:a,observer:this.sezzleDOMFunctions.startObserve(a,u=>{d(N,this,Vn).call(this,u,n,this.priceProcessor)}),widget:c,configGroup:n};e.push(o),this.modal.addClickEventForModal(o),this.sezzleDOMFunctions.observeRelatedElements(o.priceElement,o.widget,o.configGroup.relatedElementActions)}catch(o){this.widgetEventLogger.logEvent("warning",`The widget has been rendered, but an error occurred when running additional instructions: ${o.message}`)}}}})}),e.forEach(n=>{document.body.contains(n.priceElement)||(n.observer!==null&&n.observer.disconnect(),n.widget.remove(),n.widget=null)});for(let n=0,i=this.widgetConfig.configGroups.length;n<i;n++)this.sezzleDOMFunctions.hideSezzleHideElements(n);setTimeout(()=>{d(N,this,ht).call(this,e),this.competitor.logCompetitorEvents(),this.widgetEventLogger.forceSendEvents()},this.intervalInMs);const t=document.querySelector(".sezzle-");t!==null&&(t.classList.contains("sezzle-hidden")||t.classList.add("sezzle-hidden"))}function Vn(e,t,n){e.filter(i=>i.type==="childList").forEach(i=>{const a=i.target.dataset.sezzleindex,c=document.querySelector(`.sezzleindex-${a}`);if(c){const o=c.parentElement,u=o.parentElement.parentElement;try{u.classList.remove("sezzle-hidden");const p=n.getParsedPrice(i.target,t.ignoredPriceElements,t.ignoredFormattedPriceText),C=n.getProductPriceEligibility(p);(C.isPriceGreaterThanMaxPrice&&!C.isLongTermPaymentEligible||!C.isLongTermPaymentEligible&&this.widgetConfig.config.isLongTermOnly)&&u.classList.add("sezzle-hidden"),o.innerHTML=d(N,this,mt).call(this,t,a,C,p).innerHTML}catch(p){u.classList.add("sezzle-hidden"),this.widgetEventLogger.logEvent("warning",p.message)}}})}function je(e){return e&&Object.keys(e).length===0&&e.constructor===Object}function Jn(e,t=0,n){try{if(e.classList.contains("sezzle-ignored-price-element"))return null;const i=this.priceProcessor.getParsedPrice(e,n.ignoredPriceElements,n.ignoredFormattedPriceText);if(!i)return this.widgetEventLogger.logEvent("warning",`Cannot render widget. Failed to parse price for the element ${e.id||e.className}`),null;const a=this.priceProcessor.getProductPriceEligibility(i);if(a.isPriceGreaterThanMaxPrice&&!a.isLongTermPaymentEligible||!a.isLongTermPaymentEligible&&this.widgetConfig.config.isLongTermOnly)return null;const c=this.sezzleDOMFunctions.getElementToRender(e,t);e.dataset.sezzleindex=t,n.alignment==="auto"&&(n.alignment=d(N,this,Gn).call(this,e));const o=document.createElement("div");o.className=`sezzle-shopify-info-button sezzlewidgetindex-${t}`,d(N,this,gt).call(this,o),d(N,this,je).call(this,n.containerStyle)||d(N,this,Qn).call(this,o,n);const u=document.createElement("div");u.ariaHasPopup="dialog",u.role="button",u.className="sezzle-checkout-button-wrapper sezzle-modal-link",u.tabIndex=0,u.style.cursor="pointer",d(N,this,gt).call(this,u),d(N,this,ft).call(this,u,n);const p=d(N,this,mt).call(this,n,t,a,i);return u.appendChild(p),o.appendChild(u),n.widgetIsFirstChild?d(N,this,ir).call(this,o,c):d(N,this,rr).call(this,o,c),o}catch(i){return this.widgetEventLogger.logEvent("error",`An exception occurred when rendering a widget: ${i.message}`),null}}function mt(e,t,n,i){const a=document.createElement("div");return a.className="sezzle-button-text",a.style.fontSize="14px",a.style.lineHeight="18px",d(N,this,je).call(this,e.textStyle)||d(N,this,er).call(this,a,e),d(N,this,ft).call(this,a,e),d(N,this,tr).call(this,a,e),d(N,this,Zn).call(this,e,n).forEach(c=>{switch(c){case"sup":{const o=document.createElement("sup");o.textContent="1",a.appendChild(o);break}case"price":{const o=document.createElement("span");o.className=`sezzle-payment-amount sezzle-button-text sezzleindex-${t}`;const u=this.priceProcessor.getFormattedWidgetPrice(i,n.isLongTermPaymentEligible,n.is5PayEligible),p=document.createTextNode(u);o.appendChild(p),a.appendChild(o);break}case"logo":{const o=document.createElement("img");o.className=`sezzle-logo ${e.imageClassName}`,o.src=e.imageURL,o.alt="Sezzle",o.width=72,o.height=18,o.style.height="18px",o.style.width="72px",a.appendChild(o),d(N,this,je).call(this,e.logoStyle)||d(N,this,nr).call(this,o,e);break}case"info":{const o=document.createElement("div");o.ariaLabel=`${this.language.translations.clickToLearnMore} Sezzle`,o.name=`${this.language.translations.clickToLearnMore} Sezzle`,o.className="sezzle-info-icon sezzle-modal-link",o.innerHTML="&#9432",o.style=`font-size: ${e.textStyle.fontSize}px`,a.appendChild(o);break}case"afterpay-logo":{const o=document.createElement("img");o.className="sezzle-ap-logo ap-modal-info-link no-sezzle-info",o.src="https://media.sezzle.com/sezzle-credit-website-assets/ap-badge-black-on-mint.svg",o.alt=`${this.language.translations.clickToLearnMore} Afterpay`,a.appendChild(o);break}case"klarna-logo":{const o=document.createElement("img");o.className="sezzle-klarna-logo klarna-modal-info-link no-sezzle-info",o.src="https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg",o.alt=`${this.language.translations.clickToLearnMore} Klarna`,a.appendChild(o);break}case"line-break":{const o=document.createElement("br");a.appendChild(o);break}case"min-price":{const o=document.createElement("span");o.className=`sezzle-payment-amount sezzle-button-text sezzleindex-${t}`;const u=this.priceProcessor.getFormattedMinPrice(i),p=document.createTextNode(u);o.appendChild(p),a.appendChild(o);break}case"timer":{const o=document.createElement("span");o.className="sezzle-giveaway-timer",o.textContent=this.giveaway.getTimeLeftInDay(),a.appendChild(o),setInterval(()=>{o.textContent=this.giveaway.getTimeLeftInDay()},1e3);break}case"award":{const o=document.createElement("span");o.className="sezzle-giveaway-award",o.textContent=`$${document.giveawayConfig.award}`,a.appendChild(o);break}default:{const o=document.createTextNode(c);a.appendChild(o);break}}}),a}function Zn(e,t){let n,i;if(t.isLongTermPaymentEligible)n=this.language.translations.longTerm,i="longTerm";else if(document.giveawayConfig)n=this.language.translations.giveaway,i="giveaway";else if(document.sezzlePromotion){n=this.language.translations.promo,i="promo";const c=this.promotion.getPromotionString();n=n.replace("{promotext}",c)}else(this.widgetConfig.apDualInstall||this.widgetConfig.klarnaDualInstall)&&t.is5PayEligible?(n=this.language.translations.dualInstall,i="dualInstall"):(n=this.language.translations.widget,i="widget");if(t.isPriceLessThanMinPrice){const c=this.language.translations.thresholdPrice;n=n.replace("{thresholdPriceText}",c)}else{if(this.widgetConfig.apDualInstall){const c=this.language.translations.apDualInstall;n=n.replace("{apDualInstallText}",c)}if(this.widgetConfig.klarnaDualInstall){const c=this.language.translations.klarnaDualInstall;n=n.replace("{klarnaDualInstallText}",c)}}const a=t.is5PayEligible?5:4;return n=n.replace("{numberOfPayments}",a),n=n.replace("{apDualInstallText}",""),n=n.replace("{klarnaDualInstallText}",""),n=n.replace("{thresholdPriceText}",""),this.widgetEventLogger.setWidgetContext(i,a),n.split("%%")}function Gn(e){if(!e)return"left";const t=window.getComputedStyle(e).textAlign;return t==="start"||t==="justify"?"left":t==="end"?"right":t}function gt(e){return e.className+=` sezzle-${this.widgetConfig.merchantID}`,e}function Qn(e,t){Object.keys(t.containerStyle).forEach(n=>{e.style[n]=t.containerStyle[n]})}function ft(e,t){let n="";if(typeof matchMedia<"u"&&t.alignmentSwitchMinWidth&&t.alignmentSwitchType){const a=`(min-width: ${t.alignmentSwitchMinWidth}px)`;window.matchMedia(a).matches||(n=t.alignmentSwitchType)}const i=n||t.alignment||"auto";e.className+=` sezzle-${i}`}function er(e,t){Object.keys(t.textStyle).forEach(n=>{e.style[n]=t.textStyle[n]})}function tr(e,t){switch(t.theme){case"dark":case"white-flat":e.className+=" szl-dark";break;default:e.className+=" szl-light";break}}function nr(e,t){Object.keys(t.logoStyle).forEach(n=>{e.style[n]=t.logoStyle[n]})}function rr(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function ir(e,t){for(t.parentElement.insertBefore(e,t);e.previousSibling;)e.parentElement.insertBefore(e,e.previousSibling)}function or(e){Be.isEventListenerAdded||!Array.isArray(e)||e.length==0||(e.forEach(t=>{const n=document.querySelectorAll(t.element);n.length>0&&n.forEach(i=>{i.addEventListener(t.eventType,()=>{const a=document.querySelector("[data-sezzleindex]");a&&a.removeAttribute("data-sezzleindex");const c=document.querySelector(".sezzle-shopify-info-button");c&&c.remove();const o=Me.NewWidgetEventLogger(document.sezzleConfig.merchantID);new vt(Kn(document.sezzleConfig),o).init()})})}),Be.isEventListenerAdded=!0)}ne(He,"isEventListenerAdded",!1);var ar=" or %%afterpay-logo%%",sr="Click to learn more about",lr="Buy now, pay later with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",cr="or {numberOfPayments} payments of %%price%% with %%logo%%{thresholdPriceText} within %%timer%% to win %%award%% %%info%%",ur=" or %%klarna-logo%%",dr="or monthly payments as low as %%price%% with %%logo%% %%info%%",hr="or {numberOfPayments} payments of %%price%% with %%logo%%{thresholdPriceText}{promotext} %%info%%",mr="Sezzle Information",gr=" for orders over %%min-price%%",fr="or {numberOfPayments} payments of %%price%% with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",pr={apDualInstall:ar,clickToLearnMore:sr,dualInstall:lr,giveaway:cr,klarnaDualInstall:ur,longTerm:dr,promo:hr,sezzleInformation:mr,thresholdPrice:gr,widget:fr},yr=" ou %%afterpay-logo%%",vr="Cliquez pour en savoir plus sur",zr="Achetez maintenant, payez plus tard avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",br="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{thresholdPriceText} dans les %%timer%% pour gagner %%award%% %%info%%",wr=" ou %%klarna-logo%%",Cr="ou des paiements mensuels aussi bas que %%price%% avec %%logo%% %%info%%",Tr="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{thresholdPriceText}{promotext} %%info%%",Er="Informations Sezzle",Sr=" pour les achats de plus de %%min-price%%",Pr="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",_r={apDualInstall:yr,clickToLearnMore:vr,dualInstall:zr,giveaway:br,klarnaDualInstall:wr,longTerm:Cr,promo:Tr,sezzleInformation:Er,thresholdPrice:Sr,widget:Pr},$r=" o %%afterpay-logo%%",Lr="Haga clic para obtener más información sobre",Mr="Compra ahora, paga después con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",kr="o {numberOfPayments} pagos de %%price%% con %%logo%%{thresholdPriceText} dentro de %%timer%% para ganar %%award%% %%info%%",xr=" o %%klarna-logo%%",Dr="o pagos mensuales tan bajos como %%price%% con %%logo%% %%info%%",Or="o {numberOfPayments} pagos de %%price%% con %%logo%%{thresholdPriceText}{promotext} %%info%%",Ir="Información de Sezzle",Nr=" por compras superiores a %%min-price%%",Ar="o {numberOfPayments} pagos de %%price%% con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",Wr={apDualInstall:$r,clickToLearnMore:Lr,dualInstall:Mr,giveaway:kr,klarnaDualInstall:xr,longTerm:Dr,promo:Or,sezzleInformation:Ir,thresholdPrice:Nr,widget:Ar},pt=new WeakSet,Fr=class{constructor(){ee(this,pt),this.defaultLanguage="en",this.translationsMap={en:pr,fr:_r,es:Wr},this.translations=null,this.language=null}getTranslations(){return this.translationsMap[this.language]}setLanguage(e){let t;typeof e=="function"?t=e():t=e,(!t||typeof t!="string")&&(t=document.querySelector("html").lang);const n=t.substring(0,2).toLowerCase();d(pt,this,qr).call(this,n)?this.language=n:this.language=this.defaultLanguage,this.translations=this.getTranslations()}getLanguage(){return this.language||this.defaultLanguage}};function qr(e){let t=0;return Object.getOwnPropertyNames(this.translationsMap).forEach(n=>{n===e&&t++}),t>0}var yt=new WeakSet,vt=class{constructor(e,t){ee(this,yt),this.basicWidgetConfiguration=e,this.widgetEventLogger=t,this.competitor=new xe(this.widgetEventLogger)}async init(){try{this.widgetEventLogger.logEvent("request");const e=B.getCookie("shopify_pay_redirect");e&&this.widgetEventLogger.logEvent(`shopify-pay-redirect-${e}`);const t=new Fr,n=new Zt(this.basicWidgetConfiguration,t,this.widgetEventLogger);await n.setAPModalHTML(),await n.setKlarnaModalHTML();const i=n.getSezzleConfig;i.configGroups.length>0&&await d(yt,this,Ur).call(this,i,t)}catch(e){this.widgetEventLogger.logEvent("error",e.message)}this.widgetEventLogger.forceSendEvents()}};async function Ur(e,t){new He(e,this.widgetEventLogger,t).initializeRendering(),B.isWidgetDuplicateFound()&&this.widgetEventLogger.logEvent("duplicate-widget"),this.competitor.logCompetitorEvents()}var Br=dt();function Hr(){const e=Br(document.sezzleConfig),t=e?.merchantID,n=Me.NewWidgetEventLogger(t||"");if(!jr(t)){if(!e){n.logEvent("request"),n.logEvent("error","No sezzleConfig is found in the document. Check that at least a default or a custom override config is presented for the merchant"),n.forceSendEvents();return}t||n.logEvent("warning","Merchant UUID is not provided"),B.waitForBodyToBeReady().then(()=>{new vt(e,n).init()})}}function jr(e){return e?(document.sezzleJSMerchantUUIDs||(document.sezzleJSMerchantUUIDs=[]),document.sezzleJSMerchantUUIDs.includes(e)?!0:(document.sezzleJSMerchantUUIDs.push(e),!1)):!1}Hr()})();
