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 (safe-serve)
document.sezzleConfig = {"configGroups":[{"targetXPath":".price-withouttax/.price-value-wrapper/.price-value"},{"targetXPath":".price-withtax/.price-value-wrapper/.price-value"},{"targetXPath":".productView-price/.price-section/.price--withoutTax"},{"targetXPath":".productView-price/.price-section/.price--withTax"},{"renderToPath":"../..","targetXPath":".cart-total-grandTotal/SPAN-0","urlMatch":"cart"},{"targetXPath":".order-total/.cart-totals-value/.value-price"}]};

if (document.sezzleConfig){
   document.sezzleConfig.merchantID = 'a8d4cdc4-3f02-45ad-8405-dc01d0ba048f';

   // 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 Yt=Object.create,it=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,Xt=Object.getOwnPropertyNames,Kt=Object.getPrototypeOf,Jt=Object.prototype.hasOwnProperty,Le=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Zt=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=Xt(t),l=0,o=a.length,u;l<o;l++)u=a[l],!Jt.call(e,u)&&u!==n&&it(e,u,{get:(p=>t[p]).bind(null,u),enumerable:!(i=Vt(t,u))||i.enumerable});return e},He=(e,t,n)=>(n=e!=null?Yt(Kt(e)):{},Zt(t||!e||!e.__esModule?it(n,"default",{value:e,enumerable:!0}):n,e)),Gt=document.widgetServerBaseUrl?`${document.widgetServerBaseUrl}/v1/event/log`:"http://widget.sezzle.com/v1/event/log",Qt="sezzle-shopify-info-button",B=class{static httpRequestWrapper(e,t,n=null){return new Promise((i,a)=>{const l=new XMLHttpRequest;l.open(e,t,!0),n!==null&&l.setRequestHeader("Content-Type","application/json"),l.onload=function(){this.status>=200&&this.status<300?i(l.response):a(new Error(`An error occurred when calling ${t}. Status code: ${this.status} Response text: ${l.responseText}`))},l.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?l.send():l.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(`.${Qt}:not([style*='display: none'])`).length>1}static sendEvents(e){this.httpRequestWrapper("post",Gt,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,l=(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&&l<=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 en(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function te(e,t){en(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 ne=new WeakSet,tn=class{constructor(e,t,n){te(this,ne),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(ne,this,nn).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 nn(){d(ne,this,rn).call(this),d(ne,this,sn).call(this),d(ne,this,ln).call(this),d(ne,this,un).call(this)}function rn(){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(ne,this,on).call(this),d(ne,this,an).call(this)}function on(){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 an(){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 sn(){this.basicWidgetConfig.configGroups=this.basicWidgetConfig.configGroups.filter(e=>!e.urlMatch||RegExp(e.urlMatch,"i").test(window.location.href))}function ln(){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 cn(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.apLogoVariant="pill",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",t.apLogoVariant="black";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 un(){this.widgetConfig.configGroups=[],this.basicWidgetConfig.configGroups.forEach(e=>{this.widgetConfig.configGroups.push(d(ne,this,cn).call(this,e))})}var dn=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 l=0;l<a.length;l++){const o=a[l];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(l=>l!==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 l=0;l<a.length;l++){const o=a[l];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)return e.textContent;const n=[];if(t.forEach(a=>{this.getElementsByXPath(a,0,[e]).forEach(l=>{l.classList.add("sezzle-ignored-price-element"),n.push(l)})}),!n.length)return e.textContent;const i=e.cloneNode(!0);return Array.prototype.slice.call(i.getElementsByClassName("sezzle-ignored-price-element")).forEach(a=>{a.remove()}),n.forEach(a=>{a.classList.remove("sezzle-ignored-price-element")}),i.textContent}startObserve(e,t){const n=new MutationObserver(t);return n.observe(e,this.config.mutationObserverConfig),n}observeRelatedElements(e,t,n){const i=[];return n&&n.forEach(a=>{if(typeof a.relatedPath=="string"&&(typeof a.action=="function"||typeof a.initialAction=="function")){const l=this.getElementsByXPath(B.breakXPath(a.relatedPath),0,[e]);l.length>0&&(typeof a.action=="function"&&i.push(this.startObserve(l[0],o=>{a.action(o,t)})),typeof a.initialAction=="function"&&a.initialAction(l[0],t))}}),i}hideSezzleHideElements(e){this.config.configGroups[e].hideClasses.forEach(t=>{this.getElementsByXPath(t).forEach(n=>{n.classList.contains("sezzle-hidden")||n.classList.add("sezzle-hidden")})})}},hn=["en","fr","es"],mn={languages:hn},P=new WeakSet,gn=class{constructor(e,t,n,i,a,l){te(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=l,this.messageEventHandler=this.messageEventHandler.bind(this),this.modalIframe=null,this.activeTab=1,this.pi5MinPriceInCents=5e3}addClickEventForModal(e){this.sezzleElement=e.widget,d(P,this,bn).call(this,e),d(P,this,vn).call(this,e),d(P,this,zn).call(this),d(P,this,wn).call(this)}renderModals(){d(P,this,Cn).call(this),d(P,this,Tn).call(this),d(P,this,Sn).call(this)}messageEventHandler(e){const{origin:t,data:n}=e;t==this.widgetConfig.apiEndpoints.dynamicModalURL&&n=="close-modal"&&(d(P,this,je).call(this),window.removeEventListener("message",this.messageEventHandler))}};async function fn(){if(window.ModalUI)return;mn.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,En).call(this),d(P,this,je).call(this)}function ot(e,t){if(e.preventDefault(),d(P,this,Mn).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,pn).call(this),this.widgetEventLogger.logEvent("onclick")}}}function pn(){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",l=>{delete i[l.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 l=document.getElementsByClassName("sezzle-checkout-modal-lightbox");for(let u=0;u<l.length;u++)l[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 yn(){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 l=a.querySelector(".carousel-dots").children;for(let o=0;o<l.length;o++)this.activeTab-1===o?l[o].className="dot active":l[o].className="dot"}})}function je(){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 vn(e){e.widget.addEventListener("keydown",t=>{(t.key==="Enter"||t.key===" ")&&d(P,this,ot).call(this,t,e)})}function bn(e){e.widget.addEventListener("click",t=>{d(P,this,ot).call(this,t,e)})}function zn(){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 wn(){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 Cn(){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,fn).call(this)}catch(e){this.widgetEventLogger.logEvent("error",e.message)}}function Tn(){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 Sn(){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 En(){const e=document.head,t=document.createElement("script");t.innerHTML=this.modalNode.querySelector("script").innerHTML,e.appendChild(t)}function at(e,t){for(let n=0;n<e.length;n++)e[n].textContent=t}function Pn(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),l=t.getElementsByClassName("4-pay-installment"),o=t.getElementsByClassName("5-pay-installment");d(P,this,at).call(this,l,a.pi4InstallmentAmount),d(P,this,at).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 _n(e,t,n){const i=e.querySelector(".sezzle-lt-payments")||e.querySelector(".payment-cards-monthly");if(!i)return;const a=this.priceProcessor.longTermPaymentConfig,l=n*100,o=a&&l>=a.minPrice&&l<=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 S=C[L];S.setAttribute("data-months",D.durationInMonths),S.querySelector(".monthly-amount").textContent=D.monthlyPayment;const _=S.querySelector(".pill"),T=_.textContent.replace(/^\d+\s*/,"");_.textContent=`${D.durationInMonths} ${T}`,S.querySelector(".monthly-apr").textContent=`${D.apr}%`,S.querySelector(".monthly-interest").textContent=D.totalInterest,S.querySelector(".monthly-total").textContent=D.totalAmount})}function $n(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,l=this.priceProcessor.getCurrency(n.value);if(n.value===l||!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,Pn).call(this,e,t)):L&&(L.style.display="none"),d(P,this,_n).call(this,t,i,a)}function Ln(){const e=document.querySelector("#sezzle-modal-core-content"),t=e?.querySelector(".input-amount");t&&t.addEventListener("input",n=>{d(P,this,$n).call(this,n,e)})}function Mn(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,xn).call(this)}function kn(){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 l=t.getAttribute("aria-expanded")==="true";t.setAttribute("aria-expanded",String(!l)),t.setAttribute("aria-label",l?t.dataset.labelExpand:t.dataset.labelCollapse),n.style.display=l?"none":"",n.setAttribute("aria-hidden",String(l)),i&&(i.style.display=l?"":"none"),a&&(a.style.display=l?"none":"")})}function xn(){window.ModalUI?window.ModalUI.load():this.widgetEventLogger.logEvent("error","ModalUI is undefined. Problem adding modal script to the document"),d(P,this,je).call(this),d(P,this,Ln).call(this),d(P,this,yn).call(this),d(P,this,kn).call(this)}function Se(e){"@babel/helpers - typeof";return Se=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},Se(e)}function Dn(e,t){if(Se(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(Se(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function On(e){var t=Dn(e,"string");return Se(t)=="symbol"?t:t+""}function ee(e,t,n){return(t=On(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(te(this,Ee),ee(this,"merchantUUID",void 0),ee(this,"events",void 0),ee(this,"sentEvents",void 0),ee(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,In).call(this,i.name,i.description)||(this.events.push(i),a&&(d(Ee,this,st).call(this),this.events=[]))}forceSendEvents(){d(Ee,this,st).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 In(e,t){return this.events.some(n=>n.name===e&&n.description===t)}function Nn(e,t){return this.sentEvents.some(n=>n.name===e&&n.description===t)}function st(){try{const e=[];this.events.forEach(t=>{d(Ee,this,Nn).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)}}ee(Me,"initializing",void 0),ee(Me,"widgetEventLogger",void 0);var An=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,l){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[`${l}`]),u[`${l}`])}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""}},Wn=class Be{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 An}getPromotionString(){return this.promoConfig?Be.getPromotionString(this.promoConfig,this.language,this.defaultLanguage,this.promoTranslations):""}static getPromotionString(t,n,i,a){const l=Fn[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(l,u,o,p,n,i);return C=C.replace("{money}",Be.format(n,t.currency_code,t.spend_award_in_cents)),o&&(C=C.replace("{threshold}",Be.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}),l=new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}),o=parseInt(i)/100;return o%1===0?a.format(o):l.format(o)}},Fn={1:"reward",2:"discount"},qn=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,l="millisecond",o="second",u="minute",p="hour",C="day",D="week",L="month",S="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+)?$/,N=/\[([^\]]+)]|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(z){var f=["th","st","nd","rd"],h=z%100;return"["+z+(f[(h-20)%10]||f[h]||f[0])+"]"}},I=function(z,f,h){var v=String(z);return!v||v.length>=f?z:""+Array(f+1-v.length).join(h)+z},F={s:I,z:function(z){var f=-z.utcOffset(),h=Math.abs(f),v=Math.floor(h/60),m=h%60;return(f<=0?"+":"-")+I(v,2,"0")+":"+I(m,2,"0")},m:function z(f,h){if(f.date()<h.date())return-z(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(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:L,y:_,w:D,d:C,D:T,h:p,m:u,s:o,ms:l,Q:S}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},H="en",q={};q[H]=W;var R="$isDayjsObject",J=function(z){return z instanceof de||!(!z||!z[R])},Y=function z(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 z(g[0])}else{var k=f.name;q[k]=f,m=k}return!v&&m&&(H=m),m||!v&&H},M=function(z,f){if(J(z))return z.clone();var h=typeof f=="object"?f:{};return h.date=z,h.args=arguments,new de(h)},E=F;E.l=Y,E.i=J,E.w=function(z,f){return M(z,{locale:f.$L,utc:f.$u,x:f.$x,$offset:f.$offset})};var de=(function(){function z(h){this.$L=Y(h.locale,null,!0),this.parse(h),this.$x=this.$x||h.x||{},this[R]=!0}var f=z.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(E.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 E},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 E.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=!!E.u(v)||v,g=E.p(h),k=function(ie,V){var Q=E.w(m.$u?Date.UTC(m.$y,V,ie):new Date(m.$y,V,ie),m);return w?Q:Q.endOf(C)},A=function(ie,V){return E.w(m.toDate()[ie].apply(m.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(V)),m)},x=this.$W,U=this.$M,X=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?X-he:X+(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=E.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[l]=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[E.p(h)]()},f.add=function(h,v){var m,w=this;h=Number(h);var g=E.p(v),k=function(U){var X=M(w);return E.w(X.date(X.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 E.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=E.z(this),k=this.$H,A=this.$m,x=this.$M,U=m.weekdays,X=m.months,se=m.meridiem,re=function(V,Q,me,be){return V&&(V[Q]||V(v,w))||me[Q].slice(0,be)},he=function(V){return E.s(k%12||12,V,"0")},ie=se||function(V,Q,me){var be=V<12?"AM":"PM";return me?be.toLowerCase():be};return w.replace(N,(function(V,Q){return Q||(function(me){switch(me){case"YY":return String(v.$y).slice(-2);case"YYYY":return E.s(v.$y,4,"0");case"M":return x+1;case"MM":return E.s(x+1,2,"0");case"MMM":return re(m.monthsShort,x,X,3);case"MMMM":return re(X,x);case"D":return v.$D;case"DD":return E.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 E.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 E.s(A,2,"0");case"s":return String(v.$s);case"ss":return E.s(v.$s,2,"0");case"SSS":return E.s(v.$ms,3,"0");case"Z":return g}return null})(V)||g.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(h,v,m){var w,g=this,k=E.p(v),A=M(h),x=(A.utcOffset()-this.utcOffset())*i,U=this-A,X=function(){return E.m(g,A)};switch(k){case _:w=X()/12;break;case L:w=X();break;case S:w=X()/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:E.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 E.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()},z})(),Pe=de.prototype;return M.prototype=Pe,[["$ms",l],["$s",o],["$m",u],["$H",p],["$W",C],["$M",L],["$y",_],["$D",T]].forEach((function(z){Pe[z[1]]=function(f){return this.$g(f,z[0],z[1])}})),M.extend=function(z,f){return z.$i||(z(f,de,M),z.$i=!0),M},M.locale=Y,M.isDayjs=J,M.unix=function(z){return M(1e3*z)},M.en=q[H],M.Ls=q,M.p={},M}))})),Un=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(l,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 N=this.$utils().u;if(N(y))return this.$u?0:N(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 I=this.clone();if($)return I.$offset=W,I.$u=!1,I;var F=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(I=this.local().add(W+F,n)).$offset=W,I.$x.$localOffset=F,I};var S=p.format;p.format=function(y){var $=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return S.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,$,N){if(y&&this.$u===y.$u)return T.call(this,y,$,N);var W=this.local(),I=u(y).local();return T.call(W,I,$,N)}}}))})),Bn=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,l,o){var u,p=function(S,_,T){T===void 0&&(T={});var y=new Date(S);return(function($,N){N===void 0&&(N={});var W=N.timeZoneName||"short",I=$+"|"+W,F=i[I];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[I]=F),F})(_,T).formatToParts(y)},C=function(S,_){for(var T=p(S,_),y=[],$=0;$<T.length;$+=1){var N=T[$],W=N.type,I=N.value,F=n[W];F>=0&&(y[F]=parseInt(I,10))}var H=y[3],q=H===24?0:H,R=y[0]+"-"+y[1]+"-"+y[2]+" "+q+":"+y[4]+":"+y[5]+":000",J=+S;return(o.utc(R).valueOf()-(J-=J%1e3))/6e4},D=l.prototype;D.tz=function(S,_){S===void 0&&(S=u);var T,y=this.utcOffset(),$=this.toDate(),N=$.toLocaleString("en-US",{timeZone:S}),W=Math.round(($-new Date(N))/1e3/60),I=15*-Math.round($.getTimezoneOffset()/15)-W;if(!Number(I))T=this.utcOffset(0,_);else if(T=o(N,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(I,!0),_){var F=T.utcOffset();T=T.add(y-F,"minute")}return T.$x.$timezone=S,T},D.offsetName=function(S){var _=this.$x.$timezone||o.tz.guess(),T=p(this.valueOf(),_,{timeZoneName:S}).find((function(y){return y.type.toLowerCase()==="timezonename"}));return T&&T.value};var L=D.startOf;D.startOf=function(S,_){if(!this.$x||!this.$x.$timezone)return L.call(this,S,_);var T=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return L.call(T,S,_).tz(this.$x.$timezone,!0)},o.tz=function(S,_,T){var y=T&&_,$=T||_||u,N=C(+o(),$);if(typeof S!="string")return o(S).tz($);var W=(function(q,R,J){var Y=q-60*R*1e3,M=C(Y,J);if(R===M)return[Y,R];var E=C(Y-=60*(M-R)*1e3,J);return M===E?[Y,M]:[q-60*Math.min(M,E)*1e3,Math.max(M,E)]})(o.utc(S,y).valueOf(),N,$),I=W[0],F=W[1],H=o(I).utcOffset(F);return H.$x.$timezone=$,H},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(S){u=S}}}))})),ye=He(qn()),Hn=He(Un()),jn=He(Bn());ye.default.extend(Hn.default),ye.default.extend(jn.default);var Rn=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,lt=class{constructor(e){te(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,ut).call(this,e),n={productPrice:e,paymentTerms:[]};return n.paymentTerms=t.map(i=>{const a=i[0],l=i[1],o=d(ue,this,ct).call(this,e,a,l),u=d(ue,this,Vn).call(this,o*a);return{durationInMonths:a,apr:l,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,Yn).call(this,e);return d(ue,this,ct).call(this,e,t[0],t[1])}};function ct(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 Yn(e){return d(ue,this,ut).call(this,e)[0]}function ut(e){for(const t of this.terms)if(e>t.price)return t.options;return this.terms[this.terms.length-1].options}function Vn(e){return Math.round(e*100)/100}var ve=new WeakSet,Xn=class{constructor(e,t,n,i,a){te(this,ve),this.sezzleDOMFunctions=n,this.widgetEventLogger=i,this.widgetConfig=e,this.longTermPaymentConfig=t,this.language=a,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.naFormatWithSpace=/^\d{1,3}(\s\d{3})+\.\d+$/,this.unknownFormatWithSpace=/^\d{1,3}(\s\d{3})+$/,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(ve,this,Kn).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 l=a,o;return this.naFormat.test(a)&&(l=a.replaceAll(",",""),o=this.naFormat),this.euFormat.test(a)&&(l=a.replaceAll(".","").replaceAll(",","."),o=this.euFormat),this.naFormatWithSpace.test(a)&&(l=a.replace(/\s/g,""),o=this.naFormatWithSpace),this.euFormatWithSpace.test(a)&&(l=a.replace(/\s/g,"").replaceAll(",","."),o=this.euFormatWithSpace),this.unknownFormatWithSpace.test(a)&&(l=a.replace(/\s/g,""),o=this.unknownFormatWithSpace),this.euDecimalsNoThousandDelimiterFormat.test(a)&&(l=a.replaceAll(",","."),o=this.euDecimalsNoThousandDelimiterFormat),parseFloat(l)===NaN&&this.widgetEventLogger.logEvent("warning",`parsed price element text ${l} is not a number`),{value:parseFloat(l),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 l,o;if(t)l=new lt(this.longTermPaymentConfig.paymentTerms).calculateLowestAvailablePayment(a.value).toFixed(this.numberOfDecimals);else{const u=n?5:4;l=(a.value/u).toFixed(this.numberOfDecimals)}o=d(ve,this,dt).call(this,l,a.format),i=i.replace(this.placeholder,o)}return i}getFormattedMinPrice(e){const t=e.prices[0].format,n=e.formatter,i=d(ve,this,dt).call(this,this.widgetConfig.minPrice/100,t),a=d(ve,this,Zn).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 lt(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,l={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 l.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,",")})),l}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 Kn(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 Jn(){const e=this.language&&typeof this.language.getLanguage=="function"?this.language.getLanguage():null;if(!e)return",";try{return new Intl.NumberFormat(e).formatToParts(1.1).find(t=>t.type==="decimal")?.value??","}catch{return","}}function dt(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.naFormatWithSpace:return e.toString().replace(this.thousandDelimiter," ");case this.unknownFormatWithSpace:return d(ve,this,Jn).call(this)===","?e.toString().replace(".",",").replace(this.thousandDelimiter," "):e.toString().replace(this.thousandDelimiter," ");case this.euDecimalsNoThousandDelimiterFormat:return e.toString().replace(".",",");default:return e.toString()}}function Zn(e){const t=["–","-"];let n="";return t.forEach(i=>{e.includes(i)&&(n=i)}),n}var ke,ht=new WeakSet,xe=class Rt{constructor(t){te(this,ht),this.widgetEventLogger=t}logCompetitorEvents(){for(const t in Rt.competitorWidgets)d(ht,this,Gn).call(this,t)&&this.widgetEventLogger.logEvent("competitor-widget",t)}};ke=xe;function Gn(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}ee(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 mt="http://www.w3.org/2000/svg",Qn="https://media.sezzle.com/sezzle-credit-website-assets/ap-badge-black-on-mint.svg",De={viewBox:"0 0 170 35",width:170,height:35,paths:["M13.7 15.2c0-2.8-2.1-4.8-4.7-4.8s-4.7 2-4.7 4.8 2.1 4.7 4.7 4.7 4.7-2 4.7-4.7m0 8.3v-2.2a7 7 0 0 1-5.4 2.4A8 8 0 0 1 0 15.2c0-5 3.7-8.6 8.4-8.6q3.3.2 5.3 2.4V6.9h4.2v16.6z","M38.4 19.8q-2 0-1.9-2v-7.3h2.8V6.9h-2.8v-4h-4.3v4h-5.6v-1q0-2 2.1-2h1V.7h-2.1q-5.4-.2-5.3 4.6v1.6H20v3.6h2.4v13h4.3v-13h5.6v8.1q-.2 5 4.9 4.9h2.2v-3.7z","M54 13.7a4 4 0 0 0-4.3-3.5 4 4 0 0 0-4.3 3.5zm-8.7 2.6c.3 2.4 2.2 3.8 4.5 3.8q2.8 0 4-2.1h4.5c-1 3.5-4.3 5.7-8.6 5.7-5.2 0-8.9-3.5-8.9-8.5s3.9-8.6 9-8.6a8.5 8.5 0 0 1 8.7 9.7z","M86.1 15.2a4.7 4.7 0 1 0-9.3 0c0 2.7 2 4.7 4.6 4.7s4.7-2 4.7-4.7M72.5 6.9h4.2V9a7 7 0 0 1 5.5-2.4c4.6 0 8.2 3.7 8.2 8.5 0 5-3.7 8.6-8.3 8.6q-3.3 0-5.2-2.2v8.8h-4.4z","M105.7 15.2c0-2.8-2.1-4.8-4.7-4.8s-4.7 2-4.7 4.8 2.1 4.7 4.7 4.7 4.7-2 4.7-4.7m0 8.3v-2.2a7 7 0 0 1-5.4 2.4 8 8 0 0 1-8.3-8.5c0-5 3.7-8.6 8.4-8.6q3.3.2 5.3 2.4V6.9h4.2v16.6z","M64.9 8.5s1-2 3.7-2a4 4 0 0 1 1.9.5v4.2s-1.6-1-3-.8Q65 11 65 13.6v9.9h-4.3V6.9h4.2z","M129.6 6.9 119 30.2h-4.5l4.2-9-7.1-14.3h5l4.2 9.5 4.3-9.5z","M163.7 6.5 153 .6c-3.1-1.7-7 .4-7 3.9v.6q0 .9.8 1.3l2 1.1c.6.4 1.3 0 1.3-.7V5.3c0-.7.9-1.2 1.5-.8l9.2 5a1 1 0 0 1 0 1.8l-9.2 5c-.6.4-1.5 0-1.5-.8v-.8c0-3.4-3.9-5.6-7-3.9l-10.5 6a4.4 4.4 0 0 0 0 7.7l10.5 5.9c3.1 1.7 7-.4 7-3.9v-.6q0-.9-.8-1.3l-2-1.1c-.5-.4-1.3 0-1.3.7v1.5c0 .7-.8 1.2-1.5.8l-9.1-5a1 1 0 0 1 0-1.8l9.1-5c.7-.4 1.5 0 1.5.8v.8c0 3.4 3.9 5.6 7 3.9l10.6-6c3-1.6 3-6 0-7.7"]},er=class{static buildAfterpayLogo(e,t){const n="sezzle-ap-logo ap-modal-info-link no-sezzle-info";if(e!=="black"){const a=document.createElement("img");return a.className=n,a.src=Qn,a.alt=t,a}const i=document.createElementNS(mt,"svg");return i.setAttribute("class",`${n} sezzle-ap-logo-text`),i.setAttribute("viewBox",De.viewBox),i.setAttribute("role","img"),i.setAttribute("aria-label",t),i.setAttribute("width",De.width),i.setAttribute("height",De.height),i.style.height="18px",i.style.width="auto",i.style.margin="0 -4px -7px 0",i.style.verticalAlign="baseline",De.paths.forEach(a=>{const l=document.createElementNS(mt,"path");l.setAttribute("d",a),l.setAttribute("fill","black"),l.setAttribute("pointer-events","none"),i.appendChild(l)}),i}},gt=Le(((e,t)=>{var n=200,i="__lodash_hash_undefined__",a=9007199254740991,l="[object Arguments]",o="[object Array]",u="[object Boolean]",p="[object Date]",C="[object Error]",D="[object Function]",L="[object GeneratorFunction]",S="[object Map]",_="[object Number]",T="[object Object]",y="[object Promise]",$="[object RegExp]",N="[object Set]",W="[object String]",I="[object Symbol]",F="[object WeakMap]",H="[object ArrayBuffer]",q="[object DataView]",R="[object Float32Array]",J="[object Float64Array]",Y="[object Int8Array]",M="[object Int16Array]",E="[object Int32Array]",de="[object Uint8Array]",Pe="[object Uint8ClampedArray]",z="[object Uint16Array]",f="[object Uint32Array]",h=/[\\^$.*+?()[\]{}|]/g,v=/\w*$/,m=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,g={};g[l]=g[o]=g[H]=g[q]=g[u]=g[p]=g[R]=g[J]=g[Y]=g[M]=g[E]=g[S]=g[_]=g[T]=g[$]=g[N]=g[W]=g[I]=g[de]=g[Pe]=g[z]=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,X=U&&typeof t=="object"&&t&&!t.nodeType&&t,se=X&&X.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 c=-1,b=r?r.length:0;++c<b&&s(r[c],c,r)!==!1;);return r}function V(r,s){for(var c=-1,b=s.length,j=r.length;++c<b;)r[j+c]=s[c];return r}function Q(r,s,c,b){var j=-1,K=r?r.length:0;for(b&&K&&(c=r[++j]);++j<K;)c=s(c,r[j],j,r);return c}function me(r,s){for(var c=-1,b=Array(r);++c<r;)b[c]=s(c);return b}function be(r,s){return r?.[s]}function Tt(r){var s=!1;if(r!=null&&typeof r.toString!="function")try{s=!!(r+"")}catch{}return s}function St(r){var s=-1,c=Array(r.size);return r.forEach(function(b,j){c[++s]=[j,b]}),c}function Ye(r,s){return function(c){return r(s(c))}}function Et(r){var s=-1,c=Array(r.size);return r.forEach(function(b){c[++s]=b}),c}var Gr=Array.prototype,Qr=Function.prototype,Ne=Object.prototype,Ve=x["__core-js_shared__"],Pt=(function(){var r=/[^.]+$/.exec(Ve&&Ve.keys&&Ve.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),_t=Qr.toString,le=Ne.hasOwnProperty,Ae=Ne.toString,ei=RegExp("^"+_t.call(le).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=se?x.Buffer:void 0,Lt=x.Symbol,Mt=x.Uint8Array,ti=Ye(Object.getPrototypeOf,Object),ni=Object.create,ri=Ne.propertyIsEnumerable,ii=Gr.splice,kt=Object.getOwnPropertySymbols,oi=$t?$t.isBuffer:void 0,ai=Ye(Object.keys,Object),Xe=Ce(x,"DataView"),_e=Ce(x,"Map"),Ke=Ce(x,"Promise"),Je=Ce(x,"Set"),Ze=Ce(x,"WeakMap"),$e=Ce(Object,"create"),si=pe(Xe),li=pe(_e),ci=pe(Ke),ui=pe(Je),di=pe(Ze),xt=Lt?Lt.prototype:void 0,Dt=xt?xt.valueOf:void 0;function ge(r){var s=-1,c=r?r.length:0;for(this.clear();++s<c;){var b=r[s];this.set(b[0],b[1])}}function hi(){this.__data__=$e?$e(null):{}}function mi(r){return this.has(r)&&delete this.__data__[r]}function gi(r){var s=this.__data__;if($e){var c=s[r];return c===i?void 0:c}return le.call(s,r)?s[r]:void 0}function fi(r){var s=this.__data__;return $e?s[r]!==void 0:le.call(s,r)}function pi(r,s){var c=this.__data__;return c[r]=$e&&s===void 0?i:s,this}ge.prototype.clear=hi,ge.prototype.delete=mi,ge.prototype.get=gi,ge.prototype.has=fi,ge.prototype.set=pi;function oe(r){var s=-1,c=r?r.length:0;for(this.clear();++s<c;){var b=r[s];this.set(b[0],b[1])}}function yi(){this.__data__=[]}function vi(r){var s=this.__data__,c=We(s,r);return c<0?!1:(c==s.length-1?s.pop():ii.call(s,c,1),!0)}function bi(r){var s=this.__data__,c=We(s,r);return c<0?void 0:s[c][1]}function zi(r){return We(this.__data__,r)>-1}function wi(r,s){var c=this.__data__,b=We(c,r);return b<0?c.push([r,s]):c[b][1]=s,this}oe.prototype.clear=yi,oe.prototype.delete=vi,oe.prototype.get=bi,oe.prototype.has=zi,oe.prototype.set=wi;function ze(r){var s=-1,c=r?r.length:0;for(this.clear();++s<c;){var b=r[s];this.set(b[0],b[1])}}function Ci(){this.__data__={hash:new ge,map:new(_e||oe),string:new ge}}function Ti(r){return Fe(this,r).delete(r)}function Si(r){return Fe(this,r).get(r)}function Ei(r){return Fe(this,r).has(r)}function Pi(r,s){return Fe(this,r).set(r,s),this}ze.prototype.clear=Ci,ze.prototype.delete=Ti,ze.prototype.get=Si,ze.prototype.has=Ei,ze.prototype.set=Pi;function we(r){this.__data__=new oe(r)}function _i(){this.__data__=new oe}function $i(r){return this.__data__.delete(r)}function Li(r){return this.__data__.get(r)}function Mi(r){return this.__data__.has(r)}function ki(r,s){var c=this.__data__;if(c instanceof oe){var b=c.__data__;if(!_e||b.length<n-1)return b.push([r,s]),this;c=this.__data__=new ze(b)}return c.set(r,s),this}we.prototype.clear=_i,we.prototype.delete=$i,we.prototype.get=Li,we.prototype.has=Mi,we.prototype.set=ki;function xi(r,s){var c=et(r)||no(r)?me(r.length,String):[],b=c.length,j=!!b;for(var K in r)(s||le.call(r,K))&&!(j&&(K=="length"||Gi(K,b)))&&c.push(K);return c}function Ot(r,s,c){var b=r[s];(!(le.call(r,s)&&Wt(b,c))||c===void 0&&!(s in r))&&(r[s]=c)}function We(r,s){for(var c=r.length;c--;)if(Wt(r[c][0],s))return c;return-1}function Di(r,s){return r&&It(s,tt(s),r)}function Ge(r,s,c,b,j,K,G){var Z;if(b&&(Z=K?b(r,j,K,G):b(r)),Z!==void 0)return Z;if(!qe(r))return r;var Ut=et(r);if(Ut){if(Z=Ki(r),!s)return Yi(r,Z)}else{var Te=fe(r),Bt=Te==D||Te==L;if(io(r))return Fi(r,s);if(Te==T||Te==l||Bt&&!K){if(Tt(r))return K?r:{};if(Z=Ji(Bt?{}:r),!s)return Vi(r,Di(Z,r))}else{if(!g[Te])return K?r:{};Z=Zi(r,Te,Ge,s)}}G||(G=new we);var Ht=G.get(r);if(Ht)return Ht;if(G.set(r,Z),!Ut)var jt=c?Xi(r):tt(r);return ie(jt||r,function(nt,Ue){jt&&(Ue=nt,nt=r[Ue]),Ot(Z,Ue,Ge(nt,s,c,b,Ue,r,G))}),Z}function Oi(r){return qe(r)?ni(r):{}}function Ii(r,s,c){var b=s(r);return et(r)?b:V(b,c(r))}function Ni(r){return Ae.call(r)}function Ai(r){return!qe(r)||eo(r)?!1:(qt(r)||Tt(r)?ei:m).test(pe(r))}function Wi(r){if(!At(r))return ai(r);var s=[];for(var c in Object(r))le.call(r,c)&&c!="constructor"&&s.push(c);return s}function Fi(r,s){if(s)return r.slice();var c=new r.constructor(r.length);return r.copy(c),c}function Qe(r){var s=new r.constructor(r.byteLength);return new Mt(s).set(new Mt(r)),s}function qi(r,s){var c=s?Qe(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.byteLength)}function Ui(r,s,c){return Q(s?c(St(r),!0):St(r),re,new r.constructor)}function Bi(r){var s=new r.constructor(r.source,v.exec(r));return s.lastIndex=r.lastIndex,s}function Hi(r,s,c){return Q(s?c(Et(r),!0):Et(r),he,new r.constructor)}function ji(r){return Dt?Object(Dt.call(r)):{}}function Ri(r,s){var c=s?Qe(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.length)}function Yi(r,s){var c=-1,b=r.length;for(s||(s=Array(b));++c<b;)s[c]=r[c];return s}function It(r,s,c,b){c||(c={});for(var j=-1,K=s.length;++j<K;){var G=s[j],Z=b?b(c[G],r[G],G,c,r):void 0;Ot(c,G,Z===void 0?r[G]:Z)}return c}function Vi(r,s){return It(r,Nt(r),s)}function Xi(r){return Ii(r,tt,Nt)}function Fe(r,s){var c=r.__data__;return Qi(s)?c[typeof s=="string"?"string":"hash"]:c.map}function Ce(r,s){var c=be(r,s);return Ai(c)?c:void 0}var Nt=kt?Ye(kt,Object):so,fe=Ni;(Xe&&fe(new Xe(new ArrayBuffer(1)))!=q||_e&&fe(new _e)!=S||Ke&&fe(Ke.resolve())!=y||Je&&fe(new Je)!=N||Ze&&fe(new Ze)!=F)&&(fe=function(r){var s=Ae.call(r),c=s==T?r.constructor:void 0,b=c?pe(c):void 0;if(b)switch(b){case si:return q;case li:return S;case ci:return y;case ui:return N;case di:return F}return s});function Ki(r){var s=r.length,c=r.constructor(s);return s&&typeof r[0]=="string"&&le.call(r,"index")&&(c.index=r.index,c.input=r.input),c}function Ji(r){return typeof r.constructor=="function"&&!At(r)?Oi(ti(r)):{}}function Zi(r,s,c,b){var j=r.constructor;switch(s){case H:return Qe(r);case u:case p:return new j(+r);case q:return qi(r,b);case R:case J:case Y:case M:case E:case de:case Pe:case z:case f:return Ri(r,b);case S:return Ui(r,b,c);case _:case W:return new j(r);case $:return Bi(r);case N:return Hi(r,b,c);case I:return ji(r)}}function Gi(r,s){return s=s??a,!!s&&(typeof r=="number"||w.test(r))&&r>-1&&r%1==0&&r<s}function Qi(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}function eo(r){return!!Pt&&Pt in r}function At(r){var s=r&&r.constructor;return r===(typeof s=="function"&&s.prototype||Ne)}function pe(r){if(r!=null){try{return _t.call(r)}catch{}try{return r+""}catch{}}return""}function to(r){return Ge(r,!0,!0)}function Wt(r,s){return r===s||r!==r&&s!==s}function no(r){return ro(r)&&le.call(r,"callee")&&(!ri.call(r,"callee")||Ae.call(r)==l)}var et=Array.isArray;function Ft(r){return r!=null&&oo(r.length)&&!qt(r)}function ro(r){return ao(r)&&Ft(r)}var io=oi||lo;function qt(r){var s=qe(r)?Ae.call(r):"";return s==D||s==L}function oo(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=a}function qe(r){var s=typeof r;return!!r&&(s=="object"||s=="function")}function ao(r){return!!r&&typeof r=="object"}function tt(r){return Ft(r)?xi(r):Wi(r)}function so(){return[]}function lo(){return!1}t.exports=to})),Oe,tr=gt(),O=new WeakSet,Ie=class rt{constructor(t,n,i){te(this,O),ee(this,"intervalInMs",void 0),this.intervalInMs=2e3,this.widgetRenderingInfos=[],this.checkIntervalTimeout=null,this.widgetConfig=t,this.widgetEventLogger=n,this.competitor=new xe(this.widgetEventLogger),this.sezzleDOMFunctions=new dn(t),this.language=i,this.promotion=new Wn(document.sezzlePromotion,this.language),this.giveaway=new Rn(document.giveawayConfig),this.priceProcessor=new Xn(t,document.longTermPaymentConfig,this.sezzleDOMFunctions,this.widgetEventLogger,this.language),this.modal=new gn(t,n,this.giveaway,this.promotion,this.priceProcessor,this.language)}initializeRendering(){rt.activeRenderers.add(this),d(O,this,hr).call(this,this.widgetConfig.observeElements),d(O,this,pt).call(this,[]),this.modal.renderModals()}teardown(){this.checkIntervalTimeout!==null&&(clearTimeout(this.checkIntervalTimeout),this.checkIntervalTimeout=null),this.widgetRenderingInfos.forEach(t=>{d(O,this,ft).call(this,t)}),this.widgetRenderingInfos=[],rt.activeRenderers.delete(this)}};Oe=Ie;function ft(e){e.observer&&e.observer.disconnect(),e.relatedObservers.forEach(t=>{t.disconnect()}),e.relatedObservers=[]}function pt(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 l=d(O,this,rr).call(this,a,i,n);if(l){this.widgetEventLogger.logEvent("onload");try{const o={priceElement:a,observer:this.sezzleDOMFunctions.startObserve(a,u=>{d(O,this,nr).call(this,u,n,this.priceProcessor,l)}),widget:l,configGroup:n,relatedObservers:[]};e.push(o),this.modal.addClickEventForModal(o),o.relatedObservers=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)||(d(O,this,ft).call(this,n),n.widget.remove(),n.widget=null)}),this.widgetRenderingInfos=e;for(let n=0,i=this.widgetConfig.configGroups.length;n<i;n++)this.sezzleDOMFunctions.hideSezzleHideElements(n);this.checkIntervalTimeout=setTimeout(()=>{this.checkIntervalTimeout=null,d(O,this,pt).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 nr(e,t,n,i){e.filter(a=>a.type==="childList").forEach(a=>{const l=a.target.dataset.sezzleindex,o=i.getElementsByClassName(`sezzleindex-${l}`)[0];if(o){const u=o.parentElement;try{i.classList.remove("sezzle-hidden");const p=n.getParsedPrice(a.target,t.ignoredPriceElements,t.ignoredFormattedPriceText),C=n.getProductPriceEligibility(p);(C.isPriceGreaterThanMaxPrice&&!C.isLongTermPaymentEligible||!C.isLongTermPaymentEligible&&this.widgetConfig.config.isLongTermOnly)&&i.classList.add("sezzle-hidden"),u.innerHTML=d(O,this,yt).call(this,t,l,C,p).innerHTML}catch(p){i.classList.add("sezzle-hidden"),this.widgetEventLogger.logEvent("warning",p.message)}}})}function Re(e){return e&&Object.keys(e).length===0&&e.constructor===Object}function rr(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 l=this.sezzleDOMFunctions.getElementToRender(e,t);e.dataset.sezzleindex=t,n.alignment==="auto"&&(n.alignment=d(O,this,or).call(this,e));const o=document.createElement("div");o.className=`sezzle-shopify-info-button sezzlewidgetindex-${t}`,d(O,this,vt).call(this,o),d(O,this,Re).call(this,n.containerStyle)||d(O,this,ar).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(O,this,vt).call(this,u),d(O,this,bt).call(this,u,n);const p=d(O,this,yt).call(this,n,t,a,i);return u.appendChild(p),o.appendChild(u),n.widgetIsFirstChild?d(O,this,dr).call(this,o,l):d(O,this,ur).call(this,o,l),o}catch(i){return this.widgetEventLogger.logEvent("error",`An exception occurred when rendering a widget: ${i.message}`),null}}function yt(e,t,n,i){const a=document.createElement("div");return a.className="sezzle-button-text",a.style.fontSize="14px",a.style.lineHeight="18px",d(O,this,Re).call(this,e.textStyle)||d(O,this,sr).call(this,a,e),d(O,this,bt).call(this,a,e),d(O,this,lr).call(this,a,e),d(O,this,ir).call(this,e,n).forEach(l=>{switch(l){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(O,this,Re).call(this,e.logoStyle)||d(O,this,cr).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=er.buildAfterpayLogo(e.apLogoVariant,`${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(l);a.appendChild(o);break}}}),a}function ir(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 l=this.promotion.getPromotionString();n=n.replace("{promotext}",l)}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 l=this.language.translations.thresholdPrice;n=n.replace("{thresholdPriceText}",l)}else{if(this.widgetConfig.apDualInstall){const l=this.language.translations.apDualInstall;n=n.replace("{apDualInstallText}",l)}if(this.widgetConfig.klarnaDualInstall){const l=this.language.translations.klarnaDualInstall;n=n.replace("{klarnaDualInstallText}",l)}}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 or(e){if(!e)return"left";const t=window.getComputedStyle(e).textAlign;return t==="start"||t==="justify"?"left":t==="end"?"right":t}function vt(e){return e.className+=` sezzle-${this.widgetConfig.merchantID}`,e}function ar(e,t){Object.keys(t.containerStyle).forEach(n=>{e.style[n]=t.containerStyle[n]})}function bt(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 sr(e,t){Object.keys(t.textStyle).forEach(n=>{e.style[n]=t.textStyle[n]})}function lr(e,t){switch(t.theme){case"dark":case"white-flat":e.className+=" szl-dark";break;default:e.className+=" szl-light";break}}function cr(e,t){Object.keys(t.logoStyle).forEach(n=>{e.style[n]=t.logoStyle[n]})}function ur(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function dr(e,t){for(t.parentElement.insertBefore(e,t);e.previousSibling;)e.parentElement.insertBefore(e,e.previousSibling)}function hr(e){Oe.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,()=>{Array.from(Oe.activeRenderers).forEach(l=>{l.teardown()}),document.querySelectorAll("[data-sezzleindex]").forEach(l=>{l.removeAttribute("data-sezzleindex")}),document.querySelectorAll(".sezzle-shopify-info-button").forEach(l=>{l.remove()});const a=Me.NewWidgetEventLogger(document.sezzleConfig.merchantID);new Ct(tr(document.sezzleConfig),a).init()})})}),Oe.isEventListenerAdded=!0)}ee(Ie,"isEventListenerAdded",!1),ee(Ie,"activeRenderers",new Set);var mr=" or %%afterpay-logo%%",gr="Click to learn more about",fr="Buy now, pay later with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",pr="or {numberOfPayments} payments of %%price%% with %%logo%%{thresholdPriceText} within %%timer%% to win %%award%% %%info%%",yr=" or %%klarna-logo%%",vr="or monthly payments as low as %%price%% with %%logo%% %%info%%",br="or {numberOfPayments} payments of %%price%% with %%logo%%{thresholdPriceText}{promotext} %%info%%",zr="Sezzle Information",wr=" for orders over %%min-price%%",Cr="or {numberOfPayments} payments of %%price%% with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",Tr={apDualInstall:mr,clickToLearnMore:gr,dualInstall:fr,giveaway:pr,klarnaDualInstall:yr,longTerm:vr,promo:br,sezzleInformation:zr,thresholdPrice:wr,widget:Cr},Sr=" ou %%afterpay-logo%%",Er="Cliquez pour en savoir plus sur",Pr="Achetez maintenant, payez plus tard avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",_r="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{thresholdPriceText} dans les %%timer%% pour gagner %%award%% %%info%%",$r=" ou %%klarna-logo%%",Lr="ou des paiements mensuels aussi bas que %%price%% avec %%logo%% %%info%%",Mr="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{thresholdPriceText}{promotext} %%info%%",kr="Informations Sezzle",xr=" pour les achats de plus de %%min-price%%",Dr="ou {numberOfPayments} paiements de %%price%% avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",Or={apDualInstall:Sr,clickToLearnMore:Er,dualInstall:Pr,giveaway:_r,klarnaDualInstall:$r,longTerm:Lr,promo:Mr,sezzleInformation:kr,thresholdPrice:xr,widget:Dr},Ir=" o %%afterpay-logo%%",Nr="Haga clic para obtener más información sobre",Ar="Compra ahora, paga después con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}",Wr="o {numberOfPayments} pagos de %%price%% con %%logo%%{thresholdPriceText} dentro de %%timer%% para ganar %%award%% %%info%%",Fr=" o %%klarna-logo%%",qr="o pagos mensuales tan bajos como %%price%% con %%logo%% %%info%%",Ur="o {numberOfPayments} pagos de %%price%% con %%logo%%{thresholdPriceText}{promotext} %%info%%",Br="Información de Sezzle",Hr=" por compras superiores a %%min-price%%",jr="o {numberOfPayments} pagos de %%price%% con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%",Rr={apDualInstall:Ir,clickToLearnMore:Nr,dualInstall:Ar,giveaway:Wr,klarnaDualInstall:Fr,longTerm:qr,promo:Ur,sezzleInformation:Br,thresholdPrice:Hr,widget:jr},zt=new WeakSet,Yr=class{constructor(){te(this,zt),this.defaultLanguage="en",this.translationsMap={en:Tr,fr:Or,es:Rr},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(zt,this,Vr).call(this,n)?this.language=n:this.language=this.defaultLanguage,this.translations=this.getTranslations()}getLanguage(){return this.language||this.defaultLanguage}};function Vr(e){let t=0;return Object.getOwnPropertyNames(this.translationsMap).forEach(n=>{n===e&&t++}),t>0}var wt=new WeakSet,Ct=class{constructor(e,t){te(this,wt),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 Yr,n=new tn(this.basicWidgetConfiguration,t,this.widgetEventLogger);await n.setAPModalHTML(),await n.setKlarnaModalHTML();const i=n.getSezzleConfig;i.configGroups.length>0&&await d(wt,this,Xr).call(this,i,t)}catch(e){this.widgetEventLogger.logEvent("error",e.message)}this.widgetEventLogger.forceSendEvents()}};async function Xr(e,t){new Ie(e,this.widgetEventLogger,t).initializeRendering(),B.isWidgetDuplicateFound()&&this.widgetEventLogger.logEvent("duplicate-widget"),this.competitor.logCompetitorEvents()}var Kr=gt();function Jr(){const e=Kr(document.sezzleConfig),t=e?.merchantID,n=Me.NewWidgetEventLogger(t||"");if(!Zr(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 Ct(e,n).init()})}}function Zr(e){return e?(document.sezzleJSMerchantUUIDs||(document.sezzleJSMerchantUUIDs=[]),document.sezzleJSMerchantUUIDs.includes(e)?!0:(document.sezzleJSMerchantUUIDs.push(e),!1)):!1}Jr()})();
