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-4.0.4.html";
document.sezzleModalAvailableLanguages = "en,fr,es";

if (document.sezzleConfig){
   document.sezzleConfig.merchantID = 'd985262f-64ba-4543-8422-6c2921082498';

   // Sezzle's merchant payment settings override

   // Sezzle's merchant local config override
   try {document.sezzleConfig = Object.assign(document.localSezzleConfig, document.sezzleConfig); } catch(e) {}
 }
/*! For license information please see sezzle-widget.js.LICENSE.txt */
(()=>{var e={23:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(601),o=n.n(r),i=n(314),a=n.n(i)()(o());a.push([e.id,".sezzle-shopify-info-button{display:block;overflow:hidden;margin:0;border:none;padding:0;background:none}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper{display:block;box-sizing:border-box;width:100%;border:none;padding:0;background:none;color:inherit}.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;margin:auto;border:0;padding:0;background:none;vertical-align:baseline;word-wrap:normal;line-height:18px;font-size:14px;font-weight:500;font-family:inherit;color:inherit}.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;margin:0;border:0;padding:0;background:none;vertical-align:baseline;font-weight:900;font-size:1.2em}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-logo{display:inline-block;box-sizing:border-box;height:18px;width:auto;opacity:1;float:none;margin:0;margin-bottom:-5px;border:0;padding:0;background:none;vertical-align:baseline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-info-icon{display:contents;width:auto;position:absolute;margin:0;box-shadow:none;border:none;padding:0px 0px 0px 3px;background:none;vertical-align:baseline;line-height:initial;font-size:inherit;color:inherit;cursor:pointer}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-info-link{text-decoration:underline;cursor:pointer;background:none;border:none;padding:0px;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{height:45px;margin:-5px;border:0;padding:0;vertical-align:middle;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text button.ap-modal-info-link{display:inline;width:auto;margin:0;box-shadow:none;border:none;padding:0;background:none;vertical-align:middle;line-height:inherit;font-size:inherit;color:inherit;cursor:pointer}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text .sezzle-klarna-logo{height:25px;margin:0;border:0;padding:0;vertical-align:middle;display:inline}.sezzle-shopify-info-button .sezzle-checkout-button-wrapper .sezzle-button-text button.klarna-modal-info-link{display:inline;width:auto;margin:0;box-shadow:none;border:none;padding:0;background:none;vertical-align:middle;line-height:inherit;font-size:inherit;color:inherit;cursor:pointer}.sezzle-hidden{display:none;visibility:hidden}.sezzle-checkout-modal-lightbox{display:none;position:fixed;top:0;left:0;z-index:99999998;background-color:rgba(5,31,52,.57);width:100vw;height:100vh;overflow-y:auto;overflow-x:hidden;color:unset}",""]);const s=a},56:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],u=i[c]||0,f="".concat(c," ").concat(u);i[c]=u+1;var d=n(f),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(h);else{var m=o(h,r);r.byIndex=s,t.splice(s,0,{identifier:f,updater:m,references:1})}a.push(f)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=n(i[a]);t[s].references--}for(var l=r(e,o),c=0;c<i.length;c++){var u=n(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=l}}},113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},193:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",c="[object GeneratorFunction]",u="[object Map]",f="[object Number]",d="[object Object]",h="[object Promise]",m="[object RegExp]",p="[object Set]",g="[object String]",y="[object Symbol]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",z="[object Float32Array]",E="[object Float64Array]",S="[object Int8Array]",k="[object Int16Array]",T="[object Int32Array]",P="[object Uint8Array]",C="[object Uint8ClampedArray]",x="[object Uint16Array]",O="[object Uint32Array]",L=/\w*$/,_=/^\[object .+?Constructor\]$/,j=/^(?:0|[1-9]\d*)$/,D={};D[i]=D["[object Array]"]=D[b]=D[w]=D[a]=D[s]=D[z]=D[E]=D[S]=D[k]=D[T]=D[u]=D[f]=D[d]=D[m]=D[p]=D[g]=D[y]=D[P]=D[C]=D[x]=D[O]=!0,D["[object Error]"]=D[l]=D[v]=!1;var M="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,$="object"==typeof self&&self&&self.Object===Object&&self,I=M||$||Function("return this")(),N=t&&!t.nodeType&&t,A=N&&e&&!e.nodeType&&e,F=A&&A.exports===N;function W(e,t){return e.set(t[0],t[1]),e}function q(e,t){return e.add(t),e}function U(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function B(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function G(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function H(e,t){return function(n){return e(t(n))}}function R(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Y,X=Array.prototype,V=Function.prototype,J=Object.prototype,Z=I["__core-js_shared__"],K=(Y=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=V.toString,ee=J.hasOwnProperty,te=J.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=F?I.Buffer:void 0,oe=I.Symbol,ie=I.Uint8Array,ae=H(Object.getPrototypeOf,Object),se=Object.create,le=J.propertyIsEnumerable,ce=X.splice,ue=Object.getOwnPropertySymbols,fe=re?re.isBuffer:void 0,de=H(Object.keys,Object),he=Ie(I,"DataView"),me=Ie(I,"Map"),pe=Ie(I,"Promise"),ge=Ie(I,"Set"),ye=Ie(I,"WeakMap"),ve=Ie(Object,"create"),be=qe(he),we=qe(me),ze=qe(pe),Ee=qe(ge),Se=qe(ye),ke=oe?oe.prototype:void 0,Te=ke?ke.valueOf:void 0;function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){this.__data__=new Ce(e)}function Le(e,t,n){var r=e[t];ee.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function _e(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function je(e,t,n,r,o,h,v){var _;if(r&&(_=h?r(e,o,h,v):r(e)),void 0!==_)return _;if(!Ye(e))return e;var j=Be(e);if(j){if(_=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,_)}else{var M=Ae(e),$=M==l||M==c;if(He(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(M==d||M==i||$&&!h){if(B(e))return h?e:{};if(_=function(e){return"function"!=typeof e.constructor||We(e)?{}:Ye(t=ae(e))?se(t):{};var t}($?{}:e),!t)return function(e,t){return Me(e,Ne(e),t)}(e,function(e,t){return e&&Me(t,Xe(t),e)}(_,e))}else{if(!D[M])return h?e:{};_=function(e,t,n,r){var o,i=e.constructor;switch(t){case b:return De(e);case a:case s:return new i(+e);case w:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case z:case E:case S:case k:case T:case P:case C:case x:case O:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case u:return function(e,t,n){return U(t?n(G(e),!0):G(e),W,new e.constructor)}(e,r,n);case f:case g:return new i(e);case m:return function(e){var t=new e.constructor(e.source,L.exec(e));return t.lastIndex=e.lastIndex,t}(e);case p:return function(e,t,n){return U(t?n(R(e),!0):R(e),q,new e.constructor)}(e,r,n);case y:return o=e,Te?Object(Te.call(o)):{}}}(e,M,je,t)}}v||(v=new Oe);var I=v.get(e);if(I)return I;if(v.set(e,_),!j)var N=n?function(e){return function(e,t,n){var r=t(e);return Be(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Xe,Ne)}(e):Xe(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n););}(N||e,function(o,i){N&&(o=e[i=o]),Le(_,i,je(o,t,n,r,i,e,v))}),_}function De(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Me(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=r?r(n[a],e[a],a,n,e):void 0;Le(n,a,void 0===s?e[a]:s)}return n}function $e(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Ie(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ye(e)||(t=e,K&&K in t))&&(Re(e)||B(e)?ne:_).test(qe(e));var t}(n)?n:void 0}Pe.prototype.clear=function(){this.__data__=ve?ve(null):{}},Pe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Pe.prototype.get=function(e){var t=this.__data__;if(ve){var n=t[e];return n===r?void 0:n}return ee.call(t,e)?t[e]:void 0},Pe.prototype.has=function(e){var t=this.__data__;return ve?void 0!==t[e]:ee.call(t,e)},Pe.prototype.set=function(e,t){return this.__data__[e]=ve&&void 0===t?r:t,this},Ce.prototype.clear=function(){this.__data__=[]},Ce.prototype.delete=function(e){var t=this.__data__,n=_e(t,e);return!(n<0||(n==t.length-1?t.pop():ce.call(t,n,1),0))},Ce.prototype.get=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},Ce.prototype.has=function(e){return _e(this.__data__,e)>-1},Ce.prototype.set=function(e,t){var n=this.__data__,r=_e(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Pe,map:new(me||Ce),string:new Pe}},xe.prototype.delete=function(e){return $e(this,e).delete(e)},xe.prototype.get=function(e){return $e(this,e).get(e)},xe.prototype.has=function(e){return $e(this,e).has(e)},xe.prototype.set=function(e,t){return $e(this,e).set(e,t),this},Oe.prototype.clear=function(){this.__data__=new Ce},Oe.prototype.delete=function(e){return this.__data__.delete(e)},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ce){var r=n.__data__;if(!me||r.length<199)return r.push([e,t]),this;n=this.__data__=new xe(r)}return n.set(e,t),this};var Ne=ue?H(ue,Object):function(){return[]},Ae=function(e){return te.call(e)};function Fe(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||j.test(e))&&e>-1&&e%1==0&&e<t}function We(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||J)}function qe(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(he&&Ae(new he(new ArrayBuffer(1)))!=w||me&&Ae(new me)!=u||pe&&Ae(pe.resolve())!=h||ge&&Ae(new ge)!=p||ye&&Ae(new ye)!=v)&&(Ae=function(e){var t=te.call(e),n=t==d?e.constructor:void 0,r=n?qe(n):void 0;if(r)switch(r){case be:return w;case we:return u;case ze:return h;case Ee:return p;case Se:return v}return t});var Be=Array.isArray;function Ge(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!Re(e)}var He=fe||function(){return!1};function Re(e){var t=Ye(e)?te.call(e):"";return t==l||t==c}function Ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return Ge(e)?function(e,t){var n=Be(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ge(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==i)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var a in e)!t&&!ee.call(e,a)||o&&("length"==a||Fe(a,r))||n.push(a);return n}(e):function(e){if(!We(e))return de(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return je(e,!0,!0)}},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},353:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",s="week",l="month",c="quarter",u="year",f="date",d="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,p={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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,l),i=n-o<0,a=t.clone().add(r+(i?-1:1),l);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:u,w:s,d:a,D:f,h:i,m:o,s:r,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",b={};b[v]=p;var w="$isDayjsObject",z=function(e){return e instanceof T||!(!e||!e[w])},E=function e(t,n,r){var o;if(!t)return v;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),n&&(b[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!r&&o&&(v=o),o||!r&&v},S=function(e,t){if(z(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new T(n)},k=y;k.l=E,k.i=z,k.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function p(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=p.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return k},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<S(e)},g.$g=function(e,t,n){return k.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,c=!!k.u(t)||t,d=k.p(e),h=function(e,t){var r=k.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return c?r:r.endOf(a)},m=function(e,t){return k.w(n.toDate()[e].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,g=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case u:return c?h(1,0):h(31,11);case l:return c?h(1,g):h(0,g+1);case s:var b=this.$locale().weekStart||0,w=(p<b?p+7:p)-b;return h(c?y-w:y+(6-w),g);case a:case f:return m(v+"Hours",0);case i:return m(v+"Minutes",1);case o:return m(v+"Seconds",2);case r:return m(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var s,c=k.p(e),d="set"+(this.$u?"UTC":""),h=(s={},s[a]=d+"Date",s[f]=d+"Date",s[l]=d+"Month",s[u]=d+"FullYear",s[i]=d+"Hours",s[o]=d+"Minutes",s[r]=d+"Seconds",s[n]=d+"Milliseconds",s)[c],m=c===a?this.$D+(t-this.$W):t;if(c===l||c===u){var p=this.clone().set(f,1);p.$d[h](m),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[k.p(e)]()},g.add=function(n,c){var f,d=this;n=Number(n);var h=k.p(c),m=function(e){var t=S(d);return k.w(t.date(t.date()+Math.round(e*n)),d)};if(h===l)return this.set(l,this.$M+n);if(h===u)return this.set(u,this.$y+n);if(h===a)return m(1);if(h===s)return m(7);var p=(f={},f[o]=e,f[i]=t,f[r]=1e3,f)[h]||1,g=this.$d.getTime()+n*p;return k.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=k.z(this),i=this.$H,a=this.$m,s=this.$M,l=n.weekdays,c=n.months,u=n.meridiem,f=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},h=function(e){return k.s(i%12||12,e,"0")},p=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return k.s(t.$y,4,"0");case"M":return s+1;case"MM":return k.s(s+1,2,"0");case"MMM":return f(n.monthsShort,s,c,3);case"MMMM":return f(c,s);case"D":return t.$D;case"DD":return k.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,l,2);case"ddd":return f(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(i);case"HH":return k.s(i,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return p(i,a,!0);case"A":return p(i,a,!1);case"m":return String(a);case"mm":return k.s(a,2,"0");case"s":return String(t.$s);case"ss":return k.s(t.$s,2,"0");case"SSS":return k.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,f,d){var h,m=this,p=k.p(f),g=S(n),y=(g.utcOffset()-this.utcOffset())*e,v=this-g,b=function(){return k.m(m,g)};switch(p){case u:h=b()/12;break;case l:h=b();break;case c:h=b()/3;break;case s:h=(v-y)/6048e5;break;case a:h=(v-y)/864e5;break;case i:h=v/t;break;case o:h=v/e;break;case r:h=v/1e3;break;default:h=v}return d?h:k.a(h)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=E(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return k.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},p}(),P=T.prototype;return S.prototype=P,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",l],["$y",u],["$D",f]].forEach(function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),S.extend=function(e,t){return e.$i||(e(t,T,S),e.$i=!0),S},S.locale=E,S.isDayjs=z,S.unix=function(e){return S(1e3*e)},S.en=b[v],S.Ls=b,S.p={},S}()},452:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),s=new L(r||[]);return o(a,"_invoke",{value:P(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",h="suspendedYield",m="executing",p="completed",g={};function y(){}function v(){}function b(){}var w={};c(w,a,function(){return this});var z=Object.getPrototypeOf,E=z&&z(z(_([])));E&&E!==n&&r.call(E,a)&&(w=E);var S=b.prototype=y.prototype=Object.create(w);function k(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(o,i,a,s){var l=f(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(u).then(function(e){c.value=e,a(c)},function(e){return n("throw",e,a,s)})}s(l.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return i=i?i.then(o,o):o()}})}function P(e,n,r){var o=d;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=C(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var c=f(e,n,r);if("normal"===c.type){if(o=r.done?p:h,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=p,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function _(e){if(null!=e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return v.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},k(T.prototype),c(T.prototype,s,function(){return this}),e.AsyncIterator=T,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new T(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},k(S),c(S,l,"Generator"),c(S,a,function(){return this}),c(S,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=_,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},569:function(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,o){var i,a=function(e,n,r){void 0===r&&(r={});var o=new Date(e),i=function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",o=e+"|"+r,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[o]=i),i}(n,r);return i.formatToParts(o)},s=function(t,n){for(var r=a(t,n),i=[],s=0;s<r.length;s+=1){var l=r[s],c=l.type,u=l.value,f=e[c];f>=0&&(i[f]=parseInt(u,10))}var d=i[3],h=24===d?0:d,m=i[0]+"-"+i[1]+"-"+i[2]+" "+h+":"+i[4]+":"+i[5]+":000",p=+t;return(o.utc(m).valueOf()-(p-=p%1e3))/6e4},l=r.prototype;l.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),l=Math.round((a-new Date(s))/1e3/60),c=15*-Math.round(a.getTimezoneOffset()/15)-l;if(Number(c)){if(n=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},l.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,a=n||t||i,l=s(+o(),a);if("string"!=typeof e)return o(e).tz(a);var c=function(e,t,n){var r=e-60*t*1e3,o=s(r,n);if(t===o)return[r,t];var i=s(r-=60*(o-t)*1e3,n);return o===i?[r,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,r).valueOf(),l,a),u=c[0],f=c[1],d=o(u).utcOffset(f);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}}()},601:e=>{"use strict";e.exports=function(e){return e[1]}},659:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},826:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,s=this;if(o)return s.$offset=a,s.$u=0===r,s;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),o=i(e).local();return d.call(r,o,t,n)}}}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.nc=void 0,(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function r(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}n(452);var o=document.widgetServerBaseUrl?"".concat(document.widgetServerBaseUrl,"/v1/event/log"):"http://widget.sezzle.com/v1/event/log",i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},n=[{key:"httpRequestWrapper",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(r,o){var i=new XMLHttpRequest;i.open(e,t,!0),null!==n&&i.setRequestHeader("Content-Type","application/json"),i.onload=function(){this.status>=200&&this.status<300?r(i.response):o(new Error("An error occurred when calling ".concat(t,". Status code: ").concat(this.status," Response text: ").concat(i.responseText)))},i.onerror=function(e){var n;n=e instanceof ErrorEvent?"An error occurred when calling ".concat(t,". Error message: ").concat(e.message," Filename: ").concat(e.filename," Line#: ").concat(e.lineno):"An error occurred when calling ".concat(t,". Error type: ").concat(e.type),o(new Error(n))},null===n?i.send():i.send(JSON.stringify(n))})}},{key:"getCookie",value:function(e){var t="".concat(document.cookie);if(t){var n=t.split("".concat(e,"="));return 2===n.length?n.pop().split(";").shift():void 0}}},{key:"isWidgetDuplicateFound",value:function(){return document.querySelectorAll(".".concat("sezzle-shopify-info-button",":not([style*='display: none'])")).length>1}},{key:"sendEvents",value:function(e){this.httpRequestWrapper("post",o,e)}},{key:"breakXPath",value:function(e){return e.split("/").filter(function(e){return""!==e})}},{key:"getWidgetBaseUrl",value:function(){return document.widgetServerBaseUrl||"https://widget.sezzle.com"}},{key:"getDynamicModalURL",value:function(){return document.SezzleDynamicModalURL||"https://dynamic-modal.sezzle.com"}},{key:"predictBackgroundTheme",value:function(){var e,t,n,r=window.getComputedStyle(document.body).getPropertyValue("background-color");if("transparent"===r||"rgba(0, 0, 0, 0)"===r)return"light";r.match(/^rgb/)?(e=(r=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/))[1],t=r[2],n=r[3]):(e=(r=+"0x".concat(r.slice(1).replace(r.length<5&&/./g,"$&$&")))>>16,t=r>>8&255,n=255&r);var o=.2126*e+.7152*t+.0722*n,i=(Math.max(e,t,n)+Math.min(e,t,n))/2;return Math.sqrt(e*e*.299+t*t*.587+n*n*.114)<=180&&o<=180&&i<=180?"dark":"light"}},{key:"matchAll",value:function(e,t){for(var n,r=[];n=e.exec(t);)r.push(n[0]);return r}},{key:"waitForBodyToBeReady",value:function(){return new Promise(function(e){document.body&&e();var t=new MutationObserver(function(){document.body&&(t.disconnect(),e())});t.observe(document.documentElement,{childList:!0})})}}],null&&t(e.prototype,null),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();const a=i;function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function f(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return d(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,l=e,d.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],h=d.p,m=i[2];n>3?(o=m===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,d.v=r,d.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,d.n=m,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,u,m){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,m),s=u,l=m;(t=s<2?e:l)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,l)):d.n=l:d.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=d.n<0)?l:n.call(r,d))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(d(t={},r,function(){return this}),t),h=c.prototype=s.prototype=Object.create(u);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,d(e,o,"GeneratorFunction")),e.prototype=Object.create(h),e}return l.prototype=c,d(h,"constructor",c),d(c,"constructor",l),l.displayName="GeneratorFunction",d(c,o,"GeneratorFunction"),d(h),d(h,o,"Generator"),d(h,r,function(){return this}),d(h,"toString",function(){return"[object Generator]"}),(f=function(){return{w:i,m}})()}function d(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}d=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){d(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},d(e,t,n,r)}function h(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,s,"next",e)}function s(e){h(i,r,o,a,s,"throw",e)}a(void 0)})}}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function g(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function y(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var v=new WeakSet,b=function(){return e=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,v),this.basicWidgetConfig=t,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:a.getDynamicModalURL(),sezzleAssetsCDN:"https://media.sezzle.com/shopify-app/assets/",cssForMerchantURL:"".concat(a.getWidgetBaseUrl(),"/v1/css/price-widget?uuid=").concat(t.merchantID)},observeElements:null},this.widgetEventLogger=r,y(v,this,w).call(this),this.language=n,this.language.setLanguage(this.widgetConfig.config.language)},t=[{key:"getSezzleConfig",get:function(){return this.widgetConfig}},{key:"setAPModalHTML",value:(r=m(f().m(function e(){var t,n,r=this;return f().w(function(e){for(;;)switch(e.n){case 0:if(this.widgetConfig.apDualInstall){e.n=1;break}return e.a(2);case 1:return t=this.language.getLanguage(),n="https://media.sezzle.com/afterpay/modal/".concat(t,".html"),e.n=2,a.httpRequestWrapper("GET",n).then(function(e){r.widgetConfig.apModalHTML=e}).catch(function(e){r.widgetEventLogger.logEvent("error",e.message)});case 2:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:"setKlarnaModalHTML",value:(n=m(f().m(function e(){var t,n,r=this;return f().w(function(e){for(;;)switch(e.n){case 0:if(this.widgetConfig.klarnaDualInstall){e.n=1;break}return e.a(2);case 1:return t=this.language.getLanguage(),n="https://media.sezzle.com/klarna/modal/".concat(t,".html"),e.n=2,a.httpRequestWrapper("GET",n).then(function(e){r.widgetConfig.klarnaModalHTML=e}).catch(function(e){r.widgetEventLogger.logEvent("error",e.message)});case 2:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})}],t&&p(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,r}();function w(){y(v,this,z).call(this),y(v,this,k).call(this),y(v,this,T).call(this),y(v,this,C).call(this)}function z(){if(!Array.isArray(this.basicWidgetConfig.configGroups))throw new Error("options.configGroups is not an array");if(!this.basicWidgetConfig.configGroups.length)throw new Error("options.configGroups must have at least one config object");var e=["targetXPath"];this.basicWidgetConfig.configGroups.forEach(function(t){e.forEach(function(e){if(!t.hasOwnProperty(e))throw new Error("".concat(e," must be specified in all configs in options.configGroups"))})}),y(v,this,E).call(this),y(v,this,S).call(this)}function E(){var e={targetXPath:"string",renderToPath:"string",urlMatch:"string"};this.basicWidgetConfig.configGroups.forEach(function(t){Object.keys(e).forEach(function(n){if(t.hasOwnProperty(n)&&u(t[n])!==u(e[n]))throw new Error("".concat(n," must be of type ").concat(e[n]))})})}function S(){var e=this;this.basicWidgetConfig.configGroups.forEach(function(t){Object.keys(t).forEach(function(t){if(e.propsNotInConfigGroup.indexOf(t)>=0)throw new Error("".concat(t," is not a property of a configGroup. Specify this key at the outermost layer"))})})}function k(){this.basicWidgetConfig.configGroups=this.basicWidgetConfig.configGroups.filter(function(e){return!e.urlMatch||RegExp(e.urlMatch,"i").test(window.location.href)})}function T(){var 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=l(l({},this.widgetConfig),e)}function P(e){var t={};switch(t.xpath=a.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||[],"string"==typeof t.ignoredPriceElements?t.ignoredPriceElements=[a.breakXPath(t.ignoredPriceElements.trim())]:t.ignoredPriceElements=t.ignoredPriceElements.map(function(e){return a.breakXPath(e.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:"dark"===a.predictBackgroundTheme()?(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")}return t.hideClasses=e.hideClasses||this.basicWidgetConfig.defaultConfig&&this.basicWidgetConfig.defaultConfig.hideClasses||[],"string"==typeof t.hideClasses?t.hideClasses=[a.breakXPath(t.hideClasses.trim())]:t.hideClasses=t.hideClasses.map(function(e){return a.breakXPath(e.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 C(){var e=this;this.widgetConfig.configGroups=[],this.basicWidgetConfig.configGroups.forEach(function(t){e.widgetConfig.configGroups.push(y(v,e,P).call(e,t))})}const x=b;function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_(r.key),r)}}function _(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}var j=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t},t=[{key:"getElementsByXPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.length)return[];if(t===e.length)return n||[];null===n&&(n=[document]);for(var r=[],o=Array.prototype.slice.call(n),i=function(){var n=o[a];if(".."===e[t])r.push(n.parentElement);else if("#"===e[t][0])r.push(n.getElementById(e[t].substr(1)));else if("."===e[t][0])1===e[t].trim().length&&r.push(n),Array.prototype.forEach.call(n.getElementsByClassName(e[t].substr(1)),function(e){r.push(e)});else if(0===e[t].indexOf("child")){var i=e[t].split("-")[1],s=n.childNodes[i];if(void 0!==s)if("#text"===s.nodeName){var l=document.createElement("span");l.appendChild(document.createTextNode(s.nodeValue)),n.replaceChild(l,s),r.push(l)}else r.push(s);else r.push(n)}else{var c=e[t].split("-"),u=0;c.length>1&&c[c.length-1]>=0&&(u=parseInt(c[c.length-1],10));var f=e[t].replace("-".concat(u),"");Array.prototype.forEach.call(n.getElementsByTagName(f),function(e,t){t===u&&r.push(e)})}},a=0;a<o.length;a++)i();return r=r.filter(function(e){return null!==e}),this.getElementsByXPath(e,t+1,r)}},{key:"getElementToRender",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.querySelector("#sezzle-widget-v2-render-reference");if(n)return n;var r=null;if(null!==this.config.configGroups[t].rendertopath){var o=a.breakXPath(this.config.configGroups[t].rendertopath);r=e;for(var i=0;i<o.length;i++){var s=o[i];if(null===r)break;if("."!==s)if(".."===s)r=r.parentElement;else if("."===s[0])r=r.getElementsByClassName(s.substr(1)).length?r.getElementsByClassName(s.substr(1))[0]:null;else if("#"===s[0])r=document.getElementById(s.substr(1));else if("::first-child"===s)r=r.children.length>0?r.firstElementChild:null,this.config.configGroups[t].widgetIsFirstChild=!0;else{var l=0;s.split("-").length>1&&s.split("-")[1]>=0&&(l=parseInt(s.split("-")[1],10)),r=r.getElementsByTagName(s.split("-")[0]).length>l?r.getElementsByTagName(s.split("-")[0])[l]:null}}}return r||e.parentElement}},{key:"getPriceText",value:function(e,t){var n=this;if(!t||0===t.length)return e.textContent;if(t.forEach(function(t){n.getElementsByXPath(t,0,[e]).forEach(function(e){e.classList.add("sezzle-ignored-price-element")})}),!e.getElementsByClassName("sezzle-ignored-price-element").length)return e.textContent;var r=e.cloneNode(!0);return Array.prototype.forEach.call(r.getElementsByTagName("*"),function(e){-1!==Array.prototype.slice.call(e.classList).indexOf("sezzle-ignored-price-element")&&r.removeChild(e)}),Array.prototype.forEach.call(e.getElementsByClassName("sezzle-ignored-price-element"),function(e){e.classList.remove("sezzle-ignored-price-element")}),r.textContent}},{key:"startObserve",value:function(e,t){var n=new MutationObserver(t);return n.observe(e,this.config.mutationObserverConfig),n}},{key:"observeRelatedElements",value:function(e,t,n){var r=this;n&&n.forEach(function(n){if("string"==typeof n.relatedPath&&("function"==typeof n.action||"function"==typeof n.initialAction)){var o=r.getElementsByXPath(a.breakXPath(n.relatedPath),0,[e]);o.length>0&&("function"==typeof n.action&&r.startObserve(o[0],function(e){n.action(e,t)}),"function"==typeof n.initialAction&&n.initialAction(o[0],t))}})}},{key:"hideSezzleHideElements",value:function(e){var t=this;this.config.configGroups[e].hideClasses.forEach(function(e){t.getElementsByXPath(e).forEach(function(e){e.classList.contains("sezzle-hidden")||e.classList.add("sezzle-hidden")})})}}],t&&L(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const D=j;function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function $(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return I(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,l=e,d.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],h=d.p,m=i[2];n>3?(o=m===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,d.v=r,d.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,d.n=m,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,u,m){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,m),s=u,l=m;(t=s<2?e:l)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,l)):d.n=l:d.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=d.n<0)?l:n.call(r,d))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(I(t={},r,function(){return this}),t),f=c.prototype=s.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,I(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,I(f,"constructor",c),I(c,"constructor",l),l.displayName="GeneratorFunction",I(c,o,"GeneratorFunction"),I(f),I(f,o,"Generator"),I(f,r,function(){return this}),I(f,"toString",function(){return"[object Generator]"}),($=function(){return{w:i,m:d}})()}function I(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}I=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){I(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},I(e,t,n,r)}function N(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,F(r.key),r)}}function F(e){var t=function(e){if("object"!=M(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}function W(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var q=new WeakSet,U=function(){return e=function e(t,n,r,o,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,q),this.widgetConfig=t,this.widgetEventLogger=n,this.scrollDistance=0,this.modalNode=null,this.sezzleElement=null,this.promotion=o,this.giveaway=r,this.priceProcessor=i,this.languageConfig=a,this.messageEventHandler=this.messageEventHandler.bind(this),this.modalIframe=null,this.activeTab=1},(t=[{key:"addClickEventForModal",value:function(e){this.sezzleElement=e.widget,W(q,this,J).call(this,e),W(q,this,V).call(this,e),W(q,this,Z).call(this),W(q,this,K).call(this)}},{key:"renderModals",value:function(){W(q,this,ee).call(this),W(q,this,te).call(this),W(q,this,ne).call(this)}},{key:"messageEventHandler",value:function(e){var t=e.origin,n=e.data;t==this.widgetConfig.apiEndpoints.dynamicModalURL&&"close-modal"==n&&(W(q,this,X).call(this),window.removeEventListener("message",this.messageEventHandler))}}])&&A(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function B(){return G.apply(this,arguments)}function G(){var e;return e=$().m(function e(){var t,n;return $().w(function(e){for(;;)switch(e.n){case 0:if(!window.ModalUI){e.n=1;break}return e.a(2);case 1:if(!document.sezzleDefaultModalVersion||!document.sezzleModalAvailableLanguages){e.n=3;break}return document.sezzleModalAvailableLanguages.split(",").map(function(e){return e.trim()}).indexOf(this.languageConfig.language)>-1?document.modalLanguage=this.languageConfig.language:document.modalLanguage="en",t="".concat(this.widgetConfig.apiEndpoints.sezzleAssetsCDN).concat(document.sezzleDefaultModalVersion),e.n=2,a.httpRequestWrapper("GET",t);case 2:n=e.v,this.modalNode.innerHTML=n;case 3:W(q,this,oe).call(this),W(q,this,X).call(this);case 4:return e.a(2)}},e,this)}),G=function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){N(i,r,o,a,s,"next",e)}function s(e){N(i,r,o,a,s,"throw",e)}a(void 0)})},G.apply(this,arguments)}function H(e,t){if(e.preventDefault(),!document.sezzleDefaultModalVersion||!document.sezzleModalAvailableLanguages)throw new Error("Could not open modal. Missing modal version (".concat(document.sezzleDefaultModalVersion,") or languages (").concat(document.sezzleModalAvailableLanguages,")"));if(W(q,this,le).call(this,t),e.target.id="sezzle-modal-return",!e.target.classList.contains("no-sezzle-info")){var n,r=document.getElementsByClassName("sezzle-checkout-modal-lightbox");if(Array.prototype.forEach.call(r,function(e){e.classList.contains("close-sezzle-modal")&&(n=e)}),n){W(q,this,Q).call(this,!0),n.style.display="block",n.getElementsByClassName("close-sezzle-modal")[0].focus();var o=n.getElementsByClassName("sezzle-modal");o.length&&(o[0].className="sezzle-modal"),W(q,this,R).call(this),this.widgetEventLogger.logEvent("onclick")}}}function R(){var e=this,t=Array.prototype.slice.call(document.querySelector(".sezzle-modal-content").childNodes);t.unshift(document.querySelector("button.close-sezzle-modal"));var n=t[0],r=t[t.length-1],o={};document.addEventListener("keydown",function(t){if(("Shift"===t.key||"Control"===t.key)&&(t.stopImmediatePropagation(),o[t.key]=!0),document.addEventListener("keyup",function(e){delete o[e.key]}),o.Control&&!o.Shift&&"Tab"===t.key&&document.activeElement===r)n.focus();else if(o.Shift&&"Tab"===t.key&&document.activeElement===n)r.focus();else if("Escape"===t.key){for(var i=document.getElementsByClassName("sezzle-checkout-modal-lightbox"),a=0;a<i.length;a++)i[a].style.display="none",W(q,e,Q).call(e,!1);var s=document.querySelector("#sezzle-modal-return");s?(s.focus(),s.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 Y(){for(var e=this,t=this.modalNode.getElementsByClassName("arrow"),n=0;n<t.length;n++)t[n].addEventListener("click",function(t){var n=t.currentTarget;if(-1===n.className.indexOf("disabled")){n.className.indexOf("arrow-right")>-1?(e.activeTab++,n.parentElement.firstElementChild.className="arrow arrow-left",3===e.activeTab&&(n.className="arrow arrow-right disabled")):(e.activeTab--,n.parentElement.lastElementChild.className="arrow arrow-right",1===e.activeTab&&(n.className="arrow arrow-left disabled"));var r=n.parentElement.parentElement.parentElement;r.querySelector(".carousel").className="carousel position-"+e.activeTab;for(var o=r.querySelector(".carousel-dots").children,i=0;i<o.length;i++)e.activeTab-1===i?o[i].className="dot active":o[i].className="dot"}})}function X(){var e=this;Array.prototype.forEach.call(document.querySelectorAll(".close-sezzle-modal, .close-btn"),function(t){t.addEventListener("click",function(t){W(q,e,Q).call(e,!1),e.modalNode.style.display="none",e.modalNode.getElementsByClassName("sezzle-modal")[0].className="sezzle-modal sezzle-checkout-modal-hidden";var n=document.querySelector("#sezzle-modal-return")||document.querySelector(".sezzle-checkout-button-wrapper");n&&(n.focus(),n.removeAttribute("id"))})});var t=document.getElementsByClassName("sezzle-modal")[0];t||(t=document.getElementsByClassName("sezzle-checkout-modal-lightbox")[0]),t.addEventListener("click",function(e){return e.stopPropagation()})}function V(e){var t=this;e.widget.addEventListener("keydown",function(n){"Enter"!==n.key&&" "!==n.key||W(q,t,H).call(t,n,e)})}function J(e){var t=this;e.widget.addEventListener("click",function(n){W(q,t,H).call(t,n,e)})}function Z(){var e=this;if(this.widgetConfig.apModalHTML){var t=this.sezzleElement.getElementsByClassName("ap-modal-info-link");Array.prototype.forEach.call(t,function(t){t.addEventListener("click",function(t){t.target.id="sezzle-modal-return",W(q,e,Q).call(e,!0),document.querySelector(".sezzle-ap-modal").style.display="block",document.querySelector(".sezzle-ap-modal").focus(),e.widgetEventLogger.logEvent("onclick-ap")})})}}function K(){var e=this;if(this.widgetConfig.klarnaModalHTML){var t=this.sezzleElement.getElementsByClassName("klarna-modal-info-link");Array.prototype.forEach.call(t,function(t){t.addEventListener("click",function(t){t.target.id="sezzle-modal-return",W(q,e,Q).call(e,!0),document.querySelector(".sezzle-klarna-modal").style.display="block",document.querySelector(".sezzle-klarna-modal").focus(),e.widgetEventLogger.logEvent("onclick-klarna")})})}}function Q(e){var t=document.body;e?(this.scrollDistance=window.pageYOffset||(document.documentElement.clientHeight?document.documentElement.scrollTop:document.body.scrollTop)||0,t.classList.add("sezzle-modal-open"),t.style.top="".concat(-1*this.scrollDistance,"px")):(t.classList.remove("sezzle-modal-open"),window.scrollTo(0,this.scrollDistance),t.style.top=0,document.querySelector(".sezzle-modal")&&(document.querySelector(".sezzle-modal").scrollTop=0),this.scrollDistance=0)}function ee(){try{var 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)),W(q,this,B).call(this)}catch(e){this.widgetEventLogger.logEvent("error",e.message)}}function te(){var e=this;if(document.querySelector(".ap-modal-info-link")){var t=document.createElement("section");t.className="sezzle-checkout-modal-lightbox sezzle-ap-modal",t.style="position: center",t.style.display="none",t.role="dialog",t.ariaLabel="".concat(this.languageConfig.translations.clickToLearnMore," Afterpay"),t.name="".concat(this.languageConfig.translations.clickToLearnMore," Afterpay"),t.innerHTML=this.widgetConfig.apModalHTML||"",document.querySelector("body").appendChild(t);var n=document.querySelector("#afterpay-modal-close-button");null==n||n.addEventListener("click",function(n){W(q,e,Q).call(e,!1),t.style.display="none";var r=document.querySelector("#sezzle-modal-return");r?(r.focus(),r.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(),n.stopPropagation()})}}function ne(){var e=this;if(document.querySelector(".klarna-modal-info-link")){var t=document.createElement("section");t.className="sezzle-checkout-modal-lightbox sezzle-klarna-modal",t.style="position: center",t.style.display="none",t.role="dialog",t.ariaLabel="".concat(this.languageConfig.translations.clickToLearnMore," Klarna"),t.name="".concat(this.languageConfig.translations.clickToLearnMore," Klarna"),t.innerHTML=this.widgetConfig.klarnaModalHTML||"",document.querySelector("body").appendChild(t);var n=document.querySelector("button#payment-calculator-interstitial-default__nav-bar__right-icon");null==n||n.addEventListener("click",function(n){W(q,e,Q).call(e,!1),t.style.display="none";var r=document.querySelector("#sezzle-modal-return");r?(r.focus(),r.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(),n.stopPropagation()})}}function re(){var e=this;if(document.giveawayConfig){var t=document.querySelector(".sezzle-checkout-modal-lightbox").querySelector(".sezzle-giveaway-timer");t.textContent=this.giveaway.getTimeLeftInDay(),setInterval(function(){t.textContent=e.giveaway.getTimeLeftInDay()},1e3)}}function oe(){if(!document.sezzleDefaultModalVersion||!document.sezzleModalAvailableLanguages)return null;var e=document.head,t=document.createElement("script");t.innerHTML=this.modalNode.querySelector("script").innerHTML,e.appendChild(t)}function ie(e,t){for(var n=0;n<e.length;n++)e[n].textContent=t}function ae(e,t){var n=this.priceProcessor.convertToNumber(e.target.value),r=this.priceProcessor.getFormattedShortTermPaymentInfo(n,"$"),o=t.getElementsByClassName("4-pay-installment"),i=t.getElementsByClassName("5-pay-installment");W(q,this,ie).call(this,o,r.pi4InstallmentAmount),W(q,this,ie).call(this,i,r.pi5InstallmentAmount)}function se(){var e=this,t=document.querySelector("#sezzle-modal-core-content"),n=t.querySelector(".input-amount");n&&n.addEventListener("input",function(n){W(q,e,ae).call(e,n,t)})}function le(e){var 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 ".concat(e.id||e.className)),null;var n=this.priceProcessor.getProductPriceEligibility(t);n.isLongTermPaymentEligible?(document.longTermPayment=this.priceProcessor.getFormattedLongTermPaymentInfo(t,"$"),document.modal5Payment=null):n.is5PayEligible&&(document.longTermPayment=null,document.modal5Payment=this.priceProcessor.getFormattedShortTermPaymentInfo(t,"$")),W(q,this,ce).call(this,n.isLongTermPaymentEligible)}function ce(e){ModalUI?ModalUI.load():this.widgetEventLogger.logEvent("error","ModalUI is undefined. Problem adding modal script to the document"),e||W(q,this,re).call(this),W(q,this,X).call(this),W(q,this,se).call(this),W(q,this,Y).call(this)}const ue=U;function fe(e){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fe(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,me(r.key),r)}}function he(e,t,n){return(t=me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function me(e){var t=function(e){if("object"!=fe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fe(t)?t:t+""}function pe(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ge=new WeakSet,ye=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,ge),he(this,"merchantUUID",void 0),he(this,"events",void 0),he(this,"sentEvents",void 0),!e.initializing)throw new Error("Use static initializer to initialize the logger");this.merchantUUID=t,this.events=[],this.sentEvents=[]}return t=e,r=[{key:"NewWidgetEventLogger",value:function(t){return e.widgetEventLogger||(e.initializing=!0,e.widgetEventLogger=new e(t)),e.widgetEventLogger}},{key:"destruct",value:function(){e.widgetEventLogger=null}}],(n=[{key:"logEvent",value:function(e,t){var n={name:e,description:t||"",createdAt:(new Date).toJSON()},r=n.name.startsWith("onclick");!r&&pe(ge,this,ve).call(this,n.name,n.description)||(this.events.push(n),r&&(pe(ge,this,we).call(this),this.events=[]))}},{key:"forceSendEvents",value:function(){pe(ge,this,we).call(this),this.events=[]}}])&&de(t.prototype,n),r&&de(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function ve(e,t){return this.events.some(function(n){return n.name===e&&n.description===t})}function be(e,t){return this.sentEvents.some(function(n){return n.name===e&&n.description===t})}function we(){var e=this;try{var t=[];this.events.forEach(function(n){var r,o,i,a;pe(ge,e,be).call(e,n.name,n.description)||(t.push({event_name:n.name,description:n.description,merchant_uuid:null!==(r=e.merchantUUID)&&void 0!==r?r:"",merchant_site:window.location.hostname,created_at:n.createdAt,theme:{name:(null===(o=window)||void 0===o||null===(o=o.Shopify)||void 0===o||null===(o=o.theme)||void 0===o?void 0:o.name)||"",id:(null===(i=window)||void 0===i||null===(i=i.Shopify)||void 0===i||null===(i=i.theme)||void 0===i?void 0:i.theme_store_id)||0,role:(null===(a=window)||void 0===a||null===(a=a.Shopify)||void 0===a||null===(a=a.theme)||void 0===a?void 0:a.role)||"",block_type:document.querySelector("#sezzle-widget-v2-render-reference")?"app":"embed"}}),n.name.startsWith("onclick")||e.sentEvents.push(n))}),t.length>0&&a.sendEvents(t)}catch(e){console.log(e)}}he(ye,"initializing",void 0),he(ye,"widgetEventLogger",void 0);const ze=ye;function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ke(r.key),r)}}function ke(e){var t=function(e){if("object"!=Ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:t+""}var Te=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),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"}]}}}}}}}}},t=[{key:"getMainViewTranslationTextByLanguage",value:function(e,t,n,r,o,i){var a=this.promoTranslations.main[e].is_new_user_only[t].threshold[n].promocode[r];if(a){var s=a.find(function(e){return e["".concat(o)]});return s?s["".concat(o)]:(a.find(function(e){return e["".concat(i)]}),function(){throw new TypeError('"languageText" is read-only')}(),s["".concat(i)])}return""}},{key:"getModalViewTranslationTextByLanguage",value:function(e,t){var n=this.promoTranslations.modal;if(n){var r=n.find(function(t){return t["".concat(e)]});return r?r["".concat(e)]:(r=n.find(function(e){return e["".concat(t)]}))["".concat(t)]}return""}}],t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const Pe=Te;function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oe(r.key),r)}}function Oe(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}var Le=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),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 Pe}return t=e,r=[{key:"getPromotionString",value:function(t,n,r,o){var i=_e[t.type],a=!!t.spend_award_threshold_in_cents,s=!!t.is_new_user_only&&t.is_new_user_only,l=!!t.promo_code,c=o.getMainViewTranslationTextByLanguage(i,s,a,l,n,r);return c=c.replace("{money}",e.format(n,t.currency_code,t.spend_award_in_cents)),a&&(c=c.replace("{threshold}",e.format(n,t.currency_code,t.spend_award_threshold_in_cents))),l&&(c=c.replace("{promocode}",t.promo_code)),c}},{key:"format",value:function(e,t,n){var r=new Intl.NumberFormat(e,{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:0}),o=new Intl.NumberFormat(e,{style:"currency",currency:t,minimumFractionDigits:2}),i=parseInt(n)/100;return i%1==0?r.format(i):o.format(i)}}],(n=[{key:"getPromotionString",value:function(){return this.promoConfig?e.getPromotionString(this.promoConfig,this.language,this.defaultLanguage,this.promoTranslations):""}}])&&xe(t.prototype,n),r&&xe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}(),_e={1:"reward",2:"discount"};const je=Le;var De=n(353),Me=n.n(De),$e=n(826),Ie=n.n($e),Ne=n(569),Ae=n.n(Ne);function Fe(e){return Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(e)}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qe(r.key),r)}}function qe(e){var t=function(e){if("object"!=Fe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fe(t)?t:t+""}Me().extend(Ie()),Me().extend(Ae());var Ue=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.giveawayConfig=t},(t=[{key:"getTimeLeftInDay",value:function(){Me().tz.setDefault("America/Chicago");var e=Me().tz(),t=Me().tz().endOf("day").diff(e,"seconds");return Me().tz.setDefault(),new Date(1e3*t).toISOString().substring(11,19)}}])&&We(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const Be=Ue;function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ye(r.key),r)}}function Ye(e){var t=function(e){if("object"!=Ge(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ge(t)?t:t+""}function Xe(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ve=new WeakSet,Je=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,Ve),this.terms=t||[{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]]}]},(t=[{key:"getPaymentInfo",value:function(e){var t=this;if(!e||e<=0)throw new Error("Unable to calculate Long Term payments: product price is undefined or non-positive");var n=Xe(Ve,this,Qe).call(this,e),r={productPrice:e,paymentTerms:[]};return r.paymentTerms=n.map(function(n){var r=n[0],o=n[1],i=Xe(Ve,t,Ze).call(t,e,r,o),a=Xe(Ve,t,et).call(t,i*r);return{durationInMonths:r,apr:o,monthlyPayment:i,totalAmount:a,totalInterest:a-e}}),r.paymentTerms.sort(function(e,t){return e.monthlyPayment-t.monthlyPayment}),r}},{key:"calculateLowestAvailablePayment",value:function(e){if(!e||e<=0)throw new Error("Unable to calculate lowest Long Term payment: product price is undefined or non-positive");var t=Xe(Ve,this,Ke).call(this,e);return Xe(Ve,this,Ze).call(this,e,t[0],t[1])}}])&&Re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Ze(e,t,n){if(n>0){var r=n/100/12,o=Math.pow(1+r,t);return e*r*o/(o-1)}return e/t}function Ke(e){return Xe(Ve,this,Qe).call(this,e)[0]}function Qe(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return He(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(this.terms);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e>r.price)return r.options}}catch(e){n.e(e)}finally{n.f()}return this.terms[this.terms.length-1].options}function et(e){return Math.round(100*e)/100}const tt=Je;function nt(e){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nt(e)}function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,it(r.key),r)}}function it(e){var t=function(e){if("object"!=nt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nt(t)?t:t+""}function at(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var st=new WeakSet,lt=function(){return e=function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,st),this.sezzleDOMFunctions=r,this.widgetEventLogger=o,this.widgetConfig=t,this.longTermPaymentConfig=n,this.placeholder="{price}",this.numberOfDecimals=2,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+$)/},(t=[{key:"getParsedPrice",value:function(e,t,n){var r=this.sezzleDOMFunctions.getPriceText(e,t);return r?(r=at(st,this,ct).call(this,r,n),this.convertToNumber(r)):(this.widgetEventLogger.logEvent("warning","No price text after ignored price elements."),null)}},{key:"convertToNumber",value:function(e){var t=this,n=new RegExp(/\d+((\.|,|\s)\d+)*/g),r=a.matchAll(n,e);if(0===r.length||r.length>2)return this.widgetEventLogger.logEvent("warning","priceText ".concat(r," contains unexpected number of values")),null;var o={formatter:e.replace(n,this.placeholder),prices:[],currency:this.getCurrency(e)};return o.prices=r.map(function(e){var n,r=e;return t.naFormat.test(e)&&(r=e.replaceAll(",",""),n=t.naFormat),t.euFormat.test(e)&&(r=e.replaceAll(".","").replaceAll(",","."),n=t.euFormat),t.euFormatWithSpace.test(e)&&(r=e.replaceAll("/s","").replaceAll(",",".").replaceAll(" ",""),n=t.euFormatWithSpace),t.euDecimalsNoThousandDelimiterFormat.test(e)&&(r=e.replaceAll(",","."),n=t.euDecimalsNoThousandDelimiterFormat),NaN===parseFloat(r)&&t.widgetEventLogger.logEvent("warning","parsed price element text ".concat(r," is not a number")),{value:parseFloat(r),format:n}}),o}},{key:"getCurrency",value:function(e){if(!e)return"";var t=e.match(/(?:[\$\xA2-\xA5\u058F\u060B\u07FE\u07FF\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20C0\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]|\uD807[\uDFDD-\uDFE0]|\uD838\uDEFF|\uD83B\uDCB0)/g);return t?t[0]:"$"}},{key:"getFormattedWidgetPrice",value:function(e,t,n){if(!e.prices||0===e.prices.length)throw new Error("Cannot get formatted widget price: no product prices are provided");var r,o=e.formatter,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e.prices);try{for(i.s();!(r=i.n()).done;){var a,s=r.value,l=void 0;if(t)l=new tt(this.longTermPaymentConfig.paymentTerms).calculateLowestAvailablePayment(s.value).toFixed(this.numberOfDecimals);else{var c=n?5:4;l=(s.value/c).toFixed(this.numberOfDecimals)}a=at(st,this,ut).call(this,l,s.format),o=o.replace(this.placeholder,a)}}catch(e){i.e(e)}finally{i.f()}return o}},{key:"getFormattedMinPrice",value:function(e){var t=e.prices[0].format,n=e.formatter,r=at(st,this,ut).call(this,this.widgetConfig.minPrice/100,t),o=at(st,this,ft).call(this,n);return o?n.split(o)[0].replace(this.placeholder,r).trim():n.replace(this.placeholder,r)}},{key:"getProductPriceEligibility",value:function(e){var t=this.getProductPriceInCents(e);return{isPriceLessThanMinPrice:!!(t<this.widgetConfig.minPrice),isPriceGreaterThanMaxPrice:!!(t>this.widgetConfig.maxPrice),is5PayEligible:document.isSezzlePayIn5&&t>=5e3,isLongTermPaymentEligible:!!(this.longTermPaymentConfig&&t>=this.longTermPaymentConfig.minPrice&&t<=this.longTermPaymentConfig.maxPrice)}}},{key:"getFormattedLongTermPaymentInfo",value:function(e){var t=this;if(!e.currency)throw new Error("Cannot get formatted long term payment info: the currency symbol is not provided");var n=e.prices[0].value,r=new tt(this.longTermPaymentConfig.paymentTerms).getPaymentInfo(n),o={productPrice:e.currency+r.productPrice.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),paymentTerms:[]};return o.paymentTerms=r.paymentTerms.map(function(n){return{durationInMonths:n.durationInMonths,apr:n.apr,monthlyPayment:e.currency+n.monthlyPayment.toFixed(t.numberOfDecimals).replace(t.thousandDelimiter,","),totalAmount:e.currency+n.totalAmount.toFixed(t.numberOfDecimals).replace(t.thousandDelimiter,","),totalInterest:e.currency+n.totalInterest.toFixed(t.numberOfDecimals).replace(t.thousandDelimiter,",")}}),o}},{key:"getFormattedShortTermPaymentInfo",value:function(e){if(!e.currency)throw new Error("Cannot get formatted short term payment info: the currency symbol is not provided");var t=e.prices[0].value;return{productPrice:e.currency+t.toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),pi4InstallmentAmount:e.currency+(t/4).toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,","),pi5InstallmentAmount:e.currency+(t/5).toFixed(this.numberOfDecimals).replace(this.thousandDelimiter,",")}}},{key:"getProductPriceInCents",value:function(e){if(!e.prices||0===e.prices.length)throw new Error("Cannot get formatted widget price: no product prices are provided");return 100*e.prices[0].value}}])&&ot(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ct(e,t){return e=e.replace("\n","").replace(/\u00a0/g," ").trim(),t&&t.forEach(function(t){var n=new RegExp(t,"ig");e=e.replace(n,"")}),e}function ut(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 ft(e){var t="";return["–","-"].forEach(function(n){e.includes(n)&&(t=n)}),t}const dt=lt;function ht(e){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ht(e)}var mt;function pt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return gt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vt(r.key),r)}}function vt(e){var t=function(e){if("object"!=ht(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ht(t)?t:t+""}function bt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var wt,zt,Et,St=new WeakSet,kt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,St),this.widgetEventLogger=t}return t=e,(n=[{key:"logCompetitorEvents",value:function(){for(var t in e.competitorWidgets)bt(St,this,Tt).call(this,t)&&this.widgetEventLogger.logEvent("competitor-widget",t)}}])&&yt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function Tt(e){var t,n=pt(mt.competitorWidgets[e].tagNames);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(document.getElementsByTagName(r).length)return!0}}catch(e){n.e(e)}finally{n.f()}var o,i=pt(mt.competitorWidgets[e].ids);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(document.getElementById(a))return!0}}catch(e){i.e(e)}finally{i.f()}var s,l=pt(mt.competitorWidgets[e].classes);try{for(l.s();!(s=l.n()).done;){var c=s.value;if(document.getElementsByClassName(c).length)return!0}}catch(e){l.e(e)}finally{l.f()}}mt=kt,wt=kt,Et={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"]}},(zt=vt(zt="competitorWidgets"))in wt?Object.defineProperty(wt,zt,{value:Et,enumerable:!0,configurable:!0,writable:!0}):wt[zt]=Et;const Pt=kt;function Ct(e){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ct(e)}var xt;function Ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_t(r.key),r)}}function Lt(e,t,n){return(t=_t(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _t(e){var t=function(e){if("object"!=Ct(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ct(t)?t:t+""}function jt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Dt=n(193),Mt=new WeakSet,$t=function(){return function(e,t){return t&&Ot(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,Mt),Lt(this,"intervalInMs",void 0),this.intervalInMs=2e3,this.widgetConfig=t,this.widgetEventLogger=n,this.competitor=new Pt(this.widgetEventLogger),this.sezzleDOMFunctions=new D(t),this.language=r,this.promotion=new je(document.sezzlePromotion,this.language),this.giveaway=new Be(document.giveawayConfig),this.priceProcessor=new dt(t,document.longTermPaymentConfig,this.sezzleDOMFunctions,this.widgetEventLogger),this.modal=new ue(t,n,this.giveaway,this.promotion,this.priceProcessor,this.language)},[{key:"initializeRendering",value:function(){jt(Mt,this,Zt).call(this,this.widgetConfig.observeElements),jt(Mt,this,It).call(this,[]),this.modal.renderModals()}}])}();function It(e){var t=this;e=e.filter(function(e){return null!=e.widget}),this.widgetConfig.configGroups.forEach(function(n,r){t.sezzleDOMFunctions.getElementsByXPath(n.xpath).forEach(function(o){if(!o.hasAttribute("data-sezzleindex")){var i=jt(Mt,t,Ft).call(t,o,r,n);if(i){t.widgetEventLogger.logEvent("onload");try{var a={priceElement:o,observer:t.sezzleDOMFunctions.startObserve(o,function(e){jt(Mt,t,Nt).call(t,e,n,t.priceProcessor)}),widget:i,configGroup:n};e.push(a),t.modal.addClickEventForModal(a),t.sezzleDOMFunctions.observeRelatedElements(a.priceElement,a.widget,a.configGroup.relatedElementActions)}catch(e){t.widgetEventLogger.logEvent("warning","The widget has been rendered, but an error occurred when running additional instructions: ".concat(e.message))}}}})}),e.forEach(function(e){document.body.contains(e.priceElement)||(null!==e.observer&&e.observer.disconnect(),e.widget.remove(),e.widget=null)});for(var n=0,r=this.widgetConfig.configGroups.length;n<r;n++)this.sezzleDOMFunctions.hideSezzleHideElements(n);setTimeout(function(){jt(Mt,t,It).call(t,e),t.competitor.logCompetitorEvents(),t.widgetEventLogger.forceSendEvents()},this.intervalInMs);var o=document.querySelector(".sezzle-");null!==o&&(o.classList.contains("sezzle-hidden")||o.classList.add("sezzle-hidden"))}function Nt(e,t,n){var r=this;e.filter(function(e){return"childList"===e.type}).forEach(function(e){var o=e.target.dataset.sezzleindex,i=document.querySelector(".sezzleindex-".concat(o));if(i){var a=i.parentElement,s=a.parentElement.parentElement;try{s.classList.remove("sezzle-hidden");var l=n.getParsedPrice(e.target,t.ignoredPriceElements,t.ignoredFormattedPriceText),c=n.getProductPriceEligibility(l);(c.isPriceGreaterThanMaxPrice&&!c.isLongTermPaymentEligible||!c.isLongTermPaymentEligible&&r.widgetConfig.config.isLongTermOnly)&&s.classList.add("sezzle-hidden");var u=jt(Mt,r,Wt).call(r,t,o,c,l);a.innerHTML=u.innerHTML}catch(e){s.classList.add("sezzle-hidden"),r.widgetEventLogger.logEvent("warning",e.message)}}})}function At(e){return e&&0===Object.keys(e).length&&e.constructor===Object}function Ft(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;try{if(e.classList.contains("sezzle-ignored-price-element"))return null;var r=this.priceProcessor.getParsedPrice(e,n.ignoredPriceElements,n.ignoredFormattedPriceText);if(!r)return this.widgetEventLogger.logEvent("warning","Cannot render widget. Failed to parse price for the element ".concat(e.id||e.className)),null;var o=this.priceProcessor.getProductPriceEligibility(r);if(o.isPriceGreaterThanMaxPrice&&!o.isLongTermPaymentEligible||!o.isLongTermPaymentEligible&&this.widgetConfig.config.isLongTermOnly)return null;var i=this.sezzleDOMFunctions.getElementToRender(e,t);e.dataset.sezzleindex=t,"auto"===n.alignment&&(n.alignment=jt(Mt,this,Ut).call(this,e));var a=document.createElement("div");a.className="sezzle-shopify-info-button sezzlewidgetindex-".concat(t),jt(Mt,this,Bt).call(this,a),jt(Mt,this,At).call(this,n.containerStyle)||jt(Mt,this,Gt).call(this,a,n);var s=document.createElement("div");s.ariaHasPopup="dialog",s.role="button",s.className="sezzle-checkout-button-wrapper sezzle-modal-link",s.tabIndex=0,s.style.cursor="pointer",jt(Mt,this,Bt).call(this,s),jt(Mt,this,Ht).call(this,s,n);var l=jt(Mt,this,Wt).call(this,n,t,o,r);return s.appendChild(l),a.appendChild(s),n.widgetIsFirstChild?jt(Mt,this,Jt).call(this,a,i):jt(Mt,this,Vt).call(this,a,i),a}catch(e){return this.widgetEventLogger.logEvent("error","An exception occurred when rendering a widget: ".concat(e.message)),null}}function Wt(e,t,n,r){var o=this,i=document.createElement("div");return i.className="sezzle-button-text",i.style.fontSize="14px",i.style.lineHeight="18px",jt(Mt,this,At).call(this,e.textStyle)||jt(Mt,this,Rt).call(this,i,e),jt(Mt,this,Ht).call(this,i,e),jt(Mt,this,Yt).call(this,i,e),jt(Mt,this,qt).call(this,e,n).forEach(function(a){switch(a){case"sup":var s=document.createElement("sup");s.textContent="1",i.appendChild(s);break;case"price":var l=document.createElement("span");l.className="sezzle-payment-amount sezzle-button-text sezzleindex-".concat(t);var c=o.priceProcessor.getFormattedWidgetPrice(r,n.isLongTermPaymentEligible,n.is5PayEligible),u=document.createTextNode(c);l.appendChild(u),i.appendChild(l);break;case"logo":var f=document.createElement("img");f.className="sezzle-logo ".concat(e.imageClassName),f.src=e.imageURL,f.alt="Sezzle",f.style.height="18px",f.style.width="72px",i.appendChild(f),jt(Mt,o,At).call(o,e.logoStyle)||jt(Mt,o,Xt).call(o,f,e);break;case"info":var d=document.createElement("div");d.ariaLabel="".concat(o.language.translations.clickToLearnMore," Sezzle"),d.name="".concat(o.language.translations.clickToLearnMore," Sezzle"),d.className="sezzle-info-icon sezzle-modal-link",d.innerHTML="&#9432",d.style="font-size: ".concat(e.textStyle.fontSize,"px"),i.appendChild(d);break;case"afterpay-logo":var h=document.createElement("img");h.className="sezzle-ap-logo ap-modal-info-link no-sezzle-info",h.src="https://media.sezzle.com/sezzle-credit-website-assets/ap-badge-black-on-mint.svg",h.alt="".concat(o.language.translations.clickToLearnMore," Afterpay"),i.appendChild(h);break;case"klarna-logo":var m=document.createElement("img");m.className="sezzle-klarna-logo klarna-modal-info-link no-sezzle-info",m.src="https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg",m.alt="".concat(o.language.translations.clickToLearnMore," Klarna"),i.appendChild(m);break;case"line-break":var p=document.createElement("br");i.appendChild(p);break;case"min-price":var g=document.createElement("span");g.className="sezzle-payment-amount sezzle-button-text sezzleindex-".concat(t);var y=o.priceProcessor.getFormattedMinPrice(r),v=document.createTextNode(y);g.appendChild(v),i.appendChild(g);break;case"timer":var b=document.createElement("span");b.className="sezzle-giveaway-timer",b.textContent=o.giveaway.getTimeLeftInDay(),i.appendChild(b),setInterval(function(){b.textContent=o.giveaway.getTimeLeftInDay()},1e3);break;case"award":var w=document.createElement("span");w.className="sezzle-giveaway-award",w.textContent="$".concat(document.giveawayConfig.award),i.appendChild(w);break;default:var z=document.createTextNode(a);i.appendChild(z)}}),i}function qt(e,t){var n;if(t.isLongTermPaymentEligible)n=this.language.translations.longTerm;else if(document.giveawayConfig)n=this.language.translations.giveaway;else if(document.sezzlePromotion){n=this.language.translations.promo;var r=this.promotion.getPromotionString();n=n.replace("{promotext}",r)}else n=(this.widgetConfig.apDualInstall||this.widgetConfig.klarnaDualInstall)&&t.is5PayEligible?this.language.translations.dualInstall:this.language.translations.widget;if(t.isPriceLessThanMinPrice){var o=this.language.translations.thresholdPrice;n=n.replace("{thresholdPriceText}",o)}else{if(this.widgetConfig.apDualInstall){var i=this.language.translations.apDualInstall;n=n.replace("{apDualInstallText}",i)}if(this.widgetConfig.klarnaDualInstall){var a=this.language.translations.klarnaDualInstall;n=n.replace("{klarnaDualInstallText}",a)}}var s=t.is5PayEligible?5:4;return(n=(n=(n=(n=n.replace("{numberOfPayments}",s)).replace("{apDualInstallText}","")).replace("{klarnaDualInstallText}","")).replace("{thresholdPriceText}","")).split("%%")}function Ut(e){if(!e)return"left";var t=window.getComputedStyle(e).textAlign;return"start"===t||"justify"===t?"left":"end"===t?"right":t}function Bt(e){return e.className+=" sezzle-".concat(this.widgetConfig.merchantID),e}function Gt(e,t){Object.keys(t.containerStyle).forEach(function(n){e.style[n]=t.containerStyle[n]})}function Ht(e,t){var n="";if("undefined"!=typeof matchMedia&&t.alignmentSwitchMinWidth&&t.alignmentSwitchType){var r="(min-width: ".concat(t.alignmentSwitchMinWidth,"px)");window.matchMedia(r).matches||(n=t.alignmentSwitchType)}var o=n||t.alignment||"auto";e.className+=" sezzle-".concat(o)}function Rt(e,t){Object.keys(t.textStyle).forEach(function(n){e.style[n]=t.textStyle[n]})}function Yt(e,t){switch(t.theme){case"dark":case"white-flat":e.className+=" szl-dark";break;default:e.className+=" szl-light"}}function Xt(e,t){Object.keys(t.logoStyle).forEach(function(n){e.style[n]=t.logoStyle[n]})}function Vt(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function Jt(e,t){for(t.parentElement.insertBefore(e,t);e.previousSibling;)e.parentElement.insertBefore(e,e.previousSibling)}function Zt(e){xt.isEventListenerAdded||Array.isArray(e)&&0!=e.length&&(e.forEach(function(e){var t=document.querySelectorAll(e.element);t.length>0&&t.forEach(function(t){t.addEventListener(e.eventType,function(){var e=document.querySelector("[data-sezzleindex]");e&&e.removeAttribute("data-sezzleindex");var t=document.querySelector(".sezzle-shopify-info-button");t&&t.remove();var n=ze.NewWidgetEventLogger(document.sezzleConfig.merchantID);new En(Dt(document.sezzleConfig),n).init()})})}),xt.isEventListenerAdded=!0)}xt=$t,Lt($t,"isEventListenerAdded",!1);const Kt=$t,Qt=JSON.parse('{"apDualInstall":" or %%afterpay-logo%%","clickToLearnMore":"Click to learn more about","dualInstall":"Buy now, pay later with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}","giveaway":"or {numberOfPayments} payments of %%price%% with %%logo%%{thresholdPriceText} within %%timer%% to win %%award%% %%info%%","klarnaDualInstall":" or %%klarna-logo%%","longTerm":"or monthly payments as low as %%price%% with %%logo%% %%info%%","promo":"or {numberOfPayments} payments of %%price%% with %%logo%%{thresholdPriceText}{promotext} %%info%%","sezzleInformation":"Sezzle Information","thresholdPrice":" for orders over %%min-price%%","widget":"or {numberOfPayments} payments of %%price%% with %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%"}'),en=JSON.parse('{"apDualInstall":" ou %%afterpay-logo%%","clickToLearnMore":"Cliquez pour en savoir plus sur","dualInstall":"Achetez maintenant, payez plus tard avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}","giveaway":"ou {numberOfPayments} paiements de %%price%% avec %%logo%%{thresholdPriceText} dans les %%timer%% pour gagner %%award%% %%info%%","klarnaDualInstall":" ou %%klarna-logo%%","longTerm":"ou des paiements mensuels aussi bas que %%price%% avec %%logo%% %%info%%","promo":"ou {numberOfPayments} paiements de %%price%% avec %%logo%%{thresholdPriceText}{promotext} %%info%%","sezzleInformation":"Informations Sezzle","thresholdPrice":" pour les achats de plus de %%min-price%%","widget":"ou {numberOfPayments} paiements de %%price%% avec %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%"}'),tn=JSON.parse('{"apDualInstall":" o %%afterpay-logo%%","clickToLearnMore":"Haga clic para obtener más información sobre","dualInstall":"Compra ahora, paga después con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText}","giveaway":"o {numberOfPayments} pagos de %%price%% con %%logo%%{thresholdPriceText} dentro de %%timer%% para ganar %%award%% %%info%%","klarnaDualInstall":" o %%klarna-logo%%","longTerm":"o pagos mensuales tan bajos como %%price%% con %%logo%% %%info%%","promo":"o {numberOfPayments} pagos de %%price%% con %%logo%%{thresholdPriceText}{promotext} %%info%%","sezzleInformation":"Información de Sezzle","thresholdPrice":" por compras superiores a %%min-price%%","widget":"o {numberOfPayments} pagos de %%price%% con %%logo%%{apDualInstallText}{klarnaDualInstallText}{thresholdPriceText} %%info%%"}');function nn(e){return nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn(e)}function rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,on(r.key),r)}}function on(e){var t=function(e){if("object"!=nn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nn(t)?t:t+""}var an=new WeakSet,sn=function(){return function(e,t){return t&&rn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,an),this.defaultLanguage="en",this.translationsMap={en:Qt,fr:en,es:tn},this.translations=null,this.language=null},[{key:"getTranslations",value:function(){return this.translationsMap[this.language]}},{key:"setLanguage",value:function(e){var t;(t="function"==typeof e?e():e)&&"string"==typeof t||(t=document.querySelector("html").lang);var n=t.substring(0,2).toLowerCase();!function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(an,this,ln).call(this,n)?this.language=this.defaultLanguage:this.language=n,this.translations=this.getTranslations()}},{key:"getLanguage",value:function(){return this.language||this.defaultLanguage}}])}();function ln(e){var t=0;return Object.getOwnPropertyNames(this.translationsMap).forEach(function(n){n===e&&t++}),t>0}const cn=sn;function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function fn(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return dn(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,l=e,d.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],h=d.p,m=i[2];n>3?(o=m===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((o=n<2&&h<i[1])?(s=0,d.v=r,d.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,d.n=m,s=0))}if(o||n>1)return a;throw f=!0,r}return function(o,u,m){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,m),s=u,l=m;(t=s<2?e:l)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,l)):d.n=l:d.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=d.n<0)?l:n.call(r,d))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(dn(t={},r,function(){return this}),t),f=c.prototype=s.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,dn(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=c,dn(f,"constructor",c),dn(c,"constructor",l),l.displayName="GeneratorFunction",dn(c,o,"GeneratorFunction"),dn(f),dn(f,o,"Generator"),dn(f,r,function(){return this}),dn(f,"toString",function(){return"[object Generator]"}),(fn=function(){return{w:i,m:d}})()}function dn(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}dn=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){dn(e,t,function(e){return this._invoke(t,n,e)})};i("next",0),i("throw",1),i("return",2)}},dn(e,t,n,r)}function hn(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function mn(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){hn(i,r,o,a,s,"next",e)}function s(e){hn(i,r,o,a,s,"throw",e)}a(void 0)})}}function pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gn(r.key),r)}}function gn(e){var t=function(e){if("object"!=un(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==un(t)?t:t+""}function yn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var vn=new WeakSet,bn=function(){return function(e,t){return t&&pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,vn),this.basicWidgetConfiguration=t,this.widgetEventLogger=n,this.competitor=new Pt(this.widgetEventLogger)},[{key:"init",value:(e=mn(fn().m(function e(){var t,n,r,o,i;return fn().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,this.widgetEventLogger.logEvent("request"),(t=a.getCookie("shopify_pay_redirect"))&&this.widgetEventLogger.logEvent("shopify-pay-redirect-".concat(t)),n=new cn,r=new x(this.basicWidgetConfiguration,n,this.widgetEventLogger),e.n=1,r.setAPModalHTML();case 1:return e.n=2,r.setKlarnaModalHTML();case 2:if(!((o=r.getSezzleConfig).configGroups.length>0)){e.n=3;break}return e.n=3,yn(vn,this,wn).call(this,o,n);case 3:e.n=5;break;case 4:e.p=4,i=e.v,this.widgetEventLogger.logEvent("error",i.message);case 5:this.widgetEventLogger.forceSendEvents();case 6:return e.a(2)}},e,this,[[0,4]])})),function(){return e.apply(this,arguments)})}]);var e}();function wn(e,t){return zn.apply(this,arguments)}function zn(){return(zn=mn(fn().m(function e(t,n){return fn().w(function(e){for(;;)switch(e.n){case 0:new Kt(t,this.widgetEventLogger,n).initializeRendering(),a.isWidgetDuplicateFound()&&this.widgetEventLogger.logEvent("duplicate-widget"),this.competitor.logCompetitorEvents();case 1:return e.a(2)}},e,this)}))).apply(this,arguments)}const En=bn;var Sn=n(72),kn=n.n(Sn),Tn=n(825),Pn=n.n(Tn),Cn=n(659),xn=n.n(Cn),On=n(56),Ln=n.n(On),_n=n(540),jn=n.n(_n),Dn=n(113),Mn=n.n(Dn),$n=n(23),In={};In.styleTagTransform=Mn(),In.setAttributes=Ln(),In.insert=xn().bind(null,"head"),In.domAPI=Pn(),In.insertStyleElement=jn(),kn()($n.A,In),$n.A&&$n.A.locals&&$n.A.locals;var Nn=n(193);!function(){var e=Nn(document.sezzleConfig),t=null==e?void 0:e.merchantID,n=ze.NewWidgetEventLogger(t||"");if(!function(e){return!!e&&(document.sezzleJSMerchantUUIDs||(document.sezzleJSMerchantUUIDs=[]),!!document.sezzleJSMerchantUUIDs.includes(e)||(document.sezzleJSMerchantUUIDs.push(e),!1))}(t)){if(!e)return 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"),void n.forceSendEvents();t||n.logEvent("warning","Merchant UUID is not provided"),a.waitForBodyToBeReady().then(function(){new En(e,n).init()})}}()})()})();