@namiml/web-sdk 3.4.2-dev.202606032104 → 3.4.2-dev.202606042208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/containers/ResponsiveGrid.d.ts +7 -1
- package/dist/nami-web.cjs +31 -20
- package/dist/nami-web.d.ts +7 -1
- package/dist/nami-web.mjs +24 -13
- package/dist/nami-web.umd.js +25 -14
- package/package.json +2 -2
package/dist/nami-web.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).NamiWebSdk={})}(this,function(e){"use strict";function t(e,t){this.v=e,this.k=t}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){return new t(e,0)}function r(e,t,n){return t=v(t),b(e,g()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(()=>{if("undefined"==typeof globalThis){var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")();Object.defineProperty(e,"globalThis",{value:e,writable:!0,enumerable:!1,configurable:!0})}})(),"undefined"!=typeof Element&&"function"!=typeof Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var e=this.attributes,t=new Array(e.length),n=0;n<e.length;n+=1)t[n]=e[n].name;return t});var u=0;function l(e){return"__private_"+u+++"_"+e}function d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,M(i.key),i)}}function c(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e))||t){i&&(e=i);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m.apply(null,arguments)}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},f.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function y(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function b(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function w(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function r(n,i,a,r){var u=i&&i.prototype instanceof s?i:s,l=Object.create(u.prototype);return E(l,"_invoke",function(n,i,a){var r,s,u,l=0,d=a||[],c=!1,h={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return r=t,s=0,u=e,h.n=n,o}};function m(n,i){for(s=n,u=i,t=0;!c&&l&&!a&&t<d.length;t++){var a,r=d[t],m=h.p,f=r[2];n>3?(a=f===i)&&(u=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((a=n<2&&m<r[1])?(s=0,h.v=i,h.n=r[1]):m<f&&(a=n<3||r[0]>i||i>f)&&(r[4]=n,r[5]=i,h.n=f,s=0))}if(a||n>1)return o;throw c=!0,i}return function(a,d,f){if(l>1)throw TypeError("Generator is already running");for(c&&1===d&&m(d,f),s=d,u=f;(t=s<2?e:u)||!c;){r||(s?s<3?(s>1&&(h.n=-1),m(s,u)):h.n=u:h.v=u);try{if(l=2,r){if(s||(a="next"),t=r[a]){if(!(t=t.call(r,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),s=1);r=e}else if((t=(c=h.n<0)?u:n.call(i,h))!==o)break}catch(t){r=e,s=1,u=t}finally{l=1}}return{value:t,done:c}}}(n,a,r),!0),l}var o={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var d=[][i]?t(t([][i]())):(E(t={},i,function(){return this}),t),c=l.prototype=s.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,E(e,a,"GeneratorFunction")),e.prototype=Object.create(c),e}return u.prototype=l,E(c,"constructor",l),E(l,"constructor",u),u.displayName="GeneratorFunction",E(l,a,"GeneratorFunction"),E(c),E(c,a,"Generator"),E(c,i,function(){return this}),E(c,"toString",function(){return"[object Generator]"}),(w=function(){return{w:r,m:h}})()}function k(e,t,n,i,a){var r=function(e,t,n,i,a){return new S(w().w(e,t,n,i),a||Promise)}(e,t,n,i,a);return r.next().then(function(e){return e.done?e.value:r.next()})}function S(e,n){function i(a,r,o,s){try{var u=e[a](r),l=u.value;return l instanceof t?n.resolve(l.v).then(function(e){i("next",e,o,s)},function(e){i("throw",e,o,s)}):n.resolve(l).then(function(e){u.value=e,o(u)},function(e){return i("throw",e,o,s)})}catch(e){s(e)}}var a;this.next||(E(S.prototype),E(S.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),E(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)}function E(e,t,n,i){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}E=function(e,t,n,i){function r(t,n){E(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},E(e,t,n,i)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function T(e,t,n,i){var a=f(v(e.prototype),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}function M(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function _(e){var t="function"==typeof Map?new Map:void 0;return _=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(g())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var a=new(e.bind.apply(e,i));return n&&P(a,n.prototype),a}(e,arguments,v(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)},_(e)}var A,D,x,C,I,L,R,F,O,N,$,W,j=function(){return c(function e(t){o(this,e),this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t},[{key:"shadowRoot",get:function(){return this.__host.__shadowRoot}},{key:"checkValidity",value:function(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}},{key:"reportValidity",value:function(){return!0}},{key:"setFormValue",value:function(){}},{key:"setValidity",value:function(){}}])}(),B=function(e,t,n,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?a.call(e,n):a?a.value=n:t.set(e,n),n},z=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},U={__proto__:null,enumerable:!0};Object.freeze(U);var H=(N=function(){return c(function e(t,n={}){if(o(this,e),A.set(this,!1),D.set(this,!1),x.set(this,!1),C.set(this,!1),I.set(this,Date.now()),L.set(this,!1),R.set(this,void 0),F.set(this,void 0),O.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,0===arguments.length)throw new Error("The type argument must be specified");if("object"!=typeof n||!n)throw new Error('The "options" argument must be an object');var i=n.bubbles,a=n.cancelable,r=n.composed;B(this,A,!!a,"f"),B(this,D,!!i,"f"),B(this,x,!!r,"f"),B(this,R,`${t}`,"f"),B(this,F,null,"f"),B(this,O,!1,"f")},[{key:"initEvent",value:function(e,t,n){throw new Error("Method not implemented.")}},{key:"stopImmediatePropagation",value:function(){this.stopPropagation()}},{key:"preventDefault",value:function(){B(this,C,!0,"f")}},{key:"target",get:function(){return z(this,F,"f")}},{key:"currentTarget",get:function(){return z(this,F,"f")}},{key:"srcElement",get:function(){return z(this,F,"f")}},{key:"type",get:function(){return z(this,R,"f")}},{key:"cancelable",get:function(){return z(this,A,"f")}},{key:"defaultPrevented",get:function(){return z(this,A,"f")&&z(this,C,"f")}},{key:"timeStamp",get:function(){return z(this,I,"f")}},{key:"composedPath",value:function(){return z(this,O,"f")?[z(this,F,"f")]:[]}},{key:"returnValue",get:function(){return!z(this,A,"f")||!z(this,C,"f")}},{key:"bubbles",get:function(){return z(this,D,"f")}},{key:"composed",get:function(){return z(this,x,"f")}},{key:"eventPhase",get:function(){return z(this,O,"f")?N.AT_TARGET:N.NONE}},{key:"cancelBubble",get:function(){return z(this,L,"f")},set:function(e){e&&B(this,L,!0,"f")}},{key:"stopPropagation",value:function(){B(this,L,!0,"f")}},{key:"isTrusted",get:function(){return!1}}])}(),A=new WeakMap,D=new WeakMap,x=new WeakMap,C=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakMap,F=new WeakMap,O=new WeakMap,N.NONE=0,N.CAPTURING_PHASE=1,N.AT_TARGET=2,N.BUBBLING_PHASE=3,N);Object.defineProperties(H.prototype,{initEvent:U,stopImmediatePropagation:U,preventDefault:U,target:U,currentTarget:U,srcElement:U,type:U,cancelable:U,defaultPrevented:U,timeStamp:U,composedPath:U,returnValue:U,bubbles:U,composed:U,eventPhase:U,cancelBubble:U,stopPropagation:U,isTrusted:U});var G=(W=function(e){function t(e,n={}){var i,a;return o(this,t),a=r(this,t,[e,n]),$.set(a,void 0),B(a,$,null!==(i=null==n?void 0:n.detail)&&void 0!==i?i:null,"f"),a}return p(t,e),c(t,[{key:"initCustomEvent",value:function(e,t,n,i){throw new Error("Method not implemented.")}},{key:"detail",get:function(){return z(this,$,"f")}}])}(H),$=new WeakMap,W);Object.defineProperties(G.prototype,{detail:U});var V,K,X,Y,q=H,J=G;(V=function(){return c(function e(){o(this,e),this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""},[{key:"parentRule",get:function(){return null}},{key:"parentStyleSheet",get:function(){return this.__parentStyleSheet}},{key:"type",get:function(){return 0}}])}()).STYLE_RULE=1,V.CHARSET_RULE=2,V.IMPORT_RULE=3,V.MEDIA_RULE=4,V.FONT_FACE_RULE=5,V.PAGE_RULE=6,V.NAMESPACE_RULE=10,V.KEYFRAMES_RULE=7,V.KEYFRAME_RULE=8,V.SUPPORTS_RULE=12,V.COUNTER_STYLE_RULE=11,V.FONT_FEATURE_VALUES_RULE=14,V.MARGIN_RULE=9,null!==(K=globalThis.Event)&&void 0!==K||(globalThis.Event=q),null!==(X=globalThis.CustomEvent)&&void 0!==X||(globalThis.CustomEvent=J);var Q=Symbol(),Z=e=>{var t;return"boolean"==typeof e?e:null!==(t=null==e?void 0:e.capture)&&void 0!==t&&t},ee={__proto__:null,enumerable:!0};Object.freeze(ee);var te=function(){return c(function e(){o(this,e),this.__eventListeners=new Map,this.__captureEventListeners=new Map},[{key:"addEventListener",value:function(e,t,n){var i;if(null!=t){var a=Z(n)?this.__captureEventListeners:this.__eventListeners,r=a.get(e);if(void 0===r)r=new Map,a.set(e,r);else if(r.has(t))return;var o="object"==typeof n&&n?n:{};null===(i=o.signal)||void 0===i||i.addEventListener("abort",()=>this.removeEventListener(e,t,n)),r.set(t,null!=o?o:{})}}},{key:"removeEventListener",value:function(e,t,n){if(null!=t){var i=Z(n)?this.__captureEventListeners:this.__eventListeners,a=i.get(e);void 0!==a&&(a.delete(t),a.size||i.delete(e))}}},{key:"dispatchEvent",value:function(e){var t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));var n=!1,i=!1,a=q.NONE,r=null,o=null,s=null,u=e.stopPropagation,l=e.stopImmediatePropagation;Object.defineProperties(e,{target:m({get:()=>null!=r?r:o},ee),srcElement:m({get:()=>e.target},ee),currentTarget:m({get:()=>s},ee),eventPhase:m({get:()=>a},ee),composedPath:m({value:()=>t},ee),stopPropagation:m({value:()=>{n=!0,u.call(e)}},ee),stopImmediatePropagation:m({value:()=>{i=!0,l.call(e)}},ee)});var d=(t,n,i)=>{"function"==typeof t?t(e):"function"==typeof(null==t?void 0:t.handleEvent)&&t.handleEvent(e),n.once&&i.delete(t)},c=()=>(s=null,a=q.NONE,!e.defaultPrevented),f=t.slice().reverse();r=this.__host&&e.composed?null:this;for(var v,p=e=>{for(o=this;o.__host&&e.includes(o.__host);)o=o.__host},g=h(f);!(v=g()).done;){var y=v.value;r||o&&o!==y.__host||p(f.slice(f.indexOf(y))),s=y,a=y===e.target?q.AT_TARGET:q.CAPTURING_PHASE;var b=y.__captureEventListeners.get(e.type);if(b)for(var w,k=h(b);!(w=k()).done;){var S=w.value;if(d(S[0],S[1],b),i)return c()}if(n)return c()}var E=e.bubbles?t:[this];o=null;for(var P,T=h(E);!(P=T()).done;){var M=P.value;r||o&&M!==o.__host||p(E.slice(0,E.indexOf(M)+1)),s=M,a=M===e.target?q.AT_TARGET:q.BUBBLING_PHASE;var _=M.__eventListeners.get(e.type);if(_)for(var A,D=h(_);!(A=D()).done;){var x=A.value;if(d(x[0],x[1],_),i)return c()}if(n)return c()}return c()}},{key:"__resolveFullEventPath",value:function(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,oe,pe]}}])}(),ne=new WeakMap,ie=e=>{var t=ne.get(e);return void 0===t&&ne.set(e,t=new Map),t},ae=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),c(t,[{key:"getRootNode",value:function(e){var t;if(null!=e&&e.composed)return se;var n=this.__host;return null!==(t=null==n?void 0:n.__shadowRoot)&&void 0!==t?t:se}}])}(te),re=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),c(t,[{key:"adoptedStyleSheets",get:function(){return[]}},{key:"createTreeWalker",value:function(){return{}}},{key:"createTextNode",value:function(){return{}}},{key:"createElement",value:function(){return{}}}])}(ae),oe=new re,se=oe,ue=function(e){function t(e){var n;if(o(this,t),n=r(this,t),e!==Q)throw new TypeError("Illegal constructor");return Object.assign(n,globalThis,{CustomElementRegistry:fe,customElements:ve,document:se,Document:re,Element:le,EventTarget:te,HTMLElement:de,Node:ae,ShadowRoot:he,window:n,Window:ue}),n}return p(t,e),c(t)}(ae),le=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).__shadowRootMode=null,e.__shadowRoot=null,e.__internals=null,e}return p(t,e),c(t,[{key:"attributes",get:function(){return Array.from(ie(this)).map(([e,t])=>({name:e,value:t}))}},{key:"shadowRoot",get:function(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}},{key:"localName",get:function(){return this.constructor.__localName}},{key:"tagName",get:function(){var e;return null===(e=this.localName)||void 0===e?void 0:e.toUpperCase()}},{key:"setAttribute",value:function(e,t){ie(this).set(e,String(t))}},{key:"removeAttribute",value:function(e){ie(this).delete(e)}},{key:"toggleAttribute",value:function(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}},{key:"hasAttribute",value:function(e){return ie(this).has(e)}},{key:"attachShadow",value:function(e){this.__shadowRootMode=e.mode;var t=new he(Q,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}},{key:"attachInternals",value:function(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");var e=new j(this);return this.__internals=e,e}},{key:"getAttribute",value:function(e){var t=ie(this).get(e);return null!=t?t:null}}])}(ae),de=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),c(t)}(le),ce=de,he=function(e){function t(e,n){var i;if(o(this,t),i=r(this,t),e!=e)throw new TypeError("Illegal constructor");return i.mode=n.mode,i}return p(t,e),c(t,[{key:"host",get:function(){return this.__host}}])}(ae);function me(){var e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}null!==(Y=globalThis.litServerRoot)&&void 0!==Y||(globalThis.litServerRoot=Object.defineProperty(new ce,"localName",{get:()=>"lit-server-root"}));var fe=function(){return c(function e(){o(this,e),this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map},[{key:"define",value:function(e,t){var n,i;if(this.__definitions.has(e)){if("development"!==process.env.NODE_ENV)throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`)}if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:null!==(n=t.observedAttributes)&&void 0!==n?n:[]}),this.__reverseDefinitions.set(t,e),null===(i=this.__pendingWhenDefineds.get(e))||void 0===i||i.resolve(t),this.__pendingWhenDefineds.delete(e)}},{key:"get",value:function(e){var t=this.__definitions.get(e);return null==t?void 0:t.ctor}},{key:"getName",value:function(e){var t;return null!==(t=this.__reverseDefinitions.get(e))&&void 0!==t?t:null}},{key:"initialize",value:function(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}},{key:"upgrade",value:function(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}},{key:"whenDefined",value:function(e){var t,n;return k(function(i){for(;;)switch(i.n){case 0:if(!(t=this.__definitions.get(e))){i.n=1;break}return i.a(2,t.ctor);case 1:return(n=this.__pendingWhenDefineds.get(e))||(n=me(),this.__pendingWhenDefineds.set(e,n)),i.a(2,n.promise)}},null,this,null,Promise)}}])}(),ve=new fe,pe=new ue(Q);"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=ce);var ge=["action"],ye=null;var be={storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{},getAllKeys:()=>[]},device:{getDeviceData:()=>({os_version:"",os_name:"",browser_name:"",browser_version:"",sdk_client:"",sdk_version:"",language:"en"}),getDeviceFormFactor:()=>"desktop",getDeviceScaleFactor:()=>1,generateUUID:()=>{throw new Error("No platform adapter registered — call registerPlatformAdapters() before Nami.configure()")},getScreenInfo:()=>({width:0,height:0,scale:1}),getLanguage:()=>"en"},ui:{createPaywall:()=>null,reRenderPaywall:()=>{},flowNavigateToScreen:()=>{}}};function we(){return null!=ye?ye:be}function ke(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function Se(e,t,n,i){if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function Ee(e,t,n,i,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError;var Pe;!function(e){e.SDK="sdk",e.ML="ml",e.THIRD_PARTY_ANALYTICS="third_party_analytics",e.THIRD_PARTY_TRANSACTIONS="third_party_transactions",e.PAYWALL_PERSONALIZATION="paywall_personalization",e.ANONYMOUS_MODE_CAPABILITY="anonymous_allowed",e.LANGUAGE_MANAGEMENT="language_management",e.ENTITLEMENT_MANAGEMENT="entitlement_management"}(Pe||(Pe={}));var Te,Me={},_e=Me.NAMI_SDK_VERSION,Ae=void 0===_e?"3.4.2":_e,De=Me.NAMI_SDK_PACKAGE_VERSION,xe=void 0===De?"3.4.2-dev.202606032104":De,Ce=Me.PLATFORM_ID_REQUIRED,Ie=void 0===Ce?"Platform ID is required":Ce,Le=Me.DEVICE_ID_REQUIRED,Re=void 0===Le?"Device ID is required":Le,Fe=Me.EXTERNAL_ID_REQUIRED,Oe=void 0===Fe?"External ID is required":Fe,Ne=Me.SDK_NOT_INITIALIZED,$e=void 0===Ne?"SDK has not been initialized. Make sure to call Nami.configure() first!":Ne,We=Me.CAMPAIGN_NOT_AVAILABLE,je=void 0===We?"Campaign is not available":We,Be=Me.FLOW_SCREENS_NOT_AVAILABLE,ze=void 0===Be?"Flow screens not available":Be,Ue=Me.UNABLE_TO_UPDATE_CDP_ID,He=void 0===Ue?"Unable to update CDP id in anonymous mode":Ue,Ge=Me.ANONYMOUS_MODE_ALREADY_ON,Ve=void 0===Ge?"Anonymous mode is already turned on.":Ge,Ke=Me.ANONYMOUS_MODE_ALREADY_OFF,Xe=void 0===Ke?"Anonymous mode is already turned off.":Ke,Ye=Me.DEVICE_ID_NOT_SET,qe=void 0===Ye?"Nami Device ID is not set":Ye,Je=Me.AUTH_DEVICE,Qe=void 0===Je?"nami_auth_device":Je,Ze=Me.NAMI_CONFIGURATION,et=void 0===Ze?"nami_configuration":Ze,tt=Me.NAMI_PROFILE,nt=void 0===tt?"nami_profile":tt,it=Me.API_CONFIG,at=void 0===it?"api_config":it,rt=Me.API_CAMPAIGN_RULES,ot=void 0===rt?"api_campaign_rules":rt,st=Me.API_PAYWALLS,ut=void 0===st?"api_paywalls":st,lt=Me.API_CAMPAIGN_SESSION_TIMESTAMP,dt=void 0===lt?"api_campaign_session_timestamp":lt,ct=Me.API_PRODUCTS,ht=void 0===ct?"api_products":ct,mt=Me.API_ACTIVE_ENTITLEMENTS,ft=void 0===mt?"api_active_entitlements":mt,vt=Me.SERVER_NAMI_ENTITLEMENTS,pt=void 0===vt?"server_active_entitlements":vt,gt=Me.INITIAL_APP_CONFIG,yt=void 0===gt?"initial_app_config":gt,bt=Me.INITIAL_CAMPAIGN_RULES,wt=void 0===bt?"initial_campaign_rules":bt,kt=Me.INITIAL_PAYWALLS,St=void 0===kt?"initial_paywalls":kt,Et=Me.INITIAL_PRODUCTS,Pt=void 0===Et?"initial_products":Et,Tt=Me.LOCAL_NAMI_ENTITLEMENTS,Mt=void 0===Tt?"local_active_entitlements":Tt,_t=Me.CUSTOMER_ATTRIBUTES_KEY_PREFIX,At=void 0===_t?"nami_cmr_attributes_":_t,Dt=Me.NAMI_CUSTOMER_JOURNEY_STATE,xt=void 0===Dt?"nami_customer_journey_state":Dt,Ct=Me.ANONYMOUS_MODE,It=void 0===Ct?"nami_anonymous_mode_v2":Ct,Lt=Me.ANONYMOUS_UUID,Rt=void 0===Lt?"nami_anonymous_uuid":Lt,Ft=Me.KEY_SESSION_COUNTER,Ot=void 0===Ft?"nami_session_counter":Ft,Nt=Me.INITIAL_SESSION_COUNTER_VALUE,$t=void 0===Nt?1:Nt,Wt=Me.NAMI_LAST_IMPRESSION_ID,jt=void 0===Wt?"nami_last_impression_id":Wt,Bt=Me.NAMI_PURCHASE_IMPRESSION_ID,zt=void 0===Bt?"nami_purchase_impression_id":Bt,Ut=Me.NAMI_LAUNCH_ID,Ht=void 0===Ut?"nami_launch_id":Ut,Gt=Me.NAMI_SESSION_ID,Vt=void 0===Gt?"nami_session_id":Gt,Kt=Me.NAMI_LANGUAGE_CODE,Xt=void 0===Kt?"nami_language_code":Kt,Yt=Me.NAMI_PURCHASE_CHANNEL,qt=void 0===Yt?"nami_purchase_channel":Yt,Jt=Me.API_VERSION,Qt=Me.BASE_URL_PATH,Zt=void 0===Qt?`sdk/${void 0===Jt?"v3":Jt}/platform`:Qt,en=Me.BASE_URL,tn=void 0===en?"https://app.namiml.com":en,nn=Me.BASE_STAGING_URL,an=void 0===nn?"https://app-staging.namiml.com":nn,rn=Me.CUSTOM_HOST_PREFIX,on=void 0===rn?"namiAPIHost=":rn,sn=Me.USE_STAGING_API,un=void 0===sn?"useStagingAPI":sn,ln=Me.EXTENDED_CLIENT_INFO_PREFIX,dn=void 0===ln?"extendedClientInfo":ln,cn=Me.EXTENDED_CLIENT_INFO_DELIMITER,hn=void 0===cn?":":cn,mn=Me.VALIDATE_PRODUCT_GROUPS,fn=void 0===mn?"validateProductGroups":mn,vn=Me.LOG_HTTP_REQUESTS,pn=void 0===vn?"logHTTPRequests":vn,gn=Me.LOG_HTTP_TRAFFIC,yn=void 0===gn?"logHTTPTraffic":gn,bn=Me.STARTUP_TELEMETRY,wn=void 0===bn?"startupTelemetry":bn,kn=Me.API_MAX_CALLS_LIMIT,Sn=void 0===kn?2:kn,En=Me.API_RETRY_DELAY_SEC,Pn=void 0===En?2:En,Tn=Me.API_TIMEOUT_LIMIT,Mn=void 0===Tn?2e4:Tn,_n=Me.DEVICE_API_TIMEOUT_LIMIT,An=void 0===_n?2e3:_n,Dn=Me.STATUS_BAD_REQUEST,xn=void 0===Dn?400:Dn,Cn=Me.STATUS_NOT_FOUND,In=void 0===Cn?404:Cn,Ln=Me.STATUS_CONFLICT,Rn=void 0===Ln?409:Ln,Fn=Me.STATUS_INTERNAL_SERVER_ERROR,On=void 0===Fn?500:Fn,Nn=Me.INITIAL_SUCCESS,$n=void 0===Nn?"Initial success":Nn,Wn=Me.RECONFIG_SUCCESS,jn=void 0===Wn?"Reconfig success":Wn,Bn=Me.ALREADY_CONFIGURED,zn=void 0===Bn?"Already configured":Bn,Un=Me.AVAILABLE_CAMPAIGNS_CHANGED,Hn=void 0===Un?"AvailableCampaignsChanged":Un,Gn=Me.PAYWALL_ACTION_EVENT,Vn=void 0===Gn?"PaywallActionEvent":Gn,Kn=Me.AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED,Xn=void 0===Kn?"AvailableActiveEntitlementsChanged":Kn,Yn=Me.CUSTOMER_JOURNEY_STATE_CHANGED,qn=void 0===Yn?"CustomerJourneyStateChanged":Yn,Jn=Me.SKU_TEXT_REGEX,Qn=void 0===Jn?/\$\{sku\.(\w+)(:\d+)?\}/g:Jn,Zn=Me.VAR_REGEX,ei=void 0===Zn?/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g:Zn,ti=Me.SMART_TEXT_PATTERN,ni=void 0===ti?"${":ti,ii=Me.LIQUID_VARIABLE_REGEX,ai=void 0===ii?/\${[A-Za-z0-9.]+}/g:ii,ri=[Qe,et,nt,at,ot,ut,dt,ht,ft,pt,yt,wt,St,Pt,Mt,xt,It,Rt,Ot,jt,zt,Ht,Vt,Xt,qt];e.LogLevel=void 0,(Te=e.LogLevel||(e.LogLevel={}))[Te.DEBUG=1]="DEBUG",Te[Te.INFO=2]="INFO",Te[Te.WARN=3]="WARN",Te[Te.ERROR=4]="ERROR";var oi={debug:e.LogLevel.DEBUG,info:e.LogLevel.INFO,warn:e.LogLevel.WARN,error:e.LogLevel.ERROR},si=function(){return c(function t(){o(this,t),this.currentLogLevel=e.LogLevel.DEBUG,this.setLogger=t=>{this.currentLogLevel=t?oi[t]:e.LogLevel.WARN}},[{key:"debug",value:function(t,...n){this.shouldLog(e.LogLevel.DEBUG)&&console.debug(this.formatMessage(e.LogLevel.DEBUG,t,...n))}},{key:"info",value:function(t,...n){this.shouldLog(e.LogLevel.INFO)&&console.info(this.formatMessage(e.LogLevel.INFO,t,...n))}},{key:"warn",value:function(t,...n){this.shouldLog(e.LogLevel.WARN)&&console.warn(this.formatMessage(e.LogLevel.WARN,t,...n))}},{key:"error",value:function(t,...n){this.shouldLog(e.LogLevel.ERROR)&&console.error(this.formatMessage(e.LogLevel.ERROR,t,...n))}},{key:"shouldLog",value:function(e){return e>=this.currentLogLevel}},{key:"formatMessage",value:function(t,n,...i){var a=e.LogLevel[t];return`[${(new Date).toISOString()}] [${a}] ${n} ${i=i.map(e=>"object"==typeof e?JSON.stringify(e):e)}`}}])}(),ui=new si;function li(e){for(var t=-1,n=null==e?0:e.length,i=0,a=[];++t<n;){var r=e[t];r&&(a[i++]=r)}return a}function di(e,t){return e===t||e!=e&&t!=t}function ci(e,t){for(var n=e.length;n--;)if(di(e[n][0],t))return n;return-1}var hi=Array.prototype.splice;function mi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}mi.prototype.clear=function(){this.__data__=[],this.size=0},mi.prototype.delete=function(e){var t=this.__data__,n=ci(t,e);return!(n<0)&&(n==t.length-1?t.pop():hi.call(t,n,1),--this.size,!0)},mi.prototype.get=function(e){var t=this.__data__,n=ci(t,e);return n<0?void 0:t[n][1]},mi.prototype.has=function(e){return ci(this.__data__,e)>-1},mi.prototype.set=function(e,t){var n=this.__data__,i=ci(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var fi="object"==typeof global&&global&&global.Object===Object&&global,vi="object"==typeof self&&self&&self.Object===Object&&self,pi=fi||vi||Function("return this")(),gi=pi.Symbol,yi=Object.prototype,bi=yi.hasOwnProperty,wi=yi.toString,ki=gi?gi.toStringTag:void 0;var Si=Object.prototype.toString;var Ei=gi?gi.toStringTag:void 0;function Pi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ei&&Ei in Object(e)?function(e){var t=bi.call(e,ki),n=e[ki];try{e[ki]=void 0;var i=!0}catch(e){}var a=wi.call(e);return i&&(t?e[ki]=n:delete e[ki]),a}(e):function(e){return Si.call(e)}(e)}function Ti(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Mi(e){if(!Ti(e))return!1;var t=Pi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var _i,Ai=pi["__core-js_shared__"],Di=(_i=/[^.]+$/.exec(Ai&&Ai.keys&&Ai.keys.IE_PROTO||""))?"Symbol(src)_1."+_i:"";var xi=Function.prototype.toString;function Ci(e){if(null!=e){try{return xi.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Ii=/^\[object .+?Constructor\]$/,Li=Function.prototype,Ri=Object.prototype,Fi=Li.toString,Oi=Ri.hasOwnProperty,Ni=RegExp("^"+Fi.call(Oi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $i(e){return!(!Ti(e)||(t=e,Di&&Di in t))&&(Mi(e)?Ni:Ii).test(Ci(e));var t}function Wi(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $i(n)?n:void 0}var ji=Wi(pi,"Map"),Bi=Wi(Object,"create");var zi=Object.prototype.hasOwnProperty;var Ui=Object.prototype.hasOwnProperty;function Hi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Gi(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Vi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Hi.prototype.clear=function(){this.__data__=Bi?Bi(null):{},this.size=0},Hi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hi.prototype.get=function(e){var t=this.__data__;if(Bi){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return zi.call(t,e)?t[e]:void 0},Hi.prototype.has=function(e){var t=this.__data__;return Bi?void 0!==t[e]:Ui.call(t,e)},Hi.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Bi&&void 0===t?"__lodash_hash_undefined__":t,this},Vi.prototype.clear=function(){this.size=0,this.__data__={hash:new Hi,map:new(ji||mi),string:new Hi}},Vi.prototype.delete=function(e){var t=Gi(this,e).delete(e);return this.size-=t?1:0,t},Vi.prototype.get=function(e){return Gi(this,e).get(e)},Vi.prototype.has=function(e){return Gi(this,e).has(e)},Vi.prototype.set=function(e,t){var n=Gi(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function Ki(e){var t=this.__data__=new mi(e);this.size=t.size}Ki.prototype.clear=function(){this.__data__=new mi,this.size=0},Ki.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ki.prototype.get=function(e){return this.__data__.get(e)},Ki.prototype.has=function(e){return this.__data__.has(e)},Ki.prototype.set=function(e,t){var n=this.__data__;if(n instanceof mi){var i=n.__data__;if(!ji||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vi(i)}return n.set(e,t),this.size=n.size,this};function Xi(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vi;++t<n;)this.add(e[t])}function Yi(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function qi(e,t){return e.has(t)}Xi.prototype.add=Xi.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Xi.prototype.has=function(e){return this.__data__.has(e)};function Ji(e,t,n,i,a,r){var o=1&n,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var c=-1,h=!0,m=2&n?new Xi:void 0;for(r.set(e,t),r.set(t,e);++c<s;){var f=e[c],v=t[c];if(i)var p=o?i(v,f,c,t,e,r):i(f,v,c,e,t,r);if(void 0!==p){if(p)continue;h=!1;break}if(m){if(!Yi(t,function(e,t){if(!qi(m,t)&&(f===e||a(f,e,n,i,r)))return m.push(t)})){h=!1;break}}else if(f!==v&&!a(f,v,n,i,r)){h=!1;break}}return r.delete(e),r.delete(t),h}var Qi=pi.Uint8Array;function Zi(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}function ea(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ta=gi?gi.prototype:void 0,na=ta?ta.valueOf:void 0;var ia=Array.isArray;var aa=Object.prototype.propertyIsEnumerable,ra=Object.getOwnPropertySymbols,oa=ra?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var o=e[n];t(o,n,e)&&(r[a++]=o)}return r}(ra(e),function(t){return aa.call(e,t)}))}:function(){return[]};function sa(e){return null!=e&&"object"==typeof e}function ua(e){return sa(e)&&"[object Arguments]"==Pi(e)}var la=Object.prototype,da=la.hasOwnProperty,ca=la.propertyIsEnumerable,ha=ua(function(){return arguments}())?ua:function(e){return sa(e)&&da.call(e,"callee")&&!ca.call(e,"callee")};var ma="object"==typeof e&&e&&!e.nodeType&&e,fa=ma&&"object"==typeof module&&module&&!module.nodeType&&module,va=fa&&fa.exports===ma?pi.Buffer:void 0,pa=(va?va.isBuffer:void 0)||function(){return!1},ga=/^(?:0|[1-9]\d*)$/;function ya(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&ga.test(e))&&e>-1&&e%1==0&&e<t}function ba(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var wa={};function ka(e){return function(t){return e(t)}}wa["[object Float32Array]"]=wa["[object Float64Array]"]=wa["[object Int8Array]"]=wa["[object Int16Array]"]=wa["[object Int32Array]"]=wa["[object Uint8Array]"]=wa["[object Uint8ClampedArray]"]=wa["[object Uint16Array]"]=wa["[object Uint32Array]"]=!0,wa["[object Arguments]"]=wa["[object Array]"]=wa["[object ArrayBuffer]"]=wa["[object Boolean]"]=wa["[object DataView]"]=wa["[object Date]"]=wa["[object Error]"]=wa["[object Function]"]=wa["[object Map]"]=wa["[object Number]"]=wa["[object Object]"]=wa["[object RegExp]"]=wa["[object Set]"]=wa["[object String]"]=wa["[object WeakMap]"]=!1;var Sa="object"==typeof e&&e&&!e.nodeType&&e,Ea=Sa&&"object"==typeof module&&module&&!module.nodeType&&module,Pa=Ea&&Ea.exports===Sa&&fi.process,Ta=function(){try{var e=Ea&&Ea.require&&Ea.require("util").types;return e||Pa&&Pa.binding&&Pa.binding("util")}catch(e){}}(),Ma=Ta&&Ta.isTypedArray,_a=Ma?ka(Ma):function(e){return sa(e)&&ba(e.length)&&!!wa[Pi(e)]},Aa=Object.prototype.hasOwnProperty;function Da(e,t){var n=ia(e),i=!n&&ha(e),a=!n&&!i&&pa(e),r=!n&&!i&&!a&&_a(e),o=n||i||a||r,s=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],u=s.length;for(var l in e)!Aa.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ya(l,u))||s.push(l);return s}var xa=Object.prototype;function Ca(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xa)}function Ia(e,t){return function(n){return e(t(n))}}var La=Ia(Object.keys,Object),Ra=Object.prototype.hasOwnProperty;function Fa(e){return null!=(t=e)&&ba(t.length)&&!Mi(t)?Da(e):function(e){if(!Ca(e))return La(e);var t=[];for(var n in Object(e))Ra.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e);var t}function Oa(e){return function(e,t,n){var i=t(e);return ia(e)?i:function(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}(i,n(e))}(e,Fa,oa)}var Na=Object.prototype.hasOwnProperty;var $a=Wi(pi,"DataView"),Wa=Wi(pi,"Promise"),ja=Wi(pi,"Set"),Ba=Wi(pi,"WeakMap"),za="[object Map]",Ua="[object Promise]",Ha="[object Set]",Ga="[object WeakMap]",Va="[object DataView]",Ka=Ci($a),Xa=Ci(ji),Ya=Ci(Wa),qa=Ci(ja),Ja=Ci(Ba),Qa=Pi;($a&&Qa(new $a(new ArrayBuffer(1)))!=Va||ji&&Qa(new ji)!=za||Wa&&Qa(Wa.resolve())!=Ua||ja&&Qa(new ja)!=Ha||Ba&&Qa(new Ba)!=Ga)&&(Qa=function(e){var t=Pi(e),n="[object Object]"==t?e.constructor:void 0,i=n?Ci(n):"";if(i)switch(i){case Ka:return Va;case Xa:return za;case Ya:return Ua;case qa:return Ha;case Ja:return Ga}return t});var Za="[object Arguments]",er="[object Array]",tr="[object Object]",nr=Object.prototype.hasOwnProperty;function ir(e,t,n,i,a,r){var o=ia(e),s=ia(t),u=o?er:Qa(e),l=s?er:Qa(t),d=(u=u==Za?tr:u)==tr,c=(l=l==Za?tr:l)==tr,h=u==l;if(h&&pa(e)){if(!pa(t))return!1;o=!0,d=!1}if(h&&!d)return r||(r=new Ki),o||_a(e)?Ji(e,t,n,i,a,r):function(e,t,n,i,a,r,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new Qi(e),new Qi(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return di(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Zi;case"[object Set]":var u=1&i;if(s||(s=ea),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;i|=2,o.set(e,t);var d=Ji(s(e),s(t),i,a,r,o);return o.delete(e),d;case"[object Symbol]":if(na)return na.call(e)==na.call(t)}return!1}(e,t,u,n,i,a,r);if(!(1&n)){var m=d&&nr.call(e,"__wrapped__"),f=c&&nr.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new Ki),a(v,p,n,i,r)}}return!!h&&(r||(r=new Ki),function(e,t,n,i,a,r){var o=1&n,s=Oa(e),u=s.length;if(u!=Oa(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:Na.call(t,d)))return!1}var c=r.get(e),h=r.get(t);if(c&&h)return c==t&&h==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(i)var g=o?i(p,v,d,t,e,r):i(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,n,i,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,n,i,a,r))}function ar(e,t,n,i,a){return e===t||(null==e||null==t||!sa(e)&&!sa(t)?e!=e&&t!=t:ir(e,t,n,i,ar,a))}function rr(e){return e==e&&!Ti(e)}function or(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function sr(e){var t=function(e){for(var t=Fa(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,rr(a)]}return t}(e);return 1==t.length&&t[0][2]?or(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var a=n.length,r=a;if(null==e)return!r;for(e=Object(e);a--;){var o=n[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<r;){var s=(o=n[a])[0],u=e[s],l=o[1];if(o[2]){if(void 0===u&&!(s in e))return!1}else if(!ar(l,u,3,i,new Ki))return!1}return!0}(n,0,t)}}function ur(e){return"symbol"==typeof e||sa(e)&&"[object Symbol]"==Pi(e)}var lr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dr=/^\w*$/;function cr(e,t){if(ia(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ur(e))||(dr.test(e)||!lr.test(e)||null!=t&&e in Object(t))}function hr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var o=e.apply(this,i);return n.cache=r.set(a,o)||r,o};return n.cache=new(hr.Cache||Vi),n}hr.Cache=Vi;var mr,fr,vr,pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gr=/\\(\\)?/g,yr=(mr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(pr,function(e,n,i,a){t.push(i?a.replace(gr,"$1"):n||e)}),t},fr=hr(mr,function(e){return 500===vr.size&&vr.clear(),e}),vr=fr.cache,fr);var br=gi?gi.prototype:void 0,wr=br?br.toString:void 0;function kr(e){if("string"==typeof e)return e;if(ia(e))return function(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}(e,kr)+"";if(ur(e))return wr?wr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Sr(e,t){return ia(e)?e:cr(e,t)?[e]:yr(function(e){return null==e?"":kr(e)}(e))}function Er(e){if("string"==typeof e||ur(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Pr(e,t){for(var n=0,i=(t=Sr(t,e)).length;null!=e&&n<i;)e=e[Er(t[n++])];return n&&n==i?e:void 0}function Tr(e,t){return null!=e&&t in Object(e)}function Mr(e,t){return null!=e&&function(e,t,n){for(var i=-1,a=(t=Sr(t,e)).length,r=!1;++i<a;){var o=Er(t[i]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++i!=a?r:!!(a=null==e?0:e.length)&&ba(a)&&ya(o,a)&&(ia(e)||ha(e))}(e,t,Tr)}function _r(e,t){return cr(e)&&rr(t)?or(Er(e),t):function(n){var i=function(e,t,n){var i=null==e?void 0:Pr(e,t);return void 0===i?n:i}(n,e);return void 0===i&&i===t?Mr(n,e):ar(t,i,3)}}function Ar(e){return e}function Dr(e){return cr(e)?(t=Er(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Pr(t,e)}}(e);var t}function xr(e){return e!=e}function Cr(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;return-1}(e,t,n):function(e,t,n){for(var i=e.length,a=n+-1;++a<i;)if(t(e[a],a,e))return a;return-1}(e,xr,n)}(e,t,0)>-1}var Ir=ja&&1/ea(new ja([,-0]))[1]==1/0?function(e){return new ja(e)}:function(){};function Lr(e,t){return e&&e.length?function(e,t,n){var i=-1,a=Cr,r=e.length,o=!0,s=[],u=s;if(r>=200){var l=t?null:Ir(e);if(l)return ea(l);o=!1,a=qi,u=new Xi}else u=t?[]:s;e:for(;++i<r;){var d=e[i],c=t?t(d):d;if(d=0!==d?d:0,o&&c==c){for(var h=u.length;h--;)if(u[h]===c)continue e;t&&u.push(c),s.push(d)}else a(u,c,n)||(u!==s&&u.push(c),s.push(d))}return s}(e,"function"==typeof(n=t)?n:null==n?Ar:"object"==typeof n?ia(n)?_r(n[0],n[1]):sr(n):Dr(n)):[];var n}var Rr=function(){return c(function e(){o(this,e),this.memoryStore={}},[{key:"storage",get:function(){return we().storage}},{key:"setDevice",value:function(e){this.setItem(Qe,e)}},{key:"getDevice",value:function(){return this.getItem(Qe)}},{key:"resetDevice",value:function(){this.resetItem(Qe)}},{key:"getAnonymousMode",value:function(){return this.getItem(It)||!1}},{key:"setAnonymousMode",value:function(e){this.setItem(It,e)}},{key:"clearAnonymousMode",value:function(){this.resetItem(It)}},{key:"setAppConfig",value:function(e,t){this.setItem(e,t)}},{key:"getAppConfig",value:function(e){return this.getItem(e)}},{key:"setLanguageCode",value:function(e){this.setItem(Xt,e||"en")}},{key:"getLanguageCode",value:function(){return this.getItem(Xt)||"en"}},{key:"setCampaignRules",value:function(e,t){e!==wt?e!==ot||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[ot]=JSON.stringify(t):this.memoryStore[wt]=JSON.stringify(t)}},{key:"getCampaignRules",value:function(e){if(e===wt)return this.memoryStore[wt]?JSON.parse(this.memoryStore[wt]):null;if(e===ot){var t=this.memoryStore[ot];if(null!=t)return JSON.parse(t);var n=this.getItem(ot);if(null===n)return null;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){return n}return this.isLegacyTimestampedCache(n)?n.data:n}return this.getItem(e)}},{key:"setPaywalls",value:function(e,t){e!==St?e!==ut||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[ut]=JSON.stringify(t):this.memoryStore[St]=JSON.stringify(t)}},{key:"getPaywalls",value:function(e){if(e===St)return this.memoryStore[St]?JSON.parse(this.memoryStore[St]):null;if(e===ut){var t=this.memoryStore[ut];if(null!=t)return JSON.parse(t);var n=this.getItem(ut);if(null===n)return null;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){return n}return this.isLegacyTimestampedCache(n)?n.data:n}return this.getItem(e)}},{key:"setActiveEntitlements",value:function(e,t){this.setItem(e,t)}},{key:"getActiveEntitlements",value:function(e){return this.getItem(e)||[]}},{key:"setNamiEntitlements",value:function(e,t){this.setItem(e,t)}},{key:"getNamiEntitlements",value:function(e){return this.getItem(e)||[]}},{key:"setProducts",value:function(e,t){this.setItem(e,t)}},{key:"getProducts",value:function(e){return this.getItem(e)}},{key:"getCachedProducts",value:function(){var e,t,n=null!==(e=this.getItem(ht))&&void 0!==e?e:[];return Lr(li([...null!==(t=this.getItem(Pt))&&void 0!==t?t:[],...n]),"sku_ref_id")}},{key:"setNamiConfig",value:function(e){this.setItem(et,e)}},{key:"getNamiConfig",value:function(){return this.getItem(et)}},{key:"setCustomerAttribute",value:function(e,t){this.setItem(At+e,t)}},{key:"getCustomerAttribute",value:function(e){return this.getItem(At+e)}},{key:"getAllCustomerAttributes",value:function(){return this.storage.getAllKeys().map(e=>[e,this.storage.getItem(e)]).filter(([e])=>e.includes(At)).map(([e,t])=>e.replace(At,"")+":"+t)}},{key:"getAllCustomerAttributesKeys",value:function(){return this.storage.getAllKeys().filter(e=>e.includes(At)).map(e=>e.replace(At,""))}},{key:"clearCustomerAttribute",value:function(e){var t=At+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}},{key:"clearAllCustomerAttributes",value:function(){this.storage.getAllKeys().filter(e=>e.includes(At)).map(e=>this.resetItem(e))}},{key:"setNamiProfile",value:function(e){this.setItem(nt,e)}},{key:"getNamiProfile",value:function(){return this.getItem(nt)}},{key:"removeNamiProfile",value:function(){this.resetItem(nt)}},{key:"setCustomerJourneyState",value:function(e){this.setItem(xt,e)}},{key:"getCustomerJourneyState",value:function(){return this.getItem(xt)}},{key:"setSessionCounter",value:function(){var e=this.getItem(Ot),t=e?parseInt(e):$t||$t;this.setItem(Ot,t+1)}},{key:"getSessionCounter",value:function(){var e=this.getItem(Ot);return e?parseInt(e):$t}},{key:"setLastImpressionId",value:function(e){this.setItem(jt,e)}},{key:"getLastImpressionId",value:function(){var e;return null!==(e=this.getItem(jt))&&void 0!==e?e:""}},{key:"setPurchaseImpression",value:function(){var e,t=null!==(e=this.getLastImpressionId())&&void 0!==e?e:"";this.setItem(zt,t)}},{key:"getPurchaseImpression",value:function(){var e;return null!==(e=this.getItem(zt))&&void 0!==e?e:""}},{key:"setSessionId",value:function(e){e&&this.setItem(Vt,e)}},{key:"getSessionId",value:function(){var e;return null!==(e=this.getItem(Vt))&&void 0!==e?e:""}},{key:"clearSessionId",value:function(){this.resetItem(Vt)}},{key:"setLaunchId",value:function(e){e&&this.setItem(Ht,e)}},{key:"getLaunchId",value:function(){var e;return null!==(e=this.getItem(Ht))&&void 0!==e?e:""}},{key:"clearLaunchId",value:function(){this.resetItem(Ht)}},{key:"setPurchaseChannel",value:function(e){e&&this.setItem(qt,e)}},{key:"getPurchaseChannel",value:function(){return this.getItem(qt)}},{key:"getAnonymousUUID",value:function(){return this.getItem(Rt)}},{key:"setAnonymousUUID",value:function(e){this.setItem(Rt,e)}},{key:"clearAnonymousUUID",value:function(){this.resetItem(Rt)}},{key:"setApiCampaignSessionTimestamp",value:function(){this.setItem(dt,Date.now())}},{key:"getApiCampaignSessionTimestamp",value:function(){return this.getItem(dt)}},{key:"purgeApiCampaignCache",value:function(){this.resetItem(ut),this.resetItem(ot),this.resetItem(dt)}},{key:"getCampaignCacheTtl",value:function(){var e,t=this.getAppConfig(at)||this.getAppConfig(yt);return null!==(e=null==t?void 0:t.campaign_cache_ttl)&&void 0!==e?e:null}},{key:"isLegacyTimestampedCache",value:function(e){return"object"==typeof e&&null!==e&&"cachedAt"in e&&"data"in e}},{key:"setItem",value:function(e,t){var n;try{n=JSON.stringify(t)}catch(t){return void ui.error(`Serialization failed for ${e}`,t)}try{this.storage.setItem(e,n)}catch(t){ui.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=n}}},{key:"getItem",value:function(e){try{var t=this.storage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){ui.error("Error getting item from localStorage:",e,": ",t)}var n=this.memoryStore[e];return null!=n?JSON.parse(n):null}},{key:"resetItem",value:function(e){try{this.storage.removeItem(e)}catch(t){ui.error("Error removing item from localStorage:",e,": ",t)}delete this.memoryStore[e]}},{key:"clearAll",value:function(){ri.forEach(e=>this.resetItem(e)),this.clearAllCustomerAttributes(),this.memoryStore={}}},{key:"clear",value:function(){try{this.storage.clear()}catch(e){ui.error("Error clearing localStorage:",e)}this.memoryStore={}}}])}(),Fr=new Rr,Or=function(e){function t(e,n){var i;return o(this,t),(i=r(this,t,[n])).statusCode=e,i.status=e,i.message=`RetryLimitExceededError: ${i.message}`,i}return p(t,e),c(t)}(_(Error)),Nr=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),c(t)}(_(Error)),$r=function(e){function t(){var e;return o(this,t),(e=r(this,t)).status=409,e.name="ConflictError",e.message="ConflictError: Server responded with conflict",e}return p(t,e),c(t)}(Nr),Wr=function(e){function t(){return o(this,t),r(this,t,[$e])}return p(t,e),c(t)}(_(Error)),jr=function(e){function t(){return o(this,t),r(this,t,[Ie])}return p(t,e),c(t)}(_(Error)),Br=function(e){function t(){return o(this,t),r(this,t,[Re])}return p(t,e),c(t)}(_(Error)),zr=function(e){function t(){return o(this,t),r(this,t,[Oe])}return p(t,e),c(t)}(_(Error)),Ur=function(e){function t(){return o(this,t),r(this,t,[je])}return p(t,e),c(t)}(_(Error)),Hr=function(e){function t(){return o(this,t),r(this,t,[ze])}return p(t,e),c(t)}(_(Error)),Gr=function(e){function t(){return o(this,t),r(this,t,[Ve])}return p(t,e),c(t)}(_(Error)),Vr=function(e){function t(){return o(this,t),r(this,t,[Xe])}return p(t,e),c(t)}(_(Error)),Kr=function(e){function t(){return o(this,t),r(this,t,[Xe])}return p(t,e),c(t)}(_(Error)),Xr=function(e){function t(){return o(this,t),r(this,t,[He])}return p(t,e),c(t)}(_(Error)),Yr=function(e){function t(e){var n;return o(this,t),(n=r(this,t,[e])).message=`BadRequestError: ${n.message}`,n}return p(t,e),c(t)}(Nr),qr=function(e){function t(e){var n;return o(this,t),(n=r(this,t,[e])).message=`NotFoundError: ${n.message}`,n}return p(t,e),c(t)}(Nr),Jr=function(e){function t(e,n){var i;return o(this,t),(i=r(this,t,[n])).statusCode=e,i.message=`ClientError: ${i.message}`,i}return p(t,e),c(t)}(Nr),Qr=function(e){function t(e){var n;return o(this,t),(n=r(this,t,[e])).message=`ServerError: ${n.message}`,n}return p(t,e),c(t)}(Nr),Zr=(e,t)=>{if(e==xn)throw new Yr(t);if(e==In)throw new qr(t);if(e==Rn)throw new $r;if(e>xn&&e<On)throw new Jr(e,t);if(e>=On)throw new Qr(t)};function eo(e){for(var t=e.length;--t>=0;)e[t]=0}eo(new Array(576)),eo(new Array(60)),eo(new Array(512)),eo(new Array(256)),eo(new Array(29)),eo(new Array(30));var to=(e,t,n,i)=>{for(var a=65535&e,r=e>>>16&65535,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{r=r+(a=a+t[i++]|0)|0}while(--o);a%=65521,r%=65521}return a|r<<16},no=new Uint32Array((()=>{for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),io=(e,t,n,i)=>{var a=no,r=i+n;e^=-1;for(var o=i;o<r;o++)e=e>>>8^a[255&(e^t[o])];return-1^e},ao={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ro=0,oo=4,so=5,uo=6,lo=0,co=1,ho=2,mo=-2,fo=-3,vo=-4,po=-5,go=8,yo=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),bo=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)yo(n,i)&&(e[i]=n[i])}}return e},wo=e=>{for(var t=0,n=0,i=e.length;n<i;n++)t+=e[n].length;for(var a=new Uint8Array(t),r=0,o=0,s=e.length;r<s;r++){var u=e[r];a.set(u,o),o+=u.length}return a},ko=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){ko=!1}for(var So=new Uint8Array(256),Eo=0;Eo<256;Eo++)So[Eo]=Eo>=252?6:Eo>=248?5:Eo>=240?4:Eo>=224?3:Eo>=192?2:1;So[254]=So[254]=1;var Po=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,i,a,r,o=e.length,s=0;for(a=0;a<o;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),r=0,a=0;r<s;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?t[r++]=n:n<2048?(t[r++]=192|n>>>6,t[r++]=128|63&n):n<65536?(t[r++]=224|n>>>12,t[r++]=128|n>>>6&63,t[r++]=128|63&n):(t[r++]=240|n>>>18,t[r++]=128|n>>>12&63,t[r++]=128|n>>>6&63,t[r++]=128|63&n);return t},To=(e,t)=>{var n,i,a=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var r=new Array(2*a);for(i=0,n=0;n<a;){var o=e[n++];if(o<128)r[i++]=o;else{var s=So[o];if(s>4)r[i++]=65533,n+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&n<a;)o=o<<6|63&e[n++],s--;s>1?r[i++]=65533:o<65536?r[i++]=o:(o-=65536,r[i++]=55296|o>>10&1023,r[i++]=56320|1023&o)}}}return((e,t)=>{if(t<65534&&e.subarray&&ko)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n})(r,i)},Mo=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);for(var n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+So[e[n]]>t?n:t};var _o=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ao=16209,Do=function(e,t){var n,i,a,r,o,s,u,l,d,c,h,m,f,v,p,g,y,b,w,k,S,E,P,T,M=e.state;n=e.next_in,P=e.input,i=n+(e.avail_in-5),a=e.next_out,T=e.output,r=a-(t-e.avail_out),o=a+(e.avail_out-257),s=M.dmax,u=M.wsize,l=M.whave,d=M.wnext,c=M.window,h=M.hold,m=M.bits,f=M.lencode,v=M.distcode,p=(1<<M.lenbits)-1,g=(1<<M.distbits)-1;e:do{m<15&&(h+=P[n++]<<m,m+=8,h+=P[n++]<<m,m+=8),y=f[h&p];t:for(;;){if(h>>>=b=y>>>24,m-=b,0===(b=y>>>16&255))T[a++]=65535&y;else{if(!(16&b)){if(64&b){if(32&b){M.mode=16191;break e}e.msg="invalid literal/length code",M.mode=Ao;break e}y=f[(65535&y)+(h&(1<<b)-1)];continue t}for(w=65535&y,(b&=15)&&(m<b&&(h+=P[n++]<<m,m+=8),w+=h&(1<<b)-1,h>>>=b,m-=b),m<15&&(h+=P[n++]<<m,m+=8,h+=P[n++]<<m,m+=8),y=v[h&g];;){if(h>>>=b=y>>>24,m-=b,16&(b=y>>>16&255)){if(k=65535&y,m<(b&=15)&&(h+=P[n++]<<m,(m+=8)<b&&(h+=P[n++]<<m,m+=8)),(k+=h&(1<<b)-1)>s){e.msg="invalid distance too far back",M.mode=Ao;break e}if(h>>>=b,m-=b,k>(b=a-r)){if((b=k-b)>l&&M.sane){e.msg="invalid distance too far back",M.mode=Ao;break e}if(S=0,E=c,0===d){if(S+=u-b,b<w){w-=b;do{T[a++]=c[S++]}while(--b);S=a-k,E=T}}else if(d<b){if(S+=u+d-b,(b-=d)<w){w-=b;do{T[a++]=c[S++]}while(--b);if(S=0,d<w){w-=b=d;do{T[a++]=c[S++]}while(--b);S=a-k,E=T}}}else if(S+=d-b,b<w){w-=b;do{T[a++]=c[S++]}while(--b);S=a-k,E=T}for(;w>2;)T[a++]=E[S++],T[a++]=E[S++],T[a++]=E[S++],w-=3;w&&(T[a++]=E[S++],w>1&&(T[a++]=E[S++]))}else{S=a-k;do{T[a++]=T[S++],T[a++]=T[S++],T[a++]=T[S++],w-=3}while(w>2);w&&(T[a++]=T[S++],w>1&&(T[a++]=T[S++]))}break}if(64&b){e.msg="invalid distance code",M.mode=Ao;break e}y=v[(65535&y)+(h&(1<<b)-1)]}}break}}while(n<i&&a<o);n-=w=m>>3,h&=(1<<(m-=w<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<o?o-a+257:257-(a-o),M.hold=h,M.bits=m},xo=15,Co=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Io=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Lo=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Ro=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Fo=(e,t,n,i,a,r,o,s)=>{var u,l,d,c,h,m,f,v,p,g=s.bits,y=0,b=0,w=0,k=0,S=0,E=0,P=0,T=0,M=0,_=0,A=null,D=new Uint16Array(16),x=new Uint16Array(16),C=null;for(y=0;y<=xo;y++)D[y]=0;for(b=0;b<i;b++)D[t[n+b]]++;for(S=g,k=xo;k>=1&&0===D[k];k--);if(S>k&&(S=k),0===k)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(w=1;w<k&&0===D[w];w++);for(S<w&&(S=w),T=1,y=1;y<=xo;y++)if(T<<=1,(T-=D[y])<0)return-1;if(T>0&&(0===e||1!==k))return-1;for(x[1]=0,y=1;y<xo;y++)x[y+1]=x[y]+D[y];for(b=0;b<i;b++)0!==t[n+b]&&(o[x[t[n+b]]++]=b);if(0===e?(A=C=o,m=20):1===e?(A=Co,C=Io,m=257):(A=Lo,C=Ro,m=0),_=0,b=0,y=w,h=r,E=S,P=0,d=-1,c=(M=1<<S)-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){f=y-P,o[b]+1<m?(v=0,p=o[b]):o[b]>=m?(v=C[o[b]-m],p=A[o[b]-m]):(v=96,p=0),u=1<<y-P,w=l=1<<E;do{a[h+(_>>P)+(l-=u)]=f<<24|v<<16|p}while(0!==l);for(u=1<<y-1;_&u;)u>>=1;if(0!==u?(_&=u-1,_+=u):_=0,b++,0===--D[y]){if(y===k)break;y=t[n+o[b]]}if(y>S&&(_&c)!==d){for(0===P&&(P=S),h+=w,T=1<<(E=y-P);E+P<k&&!((T-=D[E+P])<=0);)E++,T<<=1;if(M+=1<<E,1===e&&M>852||2===e&&M>592)return 1;a[d=_&c]=S<<24|E<<16|h-r}}return 0!==_&&(a[h+_]=y-P<<24|64<<16),s.bits=S,0},Oo=oo,No=so,$o=uo,Wo=lo,jo=co,Bo=ho,zo=mo,Uo=fo,Ho=vo,Go=po,Vo=go,Ko=16180,Xo=16190,Yo=16191,qo=16192,Jo=16194,Qo=16199,Zo=16200,es=16206,ts=16209,ns=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function is(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var as,rs,os=e=>{if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<Ko||t.mode>16211?1:0},ss=e=>{if(os(e))return zo;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Ko,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Wo},us=e=>{if(os(e))return zo;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ss(e)},ls=(e,t)=>{var n;if(os(e))return zo;var i=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?zo:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,us(e))},ds=(e,t)=>{if(!e)return zo;var n=new is;e.state=n,n.strm=e,n.window=null,n.mode=Ko;var i=ls(e,t);return i!==Wo&&(e.state=null),i},cs=!0,hs=e=>{if(cs){as=new Int32Array(512),rs=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Fo(1,e.lens,0,288,as,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Fo(2,e.lens,0,32,rs,0,e.work,{bits:5}),cs=!1}e.lencode=as,e.lenbits=9,e.distcode=rs,e.distbits=5},ms=(e,t,n,i)=>{var a,r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),i>=r.wsize?(r.window.set(t.subarray(n-r.wsize,n),0),r.wnext=0,r.whave=r.wsize):((a=r.wsize-r.wnext)>i&&(a=i),r.window.set(t.subarray(n-i,n-i+a),r.wnext),(i-=a)?(r.window.set(t.subarray(n-i,n),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0},fs=(e,t)=>{var n,i,a,r,o,s,u,l,d,c,h,m,f,v,p,g,y,b,w,k,S,E,P,T,M=0,_=new Uint8Array(4),A=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(os(e)||!e.output||!e.input&&0!==e.avail_in)return zo;(n=e.state).mode===Yo&&(n.mode=qo),o=e.next_out,a=e.output,u=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,l=n.hold,d=n.bits,c=s,h=u,E=Wo;e:for(;;)switch(n.mode){case Ko:if(0===n.wrap){n.mode=qo;break}for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(2&n.wrap&&35615===l){0===n.wbits&&(n.wbits=15),n.check=0,_[0]=255&l,_[1]=l>>>8&255,n.check=io(n.check,_,2,0),l=0,d=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=ts;break}if((15&l)!==Vo){e.msg="unknown compression method",n.mode=ts;break}if(d-=4,S=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=S),S>15||S>n.wbits){e.msg="invalid window size",n.mode=ts;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:Yo,l=0,d=0;break;case 16181:for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(n.flags=l,(255&n.flags)!==Vo){e.msg="unknown compression method",n.mode=ts;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ts;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=io(n.check,_,2,0)),l=0,d=0,n.mode=16182;case 16182:for(;d<32;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,_[2]=l>>>16&255,_[3]=l>>>24&255,n.check=io(n.check,_,4,0)),l=0,d=0,n.mode=16183;case 16183:for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=io(n.check,_,2,0)),l=0,d=0,n.mode=16184;case 16184:if(1024&n.flags){for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=io(n.check,_,2,0)),l=0,d=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((m=n.length)>s&&(m=s),m&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(i.subarray(r,r+m),S)),512&n.flags&&4&n.wrap&&(n.check=io(n.check,i,m,r)),s-=m,r+=m,n.length-=m),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;m=0;do{S=i[r+m++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=io(n.check,i,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;m=0;do{S=i[r+m++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=io(n.check,i,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=ts;break}l=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Yo;break;case 16189:for(;d<32;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}e.adler=n.check=ns(l),l=0,d=0,n.mode=Xo;case Xo:if(0===n.havedict)return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,Bo;e.adler=n.check=1,n.mode=Yo;case Yo:if(t===No||t===$o)break e;case qo:if(n.last){l>>>=7&d,d-=7&d,n.mode=es;break}for(;d<3;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}switch(n.last=1&l,d-=1,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(hs(n),n.mode=Qo,t===$o){l>>>=2,d-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=ts}l>>>=2,d-=2;break;case 16193:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ts;break}if(n.length=65535&l,l=0,d=0,n.mode=Jo,t===$o)break e;case Jo:n.mode=16195;case 16195:if(m=n.length){if(m>s&&(m=s),m>u&&(m=u),0===m)break e;a.set(i.subarray(r,r+m),o),s-=m,r+=m,u-=m,o+=m,n.length-=m;break}n.mode=Yo;break;case 16196:for(;d<14;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(n.nlen=257+(31&l),l>>>=5,d-=5,n.ndist=1+(31&l),l>>>=5,d-=5,n.ncode=4+(15&l),l>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ts;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;d<3;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.lens[A[n.have++]]=7&l,l>>>=3,d-=3}for(;n.have<19;)n.lens[A[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},E=Fo(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,E){e.msg="invalid code lengths set",n.mode=ts;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;g=(M=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(y<16)l>>>=p,d-=p,n.lens[n.have++]=y;else{if(16===y){for(T=p+2;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(l>>>=p,d-=p,0===n.have){e.msg="invalid bit length repeat",n.mode=ts;break}S=n.lens[n.have-1],m=3+(3&l),l>>>=2,d-=2}else if(17===y){for(T=p+3;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}d-=p,S=0,m=3+(7&(l>>>=p)),l>>>=3,d-=3}else{for(T=p+7;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}d-=p,S=0,m=11+(127&(l>>>=p)),l>>>=7,d-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ts;break}for(;m--;)n.lens[n.have++]=S}}if(n.mode===ts)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ts;break}if(n.lenbits=9,P={bits:n.lenbits},E=Fo(1,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,E){e.msg="invalid literal/lengths set",n.mode=ts;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},E=Fo(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,E){e.msg="invalid distances set",n.mode=ts;break}if(n.mode=Qo,t===$o)break e;case Qo:n.mode=Zo;case Zo:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,Do(e,h),o=e.next_out,a=e.output,u=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,l=n.hold,d=n.bits,n.mode===Yo&&(n.back=-1);break}for(n.back=0;g=(M=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(g&&!(240&g)){for(b=p,w=g,k=y;g=(M=n.lencode[k+((l&(1<<b+w)-1)>>b)])>>>16&255,y=65535&M,!(b+(p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}l>>>=b,d-=b,n.back+=b}if(l>>>=p,d-=p,n.back+=p,n.length=y,0===g){n.mode=16205;break}if(32&g){n.back=-1,n.mode=Yo;break}if(64&g){e.msg="invalid literal/length code",n.mode=ts;break}n.extra=15&g,n.mode=16201;case 16201:if(n.extra){for(T=n.extra;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;g=(M=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(!(240&g)){for(b=p,w=g,k=y;g=(M=n.distcode[k+((l&(1<<b+w)-1)>>b)])>>>16&255,y=65535&M,!(b+(p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}l>>>=b,d-=b,n.back+=b}if(l>>>=p,d-=p,n.back+=p,64&g){e.msg="invalid distance code",n.mode=ts;break}n.offset=y,n.extra=15&g,n.mode=16203;case 16203:if(n.extra){for(T=n.extra;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ts;break}n.mode=16204;case 16204:if(0===u)break e;if(m=h-u,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ts;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),v=n.window}else v=a,f=o-n.offset,m=n.length;m>u&&(m=u),u-=m,n.length-=m;do{a[o++]=v[f++]}while(--m);0===n.length&&(n.mode=Zo);break;case 16205:if(0===u)break e;a[o++]=n.length,u--,n.mode=Zo;break;case es:if(n.wrap){for(;d<32;){if(0===s)break e;s--,l|=i[r++]<<d,d+=8}if(h-=u,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?io(n.check,a,h,o-h):to(n.check,a,h,o-h)),h=u,4&n.wrap&&(n.flags?l:ns(l))!==n.check){e.msg="incorrect data check",n.mode=ts;break}l=0,d=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;d<32;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ts;break}l=0,d=0}n.mode=16208;case 16208:E=jo;break e;case ts:E=Uo;break e;case 16210:return Ho;default:return zo}return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,(n.wsize||h!==e.avail_out&&n.mode<ts&&(n.mode<es||t!==Oo))&&ms(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?io(n.check,a,h,e.next_out-h):to(n.check,a,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Yo?128:0)+(n.mode===Qo||n.mode===Jo?256:0),(0===c&&0===h||t===Oo)&&E===Wo&&(E=Go),E},vs={inflateReset:us,inflateReset2:ls,inflateResetKeep:ss,inflateInit:e=>ds(e,15),inflateInit2:ds,inflate:fs,inflateEnd:e=>{if(os(e))return zo;var t=e.state;return t.window&&(t.window=null),e.state=null,Wo},inflateGetHeader:(e,t)=>{if(os(e))return zo;var n=e.state;return 2&n.wrap?(n.head=t,t.done=!1,Wo):zo},inflateSetDictionary:(e,t)=>{var n,i=t.length;return os(e)||0!==(n=e.state).wrap&&n.mode!==Xo?zo:n.mode===Xo&&to(1,t,i,0)!==n.check?Uo:ms(e,t,i,i)?(n.mode=16210,Ho):(n.havedict=1,Wo)},inflateInfo:"pako inflate (from Nodeca project)"};var ps=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},gs=Object.prototype.toString,ys=ro,bs=oo,ws=lo,ks=co,Ss=ho,Es=mo,Ps=fo,Ts=vo;function Ms(e){this.options=bo({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _o,this.strm.avail_out=0;var n=vs.inflateInit2(this.strm,t.windowBits);if(n!==ws)throw new Error(ao[n]);if(this.header=new ps,vs.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Po(t.dictionary):"[object ArrayBuffer]"===gs.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=vs.inflateSetDictionary(this.strm,t.dictionary))!==ws))throw new Error(ao[n])}Ms.prototype.push=function(e,t){var n,i,a,r=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(i=t===~~t?t:!0===t?bs:ys,"[object ArrayBuffer]"===gs.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(n=vs.inflate(r,i))===Ss&&s&&((n=vs.inflateSetDictionary(r,s))===ws?n=vs.inflate(r,i):n===Ps&&(n=Ss));r.avail_in>0&&n===ks&&r.state.wrap>0&&0!==e[r.next_in];)vs.inflateReset(r),n=vs.inflate(r,i);switch(n){case Es:case Ps:case Ss:case Ts:return this.onEnd(n),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||n===ks))if("string"===this.options.to){var u=Mo(r.output,r.next_out),l=r.next_out-u,d=To(r.output,u);r.next_out=l,r.avail_out=o-l,l&&r.output.set(r.output.subarray(u,u+l),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(n!==ws||0!==a){if(n===ks)return n=vs.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Ms.prototype.onData=function(e){this.chunks.push(e)},Ms.prototype.onEnd=function(e){e===ws&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=wo(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var _s={ungzip:function(e,t){var n=new Ms(t);if(n.push(e),n.err)throw n.msg||ao[n.err];return n.result}}.ungzip,As=e=>{var t;if(null!=e&&e.includes(un))t=an;else{var n=null==e?void 0:e.find(e=>e.includes(on));t=n?n.split("=")[1]:tn}return(t=t.replace(/\/$/,""))+"/"+Zt},Ds=e=>{var t,n,i=Fr.getAppConfig(at)||Fr.getAppConfig(yt);return null!==(t=null==i||null===(n=i.capabilities)||void 0===n?void 0:n.includes(e))&&void 0!==t&&t},xs=()=>{var e,t,n=(t=Fr.getAppConfig(at)||Fr.getAppConfig(yt),null!==(e=null==t?void 0:t.campaign_cache_ttl)&&void 0!==e?e:null);if(null!==n)if(0!==n){var i=Fr.getApiCampaignSessionTimestamp();if(null!==i)(Date.now()-i)/1e3>=n&&Fr.purgeApiCampaignCache()}else Fr.purgeApiCampaignCache()},Cs=e=>{var t=!Ds(Pe.THIRD_PARTY_TRANSACTIONS);return e&&!t&&ui.info(`[${e}] Your plan does not have purchase management features.`),t},Is=()=>{var e,t,n=null===(e=Fr.getNamiConfig())||void 0===e?void 0:e.namiCommands;return null!==(t=null==n?void 0:n.includes(pn))&&void 0!==t&&t},Ls=()=>{var e,t,n=null===(e=Fr.getNamiConfig())||void 0===e?void 0:e.namiCommands;return null!==(t=null==n?void 0:n.includes(yn))&&void 0!==t&&t};function Rs(e){try{var t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));for(var t=atob(e),n=t.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=t.charCodeAt(a);return i}(e.trim()),n=_s(t),i=(new TextDecoder).decode(n);return JSON.parse(i)}catch(e){return}}function Fs(e,t,n=Mn,i=Sn){var r,o,s,u,l,d,c;return k(function(h){for(;;)switch(h.n){case 0:return o=0,s=Is(),u=Ls(),l=null!==(r=null==t?void 0:t.method)&&void 0!==r?r:"GET",d=()=>{var r,c,h,m;return k(function(f){for(;;)switch(f.n){case 0:return(s||u)&&ui.debug(`[HTTP] ${l} ${e}`),u&&null!=t&&t.body&&ui.debug(`[HTTP] Request body: ${t.body}`),f.n=1,a(Os(e,t,n));case 1:if((r=f.v).ok){f.n=7;break}if(!u){f.n=3;break}return f.n=2,a(r.clone().text());case 2:c=f.v,ui.debug(`[HTTP] Response ${r.status}: ${c}`);case 3:if(r.status!=Rn){f.n=4;break}throw new $r;case 4:if(!(++o<=i)){f.n=6;break}return h=1e3*(o+Pn),f.n=5,a(new Promise(e=>setTimeout(e,h)));case 5:return f.a(2,d());case 6:throw new Or(r.status,`Request failed after ${i} retries`);case 7:if(!u){f.n=9;break}return f.n=8,a(r.clone().text());case 8:m=f.v,ui.debug(`[HTTP] Response ${r.status}: ${m}`);case 9:return f.a(2,r)}},null,null,null,Promise)},h.n=1,a(d());case 1:return c=h.v,h.a(2,c.json())}},null,null,null,Promise)}function Os(e,t={},n){var i,r,o;return k(function(s){for(;;)switch(s.n){case 0:return i=new AbortController,r=setTimeout(()=>i.abort(),n),t.signal=i.signal,s.n=1,a(fetch(e,t));case 1:return o=s.v,clearTimeout(r),s.a(2,o)}},null,null,null,Promise)}function Ns(e,t,n){var i=n.value;return n.value=function(...e){if(!this.platformID)throw new jr;return i.apply(this,e)},n}function $s(e,t,n){var i=n.value;return n.value=function(...e){var t=Fr.getDevice();if(null==t||!t.id)throw new Br;return i.apply(this,e)},n}var Ws,js=function(){return c(function e(){o(this,e);var t=Fr.getNamiConfig();!this.platformID&&t&&this.configure(t)},[{key:"deviceID",get:function(){var e;return null===(e=Fr.getDevice())||void 0===e?void 0:e.id}},{key:"configure",value:function(e){this.baseURL=As(e.namiCommands),this.platformID=e.appPlatformID}},{key:"reset",value:function(){this.baseURL=void 0,this.platformID=void 0}},{key:"login",value:function(e){var t,n;return k(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}throw new zr;case 1:return t=`device/${this.deviceID}/login/`,n={external_id:e},i.n=2,a(this.requestBodyAPI(t,n,"PUT"));case 2:return i.a(2,i.v)}},null,this,null,Promise)}},{key:"logout",value:function(){var e;return k(function(t){for(;;)switch(t.n){case 0:return e=`device/${this.deviceID}/logout/`,t.n=1,a(this.requestBodyAPI(e,{},"PUT"));case 1:return t.a(2,t.v)}},null,this,null,Promise)}},{key:"startSession",value:function(e){var t,n;return k(function(i){for(;;)switch(i.n){case 0:return t=`device/${this.deviceID}/session/`,i.n=1,a(this.requestBodyAPI(t,{start_time:e,app_env:"production"}));case 1:n=i.v,Fr.setSessionCounter(),n.id&&Fr.setSessionId(n.id);case 2:return i.a(2)}},null,this,null,Promise)}},{key:"postImpression",value:function(e){var t,n;return k(function(i){for(;;)switch(i.n){case 0:return t=`device/${this.deviceID}/impression/`,i.n=1,a(this.requestBodyAPI(t,e,"POST",!0));case 1:(n=i.v).id&&Fr.setLastImpressionId(n.id);case 2:return i.a(2)}},null,this,null,Promise)}},{key:"postConversion",value:function(e){var t;return k(function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/transaction/`,n.n=1,a(this.requestBodyAPI(t,e,"POST",!0));case 1:return n.a(2)}},null,this,null,Promise)}},{key:"purchaseValidation",value:function(e){var t;return k(function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/purchase_event/`,n.n=1,a(this.requestBodyAPI(t,e,"PUT"));case 1:return n.a(2)}},null,this,null,Promise)}},{key:"fetchAPI",value:function(e,t,n){var i;return k(function(r){for(;;)switch(r.n){case 0:return i=`${this.baseURL}/${this.platformID}/`+e,r.n=1,a(Fs(i,void 0,t,n));case 1:return r.a(2,r.v)}},null,this,null,Promise)}},{key:"requestBodyAPI",value:function(e,t,n="POST",i=!1,r,o){var s,u;return k(function(l){for(;;)switch(l.n){case 0:return s=`${this.baseURL}/${this.platformID}/`+e,u={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:i},l.n=1,a(Fs(s,u,r,o));case 1:return l.a(2,l.v)}},null,this,null,Promise)}}],[{key:"configure",value:function(e){this.instance.configure(e)}},{key:"reset",value:function(){this.instance.reset()}}])}();function Bs(e){return null!=(null==e?void 0:e.flow)}js.instance=new js,ke([$s],js.prototype,"login",null),ke([$s],js.prototype,"logout",null),ke([$s],js.prototype,"startSession",null),ke([$s],js.prototype,"postImpression",null),ke([$s],js.prototype,"postConversion",null),ke([$s],js.prototype,"purchaseValidation",null),ke([Ns],js.prototype,"fetchAPI",null),ke([Ns],js.prototype,"requestBodyAPI",null),e.NamiCampaignRuleType=void 0,(Ws=e.NamiCampaignRuleType||(e.NamiCampaignRuleType={})).DEFAULT="default",Ws.LABEL="label",Ws.UNKNOWN="unknown",Ws.URL="url";var zs=()=>{var e;return null!==(e=Fr.getPaywalls(St))&&void 0!==e?e:[]},Us=()=>{var e;return null!==(e=Fr.getPaywalls(ut))&&void 0!==e?e:[]},Hs=()=>Lr(li([...Us(),...zs()]),"id"),Gs=e=>Hs().find(t=>t.id===e),Vs=e=>{var t=Hs(),n=new Set(t.map(e=>e.id));return e.every(e=>n.has(e))},Ks="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{},Xs="function"==typeof Ks.BigInt,Ys=Xs?Ks.BigInt.bind(Ks):void 0,qs=Xs?Ys("0xffffffffffffffffffffffffffffffff"):null,Js=Xs?Ys("0x100000000000000000000000000000000"):null,Qs=Xs?Ys(0):null,Zs=Xs?Ys(1):null,eu=Xs?Ys(8):null,tu=Xs?Ys(1e4):null,nu=Ks.crypto,iu="function"==typeof(null==nu?void 0:nu.getRandomValues),au=1/16,ru=e=>we().device.getDeviceData(e),ou=()=>{var e=Fr.getNamiConfig();return e&&e.formFactor?e.formFactor:we().device.getDeviceFormFactor()};function su(){return we().device.generateUUID()}function uu(e){if(!Xs||!qs)return cu(e);try{var t=qs,n=function(e){if(!Ys)throw new Error("BigInt is not supported in this environment");var t=e.replace(/-/g,"");return Ys("0x"+t)}(e);return Number(n)/Number(t)*100}catch(t){throw ui.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}function lu(e){if(!Ys)throw new Error("BigInt is not supported in this environment");var t=e.toString(16).padStart(32,"0");t=t.substring(0,12)+"4"+t.substring(13);var n=3&parseInt(t[16],16)|8;return(t=t.substring(0,16)+n.toString(16)+t.substring(17)).slice(0,8)+"-"+t.slice(8,12)+"-"+t.slice(12,16)+"-"+t.slice(16,20)+"-"+t.slice(20)}function du(e,t=.5){if(!Number.isFinite(e))throw new Error("Invalid target");if(!Number.isFinite(t))throw new Error("Invalid tolerance");var n=Math.max(0,Math.min(100,e)),i=Math.max(0,Math.min(50,t)),a=e=>Math.round(100*e),r=Math.max(0,a(n-i)),o=Math.min(1e4,a(n+i));if(!(Xs&&qs&&Ys&&tu))return function(e,t){for(var n=Math.max(0,Math.min(100,e-t)),i=Math.min(100,Math.max(0,e+t)),a=su(),r=Number.POSITIVE_INFINITY,o=50,s=0;s<o;s++){var u=su(),l=cu(u);if(l>=n&&l<=i)return u;var d=hu(l,n,i);d<r&&(r=d,a=u)}return a}(n,i);var s=qs,u=Ys,l=tu,d=e=>s*u(e)/l,c=d(r),m=d(o);if(m<=c)return lu(c);var f=c+function(e){if(!Ys||null===Js||null===Zs||null===Qs||null===eu)throw new Error("BigInt is not supported in this environment");var t=Ys,n=Qs,i=Zs,a=eu,r=Js;if(e<n)throw new Error("n must be non-negative");if(e===n)return n;for(var o=new Uint8Array(16),s=e+i,u=r/s*s-i,l=0,d=!1;l<10;){if(iu)nu.getRandomValues(o);else{d||(d=!0,ui.warn("randomBigInt: crypto.getRandomValues unavailable, using Math.random fallback"));for(var c=0;c<o.length;c++)o[c]=Math.floor(256*Math.random())}for(var m,f=n,v=h(o);!(m=v()).done;)f=f<<a|t(m.value);if(f<=u)return f%s;l++}if(iu)try{nu.getRandomValues(o);for(var p,g=n,y=h(o);!(p=y()).done;)g=g<<a|t(p.value);var b=g%s;return ui.warn("randomBigInt: reached max rejection attempts, using modulo fallback",{n:e.toString(),attempts:l}),b}catch(e){throw ui.error("randomBigInt: failed to generate random values",e),new Error("randomBigInt: unable to generate random value")}for(var w,k=n,S=h(o);!(w=S()).done;)k=k<<a|t(w.value);return ui.warn("randomBigInt: reached max rejection attempts without crypto, using modulo fallback",{n:e.toString(),attempts:l}),k%s}(m-c);return lu(f)}function cu(e){var t=function(e){var t=e.replace(/-/g,"").toLowerCase();if(!/^[0-9a-f]{32}$/.test(t))throw new Error(`Invalid UUID format: ${e}`);for(var n=0,i=t.length-1;i>=0;i--){n=(n+parseInt(t[i],16))*au}return n}(e);return 100*t}function hu(e,t,n){return e<t?t-e:e>n?e-n:0}var mu,fu=e=>{try{var t=new URL(e);return("http:"===t.protocol||"https:"===t.protocol)&&!!t.hostname}catch(e){return!1}},vu=e=>{try{var t=new URL(e),n=t.origin+t.pathname,i=new Set;return t.searchParams.forEach((e,t)=>{i.add(`${t}=${e}`)}),{basePath:n,params:i}}catch(e){return}},pu=(e,t,n)=>e?e.flatMap(e=>{var i;if(i="string"==typeof n?e.segments.filter(e=>e.form_factors.some(e=>e.form_factor===n)):e.segments,0===i.length)return[];var a=((e,t)=>{for(var n,i=[...e].sort((e,t)=>e.split-t.split),a=h(i);!(n=a()).done;){var r=n.value;if(t<=r.split)return r}return i[i.length-1]})(i,t);return{form_factors:a.form_factors,paywall:a.paywall,paywall_url:a.paywall_url,page_urls:a.page_urls,flow:a.flow,segment:a.segment,split:a.split,conversion_event_type:a.conversion_event_type,conversion_event_url:a.conversion_event_url,rule:e.rule,name:e.name,type:e.type,value:e.value,external_segment:e.external_segment}}):[],gu=()=>{var e,t,n=null!==(e=Fr.getCampaignRules(ot))&&void 0!==e?e:[],i=null!==(t=Fr.getCampaignRules(wt))&&void 0!==t?t:[],a=ou(),r=li([...n,...i]).filter(e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===a)}),o=new Set;return r.filter(e=>{var t,n,i=`${null!==(t=e.type)&&void 0!==t?t:""}::${null!==(n=e.value)&&void 0!==n?n:""}`;return!o.has(i)&&(o.add(i),!0)})},yu=e=>{var t,n=null!==(t=Fr.getCampaignRules(e))&&void 0!==t?t:[],i=ou();return li(n).filter(e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===i)})},bu=()=>yu(wt),wu=()=>yu(ot),ku=(t,n,i,a)=>{var r=(()=>{if(!a)return t().find(t=>t.type==e.NamiCampaignRuleType.DEFAULT);if(a===e.NamiCampaignRuleType.URL){var n=t().filter(t=>t.type==e.NamiCampaignRuleType.URL);return((e,t)=>{var n,i,a,r=vu(e);if(r){for(var o,s,u,l=h(t);!(u=l()).done;){var d=u.value,c=d.value;if(c){var m=vu(c);if(m&&m.basePath===r.basePath){var f=m.params.size;if(0!==f){for(var v,p=0,g=h(m.params);!(v=g()).done;){var y=v.value;r.params.has(y)&&p++}p===f?(!o||f>o.totalParams)&&(o={campaign:d,totalParams:f}):o||(!s||p>s.score||p===s.score&&f>s.totalParams)&&(s={campaign:d,score:p,totalParams:f})}else o||s||(s={campaign:d,score:0,totalParams:0})}}}return null!==(n=null===(i=o)||void 0===i?void 0:i.campaign)&&void 0!==n?n:null===(a=s)||void 0===a?void 0:a.campaign}})(i,n)}return t().find(e=>e.type==a&&e.value==i)})();if(!r)return{};var o=n().find(e=>(null==r?void 0:r.paywall)===e.id);return{campaign:r,paywall:o}},Su=(e,t)=>{var n=ku(wu,Us,e,t);if(n.campaign&&n.paywall)return{campaign:n.campaign,paywall:n.paywall};var i=ku(bu,zs,e,t);return i.campaign&&i.paywall?{campaign:i.campaign,paywall:i.paywall}:n.campaign||n.paywall?{campaign:n.campaign,paywall:n.paywall}:{campaign:i.campaign,paywall:i.paywall}},Eu="object"==typeof Reflect?Reflect:null,Pu=Eu&&"function"==typeof Eu.apply?Eu.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};mu=Eu&&"function"==typeof Eu.ownKeys?Eu.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Tu=Number.isNaN||function(e){return e!=e};function Mu(){Mu.init.call(this)}Mu.EventEmitter=Mu,Mu.prototype._events=void 0,Mu.prototype._eventsCount=0,Mu.prototype._maxListeners=void 0;var _u=10;function Au(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Du(e){return void 0===e._maxListeners?Mu.defaultMaxListeners:e._maxListeners}function xu(e,t,n,i){var a,r,o,s;if(Au(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),o=r[t]),void 0===o)o=r[t]=n,++e._eventsCount;else if("function"==typeof o?o=r[t]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(a=Du(e))>0&&o.length>a&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return e}function Cu(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Iu(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=Cu.bind(i);return a.listener=n,i.wrapFn=a,a}function Lu(e,t,n){var i=e._events;if(void 0===i)return[];var a=i[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):Fu(a,a.length)}function Ru(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function Fu(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(Mu,"defaultMaxListeners",{enumerable:!0,get:function(){return _u},set:function(e){if("number"!=typeof e||e<0||Tu(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");_u=e}}),Mu.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Mu.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Tu(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Mu.prototype.getMaxListeners=function(){return Du(this)},Mu.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var r;if(t.length>0&&(r=t[0]),r instanceof Error)throw r;var o=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw o.context=r,o}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)Pu(s,this,t);else for(var u=s.length,l=Fu(s,u),d=0;d<u;++d)Pu(l[d],this,t);return!0},Mu.prototype.addListener=function(e,t){return xu(this,e,t,!1)},Mu.prototype.on=Mu.prototype.addListener,Mu.prototype.prependListener=function(e,t){return xu(this,e,t,!0)},Mu.prototype.once=function(e,t){return Au(t),this.on(e,Iu(this,e,t)),this},Mu.prototype.prependOnceListener=function(e,t){return Au(t),this.prependListener(e,Iu(this,e,t)),this},Mu.prototype.removeListener=function(e,t){var n,i,a,r,o;if(Au(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){o=n[r].listener,a=r;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},Mu.prototype.off=Mu.prototype.removeListener,Mu.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(a=r[i])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},Mu.prototype.listeners=function(e){return Lu(this,e,!0)},Mu.prototype.rawListeners=function(e){return Lu(this,e,!1)},Mu.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Ru.call(e,t)},Mu.prototype.listenerCount=Ru,Mu.prototype.eventNames=function(){return this._eventsCount>0?mu(this._events):[]};var Ou=function(){function e(){o(this,e),this.emitter=new Mu}return c(e,[{key:"on",value:function(e,t){this.emitter.on(e,t)}},{key:"off",value:function(e,t){this.emitter.off(e,t)}},{key:"emit",value:function(e,...t){this.emitter.emit(e,...t)}},{key:"addListener",value:function(e,t){this.emitter.addListener(e,t)}},{key:"removeListener",value:function(e,t){this.emitter.removeListener(e,t)}},{key:"removeAllListeners",value:function(e){e?this.emitter.removeAllListeners(e):this.emitter.removeAllListeners()}},{key:"listeners",value:function(e){return this.emitter.listeners(e)}},{key:"listenerCount",value:function(e){return this.emitter.listenerCount(e)}}],[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}])}(),Nu=function(){return c(function e(){o(this,e),this.disableCampaignUpdates=!1,this.useLegacyPaywallFetch=!1,this.currentFormFactor=ou()},[{key:"configure",value:function(e,t,n=[]){this.currentFormFactor=e,this.splitPosition=t,this.disableCampaignUpdates=n.includes("disableCampaignUpdates"),this.useLegacyPaywallFetch=n.includes("useLegacyPaywallFetch")}},{key:"reset",value:function(){this.currentFormFactor=ou(),this.splitPosition=void 0,this.disableCampaignUpdates=!1,this.useLegacyPaywallFetch=!1}},{key:"fetchCampaignRules",value:function(e){var t,n,i,r;return k(function(o){for(;;)switch(o.n){case 0:if(i=Fr.getDevice(),!this.disableCampaignUpdates){o.n=1;break}return ui.info("Campaign updates disabled by configuration. Skipping fetch."),o.a(2,[]);case 1:if(null!=i&&i.id){o.n=3;break}return o.n=2,a(this.getAnonymousCampaigns());case 2:r=o.v,o.n=5;break;case 3:return o.n=4,a(this.getCampaigns(i.id));case 4:r=o.v;case 5:return r=null===(t=r)||void 0===t?void 0:t.filter(e=>{var t;return e.paywall&&e.form_factors.some(e=>e.form_factor===this.currentFormFactor)||e.flow&&(null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===this.currentFormFactor))}),r=null===(n=r)||void 0===n?void 0:n.filter(t=>{if(t.paywall){var n=e.find(e=>e.id==t.paywall);if(n)return t}else if(t.flow)return t}),Fr.setCampaignRules(ot,r),Fr.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),o.a(2,r)}},null,this,null,Promise)}},{key:"fetchCampaignRulesRaw",value:function(){var e,t,n;return k(function(i){for(;;)switch(i.n){case 0:if(t=Fr.getDevice(),!this.disableCampaignUpdates){i.n=1;break}return ui.info("Campaign updates disabled by configuration. Skipping fetch."),i.a(2,[]);case 1:if(null!=t&&t.id){i.n=3;break}return i.n=2,a(this.getAnonymousCampaigns());case 2:n=i.v,i.n=5;break;case 3:return i.n=4,a(this.getCampaigns(t.id));case 4:n=i.v;case 5:return n=null===(e=n)||void 0===e?void 0:e.filter(e=>{var t;return e.paywall&&e.form_factors.some(e=>e.form_factor===this.currentFormFactor)||e.flow&&(null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===this.currentFormFactor))}),i.a(2,n)}},null,this,null,Promise)}},{key:"finalizeCampaignRules",value:function(e,t){var n=null==e?void 0:e.filter(e=>e.paywall?t.find(t=>t.id==e.paywall):!!e.flow);return Fr.setCampaignRules(ot,n),Fr.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),n}},{key:"invokeAvailableCampaignsResponseHandler",value:function(){var e=Ou.getInstance().listeners(Hn),t=gu();e.forEach(e=>e(t))}},{key:"getAnonymousCampaigns",value:function(e=Ae){var t,n,i,r,o;return k(function(s){for(;;)switch(s.p=s.n){case 0:return t=`campaign_rules/?sdk_version=${e}`,s.p=1,s.n=2,a(js.instance.fetchAPI(t));case 2:return i=s.v,s.a(2,pu(null!==(n=i.results)&&void 0!==n?n:[],this.splitPosition,this.currentFormFactor));case 3:if(s.p=3,o=s.v,r=this.fallbackData()){s.n=4;break}throw ui.error(Zr(o.status,t)),o;case 4:return s.a(2,r.results)}},null,this,[[1,3]],Promise)}},{key:"getCampaigns",value:function(e){var t,n,i,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return n=`device/${e}/campaign_rules/`,o.p=1,o.n=2,a(js.instance.fetchAPI(n));case 2:i=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,i=this.fallbackData()){o.n=4;break}throw ui.error(Zr(r.status,n)),r;case 4:return o.a(2,(null===(t=i)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Fr.getCampaignRules(ot)||Fr.getCampaignRules(wt);return e?{count:e.length,results:e}:null}}],[{key:"extractPaywallUrls",value:function(e){for(var t,n=[],i=h(e);!(t=i()).done;){var a,r=t.value;r.paywall_url&&n.push(r.paywall_url),r.page_urls&&n.push(...Object.values(r.page_urls)),null!==(a=r.flow)&&void 0!==a&&a.page_urls&&n.push(...Object.values(r.flow.page_urls))}return n}},{key:"hasPaywallUrls",value:function(e){return e.some(e=>{var t;return e.paywall_url||e.page_urls||(null===(t=e.flow)||void 0===t?void 0:t.page_urls)})}}])}();function $u(e,t){return ar(e,t)}Nu.instance=new Nu;var Wu=function(){return c(function e(){o(this,e)},[{key:"createOrUpdateDevice",value:function(e,t,n){var i=Fr.getDevice();if(null==i||!i.id){var a,r=m({},e,{id:null!==(a=null!=t?t:this.getAnonymousUUID())&&void 0!==a?a:su()});return{id:r.id,device:this.createDevice(r,n)}}return this.isEqualDevices(i,e)?{id:i.id,device:Promise.resolve(i)}:(this.updateDevice(i.id,e),{id:i.id,device:null})}},{key:"createDevice",value:function(e,t){var n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:return r.p=0,r.n=1,a(this.requestAPIData("device/",e,void 0,void 0,0));case 1:if(!(n=r.v)){r.n=2;break}Fr.setDevice(n),r.n=3;break;case 2:return ui.info("Device creation returned null, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),r.a(2,null);case 3:return r.a(2,n);case 4:if(r.p=4,i=r.v,console.error("Error creating device:",i),!(i instanceof Or)){r.n=5;break}return ui.info("Retry limit exceeded, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),r.a(2,null);case 5:throw i;case 6:return r.a(2)}},null,this,[[0,4]],Promise)}},{key:"updateDevice",value:function(e,t){var n;return k(function(i){for(;;)switch(i.n){case 0:return i.n=1,a(this.requestAPIData(`device/${e}/`,t,"PUT"));case 1:return(n=i.v)&&Fr.setDevice(n),i.a(2,n)}},null,this,null,Promise)}},{key:"updateDeviceField",value:function(e,t){var n,i,r;return k(function(o){for(;;)switch(o.n){case 0:if(n={[e]:t},null!=(i=Fr.getDevice())&&i.id){o.n=1;break}throw new Br;case 1:return o.n=2,a(this.requestAPIData(`device/${i.id}/`,n,"PATCH"));case 2:return(r=o.v)&&Fr.setDevice(r),o.a(2,r)}},null,this,null,Promise)}},{key:"requestAPIData",value:function(e,t,n="POST",i=An,r){var o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:return u.p=0,u.n=1,a(js.instance.requestBodyAPI(e,t,n,!1,i,r));case 1:o=u.v,u.n=5;break;case 2:if(u.p=2,!((s=u.v)instanceof jr)){u.n=3;break}throw s;case 3:if(!("device/"===e&&s instanceof Or)){u.n=4;break}throw s;case 4:if(o=Fr.getDevice()){u.n=5;break}return ui.error(Zr(s.status,e)),u.a(2,null);case 5:return u.a(2,o)}},null,null,[[0,2]],Promise)}},{key:"isEqualDevices",value:function(e,t){var n=m({},e,t),i=Object.keys(e).reduce((e,t)=>(e[t]=n[t],e),{});return $u(i,e)}},{key:"getOrCreateAnonymousUUID",value:function(){var e=Fr.getAnonymousUUID();return e||(e=su(),Fr.setAnonymousUUID(e)),e}},{key:"getAnonymousUUID",value:function(){var e=Fr.getAnonymousUUID();return e?(Fr.clearAnonymousUUID(),e):null}}])}();Wu.instance=new Wu;var ju=function(){return c(function e(){o(this,e)},[{key:"fetchProducts",value:function(){var e,t,n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:if(!Ds(Pe.THIRD_PARTY_TRANSACTIONS)){r.n=1;break}return r.a(2,[]);case 1:return r.p=1,r.n=2,a(js.instance.fetchAPI("products/"));case 2:n=r.v,r.n=4;break;case 3:if(r.p=3,i=r.v,n=this.fallbackData()){r.n=4;break}throw ui.error(Zr(i.status,"products/")),i;case 4:return null!==(e=n)&&void 0!==e&&e.results&&Fr.setProducts(ht,n.results),r.a(2,(null===(t=n)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Fr.getProducts(ht)||Fr.getProducts(Pt);return e?{count:e.length,results:e}:null}}])}();ju.instance=new ju;var Bu=3,zu=200,Uu=2e3,Hu=5e3,Gu=new Set([408,425,429]),Vu=new Set(["ECONNRESET","ECONNREFUSED","ENOTFOUND","ETIMEDOUT"]),Ku=function(e){function t(e,n){var i;return o(this,t),(i=r(this,t,[`CDN fetch failed with non-retryable status ${e} for ${n}`])).name="NonRetryableHttpError",i.status=e,i.url=n,i}return p(t,e),c(t)}(_(Error)),Xu=function(e){function t(e,n,i){var a;return o(this,t),(a=r(this,t,[`CDN fetch exhausted ${n} attempts for ${e}${void 0!==i?` (last status ${i})`:""}`])).name="RetryExhaustedError",a.url=e,a.attempts=n,a.lastStatus=i,a}return p(t,e),c(t)}(_(Error));function Yu(e,t){if("number"==typeof t)return Gu.has(t)||t>=500;if(e&&"object"==typeof e){var n=e;if("AbortError"===n.name)return!0;if(n.code&&Vu.has(n.code))return!0;if(e instanceof TypeError)return!0}return!1}function qu(e,t){var n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:return n=new AbortController,i=setTimeout(()=>n.abort(),t),r.p=1,r.n=2,a(fetch(e,{signal:n.signal}));case 2:return r.a(2,r.v);case 3:return r.p=3,clearTimeout(i),r.f(3);case 4:return r.a(2)}},null,null,[[1,,3,4]],Promise)}var Ju=e=>new Promise(t=>setTimeout(t,e));function Qu(e,t={}){var n,i,r,o,s,u,l,d,c,h,m,f,v,p,g,y,b,w,S,E,P,T,M,_,A,D,x,C,I,L;return k(function(k){for(;;)switch(k.p=k.n){case 0:d=null!==(n=t.maxAttempts)&&void 0!==n?n:Bu,c=null!==(i=t.baseDelayMs)&&void 0!==i?i:zu,h=null!==(r=t.maxDelayMs)&&void 0!==r?r:Uu,m=null!==(o=t.budgetMs)&&void 0!==o?o:Hu,f=null!==(s=t.timeoutMs)&&void 0!==s?s:Mn,v=null!==(u=t.randomFn)&&void 0!==u?u:Math.random,p=null!==(l=t.sleepFn)&&void 0!==l?l:Ju,g=Is(),y=Ls(),b=Date.now(),w=0;case 1:if(!(w<d)){k.n=16;break}if(!(w>0)){k.n=4;break}if(!((P=Date.now()-b)>=m)){k.n=2;break}return k.a(3,16);case 2:return T=Math.min(c*Math.pow(2,w-1),h),M=T*(v()-.5),_=Math.max(0,m-P),A=Math.min(Math.max(0,T+M),_),k.n=3,a(p(A));case 3:if(!(Date.now()-b>=m)){k.n=4;break}return k.a(3,16);case 4:return k.p=4,(g||y)&&ui.debug(`[HTTP] GET ${e} (cdn attempt ${w+1}/${d})`),k.n=5,a(qu(e,f));case 5:if((D=k.v).ok){k.n=9;break}if(!y){k.n=7;break}return k.n=6,a(D.clone().text());case 6:x=k.v,ui.debug(`[HTTP] Response ${D.status}: ${x}`);case 7:if(S=D.status,!Yu(void 0,D.status)){k.n=8;break}return w++,k.a(3,1);case 8:throw new Ku(D.status,e);case 9:if(!y){k.n=11;break}return k.n=10,a(D.clone().text());case 10:C=k.v,ui.debug(`[HTTP] Response ${D.status}: ${C}`);case 11:return k.n=12,a(D.json());case 12:return I=k.v,k.a(2,{data:I,retryCount:w});case 13:if(k.p=13,!((L=k.v)instanceof Ku)){k.n=14;break}throw L;case 14:if(!Yu(L)){k.n=15;break}return E=L,w++,k.a(3,1);case 15:throw L;case 16:if(void 0!==S||void 0===E){k.n=17;break}throw E;case 17:throw new Xu(e,w,S);case 18:return k.a(2)}},null,null,[[4,13]],Promise)}var Zu=function(){return c(function e(){o(this,e)},[{key:"fetchPaywalls",value:function(){var e,t,n;return k(function(i){for(;;)switch(i.n){case 0:if(null!=(e=Fr.getDevice())&&e.id){i.n=2;break}return i.n=1,a(this.getAnonymousPaywalls());case 1:t=i.v,i.n=4;break;case 2:return i.n=3,a(this.getPaywalls(e.id));case 3:t=i.v;case 4:if(!t){i.n=5;break}return(n=this.validatePaywalls(t)).length>0&&Fr.setPaywalls(ut,n),i.a(2,n);case 5:return i.a(2,t)}},null,this,null,Promise)}},{key:"getAnonymousPaywalls",value:function(e=Ae){var t,n,i,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return n=`paywalls/?sdk_version=${e}`,i=null,o.p=1,o.n=2,a(js.instance.fetchAPI(n));case 2:i=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,i=this.fallbackData()){o.n=4;break}throw ui.error(Zr(r.status,n)),r;case 4:return o.a(2,(null===(t=i)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"getPaywalls",value:function(e){var t,n,i,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return n=`device/${e}/paywalls/`,o.p=1,o.n=2,a(js.instance.fetchAPI(n));case 2:i=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,i=this.fallbackData()){o.n=4;break}throw ui.error(Zr(r.status,n)),r;case 4:return o.a(2,(null===(t=i)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fetchPaywallByUrl",value:function(e){return k(function(t){for(;;)if(0===t.n)return t.a(2,Qu(e))},null,null,null,Promise)}},{key:"fetchPaywallsByUrls",value:function(e){var t,n,i,r,o,s,u,l;return k(function(d){for(;;)switch(d.n){case 0:return t=[...new Set(e)],d.n=1,a(Promise.allSettled(t.map(e=>this.fetchPaywallByUrl(e))));case 1:for(n=d.v,i=[],r=0,o=h(n);!(s=o()).done;)"fulfilled"===(u=s.value).status?(i.push(u.value.data),r+=u.value.retryCount):ui.error(`Failed to fetch individual paywall: ${u.reason}`);if(!(i.length>0)){d.n=2;break}return(l=this.validatePaywalls(i)).length>0&&Fr.setPaywalls(ut,l),d.a(2,{paywalls:l,retryCount:r});case 2:return d.a(2,{paywalls:i,retryCount:r})}},null,this,null,Promise)}},{key:"validatePaywalls",value:function(e){return e.filter(e=>{var t,n=null===(t=e.template)||void 0===t?void 0:t.pages;return!(!Array.isArray(n)||0===n.length)||(ui.warn(`Dropping paywall "${e.id}" from cache: template.pages is missing or empty`),!1)})}},{key:"fallbackData",value:function(){var e=Fr.getPaywalls(ut)||Fr.getPaywalls(St);return e?{count:e.length,results:e}:null}}])}();Zu.instance=new Zu;var el=function(){return c(function e(){o(this,e)},[{key:"fetchConfig",value:function(){var e,t;return k(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,a(js.instance.fetchAPI("config/"));case 1:e=n.v,n.n=3;break;case 2:if(n.p=2,t=n.v,e=Fr.getAppConfig(at)||Fr.getAppConfig(yt)){n.n=3;break}throw ui.error(Zr(t.status,"config/")),t;case 3:return e&&Fr.setAppConfig(at,e),n.a(2,e)}},null,null,[[0,2]],Promise)}}])}();el.instance=new el;var tl=null;function nl(){tl&&tl.setInMemoryAnonymousMode(!1)}function il(){return!!Fr.getAnonymousMode()||!!tl&&tl.isInMemoryAnonymousMode()}var al=function(){return c(function e(){o(this,e)},[{key:"startSession",value:function(){var e;return k(function(t){for(;;)switch(t.p=t.n){case 0:if(!il()){t.n=1;break}return ui.debug("Skipping session start call - anonymous mode"),t.a(2);case 1:return t.p=1,t.n=2,a(js.instance.startSession(new Date));case 2:t.n=4;break;case 3:t.p=3,e=t.v,ui.error("error on start session: ",e);case 4:return t.a(2)}},null,null,[[1,3]],Promise)}}])}();al.instance=new al;var rl=function(){return c(function e(){o(this,e)},null,[{key:"allPurchases",value:function(){return[]}}])}();rl.instance=new rl;var ol={en:{nami_day:"day",nami_day_plural:"days",nami_week:"week",nami_week_plural:"weeks",nami_month:"month",nami_month_plural:"months",nami_year:"year",nami_year_plural:"years",nami_day_abbrev:"day",nami_day_abbrev_plural:"days",nami_week_abbrev:"wk",nami_week_abbrev_plural:"wks",nami_month_abbrev:"mo",nami_month_abbrev_plural:"mos",nami_year_abbrev:"yr",nami_year_abbrev_plural:"yrs",nami_daily:"daily",nami_weekly:"weekly",nami_biweekly:"bi-weekly",nami_monthly:"monthly",nami_bimonthly:"bi-monthly",nami_quarterly:"quarterly",nami_biannually:"bi-annually",nami_yearly:"yearly"},af:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dae",nami_week_abbrev:"week",nami_week_abbrev_plural:"weke",nami_month_abbrev:"ma",nami_month_abbrev_plural:"maande",nami_year_abbrev:"jr",nami_year_abbrev_plural:"jare",nami_daily:"daagliks",nami_weekly:"weekliks",nami_biweekly:"tweeweekliks",nami_monthly:"maandeliks",nami_bimonthly:"tweemaandeliks",nami_quarterly:"kwartaalliks",nami_biannually:"tweejaarliks",nami_yearly:"jaarliks"},am:{nami_day_abbrev:"ቀን",nami_day_abbrev_plural:"ቀናት",nami_week_abbrev:"ሳምንት",nami_week_abbrev_plural:"ሳምንታት",nami_month_abbrev:"ወር",nami_month_abbrev_plural:"ሞስ",nami_year_abbrev:"ዓመት",nami_year_abbrev_plural:"ዓመታት",nami_daily:"በየቀኑ",nami_weekly:"ሳምንታዊ",nami_biweekly:"በየሁለት ሳምንቱ",nami_monthly:"ወርሃዊ",nami_bimonthly:"በየሁለት ወሩ",nami_quarterly:"በየሩብ ዓመቱ",nami_biannually:"በየሁለት ዓመቱ",nami_yearly:"ዓመታዊ"},ar:{nami_day_abbrev:"يوم",nami_day_abbrev_plural:"أيام",nami_week_abbrev:"أسبوع",nami_week_abbrev_plural:"أسابيع",nami_month_abbrev:"شهر",nami_month_abbrev_plural:"موس",nami_year_abbrev:"سنة",nami_year_abbrev_plural:"سنوات",nami_daily:"يوميًا",nami_weekly:"أسبوعي",nami_biweekly:"كل أسبوعين",nami_monthly:"شهريا",nami_bimonthly:"كل شهرين",nami_quarterly:"ربع سنوي",nami_biannually:"مرتين في السنة",nami_yearly:"سنوي"},bg:{nami_day_abbrev:"ден",nami_day_abbrev_plural:"дни",nami_week_abbrev:"седмица",nami_week_abbrev_plural:"седмици",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год.",nami_year_abbrev_plural:"години",nami_daily:"ежедневно",nami_weekly:"седмично",nami_biweekly:"двуседмичен",nami_monthly:"месечно",nami_bimonthly:"двумесечно",nami_quarterly:"тримесечно",nami_biannually:"два пъти годишно",nami_yearly:"годишно"},ca:{nami_day_abbrev:"dia",nami_day_abbrev_plural:"dies",nami_week_abbrev:"setmana",nami_week_abbrev_plural:"setmanes",nami_month_abbrev:"mes",nami_month_abbrev_plural:"mesos",nami_year_abbrev:"any",nami_year_abbrev_plural:"anys",nami_daily:"diàriament",nami_weekly:"setmanal",nami_biweekly:"quinzenal",nami_monthly:"mensual",nami_bimonthly:"bimensual",nami_quarterly:"trimestral",nami_biannually:"bianualment",nami_yearly:"anual"},cs:{nami_day_abbrev:"den",nami_day_abbrev_plural:"dny",nami_week_abbrev:"týden",nami_week_abbrev_plural:"týdny",nami_month_abbrev:"měsíc",nami_month_abbrev_plural:"měsíce",nami_year_abbrev:"rok",nami_year_abbrev_plural:"roky",nami_daily:"denní",nami_weekly:"týdně",nami_biweekly:"dvoutýdenní",nami_monthly:"měsíční",nami_bimonthly:"dvouměsíčník",nami_quarterly:"čtvrtletní",nami_biannually:"pololetně",nami_yearly:"roční"},de:{nami_day_abbrev:"Tag",nami_day_abbrev_plural:"Tage",nami_week_abbrev:"Woche",nami_week_abbrev_plural:"Wochen",nami_month_abbrev:"Monat",nami_month_abbrev_plural:"Monate",nami_year_abbrev:"Jahr",nami_year_abbrev_plural:"Jahre",nami_daily:"täglich",nami_weekly:"wöchentlich",nami_biweekly:"zweiwöchentlich",nami_monthly:"monatlich",nami_bimonthly:"zweimonatlich",nami_quarterly:"vierteljährlich",nami_biannually:"halbjährlich",nami_yearly:"jährlich"},el:{nami_day_abbrev:"ημέρα",nami_day_abbrev_plural:"ημέρες",nami_week_abbrev:"εβδομάδα",nami_week_abbrev_plural:"εβδομάδες",nami_month_abbrev:"μήνα",nami_month_abbrev_plural:"μην",nami_year_abbrev:"έτος",nami_year_abbrev_plural:"χρόνια",nami_daily:"καθημερινά",nami_weekly:"εβδομαδιαίος",nami_biweekly:"ανά δύο εβδομάδες",nami_monthly:"μηνιαίος",nami_bimonthly:"διμηνιαίος",nami_quarterly:"τριμηνιαίος",nami_biannually:"ανά εξάμηνο",nami_yearly:"ετήσια"},es:{nami_day_abbrev:"día",nami_day_abbrev_plural:"días",nami_week_abbrev:"semana",nami_week_abbrev_plural:"semanas",nami_month_abbrev:"mes",nami_month_abbrev_plural:"meses",nami_year_abbrev:"año",nami_year_abbrev_plural:"años",nami_daily:"diario",nami_weekly:"semanal",nami_biweekly:"quincenal",nami_monthly:"mensual",nami_bimonthly:"bimensual",nami_quarterly:"trimestral",nami_biannually:"semestral",nami_yearly:"anual"},et:{nami_day_abbrev:"päev",nami_day_abbrev_plural:"päevad",nami_week_abbrev:"nädal",nami_week_abbrev_plural:"nädalat",nami_month_abbrev:"kuu",nami_month_abbrev_plural:"kuud",nami_year_abbrev:"aasta",nami_year_abbrev_plural:"aastat",nami_daily:"iga päev",nami_weekly:"iganädalane",nami_biweekly:"iga kahe nädala tagant",nami_monthly:"igakuine",nami_bimonthly:"kaks korda kuus",nami_quarterly:"kvartali",nami_biannually:"kaks korda aastas",nami_yearly:"iga-aastane"},fa:{nami_day_abbrev:"روز",nami_day_abbrev_plural:"روزها",nami_week_abbrev:"هفته",nami_week_abbrev_plural:"هفتهها",nami_month_abbrev:"مو",nami_month_abbrev_plural:"موش",nami_year_abbrev:"سال",nami_year_abbrev_plural:"سال",nami_daily:"روزانه",nami_weekly:"هفتگی",nami_biweekly:"دو هفتهای",nami_monthly:"ماهانه",nami_bimonthly:"دوماهه",nami_quarterly:"سه ماهه",nami_biannually:"دوسالانه",nami_yearly:"سالانه"},fi:{nami_day_abbrev:"päivä",nami_day_abbrev_plural:"päivää",nami_week_abbrev:"viikko",nami_week_abbrev_plural:"viikkoa",nami_month_abbrev:"kuukausi",nami_month_abbrev_plural:"kuukaudet",nami_year_abbrev:"vuosi",nami_year_abbrev_plural:"vuotta",nami_daily:"päivittäin",nami_weekly:"viikoittain",nami_biweekly:"joka toinen viikko",nami_monthly:"kuukausittain",nami_bimonthly:"kahdesti kuussa",nami_quarterly:"neljännesvuosittain",nami_biannually:"puolivuosittain",nami_yearly:"vuosittain"},fr:{nami_day_abbrev:"jour",nami_day_abbrev_plural:"jours",nami_week_abbrev:"semaine",nami_week_abbrev_plural:"semaines",nami_month_abbrev:"mois",nami_month_abbrev_plural:"mois",nami_year_abbrev:"année",nami_year_abbrev_plural:"ans",nami_daily:"tous les jours",nami_weekly:"hebdomadaire",nami_biweekly:"bihebdomadaire",nami_monthly:"mensuel",nami_bimonthly:"bimensuel",nami_quarterly:"trimestriel",nami_biannually:"bisannuel",nami_yearly:"annuel"},hi:{nami_day_abbrev:"दिन",nami_day_abbrev_plural:"दिन",nami_week_abbrev:"सप्त",nami_week_abbrev_plural:"सप्त",nami_month_abbrev:"महीना",nami_month_abbrev_plural:"महीने",nami_year_abbrev:"साल",nami_year_abbrev_plural:"वर्षीय",nami_daily:"दैनिक",nami_weekly:"साप्ताहिक",nami_biweekly:"द्वि-साप्ताहिक",nami_monthly:"महीने के",nami_bimonthly:"द्विमासिक",nami_quarterly:"त्रैमासिक",nami_biannually:"द्वि-वार्षिक रूप",nami_yearly:"वार्षिक"},hr:{nami_day_abbrev:"dan",nami_day_abbrev_plural:"dana",nami_week_abbrev:"tjedan",nami_week_abbrev_plural:"tjedni",nami_month_abbrev:"mjesec",nami_month_abbrev_plural:"mjeseca",nami_year_abbrev:"god.",nami_year_abbrev_plural:"godina",nami_daily:"dnevno",nami_weekly:"tjedno",nami_biweekly:"dvotjedno",nami_monthly:"mjesečno",nami_bimonthly:"dvomjesečno",nami_quarterly:"tromjesečno",nami_biannually:"dvogodišnje",nami_yearly:"godišnje"},hu:{nami_day_abbrev:"nap",nami_day_abbrev_plural:"napok",nami_week_abbrev:"hét",nami_week_abbrev_plural:"hetek",nami_month_abbrev:"hónap",nami_month_abbrev_plural:"hónap",nami_year_abbrev:"év",nami_year_abbrev_plural:"év",nami_daily:"napi",nami_weekly:"heti",nami_biweekly:"kéthetente",nami_monthly:"havi",nami_bimonthly:"kéthavonta",nami_quarterly:"negyedévenként",nami_biannually:"félévente",nami_yearly:"évi"},id:{nami_day_abbrev:"hari",nami_day_abbrev_plural:"hari",nami_week_abbrev:"minggu",nami_week_abbrev_plural:"minggu",nami_month_abbrev:"bulan",nami_month_abbrev_plural:"bulan",nami_year_abbrev:"tahun",nami_year_abbrev_plural:"tahun",nami_daily:"sehari-hari",nami_weekly:"mingguan",nami_biweekly:"dua kali seminggu",nami_monthly:"bulanan",nami_bimonthly:"dua bulanan",nami_quarterly:"triwulanan",nami_biannually:"dua tahunan",nami_yearly:"tahunan"},it:{nami_day_abbrev:"giorno",nami_day_abbrev_plural:"giorni",nami_week_abbrev:"settimana",nami_week_abbrev_plural:"settimane",nami_month_abbrev:"mese",nami_month_abbrev_plural:"mesi",nami_year_abbrev:"anno",nami_year_abbrev_plural:"anni",nami_daily:"quotidiano",nami_weekly:"settimanale",nami_biweekly:"bisettimanale",nami_monthly:"mensile",nami_bimonthly:"bimestrale",nami_quarterly:"trimestrale",nami_biannually:"semestralmente",nami_yearly:"annuale"},he:{nami_day_abbrev:"יְוֹם",nami_day_abbrev_plural:"ימים",nami_week_abbrev:"שבוע",nami_week_abbrev_plural:"שבועות",nami_month_abbrev:"מו",nami_month_abbrev_plural:"מוֹס",nami_year_abbrev:"שנה",nami_year_abbrev_plural:"שנים",nami_daily:"יוֹמִי",nami_weekly:"שְׁבוּעִי",nami_biweekly:"דו-שבועי",nami_monthly:"יַרחוֹן",nami_bimonthly:"דו-חודשי",nami_quarterly:"רִבעוֹן",nami_biannually:"דו-שנתי",nami_yearly:"שְׁנָתִי"},ja:{nami_day_abbrev:"日",nami_day_abbrev_plural:"日",nami_week_abbrev:"週",nami_week_abbrev_plural:"週",nami_month_abbrev:"モ",nami_month_abbrev_plural:"モス",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"毎日",nami_weekly:"毎週",nami_biweekly:"隔週",nami_monthly:"毎月",nami_bimonthly:"隔月",nami_quarterly:"四半期ごと",nami_biannually:"半年ごと",nami_yearly:"毎年"},ko:{nami_day_abbrev:"낮",nami_day_abbrev_plural:"날",nami_week_abbrev:"주",nami_week_abbrev_plural:"주",nami_month_abbrev:"모",nami_month_abbrev_plural:"모스",nami_year_abbrev:"년",nami_year_abbrev_plural:"년",nami_daily:"일일",nami_weekly:"주간",nami_biweekly:"격주 간행물",nami_monthly:"월간 간행물",nami_bimonthly:"격월",nami_quarterly:"계간지",nami_biannually:"반년마다",nami_yearly:"매년"},lt:{nami_day_abbrev:"diena",nami_day_abbrev_plural:"dienos",nami_week_abbrev:"savaitė",nami_week_abbrev_plural:"savaitės",nami_month_abbrev:"mėn.",nami_month_abbrev_plural:"mėn.",nami_year_abbrev:"metai",nami_year_abbrev_plural:"metų",nami_daily:"kasdien",nami_weekly:"kas savaitę",nami_biweekly:"kas dvi savaites",nami_monthly:"mėnesinis",nami_bimonthly:"kas du mėnesius",nami_quarterly:"ketvirtinis",nami_biannually:"kas du kartus per metus",nami_yearly:"kasmet"},lv:{nami_day_abbrev:"diena",nami_day_abbrev_plural:"dienas",nami_week_abbrev:"nedēļa",nami_week_abbrev_plural:"nedēļas",nami_month_abbrev:"mēn.",nami_month_abbrev_plural:"mēn.",nami_year_abbrev:"gads",nami_year_abbrev_plural:"gadi",nami_daily:"ikdienas",nami_weekly:"iknedēļas",nami_biweekly:"divreiz nedēļā",nami_monthly:"ikmēneša",nami_bimonthly:"divreiz mēnesī",nami_quarterly:"ceturksnī",nami_biannually:"divreiz gadā",nami_yearly:"katru gadu"},ms:{nami_day_abbrev:"hari",nami_day_abbrev_plural:"hari",nami_week_abbrev:"minggu",nami_week_abbrev_plural:"minggu",nami_month_abbrev:"bulan",nami_month_abbrev_plural:"bulan",nami_year_abbrev:"tahun",nami_year_abbrev_plural:"tahun",nami_daily:"setiap hari",nami_weekly:"mingguan",nami_biweekly:"dua minggu sekali",nami_monthly:"bulanan",nami_bimonthly:"dua kali sebulan",nami_quarterly:"suku tahunan",nami_biannually:"dua kali setahun",nami_yearly:"tahunan"},nl:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dagen",nami_week_abbrev:"week",nami_week_abbrev_plural:"weken",nami_month_abbrev:"maand",nami_month_abbrev_plural:"maanden",nami_year_abbrev:"jaar",nami_year_abbrev_plural:"jaren",nami_daily:"dagelijks",nami_weekly:"wekelijks",nami_biweekly:"tweewekelijks",nami_monthly:"maandelijks",nami_bimonthly:"tweemaandelijks",nami_quarterly:"kwartaal",nami_biannually:"halfjaarlijks",nami_yearly:"jaarlijks"},no:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dager",nami_week_abbrev:"uke",nami_week_abbrev_plural:"uker",nami_month_abbrev:"måned",nami_month_abbrev_plural:"måned",nami_year_abbrev:"år",nami_year_abbrev_plural:"år",nami_daily:"daglig",nami_weekly:"ukentlig",nami_biweekly:"annenhver uke",nami_monthly:"månedlig",nami_bimonthly:"annenhver måned",nami_quarterly:"kvartalsvis",nami_biannually:"to ganger i året",nami_yearly:"årlig"},pl:{nami_day_abbrev:"dzień",nami_day_abbrev_plural:"dni",nami_week_abbrev:"tydzień",nami_week_abbrev_plural:"tygodni",nami_month_abbrev:"miesiąc",nami_month_abbrev_plural:"miesiące",nami_year_abbrev:"rok",nami_year_abbrev_plural:"lat",nami_daily:"codziennie",nami_weekly:"tygodnik",nami_biweekly:"dwutygodniowy",nami_monthly:"miesięczny",nami_bimonthly:"dwumiesięczny",nami_quarterly:"kwartalny",nami_biannually:"dwa razy w roku",nami_yearly:"rocznie"},pt:{nami_day_abbrev:"dia",nami_day_abbrev_plural:"dias",nami_week_abbrev:"semana",nami_week_abbrev_plural:"semanas",nami_month_abbrev:"mês",nami_month_abbrev_plural:"meses",nami_year_abbrev:"ano",nami_year_abbrev_plural:"anos",nami_daily:"diário",nami_weekly:"semanalmente",nami_biweekly:"quinzenal",nami_monthly:"mensal",nami_bimonthly:"bimestral",nami_quarterly:"trimestral",nami_biannually:"bianualmente",nami_yearly:"anual"},ro:{nami_day_abbrev:"zi",nami_day_abbrev_plural:"zile",nami_week_abbrev:"săptămână",nami_week_abbrev_plural:"săptămâni",nami_month_abbrev:"lună",nami_month_abbrev_plural:"luni",nami_year_abbrev:"an",nami_year_abbrev_plural:"ani",nami_daily:"zilnic",nami_weekly:"săptămânal",nami_biweekly:"la două săptămâni",nami_monthly:"lunar",nami_bimonthly:"bilunar",nami_quarterly:"trimestrial",nami_biannually:"bianual",nami_yearly:"anual"},ru:{nami_day_abbrev:"день",nami_day_abbrev_plural:"дни",nami_week_abbrev:"нед",nami_week_abbrev_plural:"недели",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год",nami_year_abbrev_plural:"лет",nami_daily:"ежедневно",nami_weekly:"еженедельный",nami_biweekly:"раз в две недели",nami_monthly:"ежемесячно",nami_bimonthly:"раз в два месяца",nami_quarterly:"ежеквартальный",nami_biannually:"раз в два года",nami_yearly:"ежегодно"},sk:{nami_day_abbrev:"deň",nami_day_abbrev_plural:"dni",nami_week_abbrev:"týždeň",nami_week_abbrev_plural:"týždne",nami_month_abbrev:"mesiac",nami_month_abbrev_plural:"mesiacov",nami_year_abbrev:"rok",nami_year_abbrev_plural:"rokov",nami_daily:"denne",nami_weekly:"týždenne",nami_biweekly:"dvojtýždenne",nami_monthly:"mesačne",nami_bimonthly:"dvojmesačne",nami_quarterly:"štvrťročne",nami_biannually:"polročne",nami_yearly:"ročne"},sl:{nami_day_abbrev:"dan",nami_day_abbrev_plural:"dni",nami_week_abbrev:"teden",nami_week_abbrev_plural:"tedni",nami_month_abbrev:"mesec",nami_month_abbrev_plural:"mesecev",nami_year_abbrev:"leto",nami_year_abbrev_plural:"let",nami_daily:"dnevno",nami_weekly:"tedensko",nami_biweekly:"dvotedensko",nami_monthly:"mesečno",nami_bimonthly:"dvomesečno",nami_quarterly:"četrtletno",nami_biannually:"polletno",nami_yearly:"letno"},sr:{nami_day_abbrev:"дан",nami_day_abbrev_plural:"дана",nami_week_abbrev:"недеља",nami_week_abbrev_plural:"недеље",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год.",nami_year_abbrev_plural:"године",nami_daily:"свакодневно",nami_weekly:"недељно",nami_biweekly:"двонедељно",nami_monthly:"месечно",nami_bimonthly:"двомесечно",nami_quarterly:"квартално",nami_biannually:"два пута годишње",nami_yearly:"годишње"},sv:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dagar",nami_week_abbrev:"vecka",nami_week_abbrev_plural:"veckor",nami_month_abbrev:"mån",nami_month_abbrev_plural:"månader",nami_year_abbrev:"år",nami_year_abbrev_plural:"år",nami_daily:"dagligen",nami_weekly:"varje vecka",nami_biweekly:"som utkommer varannan vecka",nami_monthly:"månatlig",nami_bimonthly:"varannan månad",nami_quarterly:"kvartalsvis",nami_biannually:"vartannat år",nami_yearly:"årlig"},sw:{nami_day_abbrev:"siku",nami_day_abbrev_plural:"siku",nami_week_abbrev:"wiki",nami_week_abbrev_plural:"wiki",nami_month_abbrev:"mwezi",nami_month_abbrev_plural:"miezi",nami_year_abbrev:"mwaka",nami_year_abbrev_plural:"miaka",nami_daily:"kila siku",nami_weekly:"kila wiki",nami_biweekly:"kila wiki mbili",nami_monthly:"kila mwezi",nami_bimonthly:"kila baada ya miezi miwili",nami_quarterly:"robo mwaka",nami_biannually:"kila baada ya miaka miwili",nami_yearly:"kila mwaka"},th:{nami_day_abbrev:"วัน",nami_day_abbrev_plural:"วัน",nami_week_abbrev:"สัปดาห์",nami_week_abbrev_plural:"สัปดาห์",nami_month_abbrev:"โม",nami_month_abbrev_plural:"มอส",nami_year_abbrev:"ปี",nami_year_abbrev_plural:"ปี",nami_daily:"รายวัน",nami_weekly:"รายสัปดาห์",nami_biweekly:"สองสัปดาห์ครั้ง",nami_monthly:"รายเดือน",nami_bimonthly:"สองเดือนครั้ง",nami_quarterly:"ไตรมาส",nami_biannually:"ทุกสองปี",nami_yearly:"ทุกปี"},tr:{nami_day_abbrev:"gün",nami_day_abbrev_plural:"günler",nami_week_abbrev:"hafta",nami_week_abbrev_plural:"haftalar",nami_month_abbrev:"ay",nami_month_abbrev_plural:"aylar",nami_year_abbrev:"yıl",nami_year_abbrev_plural:"yıllar",nami_daily:"günlük",nami_weekly:"haftalık",nami_biweekly:"iki haftada bir",nami_monthly:"aylık",nami_bimonthly:"iki ayda bir",nami_quarterly:"üç aylık",nami_biannually:"iki yılda bir",nami_yearly:"yıllık"},uk:{nami_day_abbrev:"день",nami_day_abbrev_plural:"дні",nami_week_abbrev:"тиждень",nami_week_abbrev_plural:"тижні",nami_month_abbrev:"місяць",nami_month_abbrev_plural:"мос",nami_year_abbrev:"рік",nami_year_abbrev_plural:"років",nami_daily:"щоденно",nami_weekly:"щотижня",nami_biweekly:"раз на два тижні",nami_monthly:"щомісяця",nami_bimonthly:"раз на два місяці",nami_quarterly:"щоквартально",nami_biannually:"раз на півроку",nami_yearly:"щорічно"},vi:{nami_day_abbrev:"ngày",nami_day_abbrev_plural:"ngày",nami_week_abbrev:"tuần",nami_week_abbrev_plural:"tuần",nami_month_abbrev:"tháng",nami_month_abbrev_plural:"tháng",nami_year_abbrev:"năm",nami_year_abbrev_plural:"năm",nami_daily:"hằng ngày",nami_weekly:"hàng tuần",nami_biweekly:"hai tuần một lần",nami_monthly:"hàng tháng",nami_bimonthly:"hai tháng một lần",nami_quarterly:"hàng quý",nami_biannually:"hai năm một lần",nami_yearly:"hàng năm"},"zh-CN":{nami_day_abbrev:"天",nami_day_abbrev_plural:"天",nami_week_abbrev:"周",nami_week_abbrev_plural:"周",nami_month_abbrev:"莫",nami_month_abbrev_plural:"莫斯",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"日常的",nami_weekly:"每周",nami_biweekly:"每两周一次",nami_monthly:"月度",nami_bimonthly:"双月刊",nami_quarterly:"季刊",nami_biannually:"每半年",nami_yearly:"每年"},"zh-TW":{nami_day_abbrev:"天",nami_day_abbrev_plural:"天",nami_week_abbrev:"週",nami_week_abbrev_plural:"週",nami_month_abbrev:"莫",nami_month_abbrev_plural:"莫斯",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"日常的",nami_weekly:"每週",nami_biweekly:"每兩週一次",nami_monthly:"每月",nami_bimonthly:"雙月刊",nami_quarterly:"季刊",nami_biannually:"每半年",nami_yearly:"每年"},zu:{nami_day_abbrev:"usuku",nami_day_abbrev_plural:"izinsuku",nami_week_abbrev:"isonto",nami_week_abbrev_plural:"amasonto",nami_month_abbrev:"inyanga",nami_month_abbrev_plural:"i-mos",nami_year_abbrev:"unyaka",nami_year_abbrev_plural:"iminyaka",nami_daily:"nsuku zonke",nami_weekly:"masonto onke",nami_biweekly:"kabili ngesonto",nami_monthly:"nyanga zonke",nami_bimonthly:"kabili ngenyanga",nami_quarterly:"njalo ngekota",nami_biannually:"kabili ngonyaka",nami_yearly:"minyaka yonke"}},sl="en";function ul(e){var t,n,i=function(e){if(!e)return sl;var t=e.trim();if(ol[t])return t;var n=t.toLowerCase(),i=n.split("-")[0];return ol[i]?i:"zh"===i?n.includes("tw")||n.includes("hk")?"zh-TW":"zh-CN":sl}(Fr.getLanguageCode()),a=null!==(t=ol[i])&&void 0!==t?t:ol[sl];return null!==(n=null==a?void 0:a[e])&&void 0!==n?n:e}function ll(e){if("subscription"===(null==e?void 0:e.product_type)){var t=cl(e);if(t.length>0)return t[0].billingPeriod}return null}function dl(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return hl(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function cl(e){return e?hl(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function hl(e,t){return e.map(e=>ml(e,t))}function ml(e,t){var n,i,a,r,o,s,u,l;if(!e)return{};var d=null!==(n=null===(i=e.promo_period)||void 0===i?void 0:i.count)&&void 0!==n?n:null==t?void 0:t.count,c=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,h=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*h,priceCurrencyCode:m,billingPeriod:c?`P${d}${c[0].toUpperCase()}`:"",formattedPrice:pl(m).format(h)}}function fl(e,t=!1,n=!1,i=!1,a=!1){if(!e)return null;var r=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!r)return null;var o=r.slice(1).map(e=>parseInt(e)),s=o[0],u=o[1],l=o[2],d=o[3],c=(e,t,n,i,r)=>{var o=(e=>a?`${e}_abbrev`:e)(r),s=(e=>a?`${e}_abbrev_plural`:`${e}_plural`)(r),u=ul(o),l=ul(s);return a||u!==o||(u=ul(`${r}_abbrev`)),a||l!==s||(l=ul(`${r}_abbrev_plural`)),i?e.toString():n?1===e||t?u:l:1===e||t?`${e} ${u}`:`${e} ${l}`};switch(e.at(-1)){case"D":return c(d,t,n,i,"nami_day");case"W":return c(l,t,n,i,"nami_week");case"M":return c(u,t,n,i,"nami_month");case"Y":return c(s,t,n,i,"nami_year")}return null}function vl(e){var t;if(!e||e.length<2)return!1;var n=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===n||"Y"===n}function pl(e){var t={maximumFractionDigits:2,minimumFractionDigits:0},n=we().device.getLanguage();try{return new Intl.NumberFormat(n,m({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(n,m({},t,{style:"currency",currency:"USD"}))}}var gl=(e,t,n)=>e&&t&&n?n.format(e-t):null,yl=(e,t,n,i)=>{if(e&&t&&n&&i){var a=100*(1-e/(n/i*t));return`${Math.round(a)}%`}return null},bl=(e,t)=>{if(""!=t){var n=parseInt(t)-1;return n>=0&&n<(null==e?void 0:e.length)?e[n]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},wl=e=>Sl(e.priceAmountMicros)/kl(e.billingPeriod),kl=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Sl=e=>e/1e6;function El(e){return parseFloat((Math.round(e)/100).toFixed(2))}var Pl=(e,t,n=[])=>({price:()=>Ml(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>_l(e),durationSingular:()=>_l(e,!0),period:()=>_l(e,!1,!0),periodNumber:()=>_l(e,!1,!1,!0),freeTrialDuration:()=>Al(e),freeTrialDurationSingular:()=>Al(e,!0),freeTrialPeriod:()=>Al(e,!1,!0),freeTrialPeriodNumber:()=>Al(e,!1,!1,!0),pricePerMonth:()=>Dl(e),pricePerMonthRounded:()=>Dl(e,!0),periodInMonths:()=>xl(e),durationInMonths:()=>Cl(e),durationInMonthsSingular:()=>Cl(e,!0),periodNumberInMonths:()=>Il(e),percentagePriceDifferenceFromSku:()=>Ll(e,t,n),priceDifferenceFromSku:()=>Rl(e,t,n),promoEligible:()=>null===Fl(e)&&null!==Ol(e,t),freeTrialEligible:()=>null!==Fl(e),promo:()=>{var n;return null===(n=Ol(e,t))||void 0===n?void 0:n.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var n;return null===(n=Nl(e,t))||void 0===n?void 0:n.formattedPrice},promoPeriod:()=>$l(e,t,!1,!0),promoPeriodNumber:()=>$l(e,t,!1,!1,!0),promoDuration:()=>$l(e,t),promoDurationSingular:()=>$l(e,t,!0),introEligible:()=>!1,pricePerDay:()=>Wl(e),pricePerWeek:()=>jl(e),pricePerWeekRounded:()=>jl(e,!0),introductoryPrice:()=>Bl(e,t),introductoryPeriod:()=>zl(e,t,!1,!0),introductoryPeriodNumber:()=>zl(e,t,!1,!1,!0),introductoryDuration:()=>zl(e,t),introductoryDurationSingular:()=>zl(e,t,!0),introductoryPricePerMonth:()=>Ul(e,t),introductoryPricePerMonthRounded:()=>Ul(e,t,!0),durationAbbrev:()=>_l(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>Al(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>zl(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>$l(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>$l(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>Cl(e,!1,!1,!1,!0),durationSingularAbbrev:()=>_l(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>Al(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>zl(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>$l(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>$l(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>Cl(e,!0,!1,!1,!0),periodAbbrev:()=>_l(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>Al(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>zl(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>$l(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>$l(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>Cl(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;var t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;var n=t[1],i=t[2],a=t[3],r=t[4],o=void 0!==n?parseInt(n,10):0,s=void 0!==i?parseInt(i,10):0,u=void 0!==a?parseInt(a,10):0;return(void 0!==r?parseInt(r,10):0)>0?null:u>0?1===u?ul("nami_weekly"):2===u?ul("nami_biweekly"):null:s>0?ul(1===s?"nami_monthly":2===s?"nami_bimonthly":3===s?"nami_quarterly":6===s?"nami_biannually":12===s?"nami_yearly":"nami_monthly"):o>0?ul("nami_yearly"):null}(ll(e)),iso_subscription_duration:()=>Gl(e),invalid:()=>!1,unavailable:()=>!1}),Tl=(e,t,n,i=[])=>{if(!t)return null;var a=Pl(t,n,i);return a[e]?a[e]():null},Ml=e=>{var t=cl(e);return t&&t.length?t[0].formattedPrice:null},_l=(e,t,n,i,a)=>fl(ll(e),t,n,i,a),Al=(e,t,n,i,a)=>fl(dl(e),t,n,i,a),Dl=(e,t)=>{var n=cl(e);if(!n||0===n.length)return null;var i=wl(n[0]);return i?pl(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},xl=(e,t)=>{var n=cl(e);if(!n||0===n.length)return null;var i=n[0].billingPeriod;return vl(i)?fl("P1Y"===i?"P12M":i,!1,!1,!1,t):null},Cl=(e,t,n,i,a)=>{var r=cl(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return vl(o)?fl("P1Y"===o?"P12M":o,t,n,i,a):null},Il=e=>{if(!e)return 0;var t=cl(e);return t&&t.length?kl(t[0].billingPeriod):0},Ll=(e,t,n=[])=>{var i,a=cl(e);if(!a||0===a.length)return null;var r=null===(i=bl(n,null!=t?t:""))||void 0===i?void 0:i.product_details;if(!t||!r)return yl(El(a[0].priceAmountMicros),Il(e));var o=cl(r);return yl(El(a[0].priceAmountMicros),Il(e),(null==o?void 0:o.length)>0?El(o[0].priceAmountMicros):0,Il(r))},Rl=(e,t,n=[])=>{var i,a=cl(e);if(!a||0===a.length)return null;var r=null===(i=bl(n,null!=t?t:""))||void 0===i?void 0:i.product_details;if(!t||!r)return gl(wl(a[0]));var o=cl(r);return gl(wl(a[0]),wl(o[0]),pl(o[0].priceCurrencyCode))},Fl=e=>dl(e),Ol=(e,t)=>{if(!e)return null;var n=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return n[0]||null;var i=n[parseInt(t)];return i?i||null:n.find(e=>e.offer_ref_id===t)||null},Nl=(e,t)=>e?ml(Ol(e,t),e.subscription_period):null,$l=(e,t,n,i,a,r)=>{var o=Nl(e,t);return fl((null==o?void 0:o.billingPeriod)||null,n,i,a,r)},Wl=(e,t)=>{var n=cl(e);if(!n||0===n.length)return null;var i,a,r=Sl(n[0].priceAmountMicros)/(i=n[0].billingPeriod,(a=kl(i))?30.437*a:1);return r?pl(n[0].priceCurrencyCode).format(r):null},jl=(e,t)=>{var n=cl(e);if(!n||0===n.length)return null;var i,a,r=Sl(n[0].priceAmountMicros)/(i=n[0].billingPeriod,(a=kl(i))?52*a/12:1);return r?pl(n[0].priceCurrencyCode).format(t?Math.round(r):r):null},Bl=(e,t)=>{var n=Hl(e,t);return(null==n?void 0:n.formattedPrice)||null},zl=(e,t,n,i,a,r)=>{var o=Hl(e,t);return fl((null==o?void 0:o.billingPeriod)||null,n,i,a,r)},Ul=(e,t,n)=>{var i=Hl(e,t);if(i){var a=Sl(i.priceAmountMicros),r=kl(i.billingPeriod),o=n?Math.round(a/r):a/r;return pl(i.priceCurrencyCode).format(o)}},Hl=(e,t)=>{return e?(t?(n=e.offers[parseInt(t)])||(n=e.offers.find(e=>e.offer_ref_id===t)||null):n=e.offers[0],ml(n,e.subscription_period)):null;var n},Gl=e=>{var t=ll(e);return t?"P7D"===t?"P1W":t:null};function Vl(e,t,n,i){var a=n.flatMap(e=>e.products).find(e=>e.id===t.selectedProducts[t.currentGroupId]);return Xl(Jl(e,null==a?void 0:a.sku_ref_id),a,i)}function Kl(e,t,n){var i,a,r=null!==(i=null===(a=t.find(e=>e.id===n))||void 0===a?void 0:a.products)&&void 0!==i?i:[];return r.forEach(t=>{t.product_details=Jl(e,t.sku_ref_id||""),t.variables=Xl(t.product_details,t,r)}),r}function Xl(e,t,n){if(!t)return{};var i=t.variables;if(!i)return m({},t);Object.keys(i).forEach(t=>{if("string"==typeof(r=i[t])&&r.includes(ni)){var a=Yl(i[t],e,n);i[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(a)}var r});var a={};return Object.keys(Pl({})).forEach(t=>{if(void 0===i[t]){var r=Tl(t,e,void 0,n);null!==r&&(a[t]=r)}}),m({},t,a,i)}var Yl=(e,t,n)=>e.replace(Qn,(i,a)=>{var r,o,s,u,l=(null===(r=Qn.exec(e))||void 0===r?void 0:r.slice(1))||[];a=null!==(o=l[0])&&void 0!==o?o:a;var d=null!==(s=null===(u=l[1])||void 0===u?void 0:u.replace(":",""))&&void 0!==s?s:"";return Tl(a,t,d,n)});function ql(e,t){return t.flatMap(e=>e.products).some(t=>1==Tl("freeTrialEligible",Jl(e,t.sku_ref_id)))}function Jl(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Ql=function(){try{var e=Wi(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Zl=Object.prototype.hasOwnProperty;function ed(e,t,n){var i=e[t];Zl.call(e,t)&&di(i,n)&&(void 0!==n||t in e)||function(e,t,n){"__proto__"==t&&Ql?Ql(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}(e,t,n)}var td="object"==typeof e&&e&&!e.nodeType&&e,nd=td&&"object"==typeof module&&module&&!module.nodeType&&module,id=nd&&nd.exports===td?pi.Buffer:void 0;id&&id.allocUnsafe;var ad=Ia(Object.getPrototypeOf,Object),rd=Object.prototype.hasOwnProperty;function od(e){var t=new e.constructor(e.byteLength);return new Qi(t).set(new Qi(e)),t}var sd=/\w*$/;var ud=gi?gi.prototype:void 0,ld=ud?ud.valueOf:void 0;function dd(e,t,n){var i,a,r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return od(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return r=od((a=e).buffer),new a.constructor(r,a.byteOffset,a.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e){var t=od(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}(e);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,sd.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return i=e,ld?Object(ld.call(i)):{}}}var cd=Object.create,hd=function(){function e(){}return function(t){if(!Ti(t))return{};if(cd)return cd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var md=Ta&&Ta.isMap,fd=md?ka(md):function(e){return sa(e)&&"[object Map]"==Qa(e)};var vd=Ta&&Ta.isSet,pd=vd?ka(vd):function(e){return sa(e)&&"[object Set]"==Qa(e)},gd="[object Arguments]",yd="[object Function]",bd="[object Object]",wd={};function kd(e,t,n,i,a,r){var o;if(void 0!==o)return o;if(!Ti(e))return e;var s=ia(e);if(s)o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&rd.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e);else{var u=Qa(e),l=u==yd||"[object GeneratorFunction]"==u;if(pa(e))return e.slice();if(u==bd||u==gd||l&&!a)o=l?{}:function(e){return"function"!=typeof e.constructor||Ca(e)?{}:hd(ad(e))}(e);else{if(!wd[u])return a?e:{};o=dd(e,u)}}r||(r=new Ki);var d=r.get(e);if(d)return d;r.set(e,o),pd(e)?e.forEach(function(i){o.add(kd(i,t,n,i,e,r))}):fd(e)&&e.forEach(function(i,a){o.set(a,kd(i,t,n,a,e,r))});var c=s?void 0:Oa(e);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(c||e,function(i,a){c&&(i=e[a=i]),ed(o,a,kd(i,t,n,a,e,r))}),o}wd[gd]=wd["[object Array]"]=wd["[object ArrayBuffer]"]=wd["[object DataView]"]=wd["[object Boolean]"]=wd["[object Date]"]=wd["[object Float32Array]"]=wd["[object Float64Array]"]=wd["[object Int8Array]"]=wd["[object Int16Array]"]=wd["[object Int32Array]"]=wd["[object Map]"]=wd["[object Number]"]=wd[bd]=wd["[object RegExp]"]=wd["[object Set]"]=wd["[object String]"]=wd["[object Symbol]"]=wd["[object Uint8Array]"]=wd["[object Uint8ClampedArray]"]=wd["[object Uint16Array]"]=wd["[object Uint32Array]"]=!0,wd["[object Error]"]=wd[yd]=wd["[object WeakMap]"]=!1;var Sd=e=>"object"==typeof e&&null!==e&&"handleEvent"in e,Ed=(e,t,n)=>{var i=Object.getOwnPropertyDescriptor(e,t);if(!i||i.configurable)try{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n,writable:!1})}catch(i){try{e[t]=n}catch(e){}}},Pd=function(){return c(function e(){o(this,e),this.listeners=new Map},[{key:"addEventListener",value:function(e,t,n){var i;if(t){var a=(e=>"boolean"==typeof e?{capture:e}:null!=e?e:{})(n),r=null!==(i=this.listeners.get(e))&&void 0!==i?i:[];if(!r.some(e=>e.listener===t)){var o={listener:t,once:Boolean(a.once)};if(a.signal){if(a.signal.aborted)return;o.signal=a.signal,o.abortHandler=()=>this.removeEventListener(e,t),a.signal.addEventListener("abort",o.abortHandler,{once:!0})}r.push(o),this.listeners.set(e,r)}}}},{key:"removeEventListener",value:function(e,t){if(t){var n=this.listeners.get(e);if(n&&0!==n.length){for(var i=n.length-1;i>=0;i-=1){var a=n[i];a.listener===t&&(a.signal&&a.abortHandler&&a.signal.removeEventListener("abort",a.abortHandler),n.splice(i,1))}0===n.length&&this.listeners.delete(e)}}}},{key:"dispatchEvent",value:function(e){var t,n;if(!e||"string"!=typeof e.type)throw new TypeError('Failed to execute "dispatchEvent": event type must be a string.');var i=this.listeners.get(e.type);if(!i||0===i.length)return!0;Ed(e,"target",this);var a=!1,r=null===(t=e.stopImmediatePropagation)||void 0===t?void 0:t.bind(e),o=null===(n=e.stopPropagation)||void 0===n?void 0:n.bind(e),s=()=>{a=!0,null==r||r()},u=()=>{e.cancelBubble=!0,null==o||o()};e.stopImmediatePropagation=s,e.stopPropagation=u;for(var l,d=h(i.slice());!(l=d()).done;){var c=l.value;if(a)break;Ed(e,"currentTarget",this),"function"==typeof c.listener?c.listener.call(this,e):Sd(c.listener)&&c.listener.handleEvent.call(c.listener,e),c.once&&this.removeEventListener(e.type,c.listener)}if(r)e.stopImmediatePropagation=r;else try{delete e.stopImmediatePropagation}catch(t){e.stopImmediatePropagation=s}if(o)e.stopPropagation=o;else try{delete e.stopPropagation}catch(t){e.stopPropagation=u}return Ed(e,"currentTarget",null),!e.defaultPrevented}}])}(),Td=[];var Md={paywallId:"",livePaywalls:[],selectedPaywall:void 0,selectedCampaign:void 0,campaignRules:[],anySkuHasTrialOffer:!1,anySkuHasIntroOffer:!1,anySkuHasPromoOffer:!1,isLoggedIn:!1,darkMode:!1,safeAreaTop:0,groups:[],selectedProducts:{},formStates:{},timerStates:{},currentPage:"page1",pageHistory:["page1"],currentGroupId:"",currentGroupName:"",fullScreenPresentation:!1,launch:{productGroups:[],customAttributes:{},customObject:{},currentGroup:""},sku:{},orientation:"portrait",focusedState:!1,platformId:"",mediaList:{},skuItems:[],customer:{},hasNotch:!1,purchaseInProgress:!1,formFactor:"desktop",slides:{},userInteractionEnabled:!0,currentSlideIndex:void 0},_d=function(t){function n(e,t,i){var a;o(this,n),(a=r(this,n)).subscribers=new Set,a.productDetails=Td,a.filteredSkuMenus=[],a.state=kd(Md,5);var s=Fr.getNamiProfile();return a.state.isLoggedIn=!(null==s||!s.externalId),a.setPaywall(e,t,i),a.subscribers=new Set,a}return p(n,t),c(n,[{key:"onStateChanged",value:function(){}},{key:"subscribe",value:function(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}},{key:"unsubscribe",value:function(e){this.subscribers.delete(e)}},{key:"emitEvent",value:function(e,t){this.dispatchEvent(function(e,t){if("function"==typeof Event){var n=new Event(e);return Object.defineProperty(n,"detail",{configurable:!0,enumerable:!1,value:t,writable:!1}),n}return{type:e,detail:t,bubbles:!1,cancelBubble:!1,cancelable:!1,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!1,returnValue:!0,srcElement:null,target:null,timeStamp:Date.now(),NONE:0,CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3,composedPath:()=>[],initEvent:()=>{},preventDefault:()=>{},stopImmediatePropagation:()=>{},stopPropagation:()=>{}}}(e,t))}},{key:"onEvent",value:function(e,t){var n=e=>t(e.detail);return this.addEventListener(e,n),()=>this.removeEventListener(e,n)}},{key:"setState",value:function(e){this.state=e,this.subscribers.forEach(e=>e()),this.onStateChanged()}},{key:"setProductDetails",value:function(e){this.productDetails=e}},{key:"getProductDetails",value:function(){return this.productDetails}},{key:"setCurrentGroupData",value:function(e,t){var n=Vl(this.productDetails,this.state,this.filteredSkuMenus,Kl(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(m({},this.state,{currentGroupId:e,currentGroupName:t,sku:n}))}},{key:"setFormState",value:function(e,t){this.setState(m({},this.state,{formStates:m({},this.state.formStates,{[e]:t})}))}},{key:"setTimerState",value:function(e,t,n,i){this.setState(m({},this.state,{timerStates:m({},this.state.timerStates,{[e]:{remainingSeconds:t,savedAt:n,hasEmittedCompletion:i}})}))}},{key:"getTimerState",value:function(e){return this.state.timerStates[e]}},{key:"getCurrentGroupId",value:function(){return this.state.currentGroupId}},{key:"getCurrentGroupName",value:function(){return this.state.currentGroupName}},{key:"setCurrentFormId",value:function(e,t){var n=this.state.formStates||{},i=m({},n,{[e]:t||!n[e]});this.setState(m({},this.state,{formStates:i}))}},{key:"getCurrentFormId",value:function(e){return this.state.formStates[e]}},{key:"setSelectedProducts",value:function(e){var t=Vl(this.productDetails,this.state,this.filteredSkuMenus,Kl(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(m({},this.state,{selectedProducts:e,sku:t}))}},{key:"selectedProducts",value:function(){return this.state.selectedProducts}},{key:"setPaywall",value:function(e,t,n){var i,a,r,o,s,u=m({},this.state,{formFactor:ou(),selectedPaywall:e,selectedCampaign:n}),l=function(e,t,n=[]){var i,a,r=null!==(i=t.productGroups)&&void 0!==i&&i.length?t.productGroups:n.map(e=>e.ref);return{customAttributes:t.customAttributes,productGroups:r,customObject:m({},e.customObject,t.customObject),currentGroup:null!==(a=t.currentGroup)&&void 0!==a?a:""}}((u=m({},u,null===(i=e.template)||void 0===i?void 0:i.initialState)).launch,t,e.sku_menus);(this.filteredSkuMenus=null!==(a=e.sku_menus)&&void 0!==a?a:[],l.productGroups.length&&(this.filteredSkuMenus=this.filteredSkuMenus.filter(e=>l.productGroups.includes(e.ref))),""!==l.currentGroup&&u.groups.length&&null!==(r=e.template)&&void 0!==r&&r.displaySingleGroup)&&(u.currentGroupId=null!==(o=null===(s=u.groups.find(e=>e.ref==l.currentGroup))||void 0===s?void 0:s.id)&&void 0!==o?o:"");if(""===u.currentGroupId&&1===this.filteredSkuMenus.length){var d,c=u.groups.find(e=>e.ref==this.filteredSkuMenus[0].ref);u.currentGroupId=null!==(d=null==c?void 0:c.id)&&void 0!==d?d:u.currentGroupId}var h=Kl(this.productDetails,this.filteredSkuMenus,u.currentGroupId);u.skuItems=h,u.launch=l,u.anySkuHasTrialOffer=ql(this.productDetails,this.filteredSkuMenus),u.anySkuHasPromoOffer=function(e,t){return!ql(e,t)&&t.flatMap(e=>e.products).some(t=>1==Tl("promoEligible",Jl(e,t.sku_ref_id)))}(this.productDetails,this.filteredSkuMenus),u.paywallId=e.id,u.sku=Vl(this.productDetails,u,this.filteredSkuMenus,h),u.pageHistory=[u.currentPage],this.setState(u)}},{key:"getSelectedPaywall",value:function(){return this.state.selectedPaywall}},{key:"getSelectedCampaign",value:function(){return this.state.selectedCampaign}},{key:"getCurrentPlacementLabel",value:function(){var e,t;return null!==(e=this.state.selectedCampaign)&&void 0!==e&&e.value?this.state.selectedCampaign.value:null!==(t=this.flow)&&void 0!==t&&null!==(t=t.campaign)&&void 0!==t&&t.value?this.flow.campaign.value:void 0}},{key:"getPaywallActionEventData",value:function(){var t,n,i,a,r,o,s,u,l,d=this.state.selectedCampaign,c=this.state.selectedPaywall;return{paywallId:null!==(t=null==c?void 0:c.id)&&void 0!==t?t:"",paywallName:null!==(n=null==c?void 0:c.name)&&void 0!==n?n:"",campaignId:null!==(i=null==d?void 0:d.rule)&&void 0!==i?i:"",campaignName:null!==(a=null==d?void 0:d.name)&&void 0!==a?a:"",campaignType:null!==(r=null==d?void 0:d.type)&&void 0!==r?r:"",campaignLabel:null!==(o=null==d?void 0:d.value)&&void 0!==o?o:"",campaignUrl:(null==d?void 0:d.type)===e.NamiCampaignRuleType.URL&&null!==(s=null==d?void 0:d.value)&&void 0!==s?s:"",segmentId:null!==(u=null==d?void 0:d.segment)&&void 0!==u?u:"",externalSegmentId:null!==(l=null==d?void 0:d.external_segment)&&void 0!==l?l:""}}},{key:"paywallId",value:function(){return this.state.paywallId}},{key:"setCurrentPage",value:function(e){if(e&&e!==this.state.currentPage){var t=this.state.pageHistory&&this.state.pageHistory.length?this.state.pageHistory:[this.state.currentPage];this.setState(m({},this.state,{currentPage:e,pageHistory:[...t,e]}))}}},{key:"canGoBackPage",value:function(){var e,t;return(null!==(e=null===(t=this.state.pageHistory)||void 0===t?void 0:t.length)&&void 0!==e?e:0)>1}},{key:"goBackPage",value:function(){var e=this.state.pageHistory&&this.state.pageHistory.length?[...this.state.pageHistory]:[this.state.currentPage];if(e.length<=1)return!1;e.pop();var t=e[e.length-1];return!!t&&(this.setState(m({},this.state,{currentPage:t,pageHistory:e})),!0)}},{key:"setCustomerAttribute",value:function(e){this.setState(m({},this.state,{customer:m({},this.state.customer,e)}))}},{key:"removeCustomerAttribute",value:function(e){var t=m({},this.state.customer);delete t[e],this.setState(m({},this.state,{customer:t}))}},{key:"setIsLoggedIn",value:function(e){this.setState(m({},this.state,{isLoggedIn:e}))}},{key:"setMediaList",value:function(e){this.setState(m({},this.state,{mediaList:e.reduce((e,t)=>m({},e,{[t.name]:t}))}))}},{key:"setSafeAreaTop",value:function(e){this.setState(m({},this.state,{safeAreaTop:e}))}},{key:"setFullScreenPresentation",value:function(e){this.setState(m({},this.state,{fullScreenPresentation:e}))}},{key:"setFormFactor",value:function(e){this.setState(m({},this.state,{formFactor:e}))}},{key:"getFormFactor",value:function(){return this.state.formFactor}},{key:"setPurchaseInProgress",value:function(e){this.setState(m({},this.state,{purchaseInProgress:e}))}},{key:"setPurchase",value:function(e,t){this.setState(m({},this.state,{purchaseInProgress:e,productBeingPurchased:t}))}},{key:"setTimeSpentOnPaywall",value:function(e){this.setState(m({},this.state,{timeSpentOnPaywall:e}))}},{key:"setAppSuppliedVideoDetails",value:function({url:e,name:t}){this.setState(m({},this.state,{appSuppliedVideoUrl:e,appSuppliedVideoName:t}))}},{key:"resetAppSuppliedVideoDetails",value:function(){var e=m({},this.state);delete e.appSuppliedVideoUrl,delete e.appSuppliedVideoName,this.setState(e)}},{key:"setLaunchDetails",value:function(e,t){this.setState(m({},this.state,{launchValue:e,launchType:t}))}},{key:"setOpenHeaderIds",value:function(e,t){e=null!=t&&t.skuId?`${e}_${t.skuId}`:e;var n=[...this.state.openHeaderIds],i=n.indexOf(e);-1!==i?n.splice(i,1):n.push(e),this.setState(m({},this.state,{openHeaderIds:n,currentCollapsibleSku:null!=t?t:null}))}},{key:"getCurrentCollapsibleSku",value:function(){return this.state.currentCollapsibleSku}},{key:"setFlow",value:function(e){this.flow=e}},{key:"setUserInteractionEnabled",value:function(e){this.setState(m({},this.state,{userInteractionEnabled:e})),this.emitEvent("user-interaction-changed",{enabled:e})}},{key:"setUserTags",value:function(e){this.setState(m({},this.state,{userTags:m({},this.state.userTags,e)}))}},{key:"setCurrentSlideIndex",value:function(e){this.setState(m({},this.state,{currentSlideIndex:e}))}}],[{key:"create",value:function(e,t,i){var a=new n(e,t,i);return this.providers.push(a),a}},{key:"remove",value:function(e){this.providers=this.providers.filter(t=>t!==e)}},{key:"reset",value:function(){this.providers=[]}},{key:"currentProvider",get:function(){return n.providers[0]}},{key:"setCustomerAttribute",value:function(e){this.providers.forEach(t=>{t.setCustomerAttribute(e)})}},{key:"removeCustomerAttribute",value:function(e){this.providers.forEach(t=>{t.removeCustomerAttribute(e)})}},{key:"setAppSuppliedVideoDetails",value:function(e){this.providers.forEach(t=>{t.setAppSuppliedVideoDetails(e)})}},{key:"getSelectedPaywall",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.getSelectedPaywall()}},{key:"setUserInteractionEnabled",value:function(e){this.providers.forEach(t=>{t.setUserInteractionEnabled(e)})}},{key:"setUserTags",value:function(e){this.providers.forEach(t=>{t.setUserTags(e)})}},{key:"setProductDetails",value:function(e){this.providers.forEach(t=>{t.setProductDetails(e)}),Td=e}},{key:"setPurchaseInProgress",value:function(e){this.providers.forEach(t=>{t.setPurchaseInProgress(e)})}},{key:"setIsLoggedIn",value:function(e){this.providers.forEach(t=>{t.setIsLoggedIn(e)})}},{key:"setPurchase",value:function(e,t){this.providers.forEach(n=>{n.setPurchase(e,t)})}},{key:"getSelectedSlideIndex",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.state.currentSlideIndex}}])}(Pd);_d.providers=[];var Ad=c(function e(){o(this,e),this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}});Ad.instance=new Ad;var Dd=()=>Lr(li([...Fr.getNamiEntitlements(pt),...Fr.getNamiEntitlements(Mt)]),"referenceId"),xd=()=>{Ou.getInstance().emit(Xn,Dd())};function Cd(e){return{id:e.id,skuId:e.sku_ref_id,name:e.name,type:e.sku_type||"unknown",entitlements:e.entitlements,productDetails:"product_details"in e?e.product_details:null}}var Id=function(){return c(function e(){o(this,e)},[{key:"fetchActiveEntitlements",value:function(){var e,t,n;return k(function(i){for(;;)switch(i.n){case 0:if(e=null,il()||Ds(Pe.THIRD_PARTY_TRANSACTIONS)||!Ds(Pe.ENTITLEMENT_MANAGEMENT)){i.n=3;break}if(null==(t=Fr.getDevice())||!t.id){i.n=2;break}return i.n=1,a(this.getAPIEntitlements(t.id));case 1:n=i.v,(e=null==n?void 0:n.results)&&(Fr.setActiveEntitlements(ft,e),this.invokeActiveEntitlementsHandler(e));case 2:i.n=4;break;case 3:il()&&ui.debug("Skipping active entitlements update - anonymous mode"),Ds(Pe.THIRD_PARTY_TRANSACTIONS)&&ui.debug("Skipping active entitlements update - paywalls-only mode"),Ds(Pe.ENTITLEMENT_MANAGEMENT)||ui.debug("Skipping active entitlements update - no entitlement_management capability");case 4:return i.a(2,e)}},null,this,null,Promise)}},{key:"getAPIEntitlements",value:function(e){var t,n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:return t=`device/${e}/active_entitlements/`,n={},r.p=1,r.n=2,a(js.instance.fetchAPI(t));case 2:n=r.v,r.n=4;break;case 3:throw r.p=3,i=r.v,ui.error(Zr(i.status,t)),i;case 4:return r.a(2,n)}},null,null,[[1,3]],Promise)}},{key:"invokeActiveEntitlementsHandler",value:function(e){Cs()&&(e=>{Fr.setNamiEntitlements(pt,e);var t=Fr.getNamiEntitlements(Mt),n=new Set(e.map(e=>e.referenceId)),i=t.filter(e=>{var t=n.has(e.referenceId);return t&&ui.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t});i.length!==t.length&&Fr.setNamiEntitlements(Mt,i),xd()})(e.map(e=>(e=>{var t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:Ad.instance.refIdToRelatedSKUs[t]||[],activePurchases:Ad.instance.refIdToActivePurchases[t]||[],purchasedSkus:Ad.instance.refIdToPurchasedSKUs[t]||[],expires:e.expires?new Date(e.expires).valueOf():0}})(e)))}}])}();Id.instance=new Id;var Ld=function(){return c(function e(){o(this,e)},[{key:"fetchCustomerJourneyState",value:function(){var e,t,n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:if(!il()){r.n=1;break}return ui.debug("Skipping customer journey state update - anonymous mode"),r.a(2,null);case 1:if(null!=(e=Fr.getDevice())&&e.id){r.n=2;break}return r.a(2,null);case 2:return t=`device/${e.id}/profile/`,n=null,r.p=3,r.n=4,a(js.instance.fetchAPI(t,void 0,0));case 4:n=r.v,r.n=6;break;case 5:throw r.p=5,i=r.v,ui.error(Zr(i.status,t)),i;case 6:if(!n){r.n=7;break}return Fr.setCustomerJourneyState(n.customer_journey_state),r.a(2,n.customer_journey_state);case 7:return r.a(2,null)}},null,null,[[3,5]],Promise)}}])}();Ld.instance=new Ld;var Rd="[NamiStartup]",Fd=function(){return c(function e(){o(this,e),this.enabled=!1,this.t0=0,this.lastMark=0,this.decodeDuration=0,this.processDuration=0,this.placements=0,this.firstLaunchLogged=!1},[{key:"start",value:function(){var e,t,n;this.enabled=(n=null===(e=Fr.getNamiConfig())||void 0===e?void 0:e.namiCommands,null!==(t=null==n?void 0:n.includes(wn))&&void 0!==t&&t),this.enabled&&(this.t0=Date.now(),this.lastMark=this.t0,this.decodeDuration=0,this.processDuration=0,this.placements=0,this.firstLaunchLogged=!1)}},{key:"mark",value:function(e,t){if(this.enabled){var n=Date.now(),i=n-this.lastMark;this.lastMark=n,"initial_config_decoded"===e?this.decodeDuration=i:"initial_processed"===e&&(this.processDuration=i,void 0!==(null==t?void 0:t.count)&&(this.placements=t.count));var a=t?" "+Object.entries(t).map(([e,t])=>`${e}=${t}`).join(" "):"";if("ready"===e){var r=n-this.t0;ui.info(`${Rd} phase=${e} ms=${i} total_to_ready=${r}${a}`),ui.info(`${Rd} SUMMARY total_to_ready=${r} decode=${this.decodeDuration} process=${this.processDuration} placements=${this.placements}`)}else ui.info(`${Rd} phase=${e} ms=${i}${a}`)}}},{key:"firstLaunchLookup",value:function(e,t){if(!this.enabled||this.firstLaunchLogged)return t();this.firstLaunchLogged=!0;var n=Date.now(),i=t(),a=Date.now()-n;return ui.info(`${Rd} phase=first_launch_lookup ms=${a} label=${e}`),i}},{key:"serverFetch",value:function(e){var t,n,i;return k(function(r){for(;;)switch(r.n){case 0:if(this.enabled){r.n=1;break}return r.a(2,e());case 1:return t=Date.now(),r.n=2,a(e());case 2:return n=r.v,i=Date.now()-t,ui.info(`${Rd} phase=server_fetch ms=${i} campaigns=${n.length}`),r.a(2,n)}},null,this,null,Promise)}}])}(),Od=new Fd,Nd=function(){return c(function e(){o(this,e),this.inMemoryAnonymousMode=!1,tl=this},[{key:"setInMemoryAnonymousMode",value:function(e){this.inMemoryAnonymousMode=e,ui.info(`In-memory anonymous mode ${e?"enabled":"disabled"} due to failed device registration`)}},{key:"isInMemoryAnonymousMode",value:function(){return this.inMemoryAnonymousMode}},{key:"isAnonymousMode",value:function(){return Fr.getAnonymousMode()||this.inMemoryAnonymousMode}},{key:"init",value:function(e){return k(function(t){for(;;)switch(t.n){case 0:return this.setInitialValues(e),el.instance.fetchConfig(),t.n=1,a(this.initAndFetchRequiredData(e));case 1:al.instance.startSession();case 2:return t.a(2)}},null,this,null,Promise)}},{key:"setInitialValues",value:function(e){var t=m({},e);delete t.initialConfig,Fr.clearSessionId(),Fr.setNamiConfig(t),Fr.setLanguageCode(e.namiLanguageCode),Fr.setPurchaseChannel(e.purchaseChannel);var n=e.initialConfig;if(n.appConfig||n.platform_config){var i=(null==n?void 0:n.appConfig)||(null==n?void 0:n.platform_config);i&&Fr.setAppConfig(yt,i)}null!=n&&n.paywalls&&Fr.setPaywalls(St,n.paywalls),null!=n&&n.products&&Fr.setProducts(Pt,n.products)}},{key:"initAnonymousDevice",value:function(){return{deviceId:Wu.instance.getOrCreateAnonymousUUID(),deviceTask:null}}},{key:"initIdentifiedDevice",value:function(e){var t=m({},ru(e.namiCommands),e.formFactor?{form_factor:e.formFactor}:{}),n=function(e){if(e){var t=e.find(e=>e.startsWith("splitPosition="));if(t){var n=t.split("=")[1],i=Number(n);return n&&!isNaN(i)?du(i):void 0}}}(e.namiCommands),i=Wu.instance.createOrUpdateDevice(t,n,this);return{deviceId:i.id,deviceTask:i.device}}},{key:"initAndFetchRequiredData",value:function(e,t=0,n=1){var i,r,o,s,u,l,d,c,h,m,f,v;return k(function(p){for(;;)switch(p.n){case 0:if(s=e.initialConfig,u=null!==(i=e.formFactor)&&void 0!==i?i:ou(),l=this.isAnonymousMode(),d=l?this.initAnonymousDevice():this.initIdentifiedDevice(e),c=d.deviceId,h=d.deviceTask,m=uu(c),s.campaign_rules&&(f=pu(s.campaign_rules,m,u),Fr.setCampaignRules(wt,f),Od.mark("initial_processed",{count:f.length})),!h){p.n=1;break}return p.n=1,a(h);case 1:if(Nu.instance.configure(u,m,e.namiCommands),xs(),v=Promise.all([ju.instance.fetchProducts(),Ld.instance.fetchCustomerJourneyState(),Id.instance.fetchActiveEntitlements(),Od.serverFetch(()=>this.fetchCampaignsAndPaywalls())]).catch(i=>{var r;return k(function(o){for(;;)switch(o.n){case 0:if(!(i instanceof $r)){o.n=3;break}if(Fr.resetDevice(),!(t<n)){o.n=2;break}return r=100*Math.pow(2,t),o.n=1,a(new Promise(e=>setTimeout(e,r)));case 1:return o.a(2,this.initAndFetchRequiredData(e,t+1,n));case 2:if(l){o.n=3;break}return ui.warn(`Max retries reached for ConflictError. ${i.message}`),this.setInMemoryAnonymousMode(!0),o.a(2,this.initAndFetchRequiredData(e,0,n));case 3:throw i;case 4:return o.a(2)}},null,this,null,Promise)}),null!==(r=s.campaign_rules)&&void 0!==r&&r.length&&null!==(o=s.paywalls)&&void 0!==o&&o.length){p.n=2;break}return p.n=2,a(v);case 2:v.then(()=>this.reRenderPaywall());case 3:return p.a(2)}},null,this,null,Promise)}},{key:"fetchCampaignsAndPaywalls",value:function(){var e,t,n,i,r,o,s,u,l,d,c,h,m,f;return k(function(v){for(;;)switch(v.n){case 0:return e=Nu.instance,t=Zu.instance,n=Date.now(),i=Date.now(),v.n=1,a(e.fetchCampaignRulesRaw());case 1:return r=v.v,o=Date.now()-i,v.n=2,a(Promise.all(r.filter(e=>{var t;return(null===(t=e.flow)||void 0===t?void 0:t.url)&&!e.flow.object}).map(e=>{var t,n;return k(function(i){for(;;)switch(i.p=i.n){case 0:return i.p=0,i.n=1,a(fetch(e.flow.url,{cache:"no-cache"}));case 1:if(!(t=i.v).ok){i.n=3;break}return i.n=2,a(t.json());case 2:e.flow.object=i.v,i.n=4;break;case 3:ui.warn(`Failed to fetch flow object from ${e.flow.url}: ${t.status}`);case 4:i.n=6;break;case 5:i.p=5,n=i.v,ui.warn(`Error fetching flow object from ${e.flow.url}: ${n}`);case 6:return i.a(2)}},null,null,[[0,5]],Promise)})));case 2:if(s=!e.useLegacyPaywallFetch&&Nu.hasPaywallUrls(r),l=0,d=Date.now(),!s){v.n=4;break}return c=Nu.extractPaywallUrls(r),v.n=3,a(t.fetchPaywallsByUrls(c));case 3:h=v.v,u=h.paywalls,l=h.retryCount,v.n=6;break;case 4:return v.n=5,a(t.fetchPaywalls());case 5:u=v.v;case 6:return m=Date.now()-d,f=Date.now()-n,ui.info(`Paywall fetch telemetry: strategy=${s?"individual":"bulk"}, count=${u.length}, total=${f}ms, campaigns=${o}ms, paywalls=${m}ms`+(s?`, retry_count=${l}`:"")),v.a(2,e.finalizeCampaignRules(r,u))}},null,null,null,Promise)}},{key:"reRenderPaywall",value:function(){we().ui.reRenderPaywall()}}])}();function $d(e){return Array.isArray(e)?e.map($d):e&&"object"==typeof e?Object.entries(e).reduce((e,[t,n])=>(void 0!==n&&(e[t]=$d(n)),e),{}):e}function Wd(e,t){return $u($d(e),$d(t))}Nd.instance=new Nd;var jd,Bd=function(){return c(function e(){o(this,e),this.load()},[{key:"setExternalId",value:function(e){return this.externalId=e,this}},{key:"getExternalId",value:function(){return this.externalId}},{key:"isLoggedIn",value:function(){return!!this.externalId}},{key:"save",value:function(){return this.externalId?Fr.setNamiProfile({externalId:this.externalId}):Fr.removeNamiProfile(),this}},{key:"load",value:function(){var e=Fr.getNamiProfile();e&&(this.externalId=e.externalId),_d.setIsLoggedIn(!!this.externalId)}},{key:"loginLocal",value:function(e){this.setExternalId(e).save(),_d.setIsLoggedIn(!0)}},{key:"loginRemote",value:function(e){var t;return k(function(n){for(;;)switch(n.n){case 0:return n.n=1,a(js.instance.login(e));case 1:(t=n.v).external_id&&t.external_id!==this.externalId&&this.setExternalId(t.external_id).save();case 2:return n.a(2)}},null,this,null,Promise)}},{key:"logoutLocal",value:function(){this.setExternalId(void 0).save(),_d.setIsLoggedIn(!1)}},{key:"logoutRemote",value:function(){return k(function(e){for(;;)switch(e.n){case 0:return e.n=1,a(js.instance.logout());case 1:return e.a(2)}},null,null,null,Promise)}},{key:"login",value:function(e){return k(function(t){for(;;)switch(t.n){case 0:return this.loginLocal(e),t.n=1,a(this.loginRemote(e));case 1:return t.a(2)}},null,this,null,Promise)}},{key:"logout",value:function(){return k(function(e){for(;;)switch(e.n){case 0:return this.logoutLocal(),e.n=1,a(this.logoutRemote());case 1:return e.a(2)}},null,this,null,Promise)}}])}();Bd.instance=new Bd;var zd=function(){function e(){o(this,e),jd.set(this,!1),this.maxLogging=!1}return c(e,[{key:"isInitialized",get:function(){return Se(this,jd,"f")||null!=Fr.getNamiConfig()}},{key:"initializeSDK",value:function(t){var n,i,r,o,s,u,l,d,c,h;return k(function(f){for(;;)switch(f.n){case 0:if(o=!1,s=!1,u=Se(this,jd,"f")?Fr.getNamiConfig():null,ui.setLogger(t.logLevel),e.instance.maxLogging=null!==(n=t.maxLogging)&&void 0!==n&&n,null===u){f.n=3;break}if(delete(l=m({},t)).initialConfig,!Wd(l,u)){f.n=1;break}return ui.warn("Nami SDK is already configured, ignoring this configure call."),f.a(2,{sdkInitialized:!0,configureState:zn});case 1:s=!0;case 2:d=As(t.namiCommands),c=As(u.namiCommands),t.appPlatformID==u.appPlatformID&&d==c||(o=!0),t.namiLanguageCode===u.namiLanguageCode&&t.logLevel==u.logLevel||(s=!0);case 3:return o&&(ui.info("SDK full reconfigure called"),Fr.resetDevice()),Ee(this,jd,!0),js.configure(t),f.n=4,a(Nd.instance.init(t));case 4:return ui.info("SDK successfully initialized!"),h=s||o?jn:$n,null===(i=(r=we().ui).postConfigure)||void 0===i||i.call(r),Od.mark("ready"),f.a(2,{sdkInitialized:!0,configureState:h})}},null,this,null,Promise)}}],[{key:"sdkVersion",value:function(){return Ae}},{key:"sdkPackageVersion",value:function(){return xe}},{key:"reset",value:function(){var t,n,i;return k(function(r){for(;;)switch(r.n){case 0:return Fr.clearAll(),nl(),Ee(e.instance,jd,!1),Bd.instance.setExternalId(void 0),_d.reset(),js.reset(),Nu.instance.reset(),r.n=1,a(Promise.resolve().then(function(){return Fc}));case 1:i=r.v,i.NamiFlowManager.reset(),null===(t=(n=we().ui).onReset)||void 0===t||t.call(n);case 2:return r.a(2)}},null,null,null,Promise)}},{key:"configure",value:function(t){return k(function(n){for(;;)switch(n.n){case 0:if(Od.start(),t.appPlatformID){n.n=1;break}throw new jr;case 1:return this.setInitialConfig(t),Od.mark("initial_config_decoded"),n.n=2,a(e.instance.initializeSDK(t));case 2:return n.a(2,n.v)}},null,this,null,Promise)}},{key:"setInitialConfig",value:function(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){ui.warn("[DEPRECATED] NamiConfiguration.initialConfig should be an object");var t=function(e){var t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.parse(t)}catch(e){return}}(e.initialConfig);if(!t)return ui.error("Failed to parse NamiConfiguration.initialConfig"),void(e.initialConfig={});e.initialConfig=t}if("object"!=typeof e.initialConfig)e.initialConfig={};else if((e=>"object"==typeof e&&"initial_config"in e)(e.initialConfig)){var n=Rs(e.initialConfig.initial_config);n?e.initialConfig=n:(e.initialConfig={},ui.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}}])}();jd=new WeakMap,zd.instance=new zd;var Ud,Hd,Gd,Vd=new Set(["fullscreen","sheet","compact_sheet","modal"]);e.NamiPaywallManagerEvents=void 0,(Ud=e.NamiPaywallManagerEvents||(e.NamiPaywallManagerEvents={})).BuySku="RegisterBuySKU",Ud.Close="PaywallCloseRequested",Ud.SignIn="PaywallSignInRequested",Ud.Restore="PaywallRestoreRequested",Ud.DeeplinkAction="PaywallDeeplinkAction",e.NamiPaywallAction=void 0,(Hd=e.NamiPaywallAction||(e.NamiPaywallAction={})).BUY_SKU="BUY_SKU",Hd.SELECT_SKU="SELECT_SKU",Hd.RESTORE_PURCHASES="RESTORE_PURCHASES",Hd.SIGN_IN="SIGN_IN",Hd.CLOSE_PAYWALL="CLOSE_PAYWALL",Hd.SHOW_PAYWALL="SHOW_PAYWALL",Hd.PURCHASE_SELECTED_SKU="PURCHASE_SELECTED_SKU",Hd.PURCHASE_SUCCESS="PURCHASE_SUCCESS",Hd.PURCHASE_FAILED="PURCHASE_FAILED",Hd.PURCHASE_CANCELLED="PURCHASE_CANCELLED",Hd.PURCHASE_PENDING="PURCHASE_PENDING",Hd.PURCHASE_UNKNOWN="PURCHASE_UNKNOWN",Hd.PURCHASE_DEFERRED="PURCHASE_DEFERRED",Hd.DEEPLINK="DEEPLINK",Hd.TOGGLE_CHANGE="TOGGLE_CHANGE",Hd.PAGE_CHANGE="PAGE_CHANGE",Hd.SLIDE_CHANGE="SLIDE_CHANGE",Hd.COLLAPSIBLE_DRAWER_OPEN="COLLAPSIBLE_DRAWER_OPEN",Hd.COLLAPSIBLE_DRAWER_CLOSE="COLLAPSIBLE_DRAWER_CLOSE",Hd.VIDEO_STARTED="VIDEO_STARTED",Hd.VIDEO_PAUSED="VIDEO_PAUSED",Hd.VIDEO_RESUMED="VIDEO_RESUMED",Hd.VIDEO_ENDED="VIDEO_ENDED",Hd.VIDEO_CHANGED="VIDEO_CHANGED",Hd.VIDEO_MUTED="VIDEO_MUTED",Hd.VIDEO_UNMUTED="VIDEO_UNMUTED",Hd.COUNTDOWN_TIMER_COMPLETED="COUNTDOWN_TIMER_COMPLETED",Hd.UNKNOWN="UNKNOWN",e.LaunchCampaignError=void 0,(Gd=e.LaunchCampaignError||(e.LaunchCampaignError={})).DEFAULT_CAMPAIGN_NOT_FOUND="Default campaign not found",Gd.LABELED_CAMPAIGN_NOT_FOUND="Labeled campaign not found",Gd.CAMPAIGN_DATA_NOT_FOUND="Campaign data not found",Gd.PAYWALL_ALREADY_DISPLAYED="Paywall is already being displayed",Gd.SDK_NOT_INITIALIZED="SDK has not been initialized",Gd.PAYWALL_COULD_NOT_DISPLAY="Failed to display paywall",Gd.URL_CAMPAIGN_NOT_FOUND="URL campaign not found",Gd.PRODUCT_DATA_NOT_FOUND="Product data not found",Gd.PRODUCT_GROUPS_NOT_FOUND="Product groups not found",Gd.FLOW_SCREEN_DATA_UNAVILABLE="Flow unavailable due to missing screen data";var Kd,Xd="entry",Yd="screen",qd="branch",Jd="exit",Qd="unknown";!function(e){e.NAVIGATE="flowNav",e.BACK="flowPrev",e.NEXT="flowNext",e.FINISHED="flowDone",e.DISMISS="flowDismiss",e.EXIT="flowExit",e.HANDOFF="flowHandoff",e.TRACK="trackEvent",e.LOG="logEvent",e.SET_VIDEO="setVideo",e.FLOW_EVENT="flowEvent",e.BLOCK_BACK="blockBackToStep",e.FLOW_ENABLED="flowInteractionEnabled",e.FLOW_DISABLED="flowInteractionDisabled",e.SET_TAGS="setTags",e.PAUSE="flowPause",e.RESUME="flowResume",e.SET_LAUNCH_CONTEXT="setLaunchContext"}(Kd||(Kd={}));var Zd="__handoff_sequence__",ec="__buy_sku__",tc="__default__",nc="__appear__",ic="__disappear__",ac="__login_success__",rc="__login_failure__",oc="__logout_success__",sc="__logout_failure__",uc="__purchase_success__",lc="__remoteback__",dc="__tag_update__",cc="and",hc="or",mc="i_contains",fc="equals",vc="i_equals",pc="not_equals",gc="not_i_equals",yc="not_contains",bc="set",wc="notSet",kc=function(){function e(){o(this,e),this.resolvers=new Map,this.namespaceResolvers=new Map}return c(e,[{key:"registerNamespaceResolver",value:function(e,t){this.namespaceResolvers.set(e,t)}},{key:"resetResolvers",value:function(){this.resolvers.clear()}},{key:"evaluate",value:function(e){var t,n=null!==(t=e.filter)&&void 0!==t?t:[];if(0===n.length)return!0;var i=n.map(e=>this.evaluateFilter(e));switch(e.operator){case cc:return i.every(e=>e);case hc:return i.some(e=>e);default:return i.every(e=>e)}}},{key:"evaluateOrdered",value:function(e){var t;if(!e)return!0;var n=null!==(t=e.filter)&&void 0!==t?t:[];if(0===n.length)return!0;switch(e.operator){case cc:for(var i,a=h(n);!(i=a()).done;){var r=i.value;if(!this.evaluateFilter(r))return!1}return!0;case hc:for(var o,s=h(n);!(o=s()).done;){var u=o.value;if(this.evaluateFilter(u))return!0}return!1;default:for(var l,d=h(n);!(l=d()).done;){var c=l.value;if(!this.evaluateFilter(c))return!1}return!0}}},{key:"evaluateFilter",value:function(e){var t=this.resolve(e.identifier);if(zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] resolve(${e.identifier}) → ${JSON.stringify(t)} (type: ${typeof t})`),e.operator===bc)return null!=t;if(e.operator===wc)return null==t;if(null==t)return zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] ${e.identifier} resolved to null — registeredNamespaces: [${[...this.namespaceResolvers.keys()].join(", ")}]`),!![pc,gc,yc].includes(e.operator);switch(e.operator){case mc:return Array.isArray(t)?e.values.some(e=>t.some(t=>0===t.localeCompare(e,void 0,{sensitivity:"accent"}))):(this.log("Resolved value is not an array of strings for i_contains."),!1);case fc:return e.values.some(e=>{if("string"==typeof t)return t===e;if("boolean"==typeof t){var n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for equals comparison: "+typeof t),!1});case vc:return e.values.some(e=>{if("string"==typeof t)return 0===t.localeCompare(e,void 0,{sensitivity:"accent"});if("boolean"==typeof t){var n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for i_equals comparison: "+typeof t),!1});case pc:return e.values.every(e=>"string"!=typeof t||t!==e);case gc:return e.values.every(e=>"string"!=typeof t||0!==t.localeCompare(e,void 0,{sensitivity:"accent"}));case yc:return e.values.every(e=>"string"!=typeof t||!t.includes(e));default:return this.log(`Unsupported operator: ${e.operator}`),!1}}},{key:"resolve",value:function(e){var t=this.resolveRaw(e);if(void 0!==t)return zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] resolve(${e}) — exact hit: ${JSON.stringify(t)}`),t;var n=e.lastIndexOf(".");if(-1===n);else{var i=e.slice(0,n),a=e.slice(n+1),r=this.resolveRaw(i);if(void 0!==r){var o=this.extractProperty(a,r);return zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] resolve(${e}) — fallback: base=${i} → ${typeof r}, extract(.${a}) → ${JSON.stringify(o)}`),o}this.log(`Could not resolve base identifier: ${i}`)}}},{key:"resolveRaw",value:function(e){for(var t,n=[...this.namespaceResolvers.keys()].sort((e,t)=>t.length-e.length),i=h(n);!(t=i()).done;){var a=t.value;if(e.startsWith(a)){var r=this.namespaceResolvers.get(a);if(r){var o=r(e);return zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] resolveRaw(${e}) — ns=${a} → ${JSON.stringify(o)}`),o}}}}},{key:"extractProperty",value:function(e,t){switch(e){case"last":if(Array.isArray(t))return t[t.length-1];break;case"first":if(Array.isArray(t))return t[0];break;case"count":if(Array.isArray(t))return t.length;if(t&&"object"==typeof t)return Object.keys(t).length;break;default:return}this.log(`Could not extract .${e} from type ${typeof t}`)}},{key:"log",value:function(e){ui.debug(`[NamiConditionEvaluator] ${e}`)}}],[{key:"shared",get:function(){return e.instance||(e.instance=new e),e.instance}}])}(),Sc=function(){return c(function e(){o(this,e)},[{key:"register",value:function(){kc.shared.registerNamespaceResolver(this.namespace,e=>{var t=e.replace(new RegExp(`^${this.namespace}\\.`),"");return this.resolveValue(t)})}},{key:"resolveKeyPath",value:function(e,t){for(var n,i=t,a=h(e.replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean));!(n=a()).done;){var r=n.value;if(null==i||"object"!=typeof i)return;i=i[r]}return i}}])}(),Ec=function(e){function t(e){var n;return o(this,t),(n=r(this,t)).namespace="LaunchContext",n.context=e,n.register(),n}return p(t,e),c(t,[{key:"resolveValue",value:function(e){if(e.startsWith("customAttributes.")){var t=e.substring(17);return this.resolveKeyPath(t,this.context.customAttributes)}if(e.startsWith("customObject.")){var n=e.substring(13);return this.resolveKeyPath(n,this.context.customObject)}return this.resolveKeyPath(e,{customAttributes:this.context.customAttributes,customObject:this.context.customObject,productGroups:this.context.productGroups})}}])}(Sc),Pc=function(e){function t(){var e,n,i,a;o(this,t),(a=r(this,t)).namespace="Device";var s=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[1]||"",u=Intl.DateTimeFormat().resolvedOptions().timeZone,l=ru(),d=we().device.getScreenInfo();return a.context={osName:l.os_name,osVersion:l.os_version,appVersion:l.extended_platform_version,sdkVersion:l.sdk_version,deviceModel:l.device_model,screenWidth:Math.round(d.width),screenHeight:Math.round(d.height),formFactor:l.form_factor,tvQuality:a.tvQuality(null!==(e=l.form_factor)&&void 0!==e?e:"desktop",d),tvResolution:a.tvResolution(null!==(n=l.form_factor)&&void 0!==n?n:"desktop",d),screenSize:a.screenSizeTier(null!==(i=l.form_factor)&&void 0!==i?i:"desktop",d),language:l.language,country:s,timezone:u},a.register(),a}return p(t,e),c(t,[{key:"screenSizeTier",value:function(e,t){var n=Math.round(t.width*t.scale),i=Math.round(t.height*t.scale),a=Math.max(n,i);switch(e){case"phone":return a<1136?"tiny":a<1334?"small":a<1920?"medium":a<2560?"large":"huge";case"tablet":return a<2048?"medium":a<2732?"large":"huge";case"television":return a<1920?"medium":a<3840?"large":"huge";case"desktop":return a<1440?"small":a<2560?"medium":a<3840?"large":"huge";default:return"medium"}}},{key:"tvQuality",value:function(e,t){if("television"!==e)return"";var n=Math.round(t.width*t.scale),i=Math.round(t.height*t.scale),a=Math.max(n,i),r=Math.min(n,i);return a>=3840||r>=2160?"4K":a>=1920||r>=1080?"1080p":"720p"}},{key:"tvResolution",value:function(e,t){if("television"!==e)return"";var n=Math.round(t.width*t.scale),i=Math.round(t.height*t.scale),a=Math.max(n,i),r=Math.min(n,i);return r<720&&a<1280?"SD":r>=720&&r<1080&&a>=1280&&a<1920?"720p":r>=1080&&r<1440&&a>=1920&&a<2560?"1080p":r>=1440&&r<2160&&a>=2560&&a<3840?"1440p":r>=2160&&r<3e3&&a>=3840&&a<5e3?"4K":r>=3e3&&a>=5e3?"8K":"Unknown"}},{key:"resolveValue",value:function(e){return this.resolveKeyPath(e,this.context)}}])}(Sc),Tc=[/(^|_)api(_|$)?key/i,/^key$/i,/^token$/i,/id[_-]?token/i,/access[_-]?token/i,/^auth/i,/password/i,/secret/i,/signature/i,/hmac/i,/^jwt$/i,/^code$/i,/redirect[_-]?uri/i,/return[_-]?url/i,/^state$/i,/^session$/i,/^sid$/i,/^sso$/i,/assertion/i],Mc=function(){function e(){o(this,e),this.params={},"undefined"!=typeof window&&this.setSearchParams()}return c(e,[{key:"setSearchParams",value:function(){this.params=this.extractSafeParams()}},{key:"safeValue",value:function(e){if(!e)return null;try{var t=decodeURIComponent(e).trim();return!t||/^null|undefined$/i.test(t)||((e=>e.includes("://")||/^\/.*\?/.test(e))(t)||(e=>/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+$/.test(e))(t)||(e=>/^[A-Za-z0-9_-]{40,}$/.test(e)||/^[A-Fa-f0-9]{40,}$/.test(e)||/^ya29\./.test(e)||/^sk_/.test(e)||/^ghp_/.test(e))(t))?null:((e,t=128)=>e.length>t?e.slice(0,t):e)(t)}catch(e){return null}}},{key:"extractSafeParams",value:function(){var e=window.location,t={},n=new Set;try{for(var i,a=new URLSearchParams(e.search),r=(e,i)=>{var a=(e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[-\s]/g,"_").toLowerCase())(e);if(!(n.size>=10||(e=>Tc.some(t=>t.test(e)))(a))){var r=this.safeValue(i);r&&(t[a]=r,n.add(a))}},o=h(a.entries());!(i=o()).done;){var s=i.value;r(s[0],s[1])}}catch(e){}return t}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"refresh",value:function(){"undefined"!=typeof window&&this.instance.setSearchParams()}}])}();Mc._instance=null;var _c,Ac=()=>Mc.instance.params,Dc=/\{\{\s*([^}]+?)\s*\}\}/g,xc=function(){return c(function e(t){o(this,e),this.flowManager=t,this.urlParams=Ac()},[{key:"resolve",value:function(e){var t,n,i,a,r,o,s,u,l,d,c,h,m=this.flowManager.currentFlow,f=null==m?void 0:m.component;if(e.startsWith("launchContext.")){var v,p=null===(v=this.flowManager.currentFlow)||void 0===v?void 0:v.context;if(p){var g=e.substring(14),y=new Ec(p).resolveValue(g);return null==y?void 0:y.toString()}}else switch(e){case"campaignId":return null==f||null===(t=f.campaign)||void 0===t?void 0:t.rule;case"campaignName":return null==f||null===(n=f.campaign)||void 0===n?void 0:n.name;case"campaignLabel":case"campaignPlacement":return null!==(i=null==f||null===(a=f.campaign)||void 0===a?void 0:a.value)&&void 0!==i?i:void 0;case"campaignSegment":case"campaignSegmentId":return null==f||null===(r=f.campaign)||void 0===r?void 0:r.segment;case"campaignExternalSegment":case"campaignExternalSegmentId":return null!==(o=null==f||null===(s=f.campaign)||void 0===s?void 0:s.external_segment)&&void 0!==o?o:void 0;case"pageName":return null==f||null===(u=f.paywall)||void 0===u?void 0:u.name;case"pageId":return null==f||null===(l=f.paywall)||void 0===l?void 0:l.id;case"flowName":return null==m?void 0:m.name;case"flowId":return null==m?void 0:m.id;case"objectId":return null==f||null===(d=f.campaign)||void 0===d||null===(d=d.flow)||void 0===d?void 0:d.object_id;case"stepName":return null==m||null===(c=m.currentFlowStep)||void 0===c?void 0:c.name;case"buttonText":var b=null==m?void 0:m.currentButton;if(!b)return;var w=b.firstTextValue;if("function"!=typeof w)return;return w.call(b);case"slideNumber":var k=null==f?void 0:f.getSelectedSlideIndexForCurrentCarousel();return null!=k?`${k+1}`:void 0;case"productGroupId":return(null===(h=_d.currentProvider)||void 0===h?void 0:h.state.currentGroupId)||void 0;case"productGroupName":var S,E,P,T=null===(S=_d.currentProvider)||void 0===S?void 0:S.state;return null!==(E=null==T||null===(P=T.groups)||void 0===P||null===(P=P.find(e=>e.id===T.currentGroupId))||void 0===P?void 0:P.displayName)&&void 0!==E?E:void 0;case"productGroupRef":var M,_,A,D=null===(M=_d.currentProvider)||void 0===M?void 0:M.state;return null!==(_=null==D||null===(A=D.groups)||void 0===A||null===(A=A.find(e=>e.id===D.currentGroupId))||void 0===A?void 0:A.ref)&&void 0!==_?_:void 0;default:return}}},{key:"interpolateLiquidVariables",value:function(e){return e.replace(Dc,(e,t)=>{var n,i=null!==(n=this.resolve(t))&&void 0!==n?n:this.urlParams[t];return null!=i?i:""})}},{key:"interpolateDeep",value:function(e){return"string"==typeof e?this.interpolateLiquidVariables(e):Array.isArray(e)?e.map(e=>this.interpolateDeep(e)):e&&"object"==typeof e?Object.entries(e).reduce((e,[t,n])=>m({},e,{[t]:this.interpolateDeep(n)}),{}):e}}])}(),Cc=function(e){function t(){var e;return o(this,t),(e=r(this,t)).namespace="urlParams",e.context=Ac(),e.register(),e}return p(t,e),c(t,[{key:"resolveValue",value:function(e){return ui.debug("[URLParamsResolver]","Resolving keyPath",e),this.resolveKeyPath(e,this.context)}}])}(Sc),Ic=function(e){function t(){var e;return o(this,t),(e=r(this,t)).namespace="state",e.register(),e}return p(t,e),c(t,[{key:"getContextProvider",value:function(){var e=_d.providers;if(0!==e.length){var t=e.find(e=>e.flow);return t||e[e.length-1]}}},{key:"resolveValue",value:function(e){var t=this.getContextProvider();if(t){if(e.startsWith("formStates.")){var n=e.substring(11);return t.getCurrentFormId(n)}return this.resolveKeyPath(e,t.state)}}}])}(Sc),Lc=function(e){function t(e){var n;return o(this,t),(n=r(this,t)).namespace="Placement",n.campaign=e,n.register(),n}return p(t,e),c(t,[{key:"resolveValue",value:function(e){var t;if("label"===e){if(this.campaign&&void 0!==this.campaign.value&&null!==this.campaign.value)return this.campaign.value;var n=_d.providers;if(0!==n.length){var i=n.find(e=>e.flow);return i?i.getCurrentPlacementLabel():null===(t=n[n.length-1])||void 0===t?void 0:t.getCurrentPlacementLabel()}}}}])}(Sc);!function(e){e.LOGIN="login",e.LOGOUT="logout",e.ADVERTISING_ID_SET="advertising_id_set",e.ADVERTISING_ID_CLEARED="advertising_id_cleared",e.VENDOR_ID_SET="vendor_id_set",e.VENDOR_ID_CLEARED="vendor_id_cleared",e.CUSTOMER_DATA_PLATFORM_ID_SET="customer_data_platform_id_set",e.CUSTOMER_DATA_PLATFORM_ID_CLEARED="customer_data_platform_id_cleared",e.ANONYMOUS_MODE_ON="anonymous_mode_on",e.ANONYMOUS_MODE_OFF="anonymous_mode_off",e.NAMI_DEVICE_ID_SET="nami_device_id_set",e.NAMI_DEVICE_ID_CLEARED="nami_device_id_cleared"}(_c||(_c={}));var Rc=function(){function e(){o(this,e),this.flowOpen=!1,this.lastAnimatedFlowProgress=new Map,this.navGraphCache=new WeakMap}return c(e,[{key:"resume",value:function(){e.resume()}},{key:"presentFlow",value:function(e,t,n){var i=new Wc(e,t,this,n);return this.flowOpen=!0,this.currentFlow=i,i}},{key:"finishFlow",value:function(){zd.instance.maxLogging&&ui.debug("[NamiFlowManager] finishFlow() — closing flow"),this.flowOpen=!1,this.currentFlow=void 0,this.lastAnimatedFlowProgress.clear()}},{key:"getLastAnimatedFlowProgress",value:function(e){var t;return null!==(t=this.lastAnimatedFlowProgress.get(e))&&void 0!==t?t:0}},{key:"setLastAnimatedFlowProgress",value:function(e,t){this.currentFlow&&this.lastAnimatedFlowProgress.set(e,t)}},{key:"getCurrentFlowProgress",value:function(e){if(!this.currentFlow)return 1;if(!this.currentFlow.currentFlowStep)return 0;var t=this.currentFlow.steps.filter(e=>e.type===Yd);if(0===t.length)return 0;var n=this.currentFlow.stepcrumbs.filter(e=>e.type===Yd);if(0===n.length)return 0;var i=this.buildNavGraph(this.currentFlow),a=this.currentFlow.currentFlowStep,r=this.findBranchPoint(t,i),o=0;if(r)o=this.calculateBranchingProgress(n,t,a,r,i);else{var s=t.findIndex(e=>e.id===a.id);o=s>=0?(s+1)/t.length:0}return o=Math.max(0,Math.min(1,o)),e&&this.setLastAnimatedFlowProgress(e,o),o}},{key:"findBranchPoint",value:function(e,t){for(var n,i=h(e);!(n=i()).done;){var a=n.value;if(this.hasBranching(a,e,t))return a}return null}},{key:"calculateBranchingProgress",value:function(e,t,n,i,a){var r=e.length,o=t.findIndex(e=>e.id===i.id),s=e.findIndex(e=>e.id===i.id),u=t.findIndex(e=>e.id===n.id);if(-1===s||n.id===i.id)return(u+1)/(o+2);var l=this.countForwardScreens(n,t,a),d=r+l;return ui.debug(`Branching progress: visited=${r}, remaining=${l}, total=${d}, step=${n.id}`),r/d}},{key:"countForwardScreens",value:function(e,t,n){var i=t.findIndex(t=>t.id===e.id);if(-1===i)return 0;var a=new Set,r=0,o=(e,s)=>{if(!a.has(e)){a.add(e);var u=(n.get(e)||[]).filter(e=>{var n=t.findIndex(t=>t.id===e);return n>i});if(0!==u.length)for(var l,d=h(u);!(l=d()).done;){var c=l.value;o(c,s+1)}else r=Math.max(r,s)}};return o(e.id,0),r}},{key:"hasBranching",value:function(e,t,n){var i=t.findIndex(t=>t.id===e.id);if(-1===i)return!1;var a=(n.get(e.id)||[]).filter(e=>{var n=t.findIndex(t=>t.id===e);return n>i});return a.length>1}},{key:"buildNavGraph",value:function(e){var t=this.navGraphCache.get(e);if(t)return t;var n=new Map;e.steps.forEach(e=>{e.actions&&Object.values(e.actions).forEach(t=>{Array.isArray(t)&&t.forEach(t=>{t.action&&t.action.forEach(t=>{if("flowNav"===t.function){var i,a=null===(i=t.parameters)||void 0===i?void 0:i.step;a&&(n.has(e.id)||n.set(e.id,new Set),n.get(e.id).add(a))}})})})});var i=new Map;return n.forEach((e,t)=>{i.set(t,Array.from(e))}),this.navGraphCache.set(e,i),i}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){var e,t,n=null===(e=this.currentFlow)||void 0===e?void 0:e.currentFlowStep;if(!n)return null;var i=null===(t=n.actions)||void 0===t?void 0:t[nc];if(!i)return null;for(var a,r=h(i);!(a=r()).done;)for(var o,s,u=h(null!==(o=a.value.action)&&void 0!==o?o:[]);!(s=u()).done;){var l,d=s.value;if((d.function===Kd.NAVIGATE||d.function===Kd.NEXT)&&null!=(null===(l=d.parameters)||void 0===l?void 0:l.delay)){var c=d.parameters.delay,m=Number(c);if(!isNaN(m)&&m>0)return m/1e3}}return null}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"reset",value:function(){var t=e.instance;t.currentFlow=void 0,t.flowOpen=!1,t.lastAnimatedFlowProgress=new Map,t.navGraphCache=new WeakMap}},{key:"registerStepHandoff",value:function(e){this.instance.handoffStepHandler=e;var t=e;return()=>{this.instance.handoffStepHandler===t&&(this.instance.handoffStepHandler=void 0)}}},{key:"registerEventHandler",value:function(e){this.instance.eventHandler=e;var t=e;return()=>{this.instance.eventHandler===t&&(this.instance.eventHandler=void 0)}}},{key:"resume",value:function(){var t,n,i,a=e.instance,r=a.flowOpen,o=a.currentFlow;zd.instance.maxLogging&&ui.debug(`[NamiFlowManager] resume() — flowOpen=${r}, hasFlow=${!!o}, currentStep=${null!==(t=null==o||null===(n=o.currentFlowStep)||void 0===n?void 0:n.id)&&void 0!==t?t:"none"}, isPaused=${null!==(i=null==o?void 0:o.isPaused)&&void 0!==i?i:"N/A"}`);if(r&&o&&o.currentFlowStep){if(o.activeHandoffSequence)return ui.debug(`Resuming flow at handoff sequence ${o.currentFlowStep.id}`),void o.resumeNextHandoff();ui.debug(`Resuming flow at step ${o.currentFlowStep.id}`),o.executeLifecycle(o.currentFlowStep,"__resume__")}else ui.warn("Cannot resume: no active flow or current step")}},{key:"finish",value:function(){var t=e.instance,n=t.flowOpen,i=t.currentFlow;n&&i&&i.currentFlowStep?(ui.debug(`Finishing flow programmatically at step ${i.currentFlowStep.id}`),i.finished()):ui.debug("Cannot finish: no active flow or current step")}},{key:"pause",value:function(){var t=e.instance,n=t.flowOpen,i=t.currentFlow;n&&i&&i.currentFlowStep?!0===i.resumeFromBookmark?i.pause():ui.warn("This flow cannot be paused"):ui.warn("Cannot pause: no active flow or current step")}},{key:"isFlowOpen",value:function(){return e.instance.flowOpen}},{key:"getLastAnimatedFlowProgress",value:function(e){return this.instance.getLastAnimatedFlowProgress(e)}},{key:"setLastAnimatedFlowProgress",value:function(e,t){this.instance.setLastAnimatedFlowProgress(e,t)}},{key:"getCurrentFlowProgress",value:function(e){return this.instance.getCurrentFlowProgress(e)}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){return this.instance.getCurrentFlowStepAutoAdvanceDelay()}}])}(),Fc=Object.freeze({__proto__:null,NamiFlowManager:Rc}),Oc=()=>{var e,t;return null!==(e=null===(t=Fr.getNamiConfig())||void 0===t||null===(t=t.namiCommands)||void 0===t?void 0:t.includes("disableAsyncLoginLogout"))&&void 0!==e&&e},Nc=function(){return c(function e(){o(this,e),this.emitter=Ou.getInstance(),kc.shared.registerNamespaceResolver("UserTags",t=>{var n=t.replace("UserTags.",""),i=e.getCustomerAttribute(n);if(null!=i){var a=i.toLowerCase();return"true"===a||"false"===a?"true"===a:isNaN(Number(i))?i:parseInt(i,10)}return null})},[{key:"isSDKInitialized",get:function(){return zd.instance.isInitialized}}],[{key:"isLoggedIn",value:function(){return Bd.instance.isLoggedIn()}},{key:"loggedInId",value:function(){return this.instance.isSDKInitialized||ui.debug($e),Bd.instance.getExternalId()}},{key:"login",value:function(e){var t,n,i,r,o,s,u,l,d;return k(function(c){for(;;)switch(c.p=c.n){case 0:if(this.instance.isSDKInitialized){c.n=1;break}throw t=new Wr,this.invokeStateHandler(_c.LOGIN,!1,t),t;case 1:if(!this.inAnonymousMode()){c.n=2;break}throw n=new Kr,this.invokeStateHandler(_c.LOGIN,!1,n),n;case 2:if(Oc()){c.n=3;break}return Bd.instance.loginLocal(e),this.invokeStateHandler(_c.LOGIN,!0),Rc.instance.flowOpen&&(i=Rc.instance.currentFlow,(r=null==i?void 0:i.currentFlowStep)&&(zd.instance.maxLogging&&ui.debug(`[NamiCustomerManager] async login success — triggering __login_success__ on step ${r.id}`),i.executeLifecycle(r,ac))),Bd.instance.loginRemote(e).catch(e=>{ui.error("[NamiCustomerManager] async login API failed",e)}),Id.instance.fetchActiveEntitlements().catch(e=>{ui.error("[NamiCustomerManager] async login entitlement refresh failed",e)}),c.a(2);case 3:return c.p=3,c.n=4,a(Bd.instance.login(e));case 4:return c.n=5,a(Id.instance.fetchActiveEntitlements());case 5:this.invokeStateHandler(_c.LOGIN,!0),Rc.instance.flowOpen&&(o=Rc.instance.currentFlow,(s=null==o?void 0:o.currentFlowStep)&&(zd.instance.maxLogging&&ui.debug(`[NamiCustomerManager] login success — triggering __login_success__ on step ${s.id}`),o.executeLifecycle(s,ac))),c.n=7;break;case 6:throw c.p=6,d=c.v,this.invokeStateHandler(_c.LOGIN,!1,d),Rc.instance.flowOpen&&(u=Rc.instance.currentFlow,(l=null==u?void 0:u.currentFlowStep)&&(zd.instance.maxLogging&&ui.debug(`[NamiCustomerManager] login failure — triggering __login_failure__ on step ${l.id}`),u.executeLifecycle(l,rc))),d;case 7:return c.a(2)}},null,this,[[3,6]],Promise)}},{key:"logout",value:function(){var e,t,n,i,r,o,s,u,l;return k(function(d){for(;;)switch(d.p=d.n){case 0:if(this.instance.isSDKInitialized){d.n=1;break}throw e=new Wr,this.invokeStateHandler(_c.LOGOUT,!1,e),e;case 1:if(!this.inAnonymousMode()){d.n=2;break}throw t=new Kr,this.invokeStateHandler(_c.LOGOUT,!1,t),t;case 2:if(Oc()){d.n=3;break}return Bd.instance.logoutLocal(),this.invokeStateHandler(_c.LOGOUT,!0),Rc.instance.flowOpen&&(n=Rc.instance.currentFlow,(i=null==n?void 0:n.currentFlowStep)&&(zd.instance.maxLogging&&ui.debug(`[NamiCustomerManager] async logout success — triggering __logout_success__ on step ${i.id}`),n.executeLifecycle(i,oc))),Bd.instance.logoutRemote().catch(e=>{ui.error("[NamiCustomerManager] async logout API failed",e)}),Id.instance.fetchActiveEntitlements().catch(e=>{ui.error("[NamiCustomerManager] async logout entitlement refresh failed",e)}),d.a(2);case 3:return d.p=3,d.n=4,a(Bd.instance.logout());case 4:return d.n=5,a(Id.instance.fetchActiveEntitlements());case 5:this.invokeStateHandler(_c.LOGOUT,!0),Rc.instance.flowOpen&&(r=Rc.instance.currentFlow,(o=null==r?void 0:r.currentFlowStep)&&r.executeLifecycle(o,oc)),d.n=7;break;case 6:throw d.p=6,l=d.v,this.invokeStateHandler(_c.LOGOUT,!1,l),Rc.instance.flowOpen&&(s=Rc.instance.currentFlow,(u=null==s?void 0:s.currentFlowStep)&&s.executeLifecycle(u,sc)),l;case 7:return d.a(2)}},null,this,[[3,6]],Promise)}},{key:"setCustomerDataPlatformId",value:function(e){return k(function(t){for(;;)switch(t.n){case 0:return t.n=1,a(this.updateCustomerDataPlatformId(e));case 1:return t.a(2)}},null,this,null,Promise)}},{key:"clearCustomerDataPlatformId",value:function(){return k(function(e){for(;;)switch(e.n){case 0:return e.n=1,a(this.updateCustomerDataPlatformId(null));case 1:return e.a(2)}},null,this,null,Promise)}},{key:"registerAccountStateHandler",value:function(e){return this.instance.emitter.on("accountStateChange",e),()=>{this.instance.emitter.off("accountStateChange",e)}}},{key:"setAnonymousMode",value:function(e){var t,n,i,r,o;return k(function(s){for(;;)switch(s.n){case 0:if(t=e?_c.ANONYMOUS_MODE_ON:_c.ANONYMOUS_MODE_OFF,this.instance.isSDKInitialized){s.n=1;break}throw n=new Wr,this.invokeStateHandler(t,!1,n),n;case 1:if(this.anonymousModeCapability()){s.n=2;break}return ui.warn("Anonymous mode feature is not enabled for your Nami account. Contact support@nami.ml for details."),s.a(2);case 2:if(this.inAnonymousMode()!==e){s.n=3;break}return i=e?new Gr:new Vr,this.invokeStateHandler(t,!1,i),s.a(2);case 3:if(!e){s.n=4;break}Fr.setAnonymousMode(e),Fr.resetDevice(),this.refetchConfig(),this.invokeStateHandler(_c.ANONYMOUS_MODE_ON,!0),s.n=6;break;case 4:return Fr.clearAnonymousMode(),nl(),o=null===(r=Fr.getNamiConfig())||void 0===r?void 0:r.namiCommands,s.n=5,a(Wu.instance.createOrUpdateDevice(ru(o)));case 5:Fr.clearAnonymousUUID(),this.refetchConfig(),this.invokeStateHandler(_c.ANONYMOUS_MODE_OFF,!0);case 6:return s.a(2)}},null,this,null,Promise)}},{key:"inAnonymousMode",value:function(){return!!this.instance.isSDKInitialized&&il()}},{key:"setCustomerAttribute",value:function(e,t){if(!this.instance.isSDKInitialized)throw new Wr;if(Fr.setCustomerAttribute(e,t),Ds(Pe.PAYWALL_PERSONALIZATION)?(_d.setCustomerAttribute({[e]:t}),ui.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):ui.warn(`The customer attribute ${e} is not available for using on a paywall, because your account's plan does not include paywall personalization. Contact support@nami.ml for details.`),Rc.instance.flowOpen){var n=Rc.instance.currentFlow;if(n){var i=n.currentFlowStep;i&&n.executeLifecycle(i,dc)}}}},{key:"getCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new Wr;var t=Fr.getCustomerAttribute(e);return null!=t?Ds(Pe.PAYWALL_PERSONALIZATION)?ui.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):ui.warn(`Found customer attribute. ${e} is not available for use on a paywall because paywall personalization is not included in your account's plan. Contact support@nami.ml for details.`):ui.warn(`No ${e} customer attribute found.`),t}},{key:"getAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new Wr;return Fr.getAllCustomerAttributes()}},{key:"clearCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new Wr;Fr.clearCustomerAttribute(e)?(_d.removeCustomerAttribute(e),ui.warn(`This customer attribute has been cleared. ${e} is no longer available for paywall personalization on this device. A default value will be used if set in the Nami Control Center.`)):ui.warn(`No value to clear for attribute ${e}.`)}},{key:"clearAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new Wr;Fr.getAllCustomerAttributesKeys().forEach(e=>{_d.removeCustomerAttribute(e)}),Fr.clearAllCustomerAttributes(),ui.warn("All customer attribute have been cleared. customer's smart text will no longer be personalized for this device. A default value will be used if set in the Nami Control Center.")}},{key:"journeyState",value:function(){if(!this.instance.isSDKInitialized)throw new Wr;return Fr.getCustomerJourneyState()}},{key:"deviceId",value:function(){var e,t;return this.instance.isSDKInitialized&&null!==(e=null===(t=Fr.getDevice())||void 0===t?void 0:t.id)&&void 0!==e?e:qe}},{key:"registerJourneyStateHandler",value:function(e){if(Cs("NamiCustomerManager.registerJourneyStateHandler"))return this.instance.emitter.addListener(qn,e),()=>{this.instance.emitter.removeListener(qn,e)}}},{key:"invokeStateHandler",value:function(e,t,n){this.instance.emitter.emit("accountStateChange",e,t,n)}},{key:"updateCustomerDataPlatformId",value:function(e){var t,n,i,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:if(this.instance.isSDKInitialized){o.n=1;break}throw t=new Wr,this.invokeStateHandler(_c.CUSTOMER_DATA_PLATFORM_ID_SET,!1,t),t;case 1:if(this.inAnonymousMode()){o.n=6;break}return o.p=2,o.n=3,a(Wu.instance.updateDeviceField("customer_data_platform_id",e));case 3:this.invokeStateHandler(_c.CUSTOMER_DATA_PLATFORM_ID_SET,!0),o.n=5;break;case 4:o.p=4,r=o.v,this.invokeStateHandler(_c.CUSTOMER_DATA_PLATFORM_ID_SET,!1,r);case 5:o.n=7;break;case 6:return ui.info("Unable to set CDP ID in anonymous mode",{deviceId:null===(n=Fr.getDevice())||void 0===n?void 0:n.id,anonymousMode:!0}),i=new Xr,this.invokeStateHandler(_c.CUSTOMER_DATA_PLATFORM_ID_SET,!1,i),o.a(2);case 7:return o.a(2)}},null,this,[[2,4]],Promise)}},{key:"anonymousModeCapability",value:function(){if(!this.instance.isSDKInitialized)return!1;var e=Ds(Pe.ANONYMOUS_MODE_CAPABILITY),t=Ds(Pe.THIRD_PARTY_TRANSACTIONS);return e&&t}},{key:"refetchConfig",value:function(){return k(function(e){for(;;)switch(e.n){case 0:if(!this.instance.isSDKInitialized){e.n=1;break}return e.n=1,a(Promise.all([ju.instance.fetchProducts(),Zu.instance.fetchPaywalls().then(e=>Nu.instance.fetchCampaignRules(e))]));case 1:return e.a(2)}},null,this,null,Promise)}}])}();Nc.instance=new Nc;var $c=function(){return c(function e(t={}){var n,i,a,r,s;o(this,e),this.id=null!==(n=t.id)&&void 0!==n?n:"",this.name=null!==(i=t.name)&&void 0!==i?i:"",this.steps=null!==(a=t.steps)&&void 0!==a?a:[],this.screens=null!==(r=t.screens)&&void 0!==r?r:[],this.resumeFromBookmark=Boolean(t.resume_from_bookmark),this.transition=null!==(s=t.transition)&&void 0!==s?s:"none"},[{key:"allScreensAvailable",get:function(){return this.screens.length>0&&Vs(this.screens)}}])}(),Wc=function(e){function t(e,n,i,a){var s,u;o(this,t),(u=r(this,t,[null!==(s=e.flow.object)&&void 0!==s?s:{}])).stepcrumbs=[],u.branchcrumbs=[],u.activeHandoffSequence=null,u.currentScreenState=null,u.isPaused=!1,u.timerStates={},u.campaign=e,u.component=n,u.context=a,u.manager=i,u.branchcrumbs=[],u.stepcrumbs=[],u.registerResolvers(a);var l=u.findStepByType(Xd);return l&&u.forward(l.id),u}return p(t,e),c(t,[{key:"applyLaunchContextAttributes",value:function(e){var t,n;this.context||(this.context={customAttributes:{}},new Ec(this.context)),null!==(n=(t=this.context).customAttributes)&&void 0!==n||(t.customAttributes={}),Object.assign(this.context.customAttributes,e)}},{key:"registerResolvers",value:function(e){e&&new Ec(e),new Pc,new Cc,new Ic,new Lc(this.campaign),kc.shared.registerNamespaceResolver("Flow",e=>{switch(e){case"Flow.stepcrumbs":return this.stepcrumbs.map(e=>e.id);case"Flow.branchcrumbs":return this.branchcrumbs;default:return}})}},{key:"currentFlowStep",get:function(){return this.stepcrumbs.at(-1)}},{key:"nextStepAvailable",get:function(){return void 0!==this.nextFlowStep}},{key:"previousStepAvailable",get:function(){var e,t=!!this.previousFlowStep,n=!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to),i=this.stepcrumbs.slice(0,-1).some(e=>"screen"===e.type);return t&&n&&i}},{key:"previousFlowStep",get:function(){var e=this.stepcrumbs.length-2;return e>=0?this.stepcrumbs[e]:void 0}},{key:"nextFlowStep",get:function(){return this.nextStep(this.currentFlowStep)}},{key:"getStep",value:function(e){return this.steps.find(t=>t.id===e)}},{key:"findStepByType",value:function(e){return this.steps.find(t=>t.type===e)}},{key:"isStepActive",value:function(e){return!e.branch_tags||!e.branch_tags.length||e.branch_tags.some(e=>this.branchcrumbs.includes(e))}},{key:"flowLog",value:function(e,...t){zd.instance.maxLogging&&ui.debug(`[NamiFlow] ${e}`,...t)}},{key:"finished",value:function(){var e;this.flowLog(`finished() — closing flow, isPaused=${this.isPaused}, step=${null===(e=this.currentFlowStep)||void 0===e?void 0:e.id}`),this.manager.finishFlow()}},{key:"back",value:function(){var e;if(!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to)){if(!this.stepcrumbs.slice(0,-1).some(e=>"screen"===e.type))return this.flowLog("back() — no previous screen step, exiting flow"),void this.finished();this.backToPreviousScreenStep()}else ui.debug(`Not allowed to go back to ${this.previousFlowStep.id}`)}},{key:"next",value:function(){var e=this.nextFlowStep;e&&this.forward(e.id)}},{key:"backToPreviousScreenStep",value:function(){var e;if(!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to)){for(var t=this.stepcrumbs.length-2;t>=0;t--){var n=this.stepcrumbs[t];if(this.stepcrumbs.pop(),"branch"===n.type&&this.branchcrumbs.length>0&&this.branchcrumbs.pop(),"screen"===n.type&&n.screen){var i,a,r=Gs(n.screen);return r&&we().ui.flowNavigateToScreen(r,{transition:this.transition,direction:"backward"}),void(this.currentScreenState=null!==(i=null===(a=_d.currentProvider)||void 0===a?void 0:a.state)&&void 0!==i?i:null)}}ui.warn("No previous screen step found to return to")}else ui.warn(`Not allowed to go back to ${this.previousFlowStep.id}`)}},{key:"forward",value:function(e){var t=this.getStep(e);if(t)if(this.isStepActive(t))switch(this.flowLog(`forward(${e}) — type=${t.type}, name=${t.name}, isPaused=${this.isPaused}`),t.type){case Xd:case Jd:return this.stepcrumbs.push(t),void this.executeLifecycle(t,tc);case qd:return void this.handleBranchStep(t);case Yd:return void this.handleScreenStep(t);case Qd:return}else this.flowLog(`forward(${e}) — step not active (branch_tags=${JSON.stringify(t.branch_tags)}, branchcrumbs=${JSON.stringify(this.branchcrumbs)})`);else ui.error(`No step found with id: ${e}`)}},{key:"pause",value:function(){var e;this.isPaused?ui.info("Flow is already paused"):(this.isPaused=!0,this.pausedStepID=null===(e=this.currentFlowStep)||void 0===e?void 0:e.id,this.flowLog(`pause() — pausedStepID=${this.pausedStepID}`),ui.info("Flow paused"))}},{key:"resumeFromPause",value:function(){if(this.isPaused)if(this.isPaused=!1,this.pausedStepID){var e=this.pausedStepID;this.pausedStepID=void 0,this.flowLog(`resumeFromPause() — resuming from step ${e}`),ui.info(`Flow resumed from step ${e}`),this.forward(e)}else ui.warn("No step to resume from");else ui.info("Flow is not paused")}},{key:"executeLifecycle",value:function(e,t,n){var i=e.actions[t];i?(this.flowLog(`executeLifecycle(${t}) — step=${e.id}, isPaused=${this.isPaused}, ${i.length} lifecycle(s)`),this.executeFullLifecycles(i,n)):this.flowLog(`executeLifecycle(${t}) — no actions on step ${e.id}`)}},{key:"lifecycles",value:function(e){if(this.currentFlowStep){var t=this.currentFlowStep.actions[e];if(t)return t;ui.info(`No actions found for button ${e} on step ${this.currentFlowStep.id}`)}}},{key:"triggerActions",value:function(e,t,n){var i,a=this.lifecycles(e);a&&(this.flowLog(`triggerActions(${e}) — step=${null===(i=this.currentFlowStep)||void 0===i?void 0:i.id}, isPaused=${this.isPaused}`),this.currentButton=t,this.executeFullLifecycles(a,n))}},{key:"executeFullLifecycles",value:function(e,t){for(var n,i=this,a=function(){var e=n.value,a=["before","action","after"];[e.before,e.action,e.after].forEach((e,n)=>null==e?void 0:e.forEach(e=>{var r=i.shouldRun(e);i.flowLog(` ${a[n]}: ${e.function}${e.id?` (${e.id})`:""} — shouldRun=${r}`),r&&i.performAction(e,t)}))},r=h(e);!(n=r()).done;)a()}},{key:"triggerBeforeActions",value:function(e,t,n){var i=this.lifecycles(e);if(i){this.currentButton=t;for(var a,r=h(i);!(a=r()).done;){var o;null===(o=a.value.before)||void 0===o||o.forEach(e=>this.shouldRun(e)&&this.performAction(e,n))}}}},{key:"triggerAfterActions",value:function(e,t,n){var i=this.lifecycles(e);if(i){this.currentButton=t;for(var a,r=h(i);!(a=r()).done;){var o;null===(o=a.value.after)||void 0===o||o.forEach(e=>this.shouldRun(e)&&this.performAction(e,n))}}}},{key:"currentStepHasHoistedPrimaryActions",value:function(e){var t=this.lifecycles(e);return!!t&&t.some(e=>{var t;return null===(t=e.action)||void 0===t?void 0:t.length})}},{key:"shouldRun",value:function(e){if(!e.conditions)return!0;var t=e.conditions.every(e=>{var t=kc.shared.evaluate(e);if(zd.instance.maxLogging){var n,i,a,r=null!==(n=null===(i=e.filter)||void 0===i?void 0:i.map(e=>`${e.identifier} ${e.operator} ${JSON.stringify(e.values)}`).join(", "))&&void 0!==n?n:"none";ui.debug(`[NamiFlow] condition: [${r}] op=${null!==(a=e.operator)&&void 0!==a?a:"default"} → ${t}`)}return t});return t}},{key:"performAction",value:function(e,t){var n,i;if(this.currentFlowStep){var a=(null!==(n=e.parameters)&&void 0!==n&&n.delay?+e.parameters.delay:0)||0;this.flowLog(`performAction(${e.function}) — step=${this.currentFlowStep.id}, delay=${a}, params=${JSON.stringify(null!==(i=e.parameters)&&void 0!==i?i:{})}`);var r=n=>{var i,a,r,o,s,u,l,d,c,h;if((null===(i=this.currentFlowStep)||void 0===i?void 0:i.id)===n)switch(e.function){case Kd.BACK:this.back();break;case Kd.NEXT:null!==(a=e.parameters)&&void 0!==a&&a.customAttributes&&this.applyLaunchContextAttributes(e.parameters.customAttributes),null!==(r=e.parameters)&&void 0!==r&&r.step?this.forward(e.parameters.step):this.next();break;case Kd.NAVIGATE:var m;if(null!==(o=e.parameters)&&void 0!==o&&o.customAttributes&&this.applyLaunchContextAttributes(e.parameters.customAttributes),null!==(s=e.parameters)&&void 0!==s&&s.step)(null===(m=this.previousFlowStep)||void 0===m?void 0:m.id)===e.parameters.step?this.back():this.forward(e.parameters.step);else this.next();break;case Kd.FINISHED:case Kd.DISMISS:this.finished();break;case Kd.EXIT:var f=this.steps.find(e=>e.type===Jd);f&&this.forward(f.id);break;case Kd.PAUSE:this.pause();break;case Kd.RESUME:this.resumeFromPause();break;case Kd.HANDOFF:if(null!==(u=e.parameters)&&void 0!==u&&u.handoffTag)if(this.manager.handoffStepHandler)if(e.parameters.handoffData)ui.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(e.parameters.handoffData)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,e.parameters.handoffData);else if(t)ui.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(t)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,t);else if(e.parameters.handoffFormId){var v=this.getFormData();e.parameters.handoffTag===Zd?this.flowHandoffFormSequence():this.manager.handoffStepHandler(e.parameters.handoffTag,v)}else ui.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} and no data`),this.manager.handoffStepHandler(e.parameters.handoffTag);else ui.debug("No handoffStepHandler found",e);break;case Kd.LOG:var p;if(null!==(l=e.parameters)&&void 0!==l&&l.eventName)ui.info(`logEvent → ${e.parameters.eventName}`);else ui.warn(`Missing 'eventName' in logEvent action ${null!==(p=e.id)&&void 0!==p?p:"unknown"}`);break;case Kd.TRACK:var g;if(null!==(d=e.parameters)&&void 0!==d&&d.eventName)ui.info(`trackEvent → ${e.parameters.eventName}`);else ui.warn(`Missing 'eventName' in logEvent action ${null!==(g=e.id)&&void 0!==g?g:"unknown"}`);break;case Kd.SET_VIDEO:null!==(c=e.parameters)&&void 0!==c&&c.name&&e.parameters.url?_d.setAppSuppliedVideoDetails({name:e.parameters.name,url:e.parameters.url}):ui.warn("Missing name, url for setting video details");break;case Kd.BLOCK_BACK:var y,b=null===(y=e.parameters)||void 0===y?void 0:y.step,w=b?this.getStep(b):void 0;w?w.allow_back_to=!1:this.currentFlowStep?this.currentFlowStep.allow_back_to=!1:ui.warn("Missing step for blocking back");break;case Kd.FLOW_EVENT:var k,S=new xc(this.manager),E=Object.fromEntries(Object.entries(null!==(k=e.parameters)&&void 0!==k?k:{}).map(([e,t])=>[e,S.interpolateDeep(t)]));this.manager.eventHandler?this.manager.eventHandler(E):ui.warn("Missing event handler",E);break;case Kd.FLOW_ENABLED:_d.setUserInteractionEnabled(!0);break;case Kd.FLOW_DISABLED:_d.setUserInteractionEnabled(!1);break;case Kd.SET_TAGS:e.parameters&&(_d.setUserTags(e.parameters),Object.entries(e.parameters).forEach(([e,t])=>{Nc.setCustomerAttribute(e,t)}));break;case Kd.SET_LAUNCH_CONTEXT:var P=e.parameters;null!=P&&P.customAttributes?this.applyLaunchContextAttributes(P.customAttributes):void 0!==(null==P?void 0:P.key)&&void 0!==(null==P?void 0:P.value)&&this.applyLaunchContextAttributes({[P.key]:P.value});break;default:ui.warn(`Missing action handler for ${e.function}`,e)}else this.flowLog(`performAction(${e.function}) — SKIPPED stale step ${n}, current=${null===(h=this.currentFlowStep)||void 0===h?void 0:h.id}`)};a?setTimeout(r.bind(this,this.currentFlowStep.id),a):r(this.currentFlowStep.id)}else ui.warn("No current flow step")}},{key:"nextStep",value:function(e){if(e){var t=this.steps.findIndex(t=>t.id===e.id);if(-1!==t){for(var n,i=h(this.steps.slice(t+1));!(n=i()).done;){var a=n.value;if(this.isStepActive(a))return a}ui.debug(`No active next step found after ${e.id}`)}else ui.error(`Could not find next step for step ${e.id}`)}else ui.error("Next step not found")}},{key:"handleScreenStep",value:function(e){var t,n=Gs(null!==(t=e.screen)&&void 0!==t?t:"");e.screen&&n&&this.campaign?(this.stepcrumbs.push(e),we().ui.flowNavigateToScreen(n,{transition:this.transition,direction:"forward"})):ui.error("No paywall or campaign found for next step")}},{key:"handleBranchStep",value:function(e){this.stepcrumbs.push(e);for(var t=0,n=Object.entries(e.actions);t<n.length;t++){var i=n[t],a=i[0],r=i[1];if(r)for(var o,s=h(r);!(o=s()).done;){var u=o.value;if(u.action)for(var l,d=h(u.action);!(l=d()).done;){var c,m,f=l.value;if(this.shouldRun(f))return this.branchcrumbs.push(a),null===(c=u.before)||void 0===c||c.forEach(e=>{this.performAction(e)}),u.action.forEach(e=>{this.shouldRun(e)&&this.performAction(e)}),void(null===(m=u.after)||void 0===m||m.forEach(e=>{this.performAction(e)}))}else ui.warn(`No actions defined for branch tag ${a}`)}}ui.warn(`No matching branch condition matched for step ${e.id}`)}},{key:"getFormData",value:function(){var e,t;return m({},null!==(e=null===(t=_d.currentProvider)||void 0===t||null===(t=t.state)||void 0===t?void 0:t.formStates)&&void 0!==e?e:{})}},{key:"flowHandoffFormSequence",value:function(){var e,t=null===(e=this.currentScreenState)||void 0===e?void 0:e.formStates;if(t){var n=Object.keys(t).sort();if(0!==n.length){var i=n.filter(e=>!0===t[e]);if(0===i.length)return ui.info("No eligible handoff keys after filtering"),void this.manager.resume();this.activeHandoffSequence={formStates:m({},t),remainingKeys:[...i]},this.resumeNextHandoff()}else ui.warn("formStates is empty, no handoffs to perform")}else ui.warn("No formStates available for handoff sequence")}},{key:"resumeNextHandoff",value:function(){var e,t,n=this.activeHandoffSequence;if(!n)return ui.warn("No active handoff sequence to resume"),void this.manager.resume();if(0===n.remainingKeys.length)return ui.info("All handoffs in the sequence are complete"),this.activeHandoffSequence=null,void this.manager.resume();var i=n.remainingKeys.shift(),a=n.formStates[i];ui.debug(`Starting handoff for ${i} → ${String(a)}`),this.activeHandoffSequence=n;var r=`${i}`;null===(e=(t=this.manager).handoffStepHandler)||void 0===e||e.call(t,r,void 0)}}])}($c),jc=function(){return c(function e(){o(this,e),this.emitter=Ou.getInstance()},[{key:"sdkInitialized",get:function(){return zd.instance.isInitialized}},{key:"campaignTypeAndLabel",value:function(t,n){var i,a="";return t&&!n&&fu(t)?(a=t,i=e.NamiCampaignRuleType.URL):t?(a=t,i=e.NamiCampaignRuleType.LABEL):n&&(a=n,i=e.NamiCampaignRuleType.URL),{type:i,value:a}}}],[{key:"allCampaigns",value:function(){if(!this.instance.sdkInitialized)throw new Wr;return gu()}},{key:"isCampaignAvailable",value:function(e){if(!this.instance.sdkInitialized)throw new Wr;var t=this.instance.campaignTypeAndLabel(e),n=t.type,i=t.value,a=Su(i,n),r=a.campaign,o=a.paywall;return null!=r&&r.flow?new $c(r.flow.object).allScreensAvailable:Boolean(r&&o)}},{key:"isFlow",value:function(e,t){if(!this.instance.sdkInitialized)throw new Wr;var n=this.instance.campaignTypeAndLabel(e,t),i=n.type,a=n.value;return Bs(Su(a,i).campaign)}},{key:"refresh",value:function(){return k(function(e){for(;;)switch(e.n){case 0:if(this.instance.sdkInitialized){e.n=1;break}throw new Wr;case 1:return xs(),e.n=2,a(Nd.instance.fetchCampaignsAndPaywalls());case 2:return e.a(2,gu())}},null,this,null,Promise)}},{key:"registerAvailableCampaignsHandler",value:function(e){return this.instance.emitter.addListener(Hn,e),()=>{this.instance.emitter.removeListener(Hn,e)}}},{key:"launch",value:function(t,n,i,a,r){var o,s,u,l,d,c,h,f,v,p;a=null!=a?a:()=>{},i=null!=i?i:{customAttributes:{}};var g=this.instance.campaignTypeAndLabel(t,n),b=g.type,w=g.value;if(!this.instance.sdkInitialized)throw a(!1,e.LaunchCampaignError.SDK_NOT_INITIALIZED),new Wr;var k,S=Od.firstLaunchLookup(w,()=>Su(w,b)),E=S.paywall,P=S.campaign;P&&(E||P.flow)||(k=t||n?t?e.LaunchCampaignError.LABELED_CAMPAIGN_NOT_FOUND:n?e.LaunchCampaignError.URL_CAMPAIGN_NOT_FOUND:e.LaunchCampaignError.CAMPAIGN_DATA_NOT_FOUND:e.LaunchCampaignError.DEFAULT_CAMPAIGN_NOT_FOUND,a(!1,k),E={});var T={campaignId:null!==(o=null==P?void 0:P.rule)&&void 0!==o?o:"",campaignName:null!==(s=null==P?void 0:P.name)&&void 0!==s?s:"",campaignType:null!==(u=null==P?void 0:P.type)&&void 0!==u?u:"",campaignLabel:t?w:"",campaignUrl:n?w:"",paywallId:null!=P&&P.flow?void 0:(null===(l=E)||void 0===l?void 0:l.id)||"",paywallName:null!=P&&P.flow?void 0:(null===(d=E)||void 0===d?void 0:d.name)||"",segmentId:null==P?void 0:P.segment,externalSegmentId:null!==(c=null==P?void 0:P.external_segment)&&void 0!==c?c:null,action:e.NamiPaywallAction.UNKNOWN},M=Fr.getPurchaseChannel();M&&(T=m({},T,{purchaseChannel:M}));var _,A,D,x=null===(h=i)||void 0===h?void 0:h.productGroups,C=null===(f=E)||void 0===f||null===(f=f.sku_menus)||void 0===f?void 0:f.map(e=>e.ref);if((D=null===(_=Fr.getNamiConfig())||void 0===_?void 0:_.namiCommands,null!==(A=null==D?void 0:D.includes(fn))&&void 0!==A&&A&&null!=x&&x.length&&null!=C)&&0==(null==C?void 0:C.filter(e=>null==x?void 0:x.some(t=>t===e))).length)throw a(!1,e.LaunchCampaignError.PRODUCT_GROUPS_NOT_FOUND),new Ur;if(null!=P&&P.flow&&!Vs(null!==(v=null===(p=P.flow.object)||void 0===p?void 0:p.screens)&&void 0!==v?v:[]))throw a(!1,e.LaunchCampaignError.FLOW_SCREEN_DATA_UNAVILABLE),new Hr;var I=we().ui.createPaywall(b,w,i),L=su();return Fr.setLaunchId(L),r&&this.instance.emitter.addListener(Vn,t=>{var n=t.action,i=y(t,ge);r(m({},T,i,{action:null!=n?n:e.NamiPaywallAction.UNKNOWN}))}),setTimeout(()=>a(!0),0),I}},{key:"getProductGroups",value:function(e,t){var n,i,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value;return null!==(n=null===(i=Su(o,r).paywall)||void 0===i||null===(i=i.sku_menus)||void 0===i?void 0:i.map(e=>e.ref))&&void 0!==n?n:[]}},{key:"getAllProducts",value:function(e,t){var n,i,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value;return null!==(n=null===(i=Su(o,r).paywall)||void 0===i||null===(i=i.sku_menus)||void 0===i?void 0:i.flatMap(e=>{var t,n;return null!==(t=null===(n=e.products)||void 0===n?void 0:n.map(e=>e.sku_ref_id))&&void 0!==t?t:[]}))&&void 0!==n?n:[]}},{key:"getCurrentProducts",value:function(e,t){var n,i,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value,s=Su(o,r),u=_d.currentProvider,l=null==u?void 0:u.getCurrentGroupId();return l&&null!==(n=null===(i=s.paywall)||void 0===i||null===(i=i.sku_menus)||void 0===i?void 0:i.filter(e=>e.id===l).flatMap(e=>{var t,n;return null!==(t=null===(n=e.products)||void 0===n?void 0:n.map(e=>e.sku_ref_id))&&void 0!==t?t:[]}))&&void 0!==n?n:[]}}])}();jc.instance=new jc;var Bc=jc,zc=Nc,Uc=function(){return c(function e(){o(this,e),this.emitter=Ou.getInstance()},[{key:"sdkInitialized",get:function(){return zd.instance.isInitialized}}],[{key:"active",value:function(){return Cs(),Dd()}},{key:"isEntitlementActive",value:function(e){return!!Cs("NamiEntitlementManager.isEntitlementActive")&&this.active().some(t=>t.referenceId==e)}},{key:"refresh",value:function(){return k(function(e){for(;;)switch(e.n){case 0:if(this.instance.sdkInitialized){e.n=1;break}throw new Wr;case 1:if(Cs("NamiEntitlementManager.refresh")){e.n=2;break}return e.a(2,[]);case 2:return e.n=3,a(Id.instance.fetchActiveEntitlements());case 3:return e.a(2,Dd())}},null,this,null,Promise)}},{key:"registerActiveEntitlementsHandler",value:function(e){if(Cs("NamiEntitlementManager.registerActiveEntitlementsHandler"))return this.instance.emitter.addListener(Xn,e),()=>{this.instance.emitter.removeListener(Xn,e)}}},{key:"clearProvisionalEntitlementGrants",value:function(){var e=Dd();e=e.filter(e=>e.expires&&e.expires>(new Date).valueOf()),Fr.setNamiEntitlements(Mt,e),this.instance.emitter.emit(Xn)}}])}();Uc.instance=new Uc;var Hc=Uc,Gc=Rc,Vc=e=>{var t;return k(function(n){for(;;)switch(n.p=n.n){case 0:if(!il()){n.n=1;break}return ui.info("Skipping transaction post - anonymous mode"),n.a(2);case 1:return n.p=1,n.n=2,a(js.instance.postConversion(e));case 2:n.n=4;break;case 3:n.p=3,t=n.v,ui.error("Error posting conversion",t);case 4:return n.a(2)}},null,null,[[1,3]],Promise)},Kc=function(){return c(function e(){o(this,e),this.emitter=Ou.getInstance()},[{key:"sdkInitialized",get:function(){return zd.instance.isInitialized}}],[{key:"allPaywalls",value:function(){if(!this.instance.sdkInitialized)throw new Wr;return Hs()}},{key:"setProductDetails",value:function(e){this.instance.productDetails=e,_d.setProductDetails(e)}},{key:"registerSignInHandler",value:function(t){return this.instance.emitter.addListener(e.NamiPaywallManagerEvents.SignIn,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.SignIn,t)}}},{key:"registerCloseHandler",value:function(t){return this.instance.emitter.addListener(e.NamiPaywallManagerEvents.Close,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.Close,t)}}},{key:"registerDeeplinkActionHandler",value:function(t){return this.instance.emitter.addListener(e.NamiPaywallManagerEvents.DeeplinkAction,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.DeeplinkAction,t)}}},{key:"registerBuySkuHandler",value:function(t){return Cs()&&ui.debug("This handler will not be invoked because this account's plan includes built-in purchase management. Contact support@namiml.com for details."),this.instance.emitter.addListener(e.NamiPaywallManagerEvents.BuySku,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.BuySku,t)}}},{key:"registerRestoreHandler",value:function(t){return this.instance.emitter.addListener(e.NamiPaywallManagerEvents.Restore,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.Restore,t)}}},{key:"buySkuComplete",value:function(e){var t,n,i,r,o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:if(_d.setPurchaseInProgress(!1),Rc.instance.flowOpen&&(t=Rc.instance.currentFlow,n=null==t?void 0:t.currentFlowStep,t&&n&&t.executeLifecycle(n,uc)),!Nc.inAnonymousMode()){u.n=1;break}return ui.debug("Skipping purchase validation - anonymous mode"),u.a(2);case 1:if(i=Fr.getSessionId(),r=Fr.getPurchaseImpression()){u.n=2;break}return ui.debug("Not sending paywall conversion call complete due to unknown impression"),u.a(2);case 2:return u.p=2,u.n=3,a(Vc({purchase_env:"production",app_env:"production",impression:r,session:i,amount:e.amount,currency:e.currency,transaction_id:e.transactionId,sku:e.skuId}));case 3:u.n=5;break;case 4:u.p=4,o=u.v,ui.error("Error posting conversion",o);case 5:if(Ds(Pe.THIRD_PARTY_TRANSACTIONS)){u.n=9;break}return u.p=6,u.n=7,a(js.instance.purchaseValidation({app_env:"production",payload:"",sku:e.skuId}));case 7:u.n=9;break;case 8:u.p=8,s=u.v,ui.error("Error validating purchase",s);case 9:return u.a(2)}},null,null,[[6,8],[2,4]],Promise)}},{key:"buySkuCancel",value:function(){Ds(Pe.THIRD_PARTY_TRANSACTIONS)?_d.setPurchase(!1):ui.warn("Call this method is not needed for this app because Nami is responsible for purchase management. Contact support@nami.ml for details.")}},{key:"setAppSuppliedVideoDetails",value:function(e,t){fu(e)?(ui.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received valid url ${e}`),_d.setAppSuppliedVideoDetails({url:e,name:t})):ui.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received invalid url ${e}`)}},{key:"allowUserInteraction",value:function(e){ui.debug(`NamiPaywallManager: allowUserInteraction called with ${e}`),_d.setUserInteractionEnabled(e)}}])}();Kc.instance=new Kc,Kc.emitter=Ou.getInstance();var Xc,Yc,qc=Kc,Jc=rl,Qc={upperLeft:"border-top-left-radius",upperRight:"border-top-right-radius",lowerLeft:"border-bottom-left-radius",lowerRight:"border-bottom-right-radius"},Zc={left:"border-left-style",right:"border-right-style",top:"border-top-style",bottom:"border-bottom-style"},eh="wave",th="pulse",nh="none";function ih(e){var t,n=null!==(t=e.match(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/))&&void 0!==t?t:[],i=n[0],a=n[1],r=n[2],o=n[3],s=n[4],u=n[5];return{semver:i,major:Number.parseInt(a)||3,minor:Number.parseInt(r)||0,patch:Number.parseInt(o)||0,prerelease:s,buildmetadata:u}}function ah(e,t){e&&(function(e,t){return e.major!==t.major?e.major>t.major?1:-1:e.minor!==t.minor?e.minor>t.minor?1:-1:e.patch!==t.patch?e.patch>t.patch?1:-1:0}(ih(Ae),e)>=0||ui.warn(`Component ${t} requires SDK version ${e.semver} or higher, but current SDK version is ${Ae}`))}function rh(e){return!e||"object"==typeof e&&0==Object.keys(e).length}!function(e){e.DEFAULT="default",e.LABEL="label",e.URL="url"}(Xc||(Xc={})),function(e){e.DEEPLINK="deeplink",e.IN_APP="in_app"}(Yc||(Yc={})),new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z"));var oh=Bc,sh=zc,uh=qc,lh=Hc,dh=Gc,ch=Jc,hh=Bd,mh=Object.freeze({__proto__:null,NamiCampaignManager:oh,NamiCustomerManager:sh,NamiEntitlementManager:lh,NamiFlowManager:dh,NamiPaywallManager:uh,NamiProfileManager:hh,NamiPurchaseManager:ch}),fh=function(){return c(function e(){o(this,e)},[{key:"getItem",value:function(e){try{return localStorage.getItem(e)}catch(e){return null}}},{key:"setItem",value:function(e,t){try{localStorage.setItem(e,t)}catch(e){}}},{key:"removeItem",value:function(e){try{localStorage.removeItem(e)}catch(e){}}},{key:"clear",value:function(){try{localStorage.clear()}catch(e){}}},{key:"getAllKeys",value:function(){try{return Object.keys(localStorage)}catch(e){return[]}}}])}();function vh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ph,gh={exports:{}};var yh=(ph||(ph=1,function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=n(18),a=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});t.push(0);var n=t[0],i=t[1];if(10===n)switch(i){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(n){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,i){void 0===i&&(i=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(n),o=Math.max(a,r),s=0,u=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(i&&(s=o-Math.min(a,r)),o-=1;o>=s;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===s)return 0;o-=1}else if(u[0][o]<u[1][o])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var a=e[n];if(t(a,n))return a}},e.assign=function(e){for(var t,n,i=e,a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(r));var s=function(){var e=r[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){i[t]=e[t]})};for(t=0,n=r.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=a,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(91))&&i.__esModule?i:{default:i},r=n(18);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=function(){function e(){}var t,n,i;return e.getParser=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new a.default(e,t,n)},e.parse=function(e,t){return void 0===t&&(t=null),new a.default(e,t).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return r.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return r.ENGINE_MAP}},{key:"OS_MAP",get:function(){return r.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return r.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),i&&o(t,i),e}();t.default=s,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=u(n(92)),a=u(n(93)),r=u(n(94)),o=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var i=!1;"boolean"==typeof t?(i=t,this._hints=n):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==i&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),n=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return n?n.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(a.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},i=0,a={},r=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(a[t]=o,r+=1):"object"==typeof o&&(n[t]=o,i+=1)}),i>0){var o=Object.keys(n),u=s.default.find(o,function(e){return t.isOS(e)});if(u){var l=this.satisfies(n[u]);if(void 0!==l)return l}var d=s.default.find(o,function(e){return t.isPlatform(e)});if(d){var c=this.satisfies(n[d]);if(void 0!==c)return c}}if(r>0){var h=Object.keys(a),m=s.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==m)return this.compareVersion(a[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(i);return t&&a&&(i=a.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(a,n,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=l,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},n=a.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},n=a.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},n=a.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},n=a.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},n=a.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},n=a.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},n=a.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},n=a.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},n=a.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},n=a.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},n=a.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},n=a.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},n=a.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},n=a.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},n=a.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},n=a.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},n=a.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},n=a.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},n=a.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},n=a.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=a.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=a.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=a.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=a.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=a.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},n=a.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=a.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},n=a.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),i=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),r=a.default.getFirstMatch(/se ([\d.]+)x/i,e),o=n||i||r;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=a.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var n={name:"DuckDuckGo"};if(t){var i=t.getBrandVersion("DuckDuckGo");if(i)return n.version=i,n}var r=a.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(n.version=r),n}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var n={name:"Brave"};if(t){var i=t.getBrandVersion("Brave");if(i)return n.version=i,n}return n}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=a.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:a.default.getFirstMatch(t,e),version:a.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=a.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:r.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=a.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=a.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=a.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},n=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=a.default.getMacOSVersionName(t),i={name:r.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=a.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:r.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=a.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=a.default.getAndroidVersionName(t),i={name:r.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:r.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=a.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||a.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||a.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=a.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=a.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:r.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:r.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=a.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=a.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=a.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:r.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=a.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:r.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:r.ENGINE_MAP.Blink};var t=a.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:r.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:r.ENGINE_MAP.Trident},n=a.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},n=a.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},n=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:r.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:r.ENGINE_MAP.WebKit},n=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})}(gh)),gh.exports),bh=vh(yh),wh={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},kh={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4},Sh=function(){return c(function e(){o(this,e)},[{key:"getDeviceData",value:function(e){if("undefined"==typeof window)return{os_version:"X.X.X",os_name:"Server",browser_name:"Unknown",browser_version:"X.X.X",sdk_client:"web",sdk_version:Ae,language:"en"};var t=bh.getParser(window.navigator.userAgent),n=t.getPlatform(),i={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:Ae,language:window.navigator.language};if(n.type&&(i.form_factor=wh[n.type]),n.model&&(i.device_model=n.model),e&&e.length>0){var a=(e=>{var t=e.find(e=>e.includes(dn)),n={platform:"",version:""};if(t){var i=t.split(hn);n.platform=i[1],n.version=i[2]}return n})(e);i.extended_platform=a.platform,i.extended_platform_version=a.version}return i}},{key:"getDeviceFormFactor",value:function(){if("undefined"==typeof window)return"desktop";var e=bh.getParser(window.navigator.userAgent).getPlatform();return e.type&&wh[e.type]||"desktop"}},{key:"getDeviceScaleFactor",value:function(e){var t;if(e||(e=this.getDeviceFormFactor()),"television"!==e)return 1;var n=window,i=n.innerWidth,a=n.innerHeight,r=i.toString()+"x"+a.toString();return null!==(t=kh[r])&&void 0!==t?t:Math.min(i/1920,a/1080)||1}},{key:"getScreenInfo",value:function(){var e,t,n,i;return"undefined"==typeof window?{width:1920,height:1080,scale:1}:{width:null!==(e=null===(t=window.screen)||void 0===t?void 0:t.width)&&void 0!==e?e:window.innerWidth,height:null!==(n=null===(i=window.screen)||void 0===i?void 0:i.height)&&void 0!==n?n:window.innerHeight,scale:window.devicePixelRatio||1}}},{key:"getLanguage",value:function(){return"undefined"==typeof window?"en":window.navigator.language||"en"}},{key:"generateUUID",value:function(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}])}();function Eh(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}"function"==typeof SuppressedError&&SuppressedError;var Ph,Th,Mh,_h=globalThis,Ah=_h.ShadowRoot&&(void 0===_h.ShadyCSS||_h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Dh=Symbol(),xh=new WeakMap,Ch=function(){return c(function e(t,n,i){if(o(this,e),this._$cssResult$=!0,i!==Dh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Ah&&void 0===e){var n=void 0!==t&&1===t.length;n&&(e=xh.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&xh.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Ih=e=>new Ch("string"==typeof e?e:e+"",void 0,Dh),Lh=(e,...t)=>{var n=1===e.length?e[0]:t.reduce((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1],e[0]);return new Ch(n,e,Dh)},Rh=Ah?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,n="",i=h(e.cssRules);!(t=i()).done;){n+=t.value.cssText}return Ih(n)})(e):e,Fh=Object.is,Oh=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,$h=Object.getOwnPropertyNames,Wh=Object.getOwnPropertySymbols,jh=Object.getPrototypeOf,Bh=globalThis,zh=Bh.trustedTypes,Uh=zh?zh.emptyScript:"",Hh=Bh.reactiveElementPolyfillSupport,Gh=(e,t)=>e,Vh={toAttribute(e,t){switch(t){case Boolean:e=e?Uh:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Kh=(e,t)=>!Fh(e,t),Xh={attribute:!0,type:String,converter:Vh,reflect:!1,useDefault:!1,hasChanged:Kh};null!==(Ph=Symbol.metadata)&&void 0!==Ph||(Symbol.metadata=Symbol("metadata")),null!==(Th=Bh.litPropertyMetadata)&&void 0!==Th||(Bh.litPropertyMetadata=new WeakMap);var Yh,qh=function(e){function t(){var e;return o(this,t),(e=r(this,t))._$Ep=void 0,e.isUpdatePending=!1,e.hasUpdated=!1,e._$Em=null,e._$Ev(),e}return p(t,e),c(t,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}},{key:"addController",value:function(e){var t,n;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,n=h(this.constructor.elementProperties.keys());!(e=n()).done;){var i=e.value;this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Ah)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var n,i=h(t);!(n=i()).done;){var a=n.value,r=document.createElement("style"),o=_h.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}})(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}},{key:"attributeChangedCallback",value:function(e,t,n){this._$AK(e,n)}},{key:"_$ET",value:function(e,t){var n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){var a,r=(void 0!==(null===(a=n.converter)||void 0===a?void 0:a.toAttribute)?n.converter:Vh).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){var a,r,o,s=n.getPropertyOptions(i),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:Vh;this._$Em=i;var l=u.fromAttribute(t,s.type);this[i]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(i))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,n,i=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===i&&(a=this[e]),null!=n||(n=s.getPropertyOptions(e)),!((null!==(r=n.hasChanged)&&void 0!==r?r:Kh)(a,t)||n.useDefault&&n.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:n,reflect:i,wrapped:a},r){var o,s,u;n&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return k(function(n){for(;;)switch(n.p=n.n){case 0:return this.isUpdatePending=!0,n.p=1,n.n=2,a(this._$ES);case 2:n.n=4;break;case 3:n.p=3,t=n.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){n.n=5;break}return n.n=5,a(e);case 5:return n.a(2,!this.isUpdatePending)}},null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,n=h(this._$Ep);!(t=n()).done;){var i=t.value,a=i[0],r=i[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=h(o);!(s=u()).done;){var l=s.value,d=l[0],c=l[1],m=c.wrapped,f=this[d];!0!==m||this._$AL.has(d)||void 0===f||this.C(d,void 0,c,f)}}var v=!1,p=this._$AL;try{var g;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(g=this._$EO)&&void 0!==g&&g.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=Xh){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Oh(this.prototype,e,i)}}},{key:"getPropertyDescriptor",value:function(e,t,n){var i,a=null!==(i=Nh(this.prototype,e))&&void 0!==i?i:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var i=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:Xh}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Gh("elementProperties"))){var e=jh(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Gh("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Gh("properties")))for(var e=this.properties,t=0,n=[...$h(e),...Wh(e)];t<n.length;t++){var i=n[t];this.createProperty(i,e[i])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=h(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var c,m=h(this.elementProperties);!(c=m()).done;){var f=c.value,v=f[0],p=f[1],g=this._$Eu(v,p);void 0!==g&&this._$Eh.set(g,v)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var n,i=h(new Set(e.flat(1/0).reverse()));!(n=i()).done;){var a=n.value;t.unshift(Rh(a))}else void 0!==e&&t.push(Rh(e));return t}},{key:"_$Eu",value:function(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}}])}(_(HTMLElement));qh.elementStyles=[],qh.shadowRootOptions={mode:"open"},qh[Gh("elementProperties")]=new Map,qh[Gh("finalized")]=new Map,null!=Hh&&Hh({ReactiveElement:qh}),(null!==(Mh=Bh.reactiveElementVersions)&&void 0!==Mh?Mh:Bh.reactiveElementVersions=[]).push("2.1.2");var Jh=globalThis,Qh=e=>e,Zh=Jh.trustedTypes,em=Zh?Zh.createPolicy("lit-html",{createHTML:e=>e}):void 0,tm="$lit$",nm=`lit$${Math.random().toFixed(9).slice(2)}$`,im="?"+nm,am=`<${im}>`,rm=document,om=()=>rm.createComment(""),sm=e=>null===e||"object"!=typeof e&&"function"!=typeof e,um=Array.isArray,lm="[ \t\n\f\r]",dm=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,cm=/-->/g,hm=/>/g,mm=RegExp(`>|${lm}(?:([^\\s"'>=/]+)(${lm}*=${lm}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),fm=/'/g,vm=/"/g,pm=/^(?:script|style|textarea|title)$/i,gm=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),ym=gm(1),bm=gm(2),wm=Symbol.for("lit-noChange"),km=Symbol.for("lit-nothing"),Sm=new WeakMap,Em=rm.createTreeWalker(rm,129);function Pm(e,t){if(!um(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==em?em.createHTML(t):t}var Tm=function(){return c(function e({strings:t,_$litType$:n},i){var a;o(this,e),this.parts=[];var r=0,s=0,u=t.length-1,l=this.parts,d=((e,t)=>{for(var n,i=e.length-1,a=[],r=2===t?"<svg>":3===t?"<math>":"",o=dm,s=0;s<i;s++){for(var u=e[s],l=void 0,d=void 0,c=-1,h=0;h<u.length&&(o.lastIndex=h,null!==(d=o.exec(u)));)h=o.lastIndex,o===dm?"!--"===d[1]?o=cm:void 0!==d[1]?o=hm:void 0!==d[2]?(pm.test(d[2])&&(n=RegExp("</"+d[2],"g")),o=mm):void 0!==d[3]&&(o=mm):o===mm?">"===d[0]?(o=null!=n?n:dm,c=-1):void 0===d[1]?c=-2:(c=o.lastIndex-d[2].length,l=d[1],o=void 0===d[3]?mm:'"'===d[3]?vm:fm):o===vm||o===fm?o=mm:o===cm||o===hm?o=dm:(o=mm,n=void 0);var m=o===mm&&e[s+1].startsWith("/>")?" ":"";r+=o===dm?u+am:c>=0?(a.push(l),u.slice(0,c)+tm+u.slice(c)+nm+m):u+nm+(-2===c?s:m)}return[Pm(e,r+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),a]})(t,n),c=d[0],m=d[1];if(this.el=e.createElement(c,i),Em.currentNode=this.el.content,2===n||3===n){var f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;null!==(a=Em.nextNode())&&l.length<u;){if(1===a.nodeType){if(a.hasAttributes())for(var v,p=h(a.getAttributeNames());!(v=p()).done;){var g=v.value;if(g.endsWith(tm)){var y=m[s++],b=a.getAttribute(g).split(nm),w=/([.?@])?(.*)/.exec(y);l.push({type:1,index:r,name:w[2],strings:b,ctor:"."===w[1]?xm:"?"===w[1]?Cm:"@"===w[1]?Im:Dm}),a.removeAttribute(g)}else g.startsWith(nm)&&(l.push({type:6,index:r}),a.removeAttribute(g))}if(pm.test(a.tagName)){var k=a.textContent.split(nm),S=k.length-1;if(S>0){a.textContent=Zh?Zh.emptyScript:"";for(var E=0;E<S;E++)a.append(k[E],om()),Em.nextNode(),l.push({type:2,index:++r});a.append(k[S],om())}}}else if(8===a.nodeType)if(a.data===im)l.push({type:2,index:r});else for(var P=-1;-1!==(P=a.data.indexOf(nm,P+1));)l.push({type:7,index:r}),P+=nm.length-1;r++}},null,[{key:"createElement",value:function(e,t){var n=rm.createElement("template");return n.innerHTML=e,n}}])}();function Mm(e,t,n=e,i){var a,r,o,s,u;if(t===wm)return t;var l=void 0!==i?null===(a=n._$Co)||void 0===a?void 0:a[i]:n._$Cl,d=sm(t)?void 0:t._$litDirective$;return(null===(r=l)||void 0===r?void 0:r.constructor)!==d&&(null!==(o=l)&&void 0!==o&&null!==(s=o._$AO)&&void 0!==s&&s.call(o,!1),void 0===d?l=void 0:(l=new d(e))._$AT(e,n,i),void 0!==i?(null!==(u=n._$Co)&&void 0!==u?u:n._$Co=[])[i]=l:n._$Cl=l),void 0!==l&&(t=Mm(e,l._$AS(e,t.values),l,i)),t}var _m=function(){return c(function e(t,n){o(this,e),this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n},[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(e){var t,n=this._$AD,i=n.el.content,a=n.parts,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:rm).importNode(i,!0);Em.currentNode=r;for(var o=Em.nextNode(),s=0,u=0,l=a[0];void 0!==l;){var d;if(s===l.index){var c=void 0;2===l.type?c=new Am(o,o.nextSibling,this,e):1===l.type?c=new l.ctor(o,l.name,l.strings,this,e):6===l.type&&(c=new Lm(o,this,e)),this._$AV.push(c),l=a[++u]}s!==(null===(d=l)||void 0===d?void 0:d.index)&&(o=Em.nextNode(),s++)}return Em.currentNode=rm,r}},{key:"p",value:function(e){for(var t,n=0,i=h(this._$AV);!(t=i()).done;){var a=t.value;void 0!==a&&(void 0!==a.strings?(a._$AI(e,a,n),n+=a.strings.length-2):a._$AI(e[n])),n++}}}])}(),Am=function(){return c(function e(t,n,i,a){var r;o(this,e),this.type=2,this._$AH=km,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=i,this.options=a,this._$Cv=null===(r=null==a?void 0:a.isConnected)||void 0===r||r},[{key:"_$AU",get:function(){var e,t;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cv}},{key:"parentNode",get:function(){var e,t=this._$AA.parentNode,n=this._$AM;return void 0!==n&&11===(null===(e=t)||void 0===e?void 0:e.nodeType)&&(t=n.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(e,t=this){e=Mm(this,e,t),sm(e)?e===km||null==e||""===e?(this._$AH!==km&&this._$AR(),this._$AH=km):e!==this._$AH&&e!==wm&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>um(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.k(e):this._(e)}},{key:"O",value:function(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}},{key:"T",value:function(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}},{key:"_",value:function(e){this._$AH!==km&&sm(this._$AH)?this._$AA.nextSibling.data=e:this.T(rm.createTextNode(e)),this._$AH=e}},{key:"$",value:function(e){var t,n=e.values,i=e._$litType$,a="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Tm.createElement(Pm(i.h,i.h[0]),this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===a)this._$AH.p(n);else{var r=new _m(a,this),o=r.u(this.options);r.p(n),this.T(o),this._$AH=r}}},{key:"_$AC",value:function(e){var t=Sm.get(e.strings);return void 0===t&&Sm.set(e.strings,t=new Tm(e)),t}},{key:"k",value:function(e){um(this._$AH)||(this._$AH=[],this._$AR());for(var t,n,i=this._$AH,a=0,r=h(e);!(n=r()).done;){var o=n.value;a===i.length?i.push(t=new _k(this.O(om()),this.O(om()),this,this.options)):t=i[a],t._$AI(o),a++}a<i.length&&(this._$AR(t&&t._$AB.nextSibling,a),i.length=a)}},{key:"_$AR",value:function(e=this._$AA.nextSibling,t){for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e!==this._$AB;){var n,i=Qh(e).nextSibling;Qh(e).remove(),e=i}}},{key:"setConnected",value:function(e){var t;void 0===this._$AM&&(this._$Cv=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}])}(),Dm=function(){return c(function e(t,n,i,a,r){o(this,e),this.type=1,this._$AH=km,this._$AN=void 0,this.element=t,this.name=n,this._$AM=a,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=km},[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e,t=this,n,i){var a=this.strings,r=!1;if(void 0===a)e=Mm(this,e,t,0),(r=!sm(e)||e!==this._$AH&&e!==wm)&&(this._$AH=e);else{var o,s,u=e;for(e=a[0],o=0;o<a.length-1;o++)(s=Mm(this,u[n+o],t,o))===wm&&(s=this._$AH[o]),r||(r=!sm(s)||s!==this._$AH[o]),s===km?e=km:e!==km&&(e+=(null!=s?s:"")+a[o+1]),this._$AH[o]=s}r&&!i&&this.j(e)}},{key:"j",value:function(e){e===km?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}])}(),xm=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).type=3,e}return p(t,e),c(t,[{key:"j",value:function(e){this.element[this.name]=e===km?void 0:e}}])}(Dm),Cm=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).type=4,e}return p(t,e),c(t,[{key:"j",value:function(e){this.element.toggleAttribute(this.name,!!e&&e!==km)}}])}(Dm),Im=function(e){function t(e,n,i,a,s){var u;return o(this,t),(u=r(this,t,[e,n,i,a,s])).type=5,u}return p(t,e),c(t,[{key:"_$AI",value:function(e,t=this){var n;if((e=null!==(n=Mm(this,e,t,0))&&void 0!==n?n:km)!==wm){var i=this._$AH,a=e===km&&i!==km||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==km&&(i===km||a);a&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}}},{key:"handleEvent",value:function(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(t=null===(n=this.options)||void 0===n?void 0:n.host)&&void 0!==t?t:this.element,e):this._$AH.handleEvent(e)}}])}(Dm),Lm=function(){return c(function e(t,n,i){o(this,e),this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i},[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){Mm(this,e)}}])}(),Rm={I:Am},Fm=Jh.litHtmlPolyfillSupport;null!=Fm&&Fm(Tm,Am),(null!==(Yh=Jh.litHtmlVersions)&&void 0!==Yh?Yh:Jh.litHtmlVersions=[]).push("3.3.3");var Om,Nm,$m=globalThis,Wm=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).renderOptions={host:i(e)},e._$Do=void 0,e}return p(t,e),c(t,[{key:"createRenderRoot",value:function(){var e,n,i=T(t,"createRenderRoot",this,3)([]);return null!==(n=(e=this.renderOptions).renderBefore)&&void 0!==n||(e.renderBefore=i.firstChild),i}},{key:"update",value:function(e){var n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),T(t,"update",this,3)([e]),this._$Do=((e,t,n)=>{var i,a=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t,r=a._$litPart$;if(void 0===r){var o,s=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:null;a._$litPart$=r=new Am(t.insertBefore(om(),s),s,void 0,null!=n?n:{})}return r._$AI(e),r})(n,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var e;T(t,"connectedCallback",this,3)([]),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var e;T(t,"disconnectedCallback",this,3)([]),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}},{key:"render",value:function(){return wm}}])}(qh);Wm._$litElement$=!0,Wm.finalized=!0,null===(Om=$m.litElementHydrateSupport)||void 0===Om||Om.call($m,{LitElement:Wm});var jm=$m.litElementPolyfillSupport;null==jm||jm({LitElement:Wm}),(null!==(Nm=$m.litElementVersions)&&void 0!==Nm?Nm:$m.litElementVersions=[]).push("4.2.2");var Bm,zm,Um=Lh(Bm||(Bm=(e=>e)`
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).NamiWebSdk={})}(this,function(e){"use strict";function t(e,t){this.v=e,this.k=t}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){return new t(e,0)}function r(e,t,n){return t=v(t),b(e,g()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(()=>{if("undefined"==typeof globalThis){var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")();Object.defineProperty(e,"globalThis",{value:e,writable:!0,enumerable:!1,configurable:!0})}})(),"undefined"!=typeof Element&&"function"!=typeof Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var e=this.attributes,t=new Array(e.length),n=0;n<e.length;n+=1)t[n]=e[n].name;return t});var u=0;function l(e){return"__private_"+u+++"_"+e}function d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,M(i.key),i)}}function c(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e))||t){i&&(e=i);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m.apply(null,arguments)}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},f.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function y(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function b(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}function w(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function r(n,i,a,r){var u=i&&i.prototype instanceof s?i:s,l=Object.create(u.prototype);return E(l,"_invoke",function(n,i,a){var r,s,u,l=0,d=a||[],c=!1,h={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return r=t,s=0,u=e,h.n=n,o}};function m(n,i){for(s=n,u=i,t=0;!c&&l&&!a&&t<d.length;t++){var a,r=d[t],m=h.p,f=r[2];n>3?(a=f===i)&&(u=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((a=n<2&&m<r[1])?(s=0,h.v=i,h.n=r[1]):m<f&&(a=n<3||r[0]>i||i>f)&&(r[4]=n,r[5]=i,h.n=f,s=0))}if(a||n>1)return o;throw c=!0,i}return function(a,d,f){if(l>1)throw TypeError("Generator is already running");for(c&&1===d&&m(d,f),s=d,u=f;(t=s<2?e:u)||!c;){r||(s?s<3?(s>1&&(h.n=-1),m(s,u)):h.n=u:h.v=u);try{if(l=2,r){if(s||(a="next"),t=r[a]){if(!(t=t.call(r,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),s=1);r=e}else if((t=(c=h.n<0)?u:n.call(i,h))!==o)break}catch(t){r=e,s=1,u=t}finally{l=1}}return{value:t,done:c}}}(n,a,r),!0),l}var o={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var d=[][i]?t(t([][i]())):(E(t={},i,function(){return this}),t),c=l.prototype=s.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,E(e,a,"GeneratorFunction")),e.prototype=Object.create(c),e}return u.prototype=l,E(c,"constructor",l),E(l,"constructor",u),u.displayName="GeneratorFunction",E(l,a,"GeneratorFunction"),E(c),E(c,a,"Generator"),E(c,i,function(){return this}),E(c,"toString",function(){return"[object Generator]"}),(w=function(){return{w:r,m:h}})()}function k(e,t,n,i,a){var r=function(e,t,n,i,a){return new S(w().w(e,t,n,i),a||Promise)}(e,t,n,i,a);return r.next().then(function(e){return e.done?e.value:r.next()})}function S(e,n){function i(a,r,o,s){try{var u=e[a](r),l=u.value;return l instanceof t?n.resolve(l.v).then(function(e){i("next",e,o,s)},function(e){i("throw",e,o,s)}):n.resolve(l).then(function(e){u.value=e,o(u)},function(e){return i("throw",e,o,s)})}catch(e){s(e)}}var a;this.next||(E(S.prototype),E(S.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),E(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)}function E(e,t,n,i){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}E=function(e,t,n,i){function r(t,n){E(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},E(e,t,n,i)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function T(e,t,n,i){var a=f(v(e.prototype),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}function M(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function _(e){var t="function"==typeof Map?new Map:void 0;return _=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(g())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var a=new(e.bind.apply(e,i));return n&&P(a,n.prototype),a}(e,arguments,v(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)},_(e)}var A,D,x,C,I,L,R,F,O,N,$,W,j=function(){return c(function e(t){o(this,e),this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t},[{key:"shadowRoot",get:function(){return this.__host.__shadowRoot}},{key:"checkValidity",value:function(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}},{key:"reportValidity",value:function(){return!0}},{key:"setFormValue",value:function(){}},{key:"setValidity",value:function(){}}])}(),B=function(e,t,n,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?a.call(e,n):a?a.value=n:t.set(e,n),n},z=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},U={__proto__:null,enumerable:!0};Object.freeze(U);var H=(N=function(){return c(function e(t,n={}){if(o(this,e),A.set(this,!1),D.set(this,!1),x.set(this,!1),C.set(this,!1),I.set(this,Date.now()),L.set(this,!1),R.set(this,void 0),F.set(this,void 0),O.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,0===arguments.length)throw new Error("The type argument must be specified");if("object"!=typeof n||!n)throw new Error('The "options" argument must be an object');var i=n.bubbles,a=n.cancelable,r=n.composed;B(this,A,!!a,"f"),B(this,D,!!i,"f"),B(this,x,!!r,"f"),B(this,R,`${t}`,"f"),B(this,F,null,"f"),B(this,O,!1,"f")},[{key:"initEvent",value:function(e,t,n){throw new Error("Method not implemented.")}},{key:"stopImmediatePropagation",value:function(){this.stopPropagation()}},{key:"preventDefault",value:function(){B(this,C,!0,"f")}},{key:"target",get:function(){return z(this,F,"f")}},{key:"currentTarget",get:function(){return z(this,F,"f")}},{key:"srcElement",get:function(){return z(this,F,"f")}},{key:"type",get:function(){return z(this,R,"f")}},{key:"cancelable",get:function(){return z(this,A,"f")}},{key:"defaultPrevented",get:function(){return z(this,A,"f")&&z(this,C,"f")}},{key:"timeStamp",get:function(){return z(this,I,"f")}},{key:"composedPath",value:function(){return z(this,O,"f")?[z(this,F,"f")]:[]}},{key:"returnValue",get:function(){return!z(this,A,"f")||!z(this,C,"f")}},{key:"bubbles",get:function(){return z(this,D,"f")}},{key:"composed",get:function(){return z(this,x,"f")}},{key:"eventPhase",get:function(){return z(this,O,"f")?N.AT_TARGET:N.NONE}},{key:"cancelBubble",get:function(){return z(this,L,"f")},set:function(e){e&&B(this,L,!0,"f")}},{key:"stopPropagation",value:function(){B(this,L,!0,"f")}},{key:"isTrusted",get:function(){return!1}}])}(),A=new WeakMap,D=new WeakMap,x=new WeakMap,C=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakMap,F=new WeakMap,O=new WeakMap,N.NONE=0,N.CAPTURING_PHASE=1,N.AT_TARGET=2,N.BUBBLING_PHASE=3,N);Object.defineProperties(H.prototype,{initEvent:U,stopImmediatePropagation:U,preventDefault:U,target:U,currentTarget:U,srcElement:U,type:U,cancelable:U,defaultPrevented:U,timeStamp:U,composedPath:U,returnValue:U,bubbles:U,composed:U,eventPhase:U,cancelBubble:U,stopPropagation:U,isTrusted:U});var G=(W=function(e){function t(e,n={}){var i,a;return o(this,t),a=r(this,t,[e,n]),$.set(a,void 0),B(a,$,null!==(i=null==n?void 0:n.detail)&&void 0!==i?i:null,"f"),a}return p(t,e),c(t,[{key:"initCustomEvent",value:function(e,t,n,i){throw new Error("Method not implemented.")}},{key:"detail",get:function(){return z(this,$,"f")}}])}(H),$=new WeakMap,W);Object.defineProperties(G.prototype,{detail:U});var V,K,X,Y,q=H,J=G;(V=function(){return c(function e(){o(this,e),this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""},[{key:"parentRule",get:function(){return null}},{key:"parentStyleSheet",get:function(){return this.__parentStyleSheet}},{key:"type",get:function(){return 0}}])}()).STYLE_RULE=1,V.CHARSET_RULE=2,V.IMPORT_RULE=3,V.MEDIA_RULE=4,V.FONT_FACE_RULE=5,V.PAGE_RULE=6,V.NAMESPACE_RULE=10,V.KEYFRAMES_RULE=7,V.KEYFRAME_RULE=8,V.SUPPORTS_RULE=12,V.COUNTER_STYLE_RULE=11,V.FONT_FEATURE_VALUES_RULE=14,V.MARGIN_RULE=9,null!==(K=globalThis.Event)&&void 0!==K||(globalThis.Event=q),null!==(X=globalThis.CustomEvent)&&void 0!==X||(globalThis.CustomEvent=J);var Q=Symbol(),Z=e=>{var t;return"boolean"==typeof e?e:null!==(t=null==e?void 0:e.capture)&&void 0!==t&&t},ee={__proto__:null,enumerable:!0};Object.freeze(ee);var te=function(){return c(function e(){o(this,e),this.__eventListeners=new Map,this.__captureEventListeners=new Map},[{key:"addEventListener",value:function(e,t,n){var i;if(null!=t){var a=Z(n)?this.__captureEventListeners:this.__eventListeners,r=a.get(e);if(void 0===r)r=new Map,a.set(e,r);else if(r.has(t))return;var o="object"==typeof n&&n?n:{};null===(i=o.signal)||void 0===i||i.addEventListener("abort",()=>this.removeEventListener(e,t,n)),r.set(t,null!=o?o:{})}}},{key:"removeEventListener",value:function(e,t,n){if(null!=t){var i=Z(n)?this.__captureEventListeners:this.__eventListeners,a=i.get(e);void 0!==a&&(a.delete(t),a.size||i.delete(e))}}},{key:"dispatchEvent",value:function(e){var t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));var n=!1,i=!1,a=q.NONE,r=null,o=null,s=null,u=e.stopPropagation,l=e.stopImmediatePropagation;Object.defineProperties(e,{target:m({get:()=>null!=r?r:o},ee),srcElement:m({get:()=>e.target},ee),currentTarget:m({get:()=>s},ee),eventPhase:m({get:()=>a},ee),composedPath:m({value:()=>t},ee),stopPropagation:m({value:()=>{n=!0,u.call(e)}},ee),stopImmediatePropagation:m({value:()=>{i=!0,l.call(e)}},ee)});var d=(t,n,i)=>{"function"==typeof t?t(e):"function"==typeof(null==t?void 0:t.handleEvent)&&t.handleEvent(e),n.once&&i.delete(t)},c=()=>(s=null,a=q.NONE,!e.defaultPrevented),f=t.slice().reverse();r=this.__host&&e.composed?null:this;for(var v,p=e=>{for(o=this;o.__host&&e.includes(o.__host);)o=o.__host},g=h(f);!(v=g()).done;){var y=v.value;r||o&&o!==y.__host||p(f.slice(f.indexOf(y))),s=y,a=y===e.target?q.AT_TARGET:q.CAPTURING_PHASE;var b=y.__captureEventListeners.get(e.type);if(b)for(var w,k=h(b);!(w=k()).done;){var S=w.value;if(d(S[0],S[1],b),i)return c()}if(n)return c()}var E=e.bubbles?t:[this];o=null;for(var P,T=h(E);!(P=T()).done;){var M=P.value;r||o&&M!==o.__host||p(E.slice(0,E.indexOf(M)+1)),s=M,a=M===e.target?q.AT_TARGET:q.BUBBLING_PHASE;var _=M.__eventListeners.get(e.type);if(_)for(var A,D=h(_);!(A=D()).done;){var x=A.value;if(d(x[0],x[1],_),i)return c()}if(n)return c()}return c()}},{key:"__resolveFullEventPath",value:function(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,oe,pe]}}])}(),ne=new WeakMap,ie=e=>{var t=ne.get(e);return void 0===t&&ne.set(e,t=new Map),t},ae=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),c(t,[{key:"getRootNode",value:function(e){var t;if(null!=e&&e.composed)return se;var n=this.__host;return null!==(t=null==n?void 0:n.__shadowRoot)&&void 0!==t?t:se}}])}(te),re=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),c(t,[{key:"adoptedStyleSheets",get:function(){return[]}},{key:"createTreeWalker",value:function(){return{}}},{key:"createTextNode",value:function(){return{}}},{key:"createElement",value:function(){return{}}}])}(ae),oe=new re,se=oe,ue=function(e){function t(e){var n;if(o(this,t),n=r(this,t),e!==Q)throw new TypeError("Illegal constructor");return Object.assign(n,globalThis,{CustomElementRegistry:fe,customElements:ve,document:se,Document:re,Element:le,EventTarget:te,HTMLElement:de,Node:ae,ShadowRoot:he,window:n,Window:ue}),n}return p(t,e),c(t)}(ae),le=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).__shadowRootMode=null,e.__shadowRoot=null,e.__internals=null,e}return p(t,e),c(t,[{key:"attributes",get:function(){return Array.from(ie(this)).map(([e,t])=>({name:e,value:t}))}},{key:"shadowRoot",get:function(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}},{key:"localName",get:function(){return this.constructor.__localName}},{key:"tagName",get:function(){var e;return null===(e=this.localName)||void 0===e?void 0:e.toUpperCase()}},{key:"setAttribute",value:function(e,t){ie(this).set(e,String(t))}},{key:"removeAttribute",value:function(e){ie(this).delete(e)}},{key:"toggleAttribute",value:function(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}},{key:"hasAttribute",value:function(e){return ie(this).has(e)}},{key:"attachShadow",value:function(e){this.__shadowRootMode=e.mode;var t=new he(Q,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}},{key:"attachInternals",value:function(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");var e=new j(this);return this.__internals=e,e}},{key:"getAttribute",value:function(e){var t=ie(this).get(e);return null!=t?t:null}}])}(ae),de=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),c(t)}(le),ce=de,he=function(e){function t(e,n){var i;if(o(this,t),i=r(this,t),e!=e)throw new TypeError("Illegal constructor");return i.mode=n.mode,i}return p(t,e),c(t,[{key:"host",get:function(){return this.__host}}])}(ae);function me(){var e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}null!==(Y=globalThis.litServerRoot)&&void 0!==Y||(globalThis.litServerRoot=Object.defineProperty(new ce,"localName",{get:()=>"lit-server-root"}));var fe=function(){return c(function e(){o(this,e),this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map},[{key:"define",value:function(e,t){var n,i;if(this.__definitions.has(e)){if("development"!==process.env.NODE_ENV)throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`)}if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:null!==(n=t.observedAttributes)&&void 0!==n?n:[]}),this.__reverseDefinitions.set(t,e),null===(i=this.__pendingWhenDefineds.get(e))||void 0===i||i.resolve(t),this.__pendingWhenDefineds.delete(e)}},{key:"get",value:function(e){var t=this.__definitions.get(e);return null==t?void 0:t.ctor}},{key:"getName",value:function(e){var t;return null!==(t=this.__reverseDefinitions.get(e))&&void 0!==t?t:null}},{key:"initialize",value:function(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}},{key:"upgrade",value:function(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}},{key:"whenDefined",value:function(e){var t,n;return k(function(i){for(;;)switch(i.n){case 0:if(!(t=this.__definitions.get(e))){i.n=1;break}return i.a(2,t.ctor);case 1:return(n=this.__pendingWhenDefineds.get(e))||(n=me(),this.__pendingWhenDefineds.set(e,n)),i.a(2,n.promise)}},null,this,null,Promise)}}])}(),ve=new fe,pe=new ue(Q);"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=ce);var ge=["action"],ye=null;var be={storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{},getAllKeys:()=>[]},device:{getDeviceData:()=>({os_version:"",os_name:"",browser_name:"",browser_version:"",sdk_client:"",sdk_version:"",language:"en"}),getDeviceFormFactor:()=>"desktop",getDeviceScaleFactor:()=>1,generateUUID:()=>{throw new Error("No platform adapter registered — call registerPlatformAdapters() before Nami.configure()")},getScreenInfo:()=>({width:0,height:0,scale:1}),getLanguage:()=>"en"},ui:{createPaywall:()=>null,reRenderPaywall:()=>{},flowNavigateToScreen:()=>{}}};function we(){return null!=ye?ye:be}function ke(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function Se(e,t,n,i){if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function Ee(e,t,n,i,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError;var Pe;!function(e){e.SDK="sdk",e.ML="ml",e.THIRD_PARTY_ANALYTICS="third_party_analytics",e.THIRD_PARTY_TRANSACTIONS="third_party_transactions",e.PAYWALL_PERSONALIZATION="paywall_personalization",e.ANONYMOUS_MODE_CAPABILITY="anonymous_allowed",e.LANGUAGE_MANAGEMENT="language_management",e.ENTITLEMENT_MANAGEMENT="entitlement_management"}(Pe||(Pe={}));var Te,Me={},_e=Me.NAMI_SDK_VERSION,Ae=void 0===_e?"3.4.2":_e,De=Me.NAMI_SDK_PACKAGE_VERSION,xe=void 0===De?"3.4.2-dev.202606042208":De,Ce=Me.PLATFORM_ID_REQUIRED,Ie=void 0===Ce?"Platform ID is required":Ce,Le=Me.DEVICE_ID_REQUIRED,Re=void 0===Le?"Device ID is required":Le,Fe=Me.EXTERNAL_ID_REQUIRED,Oe=void 0===Fe?"External ID is required":Fe,Ne=Me.SDK_NOT_INITIALIZED,$e=void 0===Ne?"SDK has not been initialized. Make sure to call Nami.configure() first!":Ne,We=Me.CAMPAIGN_NOT_AVAILABLE,je=void 0===We?"Campaign is not available":We,Be=Me.FLOW_SCREENS_NOT_AVAILABLE,ze=void 0===Be?"Flow screens not available":Be,Ue=Me.UNABLE_TO_UPDATE_CDP_ID,He=void 0===Ue?"Unable to update CDP id in anonymous mode":Ue,Ge=Me.ANONYMOUS_MODE_ALREADY_ON,Ve=void 0===Ge?"Anonymous mode is already turned on.":Ge,Ke=Me.ANONYMOUS_MODE_ALREADY_OFF,Xe=void 0===Ke?"Anonymous mode is already turned off.":Ke,Ye=Me.DEVICE_ID_NOT_SET,qe=void 0===Ye?"Nami Device ID is not set":Ye,Je=Me.AUTH_DEVICE,Qe=void 0===Je?"nami_auth_device":Je,Ze=Me.NAMI_CONFIGURATION,et=void 0===Ze?"nami_configuration":Ze,tt=Me.NAMI_PROFILE,nt=void 0===tt?"nami_profile":tt,it=Me.API_CONFIG,at=void 0===it?"api_config":it,rt=Me.API_CAMPAIGN_RULES,ot=void 0===rt?"api_campaign_rules":rt,st=Me.API_PAYWALLS,ut=void 0===st?"api_paywalls":st,lt=Me.API_CAMPAIGN_SESSION_TIMESTAMP,dt=void 0===lt?"api_campaign_session_timestamp":lt,ct=Me.API_PRODUCTS,ht=void 0===ct?"api_products":ct,mt=Me.API_ACTIVE_ENTITLEMENTS,ft=void 0===mt?"api_active_entitlements":mt,vt=Me.SERVER_NAMI_ENTITLEMENTS,pt=void 0===vt?"server_active_entitlements":vt,gt=Me.INITIAL_APP_CONFIG,yt=void 0===gt?"initial_app_config":gt,bt=Me.INITIAL_CAMPAIGN_RULES,wt=void 0===bt?"initial_campaign_rules":bt,kt=Me.INITIAL_PAYWALLS,St=void 0===kt?"initial_paywalls":kt,Et=Me.INITIAL_PRODUCTS,Pt=void 0===Et?"initial_products":Et,Tt=Me.LOCAL_NAMI_ENTITLEMENTS,Mt=void 0===Tt?"local_active_entitlements":Tt,_t=Me.CUSTOMER_ATTRIBUTES_KEY_PREFIX,At=void 0===_t?"nami_cmr_attributes_":_t,Dt=Me.NAMI_CUSTOMER_JOURNEY_STATE,xt=void 0===Dt?"nami_customer_journey_state":Dt,Ct=Me.ANONYMOUS_MODE,It=void 0===Ct?"nami_anonymous_mode_v2":Ct,Lt=Me.ANONYMOUS_UUID,Rt=void 0===Lt?"nami_anonymous_uuid":Lt,Ft=Me.KEY_SESSION_COUNTER,Ot=void 0===Ft?"nami_session_counter":Ft,Nt=Me.INITIAL_SESSION_COUNTER_VALUE,$t=void 0===Nt?1:Nt,Wt=Me.NAMI_LAST_IMPRESSION_ID,jt=void 0===Wt?"nami_last_impression_id":Wt,Bt=Me.NAMI_PURCHASE_IMPRESSION_ID,zt=void 0===Bt?"nami_purchase_impression_id":Bt,Ut=Me.NAMI_LAUNCH_ID,Ht=void 0===Ut?"nami_launch_id":Ut,Gt=Me.NAMI_SESSION_ID,Vt=void 0===Gt?"nami_session_id":Gt,Kt=Me.NAMI_LANGUAGE_CODE,Xt=void 0===Kt?"nami_language_code":Kt,Yt=Me.NAMI_PURCHASE_CHANNEL,qt=void 0===Yt?"nami_purchase_channel":Yt,Jt=Me.API_VERSION,Qt=Me.BASE_URL_PATH,Zt=void 0===Qt?`sdk/${void 0===Jt?"v3":Jt}/platform`:Qt,en=Me.BASE_URL,tn=void 0===en?"https://app.namiml.com":en,nn=Me.BASE_STAGING_URL,an=void 0===nn?"https://app-staging.namiml.com":nn,rn=Me.CUSTOM_HOST_PREFIX,on=void 0===rn?"namiAPIHost=":rn,sn=Me.USE_STAGING_API,un=void 0===sn?"useStagingAPI":sn,ln=Me.EXTENDED_CLIENT_INFO_PREFIX,dn=void 0===ln?"extendedClientInfo":ln,cn=Me.EXTENDED_CLIENT_INFO_DELIMITER,hn=void 0===cn?":":cn,mn=Me.VALIDATE_PRODUCT_GROUPS,fn=void 0===mn?"validateProductGroups":mn,vn=Me.LOG_HTTP_REQUESTS,pn=void 0===vn?"logHTTPRequests":vn,gn=Me.LOG_HTTP_TRAFFIC,yn=void 0===gn?"logHTTPTraffic":gn,bn=Me.STARTUP_TELEMETRY,wn=void 0===bn?"startupTelemetry":bn,kn=Me.API_MAX_CALLS_LIMIT,Sn=void 0===kn?2:kn,En=Me.API_RETRY_DELAY_SEC,Pn=void 0===En?2:En,Tn=Me.API_TIMEOUT_LIMIT,Mn=void 0===Tn?2e4:Tn,_n=Me.DEVICE_API_TIMEOUT_LIMIT,An=void 0===_n?2e3:_n,Dn=Me.STATUS_BAD_REQUEST,xn=void 0===Dn?400:Dn,Cn=Me.STATUS_NOT_FOUND,In=void 0===Cn?404:Cn,Ln=Me.STATUS_CONFLICT,Rn=void 0===Ln?409:Ln,Fn=Me.STATUS_INTERNAL_SERVER_ERROR,On=void 0===Fn?500:Fn,Nn=Me.INITIAL_SUCCESS,$n=void 0===Nn?"Initial success":Nn,Wn=Me.RECONFIG_SUCCESS,jn=void 0===Wn?"Reconfig success":Wn,Bn=Me.ALREADY_CONFIGURED,zn=void 0===Bn?"Already configured":Bn,Un=Me.AVAILABLE_CAMPAIGNS_CHANGED,Hn=void 0===Un?"AvailableCampaignsChanged":Un,Gn=Me.PAYWALL_ACTION_EVENT,Vn=void 0===Gn?"PaywallActionEvent":Gn,Kn=Me.AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED,Xn=void 0===Kn?"AvailableActiveEntitlementsChanged":Kn,Yn=Me.CUSTOMER_JOURNEY_STATE_CHANGED,qn=void 0===Yn?"CustomerJourneyStateChanged":Yn,Jn=Me.SKU_TEXT_REGEX,Qn=void 0===Jn?/\$\{sku\.(\w+)(:\d+)?\}/g:Jn,Zn=Me.VAR_REGEX,ei=void 0===Zn?/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g:Zn,ti=Me.SMART_TEXT_PATTERN,ni=void 0===ti?"${":ti,ii=Me.LIQUID_VARIABLE_REGEX,ai=void 0===ii?/\${[A-Za-z0-9.]+}/g:ii,ri=[Qe,et,nt,at,ot,ut,dt,ht,ft,pt,yt,wt,St,Pt,Mt,xt,It,Rt,Ot,jt,zt,Ht,Vt,Xt,qt];e.LogLevel=void 0,(Te=e.LogLevel||(e.LogLevel={}))[Te.DEBUG=1]="DEBUG",Te[Te.INFO=2]="INFO",Te[Te.WARN=3]="WARN",Te[Te.ERROR=4]="ERROR";var oi={debug:e.LogLevel.DEBUG,info:e.LogLevel.INFO,warn:e.LogLevel.WARN,error:e.LogLevel.ERROR},si=function(){return c(function t(){o(this,t),this.currentLogLevel=e.LogLevel.DEBUG,this.setLogger=t=>{this.currentLogLevel=t?oi[t]:e.LogLevel.WARN}},[{key:"debug",value:function(t,...n){this.shouldLog(e.LogLevel.DEBUG)&&console.debug(this.formatMessage(e.LogLevel.DEBUG,t,...n))}},{key:"info",value:function(t,...n){this.shouldLog(e.LogLevel.INFO)&&console.info(this.formatMessage(e.LogLevel.INFO,t,...n))}},{key:"warn",value:function(t,...n){this.shouldLog(e.LogLevel.WARN)&&console.warn(this.formatMessage(e.LogLevel.WARN,t,...n))}},{key:"error",value:function(t,...n){this.shouldLog(e.LogLevel.ERROR)&&console.error(this.formatMessage(e.LogLevel.ERROR,t,...n))}},{key:"shouldLog",value:function(e){return e>=this.currentLogLevel}},{key:"formatMessage",value:function(t,n,...i){var a=e.LogLevel[t];return`[${(new Date).toISOString()}] [${a}] ${n} ${i=i.map(e=>"object"==typeof e?JSON.stringify(e):e)}`}}])}(),ui=new si;function li(e){for(var t=-1,n=null==e?0:e.length,i=0,a=[];++t<n;){var r=e[t];r&&(a[i++]=r)}return a}function di(e,t){return e===t||e!=e&&t!=t}function ci(e,t){for(var n=e.length;n--;)if(di(e[n][0],t))return n;return-1}var hi=Array.prototype.splice;function mi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}mi.prototype.clear=function(){this.__data__=[],this.size=0},mi.prototype.delete=function(e){var t=this.__data__,n=ci(t,e);return!(n<0)&&(n==t.length-1?t.pop():hi.call(t,n,1),--this.size,!0)},mi.prototype.get=function(e){var t=this.__data__,n=ci(t,e);return n<0?void 0:t[n][1]},mi.prototype.has=function(e){return ci(this.__data__,e)>-1},mi.prototype.set=function(e,t){var n=this.__data__,i=ci(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var fi="object"==typeof global&&global&&global.Object===Object&&global,vi="object"==typeof self&&self&&self.Object===Object&&self,pi=fi||vi||Function("return this")(),gi=pi.Symbol,yi=Object.prototype,bi=yi.hasOwnProperty,wi=yi.toString,ki=gi?gi.toStringTag:void 0;var Si=Object.prototype.toString;var Ei=gi?gi.toStringTag:void 0;function Pi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ei&&Ei in Object(e)?function(e){var t=bi.call(e,ki),n=e[ki];try{e[ki]=void 0;var i=!0}catch(e){}var a=wi.call(e);return i&&(t?e[ki]=n:delete e[ki]),a}(e):function(e){return Si.call(e)}(e)}function Ti(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Mi(e){if(!Ti(e))return!1;var t=Pi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var _i,Ai=pi["__core-js_shared__"],Di=(_i=/[^.]+$/.exec(Ai&&Ai.keys&&Ai.keys.IE_PROTO||""))?"Symbol(src)_1."+_i:"";var xi=Function.prototype.toString;function Ci(e){if(null!=e){try{return xi.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Ii=/^\[object .+?Constructor\]$/,Li=Function.prototype,Ri=Object.prototype,Fi=Li.toString,Oi=Ri.hasOwnProperty,Ni=RegExp("^"+Fi.call(Oi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $i(e){return!(!Ti(e)||(t=e,Di&&Di in t))&&(Mi(e)?Ni:Ii).test(Ci(e));var t}function Wi(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $i(n)?n:void 0}var ji=Wi(pi,"Map"),Bi=Wi(Object,"create");var zi=Object.prototype.hasOwnProperty;var Ui=Object.prototype.hasOwnProperty;function Hi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Gi(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Vi(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Hi.prototype.clear=function(){this.__data__=Bi?Bi(null):{},this.size=0},Hi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hi.prototype.get=function(e){var t=this.__data__;if(Bi){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return zi.call(t,e)?t[e]:void 0},Hi.prototype.has=function(e){var t=this.__data__;return Bi?void 0!==t[e]:Ui.call(t,e)},Hi.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Bi&&void 0===t?"__lodash_hash_undefined__":t,this},Vi.prototype.clear=function(){this.size=0,this.__data__={hash:new Hi,map:new(ji||mi),string:new Hi}},Vi.prototype.delete=function(e){var t=Gi(this,e).delete(e);return this.size-=t?1:0,t},Vi.prototype.get=function(e){return Gi(this,e).get(e)},Vi.prototype.has=function(e){return Gi(this,e).has(e)},Vi.prototype.set=function(e,t){var n=Gi(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function Ki(e){var t=this.__data__=new mi(e);this.size=t.size}Ki.prototype.clear=function(){this.__data__=new mi,this.size=0},Ki.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ki.prototype.get=function(e){return this.__data__.get(e)},Ki.prototype.has=function(e){return this.__data__.has(e)},Ki.prototype.set=function(e,t){var n=this.__data__;if(n instanceof mi){var i=n.__data__;if(!ji||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vi(i)}return n.set(e,t),this.size=n.size,this};function Xi(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vi;++t<n;)this.add(e[t])}function Yi(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function qi(e,t){return e.has(t)}Xi.prototype.add=Xi.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Xi.prototype.has=function(e){return this.__data__.has(e)};function Ji(e,t,n,i,a,r){var o=1&n,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var c=-1,h=!0,m=2&n?new Xi:void 0;for(r.set(e,t),r.set(t,e);++c<s;){var f=e[c],v=t[c];if(i)var p=o?i(v,f,c,t,e,r):i(f,v,c,e,t,r);if(void 0!==p){if(p)continue;h=!1;break}if(m){if(!Yi(t,function(e,t){if(!qi(m,t)&&(f===e||a(f,e,n,i,r)))return m.push(t)})){h=!1;break}}else if(f!==v&&!a(f,v,n,i,r)){h=!1;break}}return r.delete(e),r.delete(t),h}var Qi=pi.Uint8Array;function Zi(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}function ea(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ta=gi?gi.prototype:void 0,na=ta?ta.valueOf:void 0;var ia=Array.isArray;var aa=Object.prototype.propertyIsEnumerable,ra=Object.getOwnPropertySymbols,oa=ra?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,a=0,r=[];++n<i;){var o=e[n];t(o,n,e)&&(r[a++]=o)}return r}(ra(e),function(t){return aa.call(e,t)}))}:function(){return[]};function sa(e){return null!=e&&"object"==typeof e}function ua(e){return sa(e)&&"[object Arguments]"==Pi(e)}var la=Object.prototype,da=la.hasOwnProperty,ca=la.propertyIsEnumerable,ha=ua(function(){return arguments}())?ua:function(e){return sa(e)&&da.call(e,"callee")&&!ca.call(e,"callee")};var ma="object"==typeof e&&e&&!e.nodeType&&e,fa=ma&&"object"==typeof module&&module&&!module.nodeType&&module,va=fa&&fa.exports===ma?pi.Buffer:void 0,pa=(va?va.isBuffer:void 0)||function(){return!1},ga=/^(?:0|[1-9]\d*)$/;function ya(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&ga.test(e))&&e>-1&&e%1==0&&e<t}function ba(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var wa={};function ka(e){return function(t){return e(t)}}wa["[object Float32Array]"]=wa["[object Float64Array]"]=wa["[object Int8Array]"]=wa["[object Int16Array]"]=wa["[object Int32Array]"]=wa["[object Uint8Array]"]=wa["[object Uint8ClampedArray]"]=wa["[object Uint16Array]"]=wa["[object Uint32Array]"]=!0,wa["[object Arguments]"]=wa["[object Array]"]=wa["[object ArrayBuffer]"]=wa["[object Boolean]"]=wa["[object DataView]"]=wa["[object Date]"]=wa["[object Error]"]=wa["[object Function]"]=wa["[object Map]"]=wa["[object Number]"]=wa["[object Object]"]=wa["[object RegExp]"]=wa["[object Set]"]=wa["[object String]"]=wa["[object WeakMap]"]=!1;var Sa="object"==typeof e&&e&&!e.nodeType&&e,Ea=Sa&&"object"==typeof module&&module&&!module.nodeType&&module,Pa=Ea&&Ea.exports===Sa&&fi.process,Ta=function(){try{var e=Ea&&Ea.require&&Ea.require("util").types;return e||Pa&&Pa.binding&&Pa.binding("util")}catch(e){}}(),Ma=Ta&&Ta.isTypedArray,_a=Ma?ka(Ma):function(e){return sa(e)&&ba(e.length)&&!!wa[Pi(e)]},Aa=Object.prototype.hasOwnProperty;function Da(e,t){var n=ia(e),i=!n&&ha(e),a=!n&&!i&&pa(e),r=!n&&!i&&!a&&_a(e),o=n||i||a||r,s=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],u=s.length;for(var l in e)!Aa.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ya(l,u))||s.push(l);return s}var xa=Object.prototype;function Ca(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xa)}function Ia(e,t){return function(n){return e(t(n))}}var La=Ia(Object.keys,Object),Ra=Object.prototype.hasOwnProperty;function Fa(e){return null!=(t=e)&&ba(t.length)&&!Mi(t)?Da(e):function(e){if(!Ca(e))return La(e);var t=[];for(var n in Object(e))Ra.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e);var t}function Oa(e){return function(e,t,n){var i=t(e);return ia(e)?i:function(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}(i,n(e))}(e,Fa,oa)}var Na=Object.prototype.hasOwnProperty;var $a=Wi(pi,"DataView"),Wa=Wi(pi,"Promise"),ja=Wi(pi,"Set"),Ba=Wi(pi,"WeakMap"),za="[object Map]",Ua="[object Promise]",Ha="[object Set]",Ga="[object WeakMap]",Va="[object DataView]",Ka=Ci($a),Xa=Ci(ji),Ya=Ci(Wa),qa=Ci(ja),Ja=Ci(Ba),Qa=Pi;($a&&Qa(new $a(new ArrayBuffer(1)))!=Va||ji&&Qa(new ji)!=za||Wa&&Qa(Wa.resolve())!=Ua||ja&&Qa(new ja)!=Ha||Ba&&Qa(new Ba)!=Ga)&&(Qa=function(e){var t=Pi(e),n="[object Object]"==t?e.constructor:void 0,i=n?Ci(n):"";if(i)switch(i){case Ka:return Va;case Xa:return za;case Ya:return Ua;case qa:return Ha;case Ja:return Ga}return t});var Za="[object Arguments]",er="[object Array]",tr="[object Object]",nr=Object.prototype.hasOwnProperty;function ir(e,t,n,i,a,r){var o=ia(e),s=ia(t),u=o?er:Qa(e),l=s?er:Qa(t),d=(u=u==Za?tr:u)==tr,c=(l=l==Za?tr:l)==tr,h=u==l;if(h&&pa(e)){if(!pa(t))return!1;o=!0,d=!1}if(h&&!d)return r||(r=new Ki),o||_a(e)?Ji(e,t,n,i,a,r):function(e,t,n,i,a,r,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new Qi(e),new Qi(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return di(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Zi;case"[object Set]":var u=1&i;if(s||(s=ea),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;i|=2,o.set(e,t);var d=Ji(s(e),s(t),i,a,r,o);return o.delete(e),d;case"[object Symbol]":if(na)return na.call(e)==na.call(t)}return!1}(e,t,u,n,i,a,r);if(!(1&n)){var m=d&&nr.call(e,"__wrapped__"),f=c&&nr.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new Ki),a(v,p,n,i,r)}}return!!h&&(r||(r=new Ki),function(e,t,n,i,a,r){var o=1&n,s=Oa(e),u=s.length;if(u!=Oa(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:Na.call(t,d)))return!1}var c=r.get(e),h=r.get(t);if(c&&h)return c==t&&h==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(i)var g=o?i(p,v,d,t,e,r):i(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,n,i,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,n,i,a,r))}function ar(e,t,n,i,a){return e===t||(null==e||null==t||!sa(e)&&!sa(t)?e!=e&&t!=t:ir(e,t,n,i,ar,a))}function rr(e){return e==e&&!Ti(e)}function or(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function sr(e){var t=function(e){for(var t=Fa(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,rr(a)]}return t}(e);return 1==t.length&&t[0][2]?or(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var a=n.length,r=a;if(null==e)return!r;for(e=Object(e);a--;){var o=n[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<r;){var s=(o=n[a])[0],u=e[s],l=o[1];if(o[2]){if(void 0===u&&!(s in e))return!1}else if(!ar(l,u,3,i,new Ki))return!1}return!0}(n,0,t)}}function ur(e){return"symbol"==typeof e||sa(e)&&"[object Symbol]"==Pi(e)}var lr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dr=/^\w*$/;function cr(e,t){if(ia(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ur(e))||(dr.test(e)||!lr.test(e)||null!=t&&e in Object(t))}function hr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],r=n.cache;if(r.has(a))return r.get(a);var o=e.apply(this,i);return n.cache=r.set(a,o)||r,o};return n.cache=new(hr.Cache||Vi),n}hr.Cache=Vi;var mr,fr,vr,pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gr=/\\(\\)?/g,yr=(mr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(pr,function(e,n,i,a){t.push(i?a.replace(gr,"$1"):n||e)}),t},fr=hr(mr,function(e){return 500===vr.size&&vr.clear(),e}),vr=fr.cache,fr);var br=gi?gi.prototype:void 0,wr=br?br.toString:void 0;function kr(e){if("string"==typeof e)return e;if(ia(e))return function(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}(e,kr)+"";if(ur(e))return wr?wr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Sr(e,t){return ia(e)?e:cr(e,t)?[e]:yr(function(e){return null==e?"":kr(e)}(e))}function Er(e){if("string"==typeof e||ur(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Pr(e,t){for(var n=0,i=(t=Sr(t,e)).length;null!=e&&n<i;)e=e[Er(t[n++])];return n&&n==i?e:void 0}function Tr(e,t){return null!=e&&t in Object(e)}function Mr(e,t){return null!=e&&function(e,t,n){for(var i=-1,a=(t=Sr(t,e)).length,r=!1;++i<a;){var o=Er(t[i]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||++i!=a?r:!!(a=null==e?0:e.length)&&ba(a)&&ya(o,a)&&(ia(e)||ha(e))}(e,t,Tr)}function _r(e,t){return cr(e)&&rr(t)?or(Er(e),t):function(n){var i=function(e,t,n){var i=null==e?void 0:Pr(e,t);return void 0===i?n:i}(n,e);return void 0===i&&i===t?Mr(n,e):ar(t,i,3)}}function Ar(e){return e}function Dr(e){return cr(e)?(t=Er(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Pr(t,e)}}(e);var t}function xr(e){return e!=e}function Cr(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;return-1}(e,t,n):function(e,t,n){for(var i=e.length,a=n+-1;++a<i;)if(t(e[a],a,e))return a;return-1}(e,xr,n)}(e,t,0)>-1}var Ir=ja&&1/ea(new ja([,-0]))[1]==1/0?function(e){return new ja(e)}:function(){};function Lr(e,t){return e&&e.length?function(e,t,n){var i=-1,a=Cr,r=e.length,o=!0,s=[],u=s;if(r>=200){var l=t?null:Ir(e);if(l)return ea(l);o=!1,a=qi,u=new Xi}else u=t?[]:s;e:for(;++i<r;){var d=e[i],c=t?t(d):d;if(d=0!==d?d:0,o&&c==c){for(var h=u.length;h--;)if(u[h]===c)continue e;t&&u.push(c),s.push(d)}else a(u,c,n)||(u!==s&&u.push(c),s.push(d))}return s}(e,"function"==typeof(n=t)?n:null==n?Ar:"object"==typeof n?ia(n)?_r(n[0],n[1]):sr(n):Dr(n)):[];var n}var Rr=function(){return c(function e(){o(this,e),this.memoryStore={}},[{key:"storage",get:function(){return we().storage}},{key:"setDevice",value:function(e){this.setItem(Qe,e)}},{key:"getDevice",value:function(){return this.getItem(Qe)}},{key:"resetDevice",value:function(){this.resetItem(Qe)}},{key:"getAnonymousMode",value:function(){return this.getItem(It)||!1}},{key:"setAnonymousMode",value:function(e){this.setItem(It,e)}},{key:"clearAnonymousMode",value:function(){this.resetItem(It)}},{key:"setAppConfig",value:function(e,t){this.setItem(e,t)}},{key:"getAppConfig",value:function(e){return this.getItem(e)}},{key:"setLanguageCode",value:function(e){this.setItem(Xt,e||"en")}},{key:"getLanguageCode",value:function(){return this.getItem(Xt)||"en"}},{key:"setCampaignRules",value:function(e,t){e!==wt?e!==ot||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[ot]=JSON.stringify(t):this.memoryStore[wt]=JSON.stringify(t)}},{key:"getCampaignRules",value:function(e){if(e===wt)return this.memoryStore[wt]?JSON.parse(this.memoryStore[wt]):null;if(e===ot){var t=this.memoryStore[ot];if(null!=t)return JSON.parse(t);var n=this.getItem(ot);if(null===n)return null;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){return n}return this.isLegacyTimestampedCache(n)?n.data:n}return this.getItem(e)}},{key:"setPaywalls",value:function(e,t){e!==St?e!==ut||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[ut]=JSON.stringify(t):this.memoryStore[St]=JSON.stringify(t)}},{key:"getPaywalls",value:function(e){if(e===St)return this.memoryStore[St]?JSON.parse(this.memoryStore[St]):null;if(e===ut){var t=this.memoryStore[ut];if(null!=t)return JSON.parse(t);var n=this.getItem(ut);if(null===n)return null;if("string"==typeof n)try{n=JSON.parse(n)}catch(e){return n}return this.isLegacyTimestampedCache(n)?n.data:n}return this.getItem(e)}},{key:"setActiveEntitlements",value:function(e,t){this.setItem(e,t)}},{key:"getActiveEntitlements",value:function(e){return this.getItem(e)||[]}},{key:"setNamiEntitlements",value:function(e,t){this.setItem(e,t)}},{key:"getNamiEntitlements",value:function(e){return this.getItem(e)||[]}},{key:"setProducts",value:function(e,t){this.setItem(e,t)}},{key:"getProducts",value:function(e){return this.getItem(e)}},{key:"getCachedProducts",value:function(){var e,t,n=null!==(e=this.getItem(ht))&&void 0!==e?e:[];return Lr(li([...null!==(t=this.getItem(Pt))&&void 0!==t?t:[],...n]),"sku_ref_id")}},{key:"setNamiConfig",value:function(e){this.setItem(et,e)}},{key:"getNamiConfig",value:function(){return this.getItem(et)}},{key:"setCustomerAttribute",value:function(e,t){this.setItem(At+e,t)}},{key:"getCustomerAttribute",value:function(e){return this.getItem(At+e)}},{key:"getAllCustomerAttributes",value:function(){return this.storage.getAllKeys().map(e=>[e,this.storage.getItem(e)]).filter(([e])=>e.includes(At)).map(([e,t])=>e.replace(At,"")+":"+t)}},{key:"getAllCustomerAttributesKeys",value:function(){return this.storage.getAllKeys().filter(e=>e.includes(At)).map(e=>e.replace(At,""))}},{key:"clearCustomerAttribute",value:function(e){var t=At+e,n=this.getItem(t);return n&&this.resetItem(t),!!n}},{key:"clearAllCustomerAttributes",value:function(){this.storage.getAllKeys().filter(e=>e.includes(At)).map(e=>this.resetItem(e))}},{key:"setNamiProfile",value:function(e){this.setItem(nt,e)}},{key:"getNamiProfile",value:function(){return this.getItem(nt)}},{key:"removeNamiProfile",value:function(){this.resetItem(nt)}},{key:"setCustomerJourneyState",value:function(e){this.setItem(xt,e)}},{key:"getCustomerJourneyState",value:function(){return this.getItem(xt)}},{key:"setSessionCounter",value:function(){var e=this.getItem(Ot),t=e?parseInt(e):$t||$t;this.setItem(Ot,t+1)}},{key:"getSessionCounter",value:function(){var e=this.getItem(Ot);return e?parseInt(e):$t}},{key:"setLastImpressionId",value:function(e){this.setItem(jt,e)}},{key:"getLastImpressionId",value:function(){var e;return null!==(e=this.getItem(jt))&&void 0!==e?e:""}},{key:"setPurchaseImpression",value:function(){var e,t=null!==(e=this.getLastImpressionId())&&void 0!==e?e:"";this.setItem(zt,t)}},{key:"getPurchaseImpression",value:function(){var e;return null!==(e=this.getItem(zt))&&void 0!==e?e:""}},{key:"setSessionId",value:function(e){e&&this.setItem(Vt,e)}},{key:"getSessionId",value:function(){var e;return null!==(e=this.getItem(Vt))&&void 0!==e?e:""}},{key:"clearSessionId",value:function(){this.resetItem(Vt)}},{key:"setLaunchId",value:function(e){e&&this.setItem(Ht,e)}},{key:"getLaunchId",value:function(){var e;return null!==(e=this.getItem(Ht))&&void 0!==e?e:""}},{key:"clearLaunchId",value:function(){this.resetItem(Ht)}},{key:"setPurchaseChannel",value:function(e){e&&this.setItem(qt,e)}},{key:"getPurchaseChannel",value:function(){return this.getItem(qt)}},{key:"getAnonymousUUID",value:function(){return this.getItem(Rt)}},{key:"setAnonymousUUID",value:function(e){this.setItem(Rt,e)}},{key:"clearAnonymousUUID",value:function(){this.resetItem(Rt)}},{key:"setApiCampaignSessionTimestamp",value:function(){this.setItem(dt,Date.now())}},{key:"getApiCampaignSessionTimestamp",value:function(){return this.getItem(dt)}},{key:"purgeApiCampaignCache",value:function(){this.resetItem(ut),this.resetItem(ot),this.resetItem(dt)}},{key:"getCampaignCacheTtl",value:function(){var e,t=this.getAppConfig(at)||this.getAppConfig(yt);return null!==(e=null==t?void 0:t.campaign_cache_ttl)&&void 0!==e?e:null}},{key:"isLegacyTimestampedCache",value:function(e){return"object"==typeof e&&null!==e&&"cachedAt"in e&&"data"in e}},{key:"setItem",value:function(e,t){var n;try{n=JSON.stringify(t)}catch(t){return void ui.error(`Serialization failed for ${e}`,t)}try{this.storage.setItem(e,n)}catch(t){ui.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=n}}},{key:"getItem",value:function(e){try{var t=this.storage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){ui.error("Error getting item from localStorage:",e,": ",t)}var n=this.memoryStore[e];return null!=n?JSON.parse(n):null}},{key:"resetItem",value:function(e){try{this.storage.removeItem(e)}catch(t){ui.error("Error removing item from localStorage:",e,": ",t)}delete this.memoryStore[e]}},{key:"clearAll",value:function(){ri.forEach(e=>this.resetItem(e)),this.clearAllCustomerAttributes(),this.memoryStore={}}},{key:"clear",value:function(){try{this.storage.clear()}catch(e){ui.error("Error clearing localStorage:",e)}this.memoryStore={}}}])}(),Fr=new Rr,Or=function(e){function t(e,n){var i;return o(this,t),(i=r(this,t,[n])).statusCode=e,i.status=e,i.message=`RetryLimitExceededError: ${i.message}`,i}return p(t,e),c(t)}(_(Error)),Nr=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),c(t)}(_(Error)),$r=function(e){function t(){var e;return o(this,t),(e=r(this,t)).status=409,e.name="ConflictError",e.message="ConflictError: Server responded with conflict",e}return p(t,e),c(t)}(Nr),Wr=function(e){function t(){return o(this,t),r(this,t,[$e])}return p(t,e),c(t)}(_(Error)),jr=function(e){function t(){return o(this,t),r(this,t,[Ie])}return p(t,e),c(t)}(_(Error)),Br=function(e){function t(){return o(this,t),r(this,t,[Re])}return p(t,e),c(t)}(_(Error)),zr=function(e){function t(){return o(this,t),r(this,t,[Oe])}return p(t,e),c(t)}(_(Error)),Ur=function(e){function t(){return o(this,t),r(this,t,[je])}return p(t,e),c(t)}(_(Error)),Hr=function(e){function t(){return o(this,t),r(this,t,[ze])}return p(t,e),c(t)}(_(Error)),Gr=function(e){function t(){return o(this,t),r(this,t,[Ve])}return p(t,e),c(t)}(_(Error)),Vr=function(e){function t(){return o(this,t),r(this,t,[Xe])}return p(t,e),c(t)}(_(Error)),Kr=function(e){function t(){return o(this,t),r(this,t,[Xe])}return p(t,e),c(t)}(_(Error)),Xr=function(e){function t(){return o(this,t),r(this,t,[He])}return p(t,e),c(t)}(_(Error)),Yr=function(e){function t(e){var n;return o(this,t),(n=r(this,t,[e])).message=`BadRequestError: ${n.message}`,n}return p(t,e),c(t)}(Nr),qr=function(e){function t(e){var n;return o(this,t),(n=r(this,t,[e])).message=`NotFoundError: ${n.message}`,n}return p(t,e),c(t)}(Nr),Jr=function(e){function t(e,n){var i;return o(this,t),(i=r(this,t,[n])).statusCode=e,i.message=`ClientError: ${i.message}`,i}return p(t,e),c(t)}(Nr),Qr=function(e){function t(e){var n;return o(this,t),(n=r(this,t,[e])).message=`ServerError: ${n.message}`,n}return p(t,e),c(t)}(Nr),Zr=(e,t)=>{if(e==xn)throw new Yr(t);if(e==In)throw new qr(t);if(e==Rn)throw new $r;if(e>xn&&e<On)throw new Jr(e,t);if(e>=On)throw new Qr(t)};function eo(e){for(var t=e.length;--t>=0;)e[t]=0}eo(new Array(576)),eo(new Array(60)),eo(new Array(512)),eo(new Array(256)),eo(new Array(29)),eo(new Array(30));var to=(e,t,n,i)=>{for(var a=65535&e,r=e>>>16&65535,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{r=r+(a=a+t[i++]|0)|0}while(--o);a%=65521,r%=65521}return a|r<<16},no=new Uint32Array((()=>{for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),io=(e,t,n,i)=>{var a=no,r=i+n;e^=-1;for(var o=i;o<r;o++)e=e>>>8^a[255&(e^t[o])];return-1^e},ao={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ro=0,oo=4,so=5,uo=6,lo=0,co=1,ho=2,mo=-2,fo=-3,vo=-4,po=-5,go=8,yo=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),bo=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)yo(n,i)&&(e[i]=n[i])}}return e},wo=e=>{for(var t=0,n=0,i=e.length;n<i;n++)t+=e[n].length;for(var a=new Uint8Array(t),r=0,o=0,s=e.length;r<s;r++){var u=e[r];a.set(u,o),o+=u.length}return a},ko=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){ko=!1}for(var So=new Uint8Array(256),Eo=0;Eo<256;Eo++)So[Eo]=Eo>=252?6:Eo>=248?5:Eo>=240?4:Eo>=224?3:Eo>=192?2:1;So[254]=So[254]=1;var Po=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,i,a,r,o=e.length,s=0;for(a=0;a<o;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),r=0,a=0;r<s;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?t[r++]=n:n<2048?(t[r++]=192|n>>>6,t[r++]=128|63&n):n<65536?(t[r++]=224|n>>>12,t[r++]=128|n>>>6&63,t[r++]=128|63&n):(t[r++]=240|n>>>18,t[r++]=128|n>>>12&63,t[r++]=128|n>>>6&63,t[r++]=128|63&n);return t},To=(e,t)=>{var n,i,a=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var r=new Array(2*a);for(i=0,n=0;n<a;){var o=e[n++];if(o<128)r[i++]=o;else{var s=So[o];if(s>4)r[i++]=65533,n+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&n<a;)o=o<<6|63&e[n++],s--;s>1?r[i++]=65533:o<65536?r[i++]=o:(o-=65536,r[i++]=55296|o>>10&1023,r[i++]=56320|1023&o)}}}return((e,t)=>{if(t<65534&&e.subarray&&ko)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n})(r,i)},Mo=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);for(var n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+So[e[n]]>t?n:t};var _o=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ao=16209,Do=function(e,t){var n,i,a,r,o,s,u,l,d,c,h,m,f,v,p,g,y,b,w,k,S,E,P,T,M=e.state;n=e.next_in,P=e.input,i=n+(e.avail_in-5),a=e.next_out,T=e.output,r=a-(t-e.avail_out),o=a+(e.avail_out-257),s=M.dmax,u=M.wsize,l=M.whave,d=M.wnext,c=M.window,h=M.hold,m=M.bits,f=M.lencode,v=M.distcode,p=(1<<M.lenbits)-1,g=(1<<M.distbits)-1;e:do{m<15&&(h+=P[n++]<<m,m+=8,h+=P[n++]<<m,m+=8),y=f[h&p];t:for(;;){if(h>>>=b=y>>>24,m-=b,0===(b=y>>>16&255))T[a++]=65535&y;else{if(!(16&b)){if(64&b){if(32&b){M.mode=16191;break e}e.msg="invalid literal/length code",M.mode=Ao;break e}y=f[(65535&y)+(h&(1<<b)-1)];continue t}for(w=65535&y,(b&=15)&&(m<b&&(h+=P[n++]<<m,m+=8),w+=h&(1<<b)-1,h>>>=b,m-=b),m<15&&(h+=P[n++]<<m,m+=8,h+=P[n++]<<m,m+=8),y=v[h&g];;){if(h>>>=b=y>>>24,m-=b,16&(b=y>>>16&255)){if(k=65535&y,m<(b&=15)&&(h+=P[n++]<<m,(m+=8)<b&&(h+=P[n++]<<m,m+=8)),(k+=h&(1<<b)-1)>s){e.msg="invalid distance too far back",M.mode=Ao;break e}if(h>>>=b,m-=b,k>(b=a-r)){if((b=k-b)>l&&M.sane){e.msg="invalid distance too far back",M.mode=Ao;break e}if(S=0,E=c,0===d){if(S+=u-b,b<w){w-=b;do{T[a++]=c[S++]}while(--b);S=a-k,E=T}}else if(d<b){if(S+=u+d-b,(b-=d)<w){w-=b;do{T[a++]=c[S++]}while(--b);if(S=0,d<w){w-=b=d;do{T[a++]=c[S++]}while(--b);S=a-k,E=T}}}else if(S+=d-b,b<w){w-=b;do{T[a++]=c[S++]}while(--b);S=a-k,E=T}for(;w>2;)T[a++]=E[S++],T[a++]=E[S++],T[a++]=E[S++],w-=3;w&&(T[a++]=E[S++],w>1&&(T[a++]=E[S++]))}else{S=a-k;do{T[a++]=T[S++],T[a++]=T[S++],T[a++]=T[S++],w-=3}while(w>2);w&&(T[a++]=T[S++],w>1&&(T[a++]=T[S++]))}break}if(64&b){e.msg="invalid distance code",M.mode=Ao;break e}y=v[(65535&y)+(h&(1<<b)-1)]}}break}}while(n<i&&a<o);n-=w=m>>3,h&=(1<<(m-=w<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<o?o-a+257:257-(a-o),M.hold=h,M.bits=m},xo=15,Co=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Io=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Lo=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Ro=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Fo=(e,t,n,i,a,r,o,s)=>{var u,l,d,c,h,m,f,v,p,g=s.bits,y=0,b=0,w=0,k=0,S=0,E=0,P=0,T=0,M=0,_=0,A=null,D=new Uint16Array(16),x=new Uint16Array(16),C=null;for(y=0;y<=xo;y++)D[y]=0;for(b=0;b<i;b++)D[t[n+b]]++;for(S=g,k=xo;k>=1&&0===D[k];k--);if(S>k&&(S=k),0===k)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(w=1;w<k&&0===D[w];w++);for(S<w&&(S=w),T=1,y=1;y<=xo;y++)if(T<<=1,(T-=D[y])<0)return-1;if(T>0&&(0===e||1!==k))return-1;for(x[1]=0,y=1;y<xo;y++)x[y+1]=x[y]+D[y];for(b=0;b<i;b++)0!==t[n+b]&&(o[x[t[n+b]]++]=b);if(0===e?(A=C=o,m=20):1===e?(A=Co,C=Io,m=257):(A=Lo,C=Ro,m=0),_=0,b=0,y=w,h=r,E=S,P=0,d=-1,c=(M=1<<S)-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){f=y-P,o[b]+1<m?(v=0,p=o[b]):o[b]>=m?(v=C[o[b]-m],p=A[o[b]-m]):(v=96,p=0),u=1<<y-P,w=l=1<<E;do{a[h+(_>>P)+(l-=u)]=f<<24|v<<16|p}while(0!==l);for(u=1<<y-1;_&u;)u>>=1;if(0!==u?(_&=u-1,_+=u):_=0,b++,0===--D[y]){if(y===k)break;y=t[n+o[b]]}if(y>S&&(_&c)!==d){for(0===P&&(P=S),h+=w,T=1<<(E=y-P);E+P<k&&!((T-=D[E+P])<=0);)E++,T<<=1;if(M+=1<<E,1===e&&M>852||2===e&&M>592)return 1;a[d=_&c]=S<<24|E<<16|h-r}}return 0!==_&&(a[h+_]=y-P<<24|64<<16),s.bits=S,0},Oo=oo,No=so,$o=uo,Wo=lo,jo=co,Bo=ho,zo=mo,Uo=fo,Ho=vo,Go=po,Vo=go,Ko=16180,Xo=16190,Yo=16191,qo=16192,Jo=16194,Qo=16199,Zo=16200,es=16206,ts=16209,ns=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function is(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var as,rs,os=e=>{if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<Ko||t.mode>16211?1:0},ss=e=>{if(os(e))return zo;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Ko,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Wo},us=e=>{if(os(e))return zo;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ss(e)},ls=(e,t)=>{var n;if(os(e))return zo;var i=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?zo:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,us(e))},ds=(e,t)=>{if(!e)return zo;var n=new is;e.state=n,n.strm=e,n.window=null,n.mode=Ko;var i=ls(e,t);return i!==Wo&&(e.state=null),i},cs=!0,hs=e=>{if(cs){as=new Int32Array(512),rs=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Fo(1,e.lens,0,288,as,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Fo(2,e.lens,0,32,rs,0,e.work,{bits:5}),cs=!1}e.lencode=as,e.lenbits=9,e.distcode=rs,e.distbits=5},ms=(e,t,n,i)=>{var a,r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),i>=r.wsize?(r.window.set(t.subarray(n-r.wsize,n),0),r.wnext=0,r.whave=r.wsize):((a=r.wsize-r.wnext)>i&&(a=i),r.window.set(t.subarray(n-i,n-i+a),r.wnext),(i-=a)?(r.window.set(t.subarray(n-i,n),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0},fs=(e,t)=>{var n,i,a,r,o,s,u,l,d,c,h,m,f,v,p,g,y,b,w,k,S,E,P,T,M=0,_=new Uint8Array(4),A=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(os(e)||!e.output||!e.input&&0!==e.avail_in)return zo;(n=e.state).mode===Yo&&(n.mode=qo),o=e.next_out,a=e.output,u=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,l=n.hold,d=n.bits,c=s,h=u,E=Wo;e:for(;;)switch(n.mode){case Ko:if(0===n.wrap){n.mode=qo;break}for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(2&n.wrap&&35615===l){0===n.wbits&&(n.wbits=15),n.check=0,_[0]=255&l,_[1]=l>>>8&255,n.check=io(n.check,_,2,0),l=0,d=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=ts;break}if((15&l)!==Vo){e.msg="unknown compression method",n.mode=ts;break}if(d-=4,S=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=S),S>15||S>n.wbits){e.msg="invalid window size",n.mode=ts;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:Yo,l=0,d=0;break;case 16181:for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(n.flags=l,(255&n.flags)!==Vo){e.msg="unknown compression method",n.mode=ts;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ts;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=io(n.check,_,2,0)),l=0,d=0,n.mode=16182;case 16182:for(;d<32;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,_[2]=l>>>16&255,_[3]=l>>>24&255,n.check=io(n.check,_,4,0)),l=0,d=0,n.mode=16183;case 16183:for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=io(n.check,_,2,0)),l=0,d=0,n.mode=16184;case 16184:if(1024&n.flags){for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(_[0]=255&l,_[1]=l>>>8&255,n.check=io(n.check,_,2,0)),l=0,d=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((m=n.length)>s&&(m=s),m&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(i.subarray(r,r+m),S)),512&n.flags&&4&n.wrap&&(n.check=io(n.check,i,m,r)),s-=m,r+=m,n.length-=m),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;m=0;do{S=i[r+m++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=io(n.check,i,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;m=0;do{S=i[r+m++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S))}while(S&&m<s);if(512&n.flags&&4&n.wrap&&(n.check=io(n.check,i,m,r)),s-=m,r+=m,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;d<16;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=ts;break}l=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Yo;break;case 16189:for(;d<32;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}e.adler=n.check=ns(l),l=0,d=0,n.mode=Xo;case Xo:if(0===n.havedict)return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,Bo;e.adler=n.check=1,n.mode=Yo;case Yo:if(t===No||t===$o)break e;case qo:if(n.last){l>>>=7&d,d-=7&d,n.mode=es;break}for(;d<3;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}switch(n.last=1&l,d-=1,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(hs(n),n.mode=Qo,t===$o){l>>>=2,d-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=ts}l>>>=2,d-=2;break;case 16193:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ts;break}if(n.length=65535&l,l=0,d=0,n.mode=Jo,t===$o)break e;case Jo:n.mode=16195;case 16195:if(m=n.length){if(m>s&&(m=s),m>u&&(m=u),0===m)break e;a.set(i.subarray(r,r+m),o),s-=m,r+=m,u-=m,o+=m,n.length-=m;break}n.mode=Yo;break;case 16196:for(;d<14;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(n.nlen=257+(31&l),l>>>=5,d-=5,n.ndist=1+(31&l),l>>>=5,d-=5,n.ncode=4+(15&l),l>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ts;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;d<3;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.lens[A[n.have++]]=7&l,l>>>=3,d-=3}for(;n.have<19;)n.lens[A[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},E=Fo(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,E){e.msg="invalid code lengths set",n.mode=ts;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;g=(M=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(y<16)l>>>=p,d-=p,n.lens[n.have++]=y;else{if(16===y){for(T=p+2;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(l>>>=p,d-=p,0===n.have){e.msg="invalid bit length repeat",n.mode=ts;break}S=n.lens[n.have-1],m=3+(3&l),l>>>=2,d-=2}else if(17===y){for(T=p+3;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}d-=p,S=0,m=3+(7&(l>>>=p)),l>>>=3,d-=3}else{for(T=p+7;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}d-=p,S=0,m=11+(127&(l>>>=p)),l>>>=7,d-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ts;break}for(;m--;)n.lens[n.have++]=S}}if(n.mode===ts)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ts;break}if(n.lenbits=9,P={bits:n.lenbits},E=Fo(1,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,E){e.msg="invalid literal/lengths set",n.mode=ts;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},E=Fo(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,E){e.msg="invalid distances set",n.mode=ts;break}if(n.mode=Qo,t===$o)break e;case Qo:n.mode=Zo;case Zo:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,Do(e,h),o=e.next_out,a=e.output,u=e.avail_out,r=e.next_in,i=e.input,s=e.avail_in,l=n.hold,d=n.bits,n.mode===Yo&&(n.back=-1);break}for(n.back=0;g=(M=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(g&&!(240&g)){for(b=p,w=g,k=y;g=(M=n.lencode[k+((l&(1<<b+w)-1)>>b)])>>>16&255,y=65535&M,!(b+(p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}l>>>=b,d-=b,n.back+=b}if(l>>>=p,d-=p,n.back+=p,n.length=y,0===g){n.mode=16205;break}if(32&g){n.back=-1,n.mode=Yo;break}if(64&g){e.msg="invalid literal/length code",n.mode=ts;break}n.extra=15&g,n.mode=16201;case 16201:if(n.extra){for(T=n.extra;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;g=(M=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(!(240&g)){for(b=p,w=g,k=y;g=(M=n.distcode[k+((l&(1<<b+w)-1)>>b)])>>>16&255,y=65535&M,!(b+(p=M>>>24)<=d);){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}l>>>=b,d-=b,n.back+=b}if(l>>>=p,d-=p,n.back+=p,64&g){e.msg="invalid distance code",n.mode=ts;break}n.offset=y,n.extra=15&g,n.mode=16203;case 16203:if(n.extra){for(T=n.extra;d<T;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ts;break}n.mode=16204;case 16204:if(0===u)break e;if(m=h-u,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ts;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),v=n.window}else v=a,f=o-n.offset,m=n.length;m>u&&(m=u),u-=m,n.length-=m;do{a[o++]=v[f++]}while(--m);0===n.length&&(n.mode=Zo);break;case 16205:if(0===u)break e;a[o++]=n.length,u--,n.mode=Zo;break;case es:if(n.wrap){for(;d<32;){if(0===s)break e;s--,l|=i[r++]<<d,d+=8}if(h-=u,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?io(n.check,a,h,o-h):to(n.check,a,h,o-h)),h=u,4&n.wrap&&(n.flags?l:ns(l))!==n.check){e.msg="incorrect data check",n.mode=ts;break}l=0,d=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;d<32;){if(0===s)break e;s--,l+=i[r++]<<d,d+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ts;break}l=0,d=0}n.mode=16208;case 16208:E=jo;break e;case ts:E=Uo;break e;case 16210:return Ho;default:return zo}return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,n.hold=l,n.bits=d,(n.wsize||h!==e.avail_out&&n.mode<ts&&(n.mode<es||t!==Oo))&&ms(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?io(n.check,a,h,e.next_out-h):to(n.check,a,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Yo?128:0)+(n.mode===Qo||n.mode===Jo?256:0),(0===c&&0===h||t===Oo)&&E===Wo&&(E=Go),E},vs={inflateReset:us,inflateReset2:ls,inflateResetKeep:ss,inflateInit:e=>ds(e,15),inflateInit2:ds,inflate:fs,inflateEnd:e=>{if(os(e))return zo;var t=e.state;return t.window&&(t.window=null),e.state=null,Wo},inflateGetHeader:(e,t)=>{if(os(e))return zo;var n=e.state;return 2&n.wrap?(n.head=t,t.done=!1,Wo):zo},inflateSetDictionary:(e,t)=>{var n,i=t.length;return os(e)||0!==(n=e.state).wrap&&n.mode!==Xo?zo:n.mode===Xo&&to(1,t,i,0)!==n.check?Uo:ms(e,t,i,i)?(n.mode=16210,Ho):(n.havedict=1,Wo)},inflateInfo:"pako inflate (from Nodeca project)"};var ps=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},gs=Object.prototype.toString,ys=ro,bs=oo,ws=lo,ks=co,Ss=ho,Es=mo,Ps=fo,Ts=vo;function Ms(e){this.options=bo({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _o,this.strm.avail_out=0;var n=vs.inflateInit2(this.strm,t.windowBits);if(n!==ws)throw new Error(ao[n]);if(this.header=new ps,vs.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Po(t.dictionary):"[object ArrayBuffer]"===gs.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=vs.inflateSetDictionary(this.strm,t.dictionary))!==ws))throw new Error(ao[n])}Ms.prototype.push=function(e,t){var n,i,a,r=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(i=t===~~t?t:!0===t?bs:ys,"[object ArrayBuffer]"===gs.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(n=vs.inflate(r,i))===Ss&&s&&((n=vs.inflateSetDictionary(r,s))===ws?n=vs.inflate(r,i):n===Ps&&(n=Ss));r.avail_in>0&&n===ks&&r.state.wrap>0&&0!==e[r.next_in];)vs.inflateReset(r),n=vs.inflate(r,i);switch(n){case Es:case Ps:case Ss:case Ts:return this.onEnd(n),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||n===ks))if("string"===this.options.to){var u=Mo(r.output,r.next_out),l=r.next_out-u,d=To(r.output,u);r.next_out=l,r.avail_out=o-l,l&&r.output.set(r.output.subarray(u,u+l),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(n!==ws||0!==a){if(n===ks)return n=vs.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Ms.prototype.onData=function(e){this.chunks.push(e)},Ms.prototype.onEnd=function(e){e===ws&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=wo(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var _s={ungzip:function(e,t){var n=new Ms(t);if(n.push(e),n.err)throw n.msg||ao[n.err];return n.result}}.ungzip,As=e=>{var t;if(null!=e&&e.includes(un))t=an;else{var n=null==e?void 0:e.find(e=>e.includes(on));t=n?n.split("=")[1]:tn}return(t=t.replace(/\/$/,""))+"/"+Zt},Ds=e=>{var t,n,i=Fr.getAppConfig(at)||Fr.getAppConfig(yt);return null!==(t=null==i||null===(n=i.capabilities)||void 0===n?void 0:n.includes(e))&&void 0!==t&&t},xs=()=>{var e,t,n=(t=Fr.getAppConfig(at)||Fr.getAppConfig(yt),null!==(e=null==t?void 0:t.campaign_cache_ttl)&&void 0!==e?e:null);if(null!==n)if(0!==n){var i=Fr.getApiCampaignSessionTimestamp();if(null!==i)(Date.now()-i)/1e3>=n&&Fr.purgeApiCampaignCache()}else Fr.purgeApiCampaignCache()},Cs=e=>{var t=!Ds(Pe.THIRD_PARTY_TRANSACTIONS);return e&&!t&&ui.info(`[${e}] Your plan does not have purchase management features.`),t},Is=()=>{var e,t,n=null===(e=Fr.getNamiConfig())||void 0===e?void 0:e.namiCommands;return null!==(t=null==n?void 0:n.includes(pn))&&void 0!==t&&t},Ls=()=>{var e,t,n=null===(e=Fr.getNamiConfig())||void 0===e?void 0:e.namiCommands;return null!==(t=null==n?void 0:n.includes(yn))&&void 0!==t&&t};function Rs(e){try{var t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));for(var t=atob(e),n=t.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=t.charCodeAt(a);return i}(e.trim()),n=_s(t),i=(new TextDecoder).decode(n);return JSON.parse(i)}catch(e){return}}function Fs(e,t,n=Mn,i=Sn){var r,o,s,u,l,d,c;return k(function(h){for(;;)switch(h.n){case 0:return o=0,s=Is(),u=Ls(),l=null!==(r=null==t?void 0:t.method)&&void 0!==r?r:"GET",d=()=>{var r,c,h,m;return k(function(f){for(;;)switch(f.n){case 0:return(s||u)&&ui.debug(`[HTTP] ${l} ${e}`),u&&null!=t&&t.body&&ui.debug(`[HTTP] Request body: ${t.body}`),f.n=1,a(Os(e,t,n));case 1:if((r=f.v).ok){f.n=7;break}if(!u){f.n=3;break}return f.n=2,a(r.clone().text());case 2:c=f.v,ui.debug(`[HTTP] Response ${r.status}: ${c}`);case 3:if(r.status!=Rn){f.n=4;break}throw new $r;case 4:if(!(++o<=i)){f.n=6;break}return h=1e3*(o+Pn),f.n=5,a(new Promise(e=>setTimeout(e,h)));case 5:return f.a(2,d());case 6:throw new Or(r.status,`Request failed after ${i} retries`);case 7:if(!u){f.n=9;break}return f.n=8,a(r.clone().text());case 8:m=f.v,ui.debug(`[HTTP] Response ${r.status}: ${m}`);case 9:return f.a(2,r)}},null,null,null,Promise)},h.n=1,a(d());case 1:return c=h.v,h.a(2,c.json())}},null,null,null,Promise)}function Os(e,t={},n){var i,r,o;return k(function(s){for(;;)switch(s.n){case 0:return i=new AbortController,r=setTimeout(()=>i.abort(),n),t.signal=i.signal,s.n=1,a(fetch(e,t));case 1:return o=s.v,clearTimeout(r),s.a(2,o)}},null,null,null,Promise)}function Ns(e,t,n){var i=n.value;return n.value=function(...e){if(!this.platformID)throw new jr;return i.apply(this,e)},n}function $s(e,t,n){var i=n.value;return n.value=function(...e){var t=Fr.getDevice();if(null==t||!t.id)throw new Br;return i.apply(this,e)},n}var Ws,js=function(){return c(function e(){o(this,e);var t=Fr.getNamiConfig();!this.platformID&&t&&this.configure(t)},[{key:"deviceID",get:function(){var e;return null===(e=Fr.getDevice())||void 0===e?void 0:e.id}},{key:"configure",value:function(e){this.baseURL=As(e.namiCommands),this.platformID=e.appPlatformID}},{key:"reset",value:function(){this.baseURL=void 0,this.platformID=void 0}},{key:"login",value:function(e){var t,n;return k(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}throw new zr;case 1:return t=`device/${this.deviceID}/login/`,n={external_id:e},i.n=2,a(this.requestBodyAPI(t,n,"PUT"));case 2:return i.a(2,i.v)}},null,this,null,Promise)}},{key:"logout",value:function(){var e;return k(function(t){for(;;)switch(t.n){case 0:return e=`device/${this.deviceID}/logout/`,t.n=1,a(this.requestBodyAPI(e,{},"PUT"));case 1:return t.a(2,t.v)}},null,this,null,Promise)}},{key:"startSession",value:function(e){var t,n;return k(function(i){for(;;)switch(i.n){case 0:return t=`device/${this.deviceID}/session/`,i.n=1,a(this.requestBodyAPI(t,{start_time:e,app_env:"production"}));case 1:n=i.v,Fr.setSessionCounter(),n.id&&Fr.setSessionId(n.id);case 2:return i.a(2)}},null,this,null,Promise)}},{key:"postImpression",value:function(e){var t,n;return k(function(i){for(;;)switch(i.n){case 0:return t=`device/${this.deviceID}/impression/`,i.n=1,a(this.requestBodyAPI(t,e,"POST",!0));case 1:(n=i.v).id&&Fr.setLastImpressionId(n.id);case 2:return i.a(2)}},null,this,null,Promise)}},{key:"postConversion",value:function(e){var t;return k(function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/transaction/`,n.n=1,a(this.requestBodyAPI(t,e,"POST",!0));case 1:return n.a(2)}},null,this,null,Promise)}},{key:"purchaseValidation",value:function(e){var t;return k(function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/purchase_event/`,n.n=1,a(this.requestBodyAPI(t,e,"PUT"));case 1:return n.a(2)}},null,this,null,Promise)}},{key:"fetchAPI",value:function(e,t,n){var i;return k(function(r){for(;;)switch(r.n){case 0:return i=`${this.baseURL}/${this.platformID}/`+e,r.n=1,a(Fs(i,void 0,t,n));case 1:return r.a(2,r.v)}},null,this,null,Promise)}},{key:"requestBodyAPI",value:function(e,t,n="POST",i=!1,r,o){var s,u;return k(function(l){for(;;)switch(l.n){case 0:return s=`${this.baseURL}/${this.platformID}/`+e,u={method:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:i},l.n=1,a(Fs(s,u,r,o));case 1:return l.a(2,l.v)}},null,this,null,Promise)}}],[{key:"configure",value:function(e){this.instance.configure(e)}},{key:"reset",value:function(){this.instance.reset()}}])}();function Bs(e){return null!=(null==e?void 0:e.flow)}js.instance=new js,ke([$s],js.prototype,"login",null),ke([$s],js.prototype,"logout",null),ke([$s],js.prototype,"startSession",null),ke([$s],js.prototype,"postImpression",null),ke([$s],js.prototype,"postConversion",null),ke([$s],js.prototype,"purchaseValidation",null),ke([Ns],js.prototype,"fetchAPI",null),ke([Ns],js.prototype,"requestBodyAPI",null),e.NamiCampaignRuleType=void 0,(Ws=e.NamiCampaignRuleType||(e.NamiCampaignRuleType={})).DEFAULT="default",Ws.LABEL="label",Ws.UNKNOWN="unknown",Ws.URL="url";var zs=()=>{var e;return null!==(e=Fr.getPaywalls(St))&&void 0!==e?e:[]},Us=()=>{var e;return null!==(e=Fr.getPaywalls(ut))&&void 0!==e?e:[]},Hs=()=>Lr(li([...Us(),...zs()]),"id"),Gs=e=>Hs().find(t=>t.id===e),Vs=e=>{var t=Hs(),n=new Set(t.map(e=>e.id));return e.every(e=>n.has(e))},Ks="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{},Xs="function"==typeof Ks.BigInt,Ys=Xs?Ks.BigInt.bind(Ks):void 0,qs=Xs?Ys("0xffffffffffffffffffffffffffffffff"):null,Js=Xs?Ys("0x100000000000000000000000000000000"):null,Qs=Xs?Ys(0):null,Zs=Xs?Ys(1):null,eu=Xs?Ys(8):null,tu=Xs?Ys(1e4):null,nu=Ks.crypto,iu="function"==typeof(null==nu?void 0:nu.getRandomValues),au=1/16,ru=e=>we().device.getDeviceData(e),ou=()=>{var e=Fr.getNamiConfig();return e&&e.formFactor?e.formFactor:we().device.getDeviceFormFactor()};function su(){return we().device.generateUUID()}function uu(e){if(!Xs||!qs)return cu(e);try{var t=qs,n=function(e){if(!Ys)throw new Error("BigInt is not supported in this environment");var t=e.replace(/-/g,"");return Ys("0x"+t)}(e);return Number(n)/Number(t)*100}catch(t){throw ui.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}function lu(e){if(!Ys)throw new Error("BigInt is not supported in this environment");var t=e.toString(16).padStart(32,"0");t=t.substring(0,12)+"4"+t.substring(13);var n=3&parseInt(t[16],16)|8;return(t=t.substring(0,16)+n.toString(16)+t.substring(17)).slice(0,8)+"-"+t.slice(8,12)+"-"+t.slice(12,16)+"-"+t.slice(16,20)+"-"+t.slice(20)}function du(e,t=.5){if(!Number.isFinite(e))throw new Error("Invalid target");if(!Number.isFinite(t))throw new Error("Invalid tolerance");var n=Math.max(0,Math.min(100,e)),i=Math.max(0,Math.min(50,t)),a=e=>Math.round(100*e),r=Math.max(0,a(n-i)),o=Math.min(1e4,a(n+i));if(!(Xs&&qs&&Ys&&tu))return function(e,t){for(var n=Math.max(0,Math.min(100,e-t)),i=Math.min(100,Math.max(0,e+t)),a=su(),r=Number.POSITIVE_INFINITY,o=50,s=0;s<o;s++){var u=su(),l=cu(u);if(l>=n&&l<=i)return u;var d=hu(l,n,i);d<r&&(r=d,a=u)}return a}(n,i);var s=qs,u=Ys,l=tu,d=e=>s*u(e)/l,c=d(r),m=d(o);if(m<=c)return lu(c);var f=c+function(e){if(!Ys||null===Js||null===Zs||null===Qs||null===eu)throw new Error("BigInt is not supported in this environment");var t=Ys,n=Qs,i=Zs,a=eu,r=Js;if(e<n)throw new Error("n must be non-negative");if(e===n)return n;for(var o=new Uint8Array(16),s=e+i,u=r/s*s-i,l=0,d=!1;l<10;){if(iu)nu.getRandomValues(o);else{d||(d=!0,ui.warn("randomBigInt: crypto.getRandomValues unavailable, using Math.random fallback"));for(var c=0;c<o.length;c++)o[c]=Math.floor(256*Math.random())}for(var m,f=n,v=h(o);!(m=v()).done;)f=f<<a|t(m.value);if(f<=u)return f%s;l++}if(iu)try{nu.getRandomValues(o);for(var p,g=n,y=h(o);!(p=y()).done;)g=g<<a|t(p.value);var b=g%s;return ui.warn("randomBigInt: reached max rejection attempts, using modulo fallback",{n:e.toString(),attempts:l}),b}catch(e){throw ui.error("randomBigInt: failed to generate random values",e),new Error("randomBigInt: unable to generate random value")}for(var w,k=n,S=h(o);!(w=S()).done;)k=k<<a|t(w.value);return ui.warn("randomBigInt: reached max rejection attempts without crypto, using modulo fallback",{n:e.toString(),attempts:l}),k%s}(m-c);return lu(f)}function cu(e){var t=function(e){var t=e.replace(/-/g,"").toLowerCase();if(!/^[0-9a-f]{32}$/.test(t))throw new Error(`Invalid UUID format: ${e}`);for(var n=0,i=t.length-1;i>=0;i--){n=(n+parseInt(t[i],16))*au}return n}(e);return 100*t}function hu(e,t,n){return e<t?t-e:e>n?e-n:0}var mu,fu=e=>{try{var t=new URL(e);return("http:"===t.protocol||"https:"===t.protocol)&&!!t.hostname}catch(e){return!1}},vu=e=>{try{var t=new URL(e),n=t.origin+t.pathname,i=new Set;return t.searchParams.forEach((e,t)=>{i.add(`${t}=${e}`)}),{basePath:n,params:i}}catch(e){return}},pu=(e,t,n)=>e?e.flatMap(e=>{var i;if(i="string"==typeof n?e.segments.filter(e=>e.form_factors.some(e=>e.form_factor===n)):e.segments,0===i.length)return[];var a=((e,t)=>{for(var n,i=[...e].sort((e,t)=>e.split-t.split),a=h(i);!(n=a()).done;){var r=n.value;if(t<=r.split)return r}return i[i.length-1]})(i,t);return{form_factors:a.form_factors,paywall:a.paywall,paywall_url:a.paywall_url,page_urls:a.page_urls,flow:a.flow,segment:a.segment,split:a.split,conversion_event_type:a.conversion_event_type,conversion_event_url:a.conversion_event_url,rule:e.rule,name:e.name,type:e.type,value:e.value,external_segment:e.external_segment}}):[],gu=()=>{var e,t,n=null!==(e=Fr.getCampaignRules(ot))&&void 0!==e?e:[],i=null!==(t=Fr.getCampaignRules(wt))&&void 0!==t?t:[],a=ou(),r=li([...n,...i]).filter(e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===a)}),o=new Set;return r.filter(e=>{var t,n,i=`${null!==(t=e.type)&&void 0!==t?t:""}::${null!==(n=e.value)&&void 0!==n?n:""}`;return!o.has(i)&&(o.add(i),!0)})},yu=e=>{var t,n=null!==(t=Fr.getCampaignRules(e))&&void 0!==t?t:[],i=ou();return li(n).filter(e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===i)})},bu=()=>yu(wt),wu=()=>yu(ot),ku=(t,n,i,a)=>{var r=(()=>{if(!a)return t().find(t=>t.type==e.NamiCampaignRuleType.DEFAULT);if(a===e.NamiCampaignRuleType.URL){var n=t().filter(t=>t.type==e.NamiCampaignRuleType.URL);return((e,t)=>{var n,i,a,r=vu(e);if(r){for(var o,s,u,l=h(t);!(u=l()).done;){var d=u.value,c=d.value;if(c){var m=vu(c);if(m&&m.basePath===r.basePath){var f=m.params.size;if(0!==f){for(var v,p=0,g=h(m.params);!(v=g()).done;){var y=v.value;r.params.has(y)&&p++}p===f?(!o||f>o.totalParams)&&(o={campaign:d,totalParams:f}):o||(!s||p>s.score||p===s.score&&f>s.totalParams)&&(s={campaign:d,score:p,totalParams:f})}else o||s||(s={campaign:d,score:0,totalParams:0})}}}return null!==(n=null===(i=o)||void 0===i?void 0:i.campaign)&&void 0!==n?n:null===(a=s)||void 0===a?void 0:a.campaign}})(i,n)}return t().find(e=>e.type==a&&e.value==i)})();if(!r)return{};var o=n().find(e=>(null==r?void 0:r.paywall)===e.id);return{campaign:r,paywall:o}},Su=(e,t)=>{var n=ku(wu,Us,e,t);if(n.campaign&&n.paywall)return{campaign:n.campaign,paywall:n.paywall};var i=ku(bu,zs,e,t);return i.campaign&&i.paywall?{campaign:i.campaign,paywall:i.paywall}:n.campaign||n.paywall?{campaign:n.campaign,paywall:n.paywall}:{campaign:i.campaign,paywall:i.paywall}},Eu="object"==typeof Reflect?Reflect:null,Pu=Eu&&"function"==typeof Eu.apply?Eu.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};mu=Eu&&"function"==typeof Eu.ownKeys?Eu.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Tu=Number.isNaN||function(e){return e!=e};function Mu(){Mu.init.call(this)}Mu.EventEmitter=Mu,Mu.prototype._events=void 0,Mu.prototype._eventsCount=0,Mu.prototype._maxListeners=void 0;var _u=10;function Au(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Du(e){return void 0===e._maxListeners?Mu.defaultMaxListeners:e._maxListeners}function xu(e,t,n,i){var a,r,o,s;if(Au(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),o=r[t]),void 0===o)o=r[t]=n,++e._eventsCount;else if("function"==typeof o?o=r[t]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(a=Du(e))>0&&o.length>a&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return e}function Cu(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Iu(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=Cu.bind(i);return a.listener=n,i.wrapFn=a,a}function Lu(e,t,n){var i=e._events;if(void 0===i)return[];var a=i[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):Fu(a,a.length)}function Ru(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function Fu(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(Mu,"defaultMaxListeners",{enumerable:!0,get:function(){return _u},set:function(e){if("number"!=typeof e||e<0||Tu(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");_u=e}}),Mu.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Mu.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Tu(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Mu.prototype.getMaxListeners=function(){return Du(this)},Mu.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var r;if(t.length>0&&(r=t[0]),r instanceof Error)throw r;var o=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw o.context=r,o}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)Pu(s,this,t);else for(var u=s.length,l=Fu(s,u),d=0;d<u;++d)Pu(l[d],this,t);return!0},Mu.prototype.addListener=function(e,t){return xu(this,e,t,!1)},Mu.prototype.on=Mu.prototype.addListener,Mu.prototype.prependListener=function(e,t){return xu(this,e,t,!0)},Mu.prototype.once=function(e,t){return Au(t),this.on(e,Iu(this,e,t)),this},Mu.prototype.prependOnceListener=function(e,t){return Au(t),this.prependListener(e,Iu(this,e,t)),this},Mu.prototype.removeListener=function(e,t){var n,i,a,r,o;if(Au(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){o=n[r].listener,a=r;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},Mu.prototype.off=Mu.prototype.removeListener,Mu.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(a=r[i])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},Mu.prototype.listeners=function(e){return Lu(this,e,!0)},Mu.prototype.rawListeners=function(e){return Lu(this,e,!1)},Mu.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Ru.call(e,t)},Mu.prototype.listenerCount=Ru,Mu.prototype.eventNames=function(){return this._eventsCount>0?mu(this._events):[]};var Ou=function(){function e(){o(this,e),this.emitter=new Mu}return c(e,[{key:"on",value:function(e,t){this.emitter.on(e,t)}},{key:"off",value:function(e,t){this.emitter.off(e,t)}},{key:"emit",value:function(e,...t){this.emitter.emit(e,...t)}},{key:"addListener",value:function(e,t){this.emitter.addListener(e,t)}},{key:"removeListener",value:function(e,t){this.emitter.removeListener(e,t)}},{key:"removeAllListeners",value:function(e){e?this.emitter.removeAllListeners(e):this.emitter.removeAllListeners()}},{key:"listeners",value:function(e){return this.emitter.listeners(e)}},{key:"listenerCount",value:function(e){return this.emitter.listenerCount(e)}}],[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}])}(),Nu=function(){return c(function e(){o(this,e),this.disableCampaignUpdates=!1,this.useLegacyPaywallFetch=!1,this.currentFormFactor=ou()},[{key:"configure",value:function(e,t,n=[]){this.currentFormFactor=e,this.splitPosition=t,this.disableCampaignUpdates=n.includes("disableCampaignUpdates"),this.useLegacyPaywallFetch=n.includes("useLegacyPaywallFetch")}},{key:"reset",value:function(){this.currentFormFactor=ou(),this.splitPosition=void 0,this.disableCampaignUpdates=!1,this.useLegacyPaywallFetch=!1}},{key:"fetchCampaignRules",value:function(e){var t,n,i,r;return k(function(o){for(;;)switch(o.n){case 0:if(i=Fr.getDevice(),!this.disableCampaignUpdates){o.n=1;break}return ui.info("Campaign updates disabled by configuration. Skipping fetch."),o.a(2,[]);case 1:if(null!=i&&i.id){o.n=3;break}return o.n=2,a(this.getAnonymousCampaigns());case 2:r=o.v,o.n=5;break;case 3:return o.n=4,a(this.getCampaigns(i.id));case 4:r=o.v;case 5:return r=null===(t=r)||void 0===t?void 0:t.filter(e=>{var t;return e.paywall&&e.form_factors.some(e=>e.form_factor===this.currentFormFactor)||e.flow&&(null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===this.currentFormFactor))}),r=null===(n=r)||void 0===n?void 0:n.filter(t=>{if(t.paywall){var n=e.find(e=>e.id==t.paywall);if(n)return t}else if(t.flow)return t}),Fr.setCampaignRules(ot,r),Fr.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),o.a(2,r)}},null,this,null,Promise)}},{key:"fetchCampaignRulesRaw",value:function(){var e,t,n;return k(function(i){for(;;)switch(i.n){case 0:if(t=Fr.getDevice(),!this.disableCampaignUpdates){i.n=1;break}return ui.info("Campaign updates disabled by configuration. Skipping fetch."),i.a(2,[]);case 1:if(null!=t&&t.id){i.n=3;break}return i.n=2,a(this.getAnonymousCampaigns());case 2:n=i.v,i.n=5;break;case 3:return i.n=4,a(this.getCampaigns(t.id));case 4:n=i.v;case 5:return n=null===(e=n)||void 0===e?void 0:e.filter(e=>{var t;return e.paywall&&e.form_factors.some(e=>e.form_factor===this.currentFormFactor)||e.flow&&(null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===this.currentFormFactor))}),i.a(2,n)}},null,this,null,Promise)}},{key:"finalizeCampaignRules",value:function(e,t){var n=null==e?void 0:e.filter(e=>e.paywall?t.find(t=>t.id==e.paywall):!!e.flow);return Fr.setCampaignRules(ot,n),Fr.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),n}},{key:"invokeAvailableCampaignsResponseHandler",value:function(){var e=Ou.getInstance().listeners(Hn),t=gu();e.forEach(e=>e(t))}},{key:"getAnonymousCampaigns",value:function(e=Ae){var t,n,i,r,o;return k(function(s){for(;;)switch(s.p=s.n){case 0:return t=`campaign_rules/?sdk_version=${e}`,s.p=1,s.n=2,a(js.instance.fetchAPI(t));case 2:return i=s.v,s.a(2,pu(null!==(n=i.results)&&void 0!==n?n:[],this.splitPosition,this.currentFormFactor));case 3:if(s.p=3,o=s.v,r=this.fallbackData()){s.n=4;break}throw ui.error(Zr(o.status,t)),o;case 4:return s.a(2,r.results)}},null,this,[[1,3]],Promise)}},{key:"getCampaigns",value:function(e){var t,n,i,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return n=`device/${e}/campaign_rules/`,o.p=1,o.n=2,a(js.instance.fetchAPI(n));case 2:i=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,i=this.fallbackData()){o.n=4;break}throw ui.error(Zr(r.status,n)),r;case 4:return o.a(2,(null===(t=i)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Fr.getCampaignRules(ot)||Fr.getCampaignRules(wt);return e?{count:e.length,results:e}:null}}],[{key:"extractPaywallUrls",value:function(e){for(var t,n=[],i=h(e);!(t=i()).done;){var a,r=t.value;r.paywall_url&&n.push(r.paywall_url),r.page_urls&&n.push(...Object.values(r.page_urls)),null!==(a=r.flow)&&void 0!==a&&a.page_urls&&n.push(...Object.values(r.flow.page_urls))}return n}},{key:"hasPaywallUrls",value:function(e){return e.some(e=>{var t;return e.paywall_url||e.page_urls||(null===(t=e.flow)||void 0===t?void 0:t.page_urls)})}}])}();function $u(e,t){return ar(e,t)}Nu.instance=new Nu;var Wu=function(){return c(function e(){o(this,e)},[{key:"createOrUpdateDevice",value:function(e,t,n){var i=Fr.getDevice();if(null==i||!i.id){var a,r=m({},e,{id:null!==(a=null!=t?t:this.getAnonymousUUID())&&void 0!==a?a:su()});return{id:r.id,device:this.createDevice(r,n)}}return this.isEqualDevices(i,e)?{id:i.id,device:Promise.resolve(i)}:(this.updateDevice(i.id,e),{id:i.id,device:null})}},{key:"createDevice",value:function(e,t){var n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:return r.p=0,r.n=1,a(this.requestAPIData("device/",e,void 0,void 0,0));case 1:if(!(n=r.v)){r.n=2;break}Fr.setDevice(n),r.n=3;break;case 2:return ui.info("Device creation returned null, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),r.a(2,null);case 3:return r.a(2,n);case 4:if(r.p=4,i=r.v,console.error("Error creating device:",i),!(i instanceof Or)){r.n=5;break}return ui.info("Retry limit exceeded, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),r.a(2,null);case 5:throw i;case 6:return r.a(2)}},null,this,[[0,4]],Promise)}},{key:"updateDevice",value:function(e,t){var n;return k(function(i){for(;;)switch(i.n){case 0:return i.n=1,a(this.requestAPIData(`device/${e}/`,t,"PUT"));case 1:return(n=i.v)&&Fr.setDevice(n),i.a(2,n)}},null,this,null,Promise)}},{key:"updateDeviceField",value:function(e,t){var n,i,r;return k(function(o){for(;;)switch(o.n){case 0:if(n={[e]:t},null!=(i=Fr.getDevice())&&i.id){o.n=1;break}throw new Br;case 1:return o.n=2,a(this.requestAPIData(`device/${i.id}/`,n,"PATCH"));case 2:return(r=o.v)&&Fr.setDevice(r),o.a(2,r)}},null,this,null,Promise)}},{key:"requestAPIData",value:function(e,t,n="POST",i=An,r){var o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:return u.p=0,u.n=1,a(js.instance.requestBodyAPI(e,t,n,!1,i,r));case 1:o=u.v,u.n=5;break;case 2:if(u.p=2,!((s=u.v)instanceof jr)){u.n=3;break}throw s;case 3:if(!("device/"===e&&s instanceof Or)){u.n=4;break}throw s;case 4:if(o=Fr.getDevice()){u.n=5;break}return ui.error(Zr(s.status,e)),u.a(2,null);case 5:return u.a(2,o)}},null,null,[[0,2]],Promise)}},{key:"isEqualDevices",value:function(e,t){var n=m({},e,t),i=Object.keys(e).reduce((e,t)=>(e[t]=n[t],e),{});return $u(i,e)}},{key:"getOrCreateAnonymousUUID",value:function(){var e=Fr.getAnonymousUUID();return e||(e=su(),Fr.setAnonymousUUID(e)),e}},{key:"getAnonymousUUID",value:function(){var e=Fr.getAnonymousUUID();return e?(Fr.clearAnonymousUUID(),e):null}}])}();Wu.instance=new Wu;var ju=function(){return c(function e(){o(this,e)},[{key:"fetchProducts",value:function(){var e,t,n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:if(!Ds(Pe.THIRD_PARTY_TRANSACTIONS)){r.n=1;break}return r.a(2,[]);case 1:return r.p=1,r.n=2,a(js.instance.fetchAPI("products/"));case 2:n=r.v,r.n=4;break;case 3:if(r.p=3,i=r.v,n=this.fallbackData()){r.n=4;break}throw ui.error(Zr(i.status,"products/")),i;case 4:return null!==(e=n)&&void 0!==e&&e.results&&Fr.setProducts(ht,n.results),r.a(2,(null===(t=n)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Fr.getProducts(ht)||Fr.getProducts(Pt);return e?{count:e.length,results:e}:null}}])}();ju.instance=new ju;var Bu=3,zu=200,Uu=2e3,Hu=5e3,Gu=new Set([408,425,429]),Vu=new Set(["ECONNRESET","ECONNREFUSED","ENOTFOUND","ETIMEDOUT"]),Ku=function(e){function t(e,n){var i;return o(this,t),(i=r(this,t,[`CDN fetch failed with non-retryable status ${e} for ${n}`])).name="NonRetryableHttpError",i.status=e,i.url=n,i}return p(t,e),c(t)}(_(Error)),Xu=function(e){function t(e,n,i){var a;return o(this,t),(a=r(this,t,[`CDN fetch exhausted ${n} attempts for ${e}${void 0!==i?` (last status ${i})`:""}`])).name="RetryExhaustedError",a.url=e,a.attempts=n,a.lastStatus=i,a}return p(t,e),c(t)}(_(Error));function Yu(e,t){if("number"==typeof t)return Gu.has(t)||t>=500;if(e&&"object"==typeof e){var n=e;if("AbortError"===n.name)return!0;if(n.code&&Vu.has(n.code))return!0;if(e instanceof TypeError)return!0}return!1}function qu(e,t){var n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:return n=new AbortController,i=setTimeout(()=>n.abort(),t),r.p=1,r.n=2,a(fetch(e,{signal:n.signal}));case 2:return r.a(2,r.v);case 3:return r.p=3,clearTimeout(i),r.f(3);case 4:return r.a(2)}},null,null,[[1,,3,4]],Promise)}var Ju=e=>new Promise(t=>setTimeout(t,e));function Qu(e,t={}){var n,i,r,o,s,u,l,d,c,h,m,f,v,p,g,y,b,w,S,E,P,T,M,_,A,D,x,C,I,L;return k(function(k){for(;;)switch(k.p=k.n){case 0:d=null!==(n=t.maxAttempts)&&void 0!==n?n:Bu,c=null!==(i=t.baseDelayMs)&&void 0!==i?i:zu,h=null!==(r=t.maxDelayMs)&&void 0!==r?r:Uu,m=null!==(o=t.budgetMs)&&void 0!==o?o:Hu,f=null!==(s=t.timeoutMs)&&void 0!==s?s:Mn,v=null!==(u=t.randomFn)&&void 0!==u?u:Math.random,p=null!==(l=t.sleepFn)&&void 0!==l?l:Ju,g=Is(),y=Ls(),b=Date.now(),w=0;case 1:if(!(w<d)){k.n=16;break}if(!(w>0)){k.n=4;break}if(!((P=Date.now()-b)>=m)){k.n=2;break}return k.a(3,16);case 2:return T=Math.min(c*Math.pow(2,w-1),h),M=T*(v()-.5),_=Math.max(0,m-P),A=Math.min(Math.max(0,T+M),_),k.n=3,a(p(A));case 3:if(!(Date.now()-b>=m)){k.n=4;break}return k.a(3,16);case 4:return k.p=4,(g||y)&&ui.debug(`[HTTP] GET ${e} (cdn attempt ${w+1}/${d})`),k.n=5,a(qu(e,f));case 5:if((D=k.v).ok){k.n=9;break}if(!y){k.n=7;break}return k.n=6,a(D.clone().text());case 6:x=k.v,ui.debug(`[HTTP] Response ${D.status}: ${x}`);case 7:if(S=D.status,!Yu(void 0,D.status)){k.n=8;break}return w++,k.a(3,1);case 8:throw new Ku(D.status,e);case 9:if(!y){k.n=11;break}return k.n=10,a(D.clone().text());case 10:C=k.v,ui.debug(`[HTTP] Response ${D.status}: ${C}`);case 11:return k.n=12,a(D.json());case 12:return I=k.v,k.a(2,{data:I,retryCount:w});case 13:if(k.p=13,!((L=k.v)instanceof Ku)){k.n=14;break}throw L;case 14:if(!Yu(L)){k.n=15;break}return E=L,w++,k.a(3,1);case 15:throw L;case 16:if(void 0!==S||void 0===E){k.n=17;break}throw E;case 17:throw new Xu(e,w,S);case 18:return k.a(2)}},null,null,[[4,13]],Promise)}var Zu=function(){return c(function e(){o(this,e)},[{key:"fetchPaywalls",value:function(){var e,t,n;return k(function(i){for(;;)switch(i.n){case 0:if(null!=(e=Fr.getDevice())&&e.id){i.n=2;break}return i.n=1,a(this.getAnonymousPaywalls());case 1:t=i.v,i.n=4;break;case 2:return i.n=3,a(this.getPaywalls(e.id));case 3:t=i.v;case 4:if(!t){i.n=5;break}return(n=this.validatePaywalls(t)).length>0&&Fr.setPaywalls(ut,n),i.a(2,n);case 5:return i.a(2,t)}},null,this,null,Promise)}},{key:"getAnonymousPaywalls",value:function(e=Ae){var t,n,i,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return n=`paywalls/?sdk_version=${e}`,i=null,o.p=1,o.n=2,a(js.instance.fetchAPI(n));case 2:i=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,i=this.fallbackData()){o.n=4;break}throw ui.error(Zr(r.status,n)),r;case 4:return o.a(2,(null===(t=i)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"getPaywalls",value:function(e){var t,n,i,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return n=`device/${e}/paywalls/`,o.p=1,o.n=2,a(js.instance.fetchAPI(n));case 2:i=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,i=this.fallbackData()){o.n=4;break}throw ui.error(Zr(r.status,n)),r;case 4:return o.a(2,(null===(t=i)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fetchPaywallByUrl",value:function(e){return k(function(t){for(;;)if(0===t.n)return t.a(2,Qu(e))},null,null,null,Promise)}},{key:"fetchPaywallsByUrls",value:function(e){var t,n,i,r,o,s,u,l;return k(function(d){for(;;)switch(d.n){case 0:return t=[...new Set(e)],d.n=1,a(Promise.allSettled(t.map(e=>this.fetchPaywallByUrl(e))));case 1:for(n=d.v,i=[],r=0,o=h(n);!(s=o()).done;)"fulfilled"===(u=s.value).status?(i.push(u.value.data),r+=u.value.retryCount):ui.error(`Failed to fetch individual paywall: ${u.reason}`);if(!(i.length>0)){d.n=2;break}return(l=this.validatePaywalls(i)).length>0&&Fr.setPaywalls(ut,l),d.a(2,{paywalls:l,retryCount:r});case 2:return d.a(2,{paywalls:i,retryCount:r})}},null,this,null,Promise)}},{key:"validatePaywalls",value:function(e){return e.filter(e=>{var t,n=null===(t=e.template)||void 0===t?void 0:t.pages;return!(!Array.isArray(n)||0===n.length)||(ui.warn(`Dropping paywall "${e.id}" from cache: template.pages is missing or empty`),!1)})}},{key:"fallbackData",value:function(){var e=Fr.getPaywalls(ut)||Fr.getPaywalls(St);return e?{count:e.length,results:e}:null}}])}();Zu.instance=new Zu;var el=function(){return c(function e(){o(this,e)},[{key:"fetchConfig",value:function(){var e,t;return k(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,a(js.instance.fetchAPI("config/"));case 1:e=n.v,n.n=3;break;case 2:if(n.p=2,t=n.v,e=Fr.getAppConfig(at)||Fr.getAppConfig(yt)){n.n=3;break}throw ui.error(Zr(t.status,"config/")),t;case 3:return e&&Fr.setAppConfig(at,e),n.a(2,e)}},null,null,[[0,2]],Promise)}}])}();el.instance=new el;var tl=null;function nl(){tl&&tl.setInMemoryAnonymousMode(!1)}function il(){return!!Fr.getAnonymousMode()||!!tl&&tl.isInMemoryAnonymousMode()}var al=function(){return c(function e(){o(this,e)},[{key:"startSession",value:function(){var e;return k(function(t){for(;;)switch(t.p=t.n){case 0:if(!il()){t.n=1;break}return ui.debug("Skipping session start call - anonymous mode"),t.a(2);case 1:return t.p=1,t.n=2,a(js.instance.startSession(new Date));case 2:t.n=4;break;case 3:t.p=3,e=t.v,ui.error("error on start session: ",e);case 4:return t.a(2)}},null,null,[[1,3]],Promise)}}])}();al.instance=new al;var rl=function(){return c(function e(){o(this,e)},null,[{key:"allPurchases",value:function(){return[]}}])}();rl.instance=new rl;var ol={en:{nami_day:"day",nami_day_plural:"days",nami_week:"week",nami_week_plural:"weeks",nami_month:"month",nami_month_plural:"months",nami_year:"year",nami_year_plural:"years",nami_day_abbrev:"day",nami_day_abbrev_plural:"days",nami_week_abbrev:"wk",nami_week_abbrev_plural:"wks",nami_month_abbrev:"mo",nami_month_abbrev_plural:"mos",nami_year_abbrev:"yr",nami_year_abbrev_plural:"yrs",nami_daily:"daily",nami_weekly:"weekly",nami_biweekly:"bi-weekly",nami_monthly:"monthly",nami_bimonthly:"bi-monthly",nami_quarterly:"quarterly",nami_biannually:"bi-annually",nami_yearly:"yearly"},af:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dae",nami_week_abbrev:"week",nami_week_abbrev_plural:"weke",nami_month_abbrev:"ma",nami_month_abbrev_plural:"maande",nami_year_abbrev:"jr",nami_year_abbrev_plural:"jare",nami_daily:"daagliks",nami_weekly:"weekliks",nami_biweekly:"tweeweekliks",nami_monthly:"maandeliks",nami_bimonthly:"tweemaandeliks",nami_quarterly:"kwartaalliks",nami_biannually:"tweejaarliks",nami_yearly:"jaarliks"},am:{nami_day_abbrev:"ቀን",nami_day_abbrev_plural:"ቀናት",nami_week_abbrev:"ሳምንት",nami_week_abbrev_plural:"ሳምንታት",nami_month_abbrev:"ወር",nami_month_abbrev_plural:"ሞስ",nami_year_abbrev:"ዓመት",nami_year_abbrev_plural:"ዓመታት",nami_daily:"በየቀኑ",nami_weekly:"ሳምንታዊ",nami_biweekly:"በየሁለት ሳምንቱ",nami_monthly:"ወርሃዊ",nami_bimonthly:"በየሁለት ወሩ",nami_quarterly:"በየሩብ ዓመቱ",nami_biannually:"በየሁለት ዓመቱ",nami_yearly:"ዓመታዊ"},ar:{nami_day_abbrev:"يوم",nami_day_abbrev_plural:"أيام",nami_week_abbrev:"أسبوع",nami_week_abbrev_plural:"أسابيع",nami_month_abbrev:"شهر",nami_month_abbrev_plural:"موس",nami_year_abbrev:"سنة",nami_year_abbrev_plural:"سنوات",nami_daily:"يوميًا",nami_weekly:"أسبوعي",nami_biweekly:"كل أسبوعين",nami_monthly:"شهريا",nami_bimonthly:"كل شهرين",nami_quarterly:"ربع سنوي",nami_biannually:"مرتين في السنة",nami_yearly:"سنوي"},bg:{nami_day_abbrev:"ден",nami_day_abbrev_plural:"дни",nami_week_abbrev:"седмица",nami_week_abbrev_plural:"седмици",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год.",nami_year_abbrev_plural:"години",nami_daily:"ежедневно",nami_weekly:"седмично",nami_biweekly:"двуседмичен",nami_monthly:"месечно",nami_bimonthly:"двумесечно",nami_quarterly:"тримесечно",nami_biannually:"два пъти годишно",nami_yearly:"годишно"},ca:{nami_day_abbrev:"dia",nami_day_abbrev_plural:"dies",nami_week_abbrev:"setmana",nami_week_abbrev_plural:"setmanes",nami_month_abbrev:"mes",nami_month_abbrev_plural:"mesos",nami_year_abbrev:"any",nami_year_abbrev_plural:"anys",nami_daily:"diàriament",nami_weekly:"setmanal",nami_biweekly:"quinzenal",nami_monthly:"mensual",nami_bimonthly:"bimensual",nami_quarterly:"trimestral",nami_biannually:"bianualment",nami_yearly:"anual"},cs:{nami_day_abbrev:"den",nami_day_abbrev_plural:"dny",nami_week_abbrev:"týden",nami_week_abbrev_plural:"týdny",nami_month_abbrev:"měsíc",nami_month_abbrev_plural:"měsíce",nami_year_abbrev:"rok",nami_year_abbrev_plural:"roky",nami_daily:"denní",nami_weekly:"týdně",nami_biweekly:"dvoutýdenní",nami_monthly:"měsíční",nami_bimonthly:"dvouměsíčník",nami_quarterly:"čtvrtletní",nami_biannually:"pololetně",nami_yearly:"roční"},de:{nami_day_abbrev:"Tag",nami_day_abbrev_plural:"Tage",nami_week_abbrev:"Woche",nami_week_abbrev_plural:"Wochen",nami_month_abbrev:"Monat",nami_month_abbrev_plural:"Monate",nami_year_abbrev:"Jahr",nami_year_abbrev_plural:"Jahre",nami_daily:"täglich",nami_weekly:"wöchentlich",nami_biweekly:"zweiwöchentlich",nami_monthly:"monatlich",nami_bimonthly:"zweimonatlich",nami_quarterly:"vierteljährlich",nami_biannually:"halbjährlich",nami_yearly:"jährlich"},el:{nami_day_abbrev:"ημέρα",nami_day_abbrev_plural:"ημέρες",nami_week_abbrev:"εβδομάδα",nami_week_abbrev_plural:"εβδομάδες",nami_month_abbrev:"μήνα",nami_month_abbrev_plural:"μην",nami_year_abbrev:"έτος",nami_year_abbrev_plural:"χρόνια",nami_daily:"καθημερινά",nami_weekly:"εβδομαδιαίος",nami_biweekly:"ανά δύο εβδομάδες",nami_monthly:"μηνιαίος",nami_bimonthly:"διμηνιαίος",nami_quarterly:"τριμηνιαίος",nami_biannually:"ανά εξάμηνο",nami_yearly:"ετήσια"},es:{nami_day_abbrev:"día",nami_day_abbrev_plural:"días",nami_week_abbrev:"semana",nami_week_abbrev_plural:"semanas",nami_month_abbrev:"mes",nami_month_abbrev_plural:"meses",nami_year_abbrev:"año",nami_year_abbrev_plural:"años",nami_daily:"diario",nami_weekly:"semanal",nami_biweekly:"quincenal",nami_monthly:"mensual",nami_bimonthly:"bimensual",nami_quarterly:"trimestral",nami_biannually:"semestral",nami_yearly:"anual"},et:{nami_day_abbrev:"päev",nami_day_abbrev_plural:"päevad",nami_week_abbrev:"nädal",nami_week_abbrev_plural:"nädalat",nami_month_abbrev:"kuu",nami_month_abbrev_plural:"kuud",nami_year_abbrev:"aasta",nami_year_abbrev_plural:"aastat",nami_daily:"iga päev",nami_weekly:"iganädalane",nami_biweekly:"iga kahe nädala tagant",nami_monthly:"igakuine",nami_bimonthly:"kaks korda kuus",nami_quarterly:"kvartali",nami_biannually:"kaks korda aastas",nami_yearly:"iga-aastane"},fa:{nami_day_abbrev:"روز",nami_day_abbrev_plural:"روزها",nami_week_abbrev:"هفته",nami_week_abbrev_plural:"هفتهها",nami_month_abbrev:"مو",nami_month_abbrev_plural:"موش",nami_year_abbrev:"سال",nami_year_abbrev_plural:"سال",nami_daily:"روزانه",nami_weekly:"هفتگی",nami_biweekly:"دو هفتهای",nami_monthly:"ماهانه",nami_bimonthly:"دوماهه",nami_quarterly:"سه ماهه",nami_biannually:"دوسالانه",nami_yearly:"سالانه"},fi:{nami_day_abbrev:"päivä",nami_day_abbrev_plural:"päivää",nami_week_abbrev:"viikko",nami_week_abbrev_plural:"viikkoa",nami_month_abbrev:"kuukausi",nami_month_abbrev_plural:"kuukaudet",nami_year_abbrev:"vuosi",nami_year_abbrev_plural:"vuotta",nami_daily:"päivittäin",nami_weekly:"viikoittain",nami_biweekly:"joka toinen viikko",nami_monthly:"kuukausittain",nami_bimonthly:"kahdesti kuussa",nami_quarterly:"neljännesvuosittain",nami_biannually:"puolivuosittain",nami_yearly:"vuosittain"},fr:{nami_day_abbrev:"jour",nami_day_abbrev_plural:"jours",nami_week_abbrev:"semaine",nami_week_abbrev_plural:"semaines",nami_month_abbrev:"mois",nami_month_abbrev_plural:"mois",nami_year_abbrev:"année",nami_year_abbrev_plural:"ans",nami_daily:"tous les jours",nami_weekly:"hebdomadaire",nami_biweekly:"bihebdomadaire",nami_monthly:"mensuel",nami_bimonthly:"bimensuel",nami_quarterly:"trimestriel",nami_biannually:"bisannuel",nami_yearly:"annuel"},hi:{nami_day_abbrev:"दिन",nami_day_abbrev_plural:"दिन",nami_week_abbrev:"सप्त",nami_week_abbrev_plural:"सप्त",nami_month_abbrev:"महीना",nami_month_abbrev_plural:"महीने",nami_year_abbrev:"साल",nami_year_abbrev_plural:"वर्षीय",nami_daily:"दैनिक",nami_weekly:"साप्ताहिक",nami_biweekly:"द्वि-साप्ताहिक",nami_monthly:"महीने के",nami_bimonthly:"द्विमासिक",nami_quarterly:"त्रैमासिक",nami_biannually:"द्वि-वार्षिक रूप",nami_yearly:"वार्षिक"},hr:{nami_day_abbrev:"dan",nami_day_abbrev_plural:"dana",nami_week_abbrev:"tjedan",nami_week_abbrev_plural:"tjedni",nami_month_abbrev:"mjesec",nami_month_abbrev_plural:"mjeseca",nami_year_abbrev:"god.",nami_year_abbrev_plural:"godina",nami_daily:"dnevno",nami_weekly:"tjedno",nami_biweekly:"dvotjedno",nami_monthly:"mjesečno",nami_bimonthly:"dvomjesečno",nami_quarterly:"tromjesečno",nami_biannually:"dvogodišnje",nami_yearly:"godišnje"},hu:{nami_day_abbrev:"nap",nami_day_abbrev_plural:"napok",nami_week_abbrev:"hét",nami_week_abbrev_plural:"hetek",nami_month_abbrev:"hónap",nami_month_abbrev_plural:"hónap",nami_year_abbrev:"év",nami_year_abbrev_plural:"év",nami_daily:"napi",nami_weekly:"heti",nami_biweekly:"kéthetente",nami_monthly:"havi",nami_bimonthly:"kéthavonta",nami_quarterly:"negyedévenként",nami_biannually:"félévente",nami_yearly:"évi"},id:{nami_day_abbrev:"hari",nami_day_abbrev_plural:"hari",nami_week_abbrev:"minggu",nami_week_abbrev_plural:"minggu",nami_month_abbrev:"bulan",nami_month_abbrev_plural:"bulan",nami_year_abbrev:"tahun",nami_year_abbrev_plural:"tahun",nami_daily:"sehari-hari",nami_weekly:"mingguan",nami_biweekly:"dua kali seminggu",nami_monthly:"bulanan",nami_bimonthly:"dua bulanan",nami_quarterly:"triwulanan",nami_biannually:"dua tahunan",nami_yearly:"tahunan"},it:{nami_day_abbrev:"giorno",nami_day_abbrev_plural:"giorni",nami_week_abbrev:"settimana",nami_week_abbrev_plural:"settimane",nami_month_abbrev:"mese",nami_month_abbrev_plural:"mesi",nami_year_abbrev:"anno",nami_year_abbrev_plural:"anni",nami_daily:"quotidiano",nami_weekly:"settimanale",nami_biweekly:"bisettimanale",nami_monthly:"mensile",nami_bimonthly:"bimestrale",nami_quarterly:"trimestrale",nami_biannually:"semestralmente",nami_yearly:"annuale"},he:{nami_day_abbrev:"יְוֹם",nami_day_abbrev_plural:"ימים",nami_week_abbrev:"שבוע",nami_week_abbrev_plural:"שבועות",nami_month_abbrev:"מו",nami_month_abbrev_plural:"מוֹס",nami_year_abbrev:"שנה",nami_year_abbrev_plural:"שנים",nami_daily:"יוֹמִי",nami_weekly:"שְׁבוּעִי",nami_biweekly:"דו-שבועי",nami_monthly:"יַרחוֹן",nami_bimonthly:"דו-חודשי",nami_quarterly:"רִבעוֹן",nami_biannually:"דו-שנתי",nami_yearly:"שְׁנָתִי"},ja:{nami_day_abbrev:"日",nami_day_abbrev_plural:"日",nami_week_abbrev:"週",nami_week_abbrev_plural:"週",nami_month_abbrev:"モ",nami_month_abbrev_plural:"モス",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"毎日",nami_weekly:"毎週",nami_biweekly:"隔週",nami_monthly:"毎月",nami_bimonthly:"隔月",nami_quarterly:"四半期ごと",nami_biannually:"半年ごと",nami_yearly:"毎年"},ko:{nami_day_abbrev:"낮",nami_day_abbrev_plural:"날",nami_week_abbrev:"주",nami_week_abbrev_plural:"주",nami_month_abbrev:"모",nami_month_abbrev_plural:"모스",nami_year_abbrev:"년",nami_year_abbrev_plural:"년",nami_daily:"일일",nami_weekly:"주간",nami_biweekly:"격주 간행물",nami_monthly:"월간 간행물",nami_bimonthly:"격월",nami_quarterly:"계간지",nami_biannually:"반년마다",nami_yearly:"매년"},lt:{nami_day_abbrev:"diena",nami_day_abbrev_plural:"dienos",nami_week_abbrev:"savaitė",nami_week_abbrev_plural:"savaitės",nami_month_abbrev:"mėn.",nami_month_abbrev_plural:"mėn.",nami_year_abbrev:"metai",nami_year_abbrev_plural:"metų",nami_daily:"kasdien",nami_weekly:"kas savaitę",nami_biweekly:"kas dvi savaites",nami_monthly:"mėnesinis",nami_bimonthly:"kas du mėnesius",nami_quarterly:"ketvirtinis",nami_biannually:"kas du kartus per metus",nami_yearly:"kasmet"},lv:{nami_day_abbrev:"diena",nami_day_abbrev_plural:"dienas",nami_week_abbrev:"nedēļa",nami_week_abbrev_plural:"nedēļas",nami_month_abbrev:"mēn.",nami_month_abbrev_plural:"mēn.",nami_year_abbrev:"gads",nami_year_abbrev_plural:"gadi",nami_daily:"ikdienas",nami_weekly:"iknedēļas",nami_biweekly:"divreiz nedēļā",nami_monthly:"ikmēneša",nami_bimonthly:"divreiz mēnesī",nami_quarterly:"ceturksnī",nami_biannually:"divreiz gadā",nami_yearly:"katru gadu"},ms:{nami_day_abbrev:"hari",nami_day_abbrev_plural:"hari",nami_week_abbrev:"minggu",nami_week_abbrev_plural:"minggu",nami_month_abbrev:"bulan",nami_month_abbrev_plural:"bulan",nami_year_abbrev:"tahun",nami_year_abbrev_plural:"tahun",nami_daily:"setiap hari",nami_weekly:"mingguan",nami_biweekly:"dua minggu sekali",nami_monthly:"bulanan",nami_bimonthly:"dua kali sebulan",nami_quarterly:"suku tahunan",nami_biannually:"dua kali setahun",nami_yearly:"tahunan"},nl:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dagen",nami_week_abbrev:"week",nami_week_abbrev_plural:"weken",nami_month_abbrev:"maand",nami_month_abbrev_plural:"maanden",nami_year_abbrev:"jaar",nami_year_abbrev_plural:"jaren",nami_daily:"dagelijks",nami_weekly:"wekelijks",nami_biweekly:"tweewekelijks",nami_monthly:"maandelijks",nami_bimonthly:"tweemaandelijks",nami_quarterly:"kwartaal",nami_biannually:"halfjaarlijks",nami_yearly:"jaarlijks"},no:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dager",nami_week_abbrev:"uke",nami_week_abbrev_plural:"uker",nami_month_abbrev:"måned",nami_month_abbrev_plural:"måned",nami_year_abbrev:"år",nami_year_abbrev_plural:"år",nami_daily:"daglig",nami_weekly:"ukentlig",nami_biweekly:"annenhver uke",nami_monthly:"månedlig",nami_bimonthly:"annenhver måned",nami_quarterly:"kvartalsvis",nami_biannually:"to ganger i året",nami_yearly:"årlig"},pl:{nami_day_abbrev:"dzień",nami_day_abbrev_plural:"dni",nami_week_abbrev:"tydzień",nami_week_abbrev_plural:"tygodni",nami_month_abbrev:"miesiąc",nami_month_abbrev_plural:"miesiące",nami_year_abbrev:"rok",nami_year_abbrev_plural:"lat",nami_daily:"codziennie",nami_weekly:"tygodnik",nami_biweekly:"dwutygodniowy",nami_monthly:"miesięczny",nami_bimonthly:"dwumiesięczny",nami_quarterly:"kwartalny",nami_biannually:"dwa razy w roku",nami_yearly:"rocznie"},pt:{nami_day_abbrev:"dia",nami_day_abbrev_plural:"dias",nami_week_abbrev:"semana",nami_week_abbrev_plural:"semanas",nami_month_abbrev:"mês",nami_month_abbrev_plural:"meses",nami_year_abbrev:"ano",nami_year_abbrev_plural:"anos",nami_daily:"diário",nami_weekly:"semanalmente",nami_biweekly:"quinzenal",nami_monthly:"mensal",nami_bimonthly:"bimestral",nami_quarterly:"trimestral",nami_biannually:"bianualmente",nami_yearly:"anual"},ro:{nami_day_abbrev:"zi",nami_day_abbrev_plural:"zile",nami_week_abbrev:"săptămână",nami_week_abbrev_plural:"săptămâni",nami_month_abbrev:"lună",nami_month_abbrev_plural:"luni",nami_year_abbrev:"an",nami_year_abbrev_plural:"ani",nami_daily:"zilnic",nami_weekly:"săptămânal",nami_biweekly:"la două săptămâni",nami_monthly:"lunar",nami_bimonthly:"bilunar",nami_quarterly:"trimestrial",nami_biannually:"bianual",nami_yearly:"anual"},ru:{nami_day_abbrev:"день",nami_day_abbrev_plural:"дни",nami_week_abbrev:"нед",nami_week_abbrev_plural:"недели",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год",nami_year_abbrev_plural:"лет",nami_daily:"ежедневно",nami_weekly:"еженедельный",nami_biweekly:"раз в две недели",nami_monthly:"ежемесячно",nami_bimonthly:"раз в два месяца",nami_quarterly:"ежеквартальный",nami_biannually:"раз в два года",nami_yearly:"ежегодно"},sk:{nami_day_abbrev:"deň",nami_day_abbrev_plural:"dni",nami_week_abbrev:"týždeň",nami_week_abbrev_plural:"týždne",nami_month_abbrev:"mesiac",nami_month_abbrev_plural:"mesiacov",nami_year_abbrev:"rok",nami_year_abbrev_plural:"rokov",nami_daily:"denne",nami_weekly:"týždenne",nami_biweekly:"dvojtýždenne",nami_monthly:"mesačne",nami_bimonthly:"dvojmesačne",nami_quarterly:"štvrťročne",nami_biannually:"polročne",nami_yearly:"ročne"},sl:{nami_day_abbrev:"dan",nami_day_abbrev_plural:"dni",nami_week_abbrev:"teden",nami_week_abbrev_plural:"tedni",nami_month_abbrev:"mesec",nami_month_abbrev_plural:"mesecev",nami_year_abbrev:"leto",nami_year_abbrev_plural:"let",nami_daily:"dnevno",nami_weekly:"tedensko",nami_biweekly:"dvotedensko",nami_monthly:"mesečno",nami_bimonthly:"dvomesečno",nami_quarterly:"četrtletno",nami_biannually:"polletno",nami_yearly:"letno"},sr:{nami_day_abbrev:"дан",nami_day_abbrev_plural:"дана",nami_week_abbrev:"недеља",nami_week_abbrev_plural:"недеље",nami_month_abbrev:"мо",nami_month_abbrev_plural:"мос",nami_year_abbrev:"год.",nami_year_abbrev_plural:"године",nami_daily:"свакодневно",nami_weekly:"недељно",nami_biweekly:"двонедељно",nami_monthly:"месечно",nami_bimonthly:"двомесечно",nami_quarterly:"квартално",nami_biannually:"два пута годишње",nami_yearly:"годишње"},sv:{nami_day_abbrev:"dag",nami_day_abbrev_plural:"dagar",nami_week_abbrev:"vecka",nami_week_abbrev_plural:"veckor",nami_month_abbrev:"mån",nami_month_abbrev_plural:"månader",nami_year_abbrev:"år",nami_year_abbrev_plural:"år",nami_daily:"dagligen",nami_weekly:"varje vecka",nami_biweekly:"som utkommer varannan vecka",nami_monthly:"månatlig",nami_bimonthly:"varannan månad",nami_quarterly:"kvartalsvis",nami_biannually:"vartannat år",nami_yearly:"årlig"},sw:{nami_day_abbrev:"siku",nami_day_abbrev_plural:"siku",nami_week_abbrev:"wiki",nami_week_abbrev_plural:"wiki",nami_month_abbrev:"mwezi",nami_month_abbrev_plural:"miezi",nami_year_abbrev:"mwaka",nami_year_abbrev_plural:"miaka",nami_daily:"kila siku",nami_weekly:"kila wiki",nami_biweekly:"kila wiki mbili",nami_monthly:"kila mwezi",nami_bimonthly:"kila baada ya miezi miwili",nami_quarterly:"robo mwaka",nami_biannually:"kila baada ya miaka miwili",nami_yearly:"kila mwaka"},th:{nami_day_abbrev:"วัน",nami_day_abbrev_plural:"วัน",nami_week_abbrev:"สัปดาห์",nami_week_abbrev_plural:"สัปดาห์",nami_month_abbrev:"โม",nami_month_abbrev_plural:"มอส",nami_year_abbrev:"ปี",nami_year_abbrev_plural:"ปี",nami_daily:"รายวัน",nami_weekly:"รายสัปดาห์",nami_biweekly:"สองสัปดาห์ครั้ง",nami_monthly:"รายเดือน",nami_bimonthly:"สองเดือนครั้ง",nami_quarterly:"ไตรมาส",nami_biannually:"ทุกสองปี",nami_yearly:"ทุกปี"},tr:{nami_day_abbrev:"gün",nami_day_abbrev_plural:"günler",nami_week_abbrev:"hafta",nami_week_abbrev_plural:"haftalar",nami_month_abbrev:"ay",nami_month_abbrev_plural:"aylar",nami_year_abbrev:"yıl",nami_year_abbrev_plural:"yıllar",nami_daily:"günlük",nami_weekly:"haftalık",nami_biweekly:"iki haftada bir",nami_monthly:"aylık",nami_bimonthly:"iki ayda bir",nami_quarterly:"üç aylık",nami_biannually:"iki yılda bir",nami_yearly:"yıllık"},uk:{nami_day_abbrev:"день",nami_day_abbrev_plural:"дні",nami_week_abbrev:"тиждень",nami_week_abbrev_plural:"тижні",nami_month_abbrev:"місяць",nami_month_abbrev_plural:"мос",nami_year_abbrev:"рік",nami_year_abbrev_plural:"років",nami_daily:"щоденно",nami_weekly:"щотижня",nami_biweekly:"раз на два тижні",nami_monthly:"щомісяця",nami_bimonthly:"раз на два місяці",nami_quarterly:"щоквартально",nami_biannually:"раз на півроку",nami_yearly:"щорічно"},vi:{nami_day_abbrev:"ngày",nami_day_abbrev_plural:"ngày",nami_week_abbrev:"tuần",nami_week_abbrev_plural:"tuần",nami_month_abbrev:"tháng",nami_month_abbrev_plural:"tháng",nami_year_abbrev:"năm",nami_year_abbrev_plural:"năm",nami_daily:"hằng ngày",nami_weekly:"hàng tuần",nami_biweekly:"hai tuần một lần",nami_monthly:"hàng tháng",nami_bimonthly:"hai tháng một lần",nami_quarterly:"hàng quý",nami_biannually:"hai năm một lần",nami_yearly:"hàng năm"},"zh-CN":{nami_day_abbrev:"天",nami_day_abbrev_plural:"天",nami_week_abbrev:"周",nami_week_abbrev_plural:"周",nami_month_abbrev:"莫",nami_month_abbrev_plural:"莫斯",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"日常的",nami_weekly:"每周",nami_biweekly:"每两周一次",nami_monthly:"月度",nami_bimonthly:"双月刊",nami_quarterly:"季刊",nami_biannually:"每半年",nami_yearly:"每年"},"zh-TW":{nami_day_abbrev:"天",nami_day_abbrev_plural:"天",nami_week_abbrev:"週",nami_week_abbrev_plural:"週",nami_month_abbrev:"莫",nami_month_abbrev_plural:"莫斯",nami_year_abbrev:"年",nami_year_abbrev_plural:"年",nami_daily:"日常的",nami_weekly:"每週",nami_biweekly:"每兩週一次",nami_monthly:"每月",nami_bimonthly:"雙月刊",nami_quarterly:"季刊",nami_biannually:"每半年",nami_yearly:"每年"},zu:{nami_day_abbrev:"usuku",nami_day_abbrev_plural:"izinsuku",nami_week_abbrev:"isonto",nami_week_abbrev_plural:"amasonto",nami_month_abbrev:"inyanga",nami_month_abbrev_plural:"i-mos",nami_year_abbrev:"unyaka",nami_year_abbrev_plural:"iminyaka",nami_daily:"nsuku zonke",nami_weekly:"masonto onke",nami_biweekly:"kabili ngesonto",nami_monthly:"nyanga zonke",nami_bimonthly:"kabili ngenyanga",nami_quarterly:"njalo ngekota",nami_biannually:"kabili ngonyaka",nami_yearly:"minyaka yonke"}},sl="en";function ul(e){var t,n,i=function(e){if(!e)return sl;var t=e.trim();if(ol[t])return t;var n=t.toLowerCase(),i=n.split("-")[0];return ol[i]?i:"zh"===i?n.includes("tw")||n.includes("hk")?"zh-TW":"zh-CN":sl}(Fr.getLanguageCode()),a=null!==(t=ol[i])&&void 0!==t?t:ol[sl];return null!==(n=null==a?void 0:a[e])&&void 0!==n?n:e}function ll(e){if("subscription"===(null==e?void 0:e.product_type)){var t=cl(e);if(t.length>0)return t[0].billingPeriod}return null}function dl(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return hl(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function cl(e){return e?hl(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function hl(e,t){return e.map(e=>ml(e,t))}function ml(e,t){var n,i,a,r,o,s,u,l;if(!e)return{};var d=null!==(n=null===(i=e.promo_period)||void 0===i?void 0:i.count)&&void 0!==n?n:null==t?void 0:t.count,c=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,h=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*h,priceCurrencyCode:m,billingPeriod:c?`P${d}${c[0].toUpperCase()}`:"",formattedPrice:pl(m).format(h)}}function fl(e,t=!1,n=!1,i=!1,a=!1){if(!e)return null;var r=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!r)return null;var o=r.slice(1).map(e=>parseInt(e)),s=o[0],u=o[1],l=o[2],d=o[3],c=(e,t,n,i,r)=>{var o=(e=>a?`${e}_abbrev`:e)(r),s=(e=>a?`${e}_abbrev_plural`:`${e}_plural`)(r),u=ul(o),l=ul(s);return a||u!==o||(u=ul(`${r}_abbrev`)),a||l!==s||(l=ul(`${r}_abbrev_plural`)),i?e.toString():n?1===e||t?u:l:1===e||t?`${e} ${u}`:`${e} ${l}`};switch(e.at(-1)){case"D":return c(d,t,n,i,"nami_day");case"W":return c(l,t,n,i,"nami_week");case"M":return c(u,t,n,i,"nami_month");case"Y":return c(s,t,n,i,"nami_year")}return null}function vl(e){var t;if(!e||e.length<2)return!1;var n=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===n||"Y"===n}function pl(e){var t={maximumFractionDigits:2,minimumFractionDigits:0},n=we().device.getLanguage();try{return new Intl.NumberFormat(n,m({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(n,m({},t,{style:"currency",currency:"USD"}))}}var gl=(e,t,n)=>e&&t&&n?n.format(e-t):null,yl=(e,t,n,i)=>{if(e&&t&&n&&i){var a=100*(1-e/(n/i*t));return`${Math.round(a)}%`}return null},bl=(e,t)=>{if(""!=t){var n=parseInt(t)-1;return n>=0&&n<(null==e?void 0:e.length)?e[n]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},wl=e=>Sl(e.priceAmountMicros)/kl(e.billingPeriod),kl=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Sl=e=>e/1e6;function El(e){return parseFloat((Math.round(e)/100).toFixed(2))}var Pl=(e,t,n=[])=>({price:()=>Ml(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>_l(e),durationSingular:()=>_l(e,!0),period:()=>_l(e,!1,!0),periodNumber:()=>_l(e,!1,!1,!0),freeTrialDuration:()=>Al(e),freeTrialDurationSingular:()=>Al(e,!0),freeTrialPeriod:()=>Al(e,!1,!0),freeTrialPeriodNumber:()=>Al(e,!1,!1,!0),pricePerMonth:()=>Dl(e),pricePerMonthRounded:()=>Dl(e,!0),periodInMonths:()=>xl(e),durationInMonths:()=>Cl(e),durationInMonthsSingular:()=>Cl(e,!0),periodNumberInMonths:()=>Il(e),percentagePriceDifferenceFromSku:()=>Ll(e,t,n),priceDifferenceFromSku:()=>Rl(e,t,n),promoEligible:()=>null===Fl(e)&&null!==Ol(e,t),freeTrialEligible:()=>null!==Fl(e),promo:()=>{var n;return null===(n=Ol(e,t))||void 0===n?void 0:n.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var n;return null===(n=Nl(e,t))||void 0===n?void 0:n.formattedPrice},promoPeriod:()=>$l(e,t,!1,!0),promoPeriodNumber:()=>$l(e,t,!1,!1,!0),promoDuration:()=>$l(e,t),promoDurationSingular:()=>$l(e,t,!0),introEligible:()=>!1,pricePerDay:()=>Wl(e),pricePerWeek:()=>jl(e),pricePerWeekRounded:()=>jl(e,!0),introductoryPrice:()=>Bl(e,t),introductoryPeriod:()=>zl(e,t,!1,!0),introductoryPeriodNumber:()=>zl(e,t,!1,!1,!0),introductoryDuration:()=>zl(e,t),introductoryDurationSingular:()=>zl(e,t,!0),introductoryPricePerMonth:()=>Ul(e,t),introductoryPricePerMonthRounded:()=>Ul(e,t,!0),durationAbbrev:()=>_l(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>Al(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>zl(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>$l(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>$l(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>Cl(e,!1,!1,!1,!0),durationSingularAbbrev:()=>_l(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>Al(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>zl(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>$l(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>$l(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>Cl(e,!0,!1,!1,!0),periodAbbrev:()=>_l(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>Al(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>zl(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>$l(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>$l(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>Cl(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;var t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;var n=t[1],i=t[2],a=t[3],r=t[4],o=void 0!==n?parseInt(n,10):0,s=void 0!==i?parseInt(i,10):0,u=void 0!==a?parseInt(a,10):0;return(void 0!==r?parseInt(r,10):0)>0?null:u>0?1===u?ul("nami_weekly"):2===u?ul("nami_biweekly"):null:s>0?ul(1===s?"nami_monthly":2===s?"nami_bimonthly":3===s?"nami_quarterly":6===s?"nami_biannually":12===s?"nami_yearly":"nami_monthly"):o>0?ul("nami_yearly"):null}(ll(e)),iso_subscription_duration:()=>Gl(e),invalid:()=>!1,unavailable:()=>!1}),Tl=(e,t,n,i=[])=>{if(!t)return null;var a=Pl(t,n,i);return a[e]?a[e]():null},Ml=e=>{var t=cl(e);return t&&t.length?t[0].formattedPrice:null},_l=(e,t,n,i,a)=>fl(ll(e),t,n,i,a),Al=(e,t,n,i,a)=>fl(dl(e),t,n,i,a),Dl=(e,t)=>{var n=cl(e);if(!n||0===n.length)return null;var i=wl(n[0]);return i?pl(n[0].priceCurrencyCode).format(t?Math.round(i):i):null},xl=(e,t)=>{var n=cl(e);if(!n||0===n.length)return null;var i=n[0].billingPeriod;return vl(i)?fl("P1Y"===i?"P12M":i,!1,!1,!1,t):null},Cl=(e,t,n,i,a)=>{var r=cl(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return vl(o)?fl("P1Y"===o?"P12M":o,t,n,i,a):null},Il=e=>{if(!e)return 0;var t=cl(e);return t&&t.length?kl(t[0].billingPeriod):0},Ll=(e,t,n=[])=>{var i,a=cl(e);if(!a||0===a.length)return null;var r=null===(i=bl(n,null!=t?t:""))||void 0===i?void 0:i.product_details;if(!t||!r)return yl(El(a[0].priceAmountMicros),Il(e));var o=cl(r);return yl(El(a[0].priceAmountMicros),Il(e),(null==o?void 0:o.length)>0?El(o[0].priceAmountMicros):0,Il(r))},Rl=(e,t,n=[])=>{var i,a=cl(e);if(!a||0===a.length)return null;var r=null===(i=bl(n,null!=t?t:""))||void 0===i?void 0:i.product_details;if(!t||!r)return gl(wl(a[0]));var o=cl(r);return gl(wl(a[0]),wl(o[0]),pl(o[0].priceCurrencyCode))},Fl=e=>dl(e),Ol=(e,t)=>{if(!e)return null;var n=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return n[0]||null;var i=n[parseInt(t)];return i?i||null:n.find(e=>e.offer_ref_id===t)||null},Nl=(e,t)=>e?ml(Ol(e,t),e.subscription_period):null,$l=(e,t,n,i,a,r)=>{var o=Nl(e,t);return fl((null==o?void 0:o.billingPeriod)||null,n,i,a,r)},Wl=(e,t)=>{var n=cl(e);if(!n||0===n.length)return null;var i,a,r=Sl(n[0].priceAmountMicros)/(i=n[0].billingPeriod,(a=kl(i))?30.437*a:1);return r?pl(n[0].priceCurrencyCode).format(r):null},jl=(e,t)=>{var n=cl(e);if(!n||0===n.length)return null;var i,a,r=Sl(n[0].priceAmountMicros)/(i=n[0].billingPeriod,(a=kl(i))?52*a/12:1);return r?pl(n[0].priceCurrencyCode).format(t?Math.round(r):r):null},Bl=(e,t)=>{var n=Hl(e,t);return(null==n?void 0:n.formattedPrice)||null},zl=(e,t,n,i,a,r)=>{var o=Hl(e,t);return fl((null==o?void 0:o.billingPeriod)||null,n,i,a,r)},Ul=(e,t,n)=>{var i=Hl(e,t);if(i){var a=Sl(i.priceAmountMicros),r=kl(i.billingPeriod),o=n?Math.round(a/r):a/r;return pl(i.priceCurrencyCode).format(o)}},Hl=(e,t)=>{return e?(t?(n=e.offers[parseInt(t)])||(n=e.offers.find(e=>e.offer_ref_id===t)||null):n=e.offers[0],ml(n,e.subscription_period)):null;var n},Gl=e=>{var t=ll(e);return t?"P7D"===t?"P1W":t:null};function Vl(e,t,n,i){var a=n.flatMap(e=>e.products).find(e=>e.id===t.selectedProducts[t.currentGroupId]);return Xl(Jl(e,null==a?void 0:a.sku_ref_id),a,i)}function Kl(e,t,n){var i,a,r=null!==(i=null===(a=t.find(e=>e.id===n))||void 0===a?void 0:a.products)&&void 0!==i?i:[];return r.forEach(t=>{t.product_details=Jl(e,t.sku_ref_id||""),t.variables=Xl(t.product_details,t,r)}),r}function Xl(e,t,n){if(!t)return{};var i=t.variables;if(!i)return m({},t);Object.keys(i).forEach(t=>{if("string"==typeof(r=i[t])&&r.includes(ni)){var a=Yl(i[t],e,n);i[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(a)}var r});var a={};return Object.keys(Pl({})).forEach(t=>{if(void 0===i[t]){var r=Tl(t,e,void 0,n);null!==r&&(a[t]=r)}}),m({},t,a,i)}var Yl=(e,t,n)=>e.replace(Qn,(i,a)=>{var r,o,s,u,l=(null===(r=Qn.exec(e))||void 0===r?void 0:r.slice(1))||[];a=null!==(o=l[0])&&void 0!==o?o:a;var d=null!==(s=null===(u=l[1])||void 0===u?void 0:u.replace(":",""))&&void 0!==s?s:"";return Tl(a,t,d,n)});function ql(e,t){return t.flatMap(e=>e.products).some(t=>1==Tl("freeTrialEligible",Jl(e,t.sku_ref_id)))}function Jl(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Ql=function(){try{var e=Wi(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Zl=Object.prototype.hasOwnProperty;function ed(e,t,n){var i=e[t];Zl.call(e,t)&&di(i,n)&&(void 0!==n||t in e)||function(e,t,n){"__proto__"==t&&Ql?Ql(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}(e,t,n)}var td="object"==typeof e&&e&&!e.nodeType&&e,nd=td&&"object"==typeof module&&module&&!module.nodeType&&module,id=nd&&nd.exports===td?pi.Buffer:void 0;id&&id.allocUnsafe;var ad=Ia(Object.getPrototypeOf,Object),rd=Object.prototype.hasOwnProperty;function od(e){var t=new e.constructor(e.byteLength);return new Qi(t).set(new Qi(e)),t}var sd=/\w*$/;var ud=gi?gi.prototype:void 0,ld=ud?ud.valueOf:void 0;function dd(e,t,n){var i,a,r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return od(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return r=od((a=e).buffer),new a.constructor(r,a.byteOffset,a.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e){var t=od(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}(e);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,sd.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return i=e,ld?Object(ld.call(i)):{}}}var cd=Object.create,hd=function(){function e(){}return function(t){if(!Ti(t))return{};if(cd)return cd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var md=Ta&&Ta.isMap,fd=md?ka(md):function(e){return sa(e)&&"[object Map]"==Qa(e)};var vd=Ta&&Ta.isSet,pd=vd?ka(vd):function(e){return sa(e)&&"[object Set]"==Qa(e)},gd="[object Arguments]",yd="[object Function]",bd="[object Object]",wd={};function kd(e,t,n,i,a,r){var o;if(void 0!==o)return o;if(!Ti(e))return e;var s=ia(e);if(s)o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&rd.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e);else{var u=Qa(e),l=u==yd||"[object GeneratorFunction]"==u;if(pa(e))return e.slice();if(u==bd||u==gd||l&&!a)o=l?{}:function(e){return"function"!=typeof e.constructor||Ca(e)?{}:hd(ad(e))}(e);else{if(!wd[u])return a?e:{};o=dd(e,u)}}r||(r=new Ki);var d=r.get(e);if(d)return d;r.set(e,o),pd(e)?e.forEach(function(i){o.add(kd(i,t,n,i,e,r))}):fd(e)&&e.forEach(function(i,a){o.set(a,kd(i,t,n,a,e,r))});var c=s?void 0:Oa(e);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(c||e,function(i,a){c&&(i=e[a=i]),ed(o,a,kd(i,t,n,a,e,r))}),o}wd[gd]=wd["[object Array]"]=wd["[object ArrayBuffer]"]=wd["[object DataView]"]=wd["[object Boolean]"]=wd["[object Date]"]=wd["[object Float32Array]"]=wd["[object Float64Array]"]=wd["[object Int8Array]"]=wd["[object Int16Array]"]=wd["[object Int32Array]"]=wd["[object Map]"]=wd["[object Number]"]=wd[bd]=wd["[object RegExp]"]=wd["[object Set]"]=wd["[object String]"]=wd["[object Symbol]"]=wd["[object Uint8Array]"]=wd["[object Uint8ClampedArray]"]=wd["[object Uint16Array]"]=wd["[object Uint32Array]"]=!0,wd["[object Error]"]=wd[yd]=wd["[object WeakMap]"]=!1;var Sd=e=>"object"==typeof e&&null!==e&&"handleEvent"in e,Ed=(e,t,n)=>{var i=Object.getOwnPropertyDescriptor(e,t);if(!i||i.configurable)try{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n,writable:!1})}catch(i){try{e[t]=n}catch(e){}}},Pd=function(){return c(function e(){o(this,e),this.listeners=new Map},[{key:"addEventListener",value:function(e,t,n){var i;if(t){var a=(e=>"boolean"==typeof e?{capture:e}:null!=e?e:{})(n),r=null!==(i=this.listeners.get(e))&&void 0!==i?i:[];if(!r.some(e=>e.listener===t)){var o={listener:t,once:Boolean(a.once)};if(a.signal){if(a.signal.aborted)return;o.signal=a.signal,o.abortHandler=()=>this.removeEventListener(e,t),a.signal.addEventListener("abort",o.abortHandler,{once:!0})}r.push(o),this.listeners.set(e,r)}}}},{key:"removeEventListener",value:function(e,t){if(t){var n=this.listeners.get(e);if(n&&0!==n.length){for(var i=n.length-1;i>=0;i-=1){var a=n[i];a.listener===t&&(a.signal&&a.abortHandler&&a.signal.removeEventListener("abort",a.abortHandler),n.splice(i,1))}0===n.length&&this.listeners.delete(e)}}}},{key:"dispatchEvent",value:function(e){var t,n;if(!e||"string"!=typeof e.type)throw new TypeError('Failed to execute "dispatchEvent": event type must be a string.');var i=this.listeners.get(e.type);if(!i||0===i.length)return!0;Ed(e,"target",this);var a=!1,r=null===(t=e.stopImmediatePropagation)||void 0===t?void 0:t.bind(e),o=null===(n=e.stopPropagation)||void 0===n?void 0:n.bind(e),s=()=>{a=!0,null==r||r()},u=()=>{e.cancelBubble=!0,null==o||o()};e.stopImmediatePropagation=s,e.stopPropagation=u;for(var l,d=h(i.slice());!(l=d()).done;){var c=l.value;if(a)break;Ed(e,"currentTarget",this),"function"==typeof c.listener?c.listener.call(this,e):Sd(c.listener)&&c.listener.handleEvent.call(c.listener,e),c.once&&this.removeEventListener(e.type,c.listener)}if(r)e.stopImmediatePropagation=r;else try{delete e.stopImmediatePropagation}catch(t){e.stopImmediatePropagation=s}if(o)e.stopPropagation=o;else try{delete e.stopPropagation}catch(t){e.stopPropagation=u}return Ed(e,"currentTarget",null),!e.defaultPrevented}}])}(),Td=[];var Md={paywallId:"",livePaywalls:[],selectedPaywall:void 0,selectedCampaign:void 0,campaignRules:[],anySkuHasTrialOffer:!1,anySkuHasIntroOffer:!1,anySkuHasPromoOffer:!1,isLoggedIn:!1,darkMode:!1,safeAreaTop:0,groups:[],selectedProducts:{},formStates:{},timerStates:{},currentPage:"page1",pageHistory:["page1"],currentGroupId:"",currentGroupName:"",fullScreenPresentation:!1,launch:{productGroups:[],customAttributes:{},customObject:{},currentGroup:""},sku:{},orientation:"portrait",focusedState:!1,platformId:"",mediaList:{},skuItems:[],customer:{},hasNotch:!1,purchaseInProgress:!1,formFactor:"desktop",slides:{},userInteractionEnabled:!0,currentSlideIndex:void 0},_d=function(t){function n(e,t,i){var a;o(this,n),(a=r(this,n)).subscribers=new Set,a.productDetails=Td,a.filteredSkuMenus=[],a.state=kd(Md,5);var s=Fr.getNamiProfile();return a.state.isLoggedIn=!(null==s||!s.externalId),a.setPaywall(e,t,i),a.subscribers=new Set,a}return p(n,t),c(n,[{key:"onStateChanged",value:function(){}},{key:"subscribe",value:function(e){return this.subscribers.add(e),()=>this.unsubscribe(e)}},{key:"unsubscribe",value:function(e){this.subscribers.delete(e)}},{key:"emitEvent",value:function(e,t){this.dispatchEvent(function(e,t){if("function"==typeof Event){var n=new Event(e);return Object.defineProperty(n,"detail",{configurable:!0,enumerable:!1,value:t,writable:!1}),n}return{type:e,detail:t,bubbles:!1,cancelBubble:!1,cancelable:!1,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!1,returnValue:!0,srcElement:null,target:null,timeStamp:Date.now(),NONE:0,CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3,composedPath:()=>[],initEvent:()=>{},preventDefault:()=>{},stopImmediatePropagation:()=>{},stopPropagation:()=>{}}}(e,t))}},{key:"onEvent",value:function(e,t){var n=e=>t(e.detail);return this.addEventListener(e,n),()=>this.removeEventListener(e,n)}},{key:"setState",value:function(e){this.state=e,this.subscribers.forEach(e=>e()),this.onStateChanged()}},{key:"setProductDetails",value:function(e){this.productDetails=e}},{key:"getProductDetails",value:function(){return this.productDetails}},{key:"setCurrentGroupData",value:function(e,t){var n=Vl(this.productDetails,this.state,this.filteredSkuMenus,Kl(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(m({},this.state,{currentGroupId:e,currentGroupName:t,sku:n}))}},{key:"setFormState",value:function(e,t){this.setState(m({},this.state,{formStates:m({},this.state.formStates,{[e]:t})}))}},{key:"setTimerState",value:function(e,t,n,i){this.setState(m({},this.state,{timerStates:m({},this.state.timerStates,{[e]:{remainingSeconds:t,savedAt:n,hasEmittedCompletion:i}})}))}},{key:"getTimerState",value:function(e){return this.state.timerStates[e]}},{key:"getCurrentGroupId",value:function(){return this.state.currentGroupId}},{key:"getCurrentGroupName",value:function(){return this.state.currentGroupName}},{key:"setCurrentFormId",value:function(e,t){var n=this.state.formStates||{},i=m({},n,{[e]:t||!n[e]});this.setState(m({},this.state,{formStates:i}))}},{key:"getCurrentFormId",value:function(e){return this.state.formStates[e]}},{key:"setSelectedProducts",value:function(e){var t=Vl(this.productDetails,this.state,this.filteredSkuMenus,Kl(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(m({},this.state,{selectedProducts:e,sku:t}))}},{key:"selectedProducts",value:function(){return this.state.selectedProducts}},{key:"setPaywall",value:function(e,t,n){var i,a,r,o,s,u=m({},this.state,{formFactor:ou(),selectedPaywall:e,selectedCampaign:n}),l=function(e,t,n=[]){var i,a,r=null!==(i=t.productGroups)&&void 0!==i&&i.length?t.productGroups:n.map(e=>e.ref);return{customAttributes:t.customAttributes,productGroups:r,customObject:m({},e.customObject,t.customObject),currentGroup:null!==(a=t.currentGroup)&&void 0!==a?a:""}}((u=m({},u,null===(i=e.template)||void 0===i?void 0:i.initialState)).launch,t,e.sku_menus);(this.filteredSkuMenus=null!==(a=e.sku_menus)&&void 0!==a?a:[],l.productGroups.length&&(this.filteredSkuMenus=this.filteredSkuMenus.filter(e=>l.productGroups.includes(e.ref))),""!==l.currentGroup&&u.groups.length&&null!==(r=e.template)&&void 0!==r&&r.displaySingleGroup)&&(u.currentGroupId=null!==(o=null===(s=u.groups.find(e=>e.ref==l.currentGroup))||void 0===s?void 0:s.id)&&void 0!==o?o:"");if(""===u.currentGroupId&&1===this.filteredSkuMenus.length){var d,c=u.groups.find(e=>e.ref==this.filteredSkuMenus[0].ref);u.currentGroupId=null!==(d=null==c?void 0:c.id)&&void 0!==d?d:u.currentGroupId}var h=Kl(this.productDetails,this.filteredSkuMenus,u.currentGroupId);u.skuItems=h,u.launch=l,u.anySkuHasTrialOffer=ql(this.productDetails,this.filteredSkuMenus),u.anySkuHasPromoOffer=function(e,t){return!ql(e,t)&&t.flatMap(e=>e.products).some(t=>1==Tl("promoEligible",Jl(e,t.sku_ref_id)))}(this.productDetails,this.filteredSkuMenus),u.paywallId=e.id,u.sku=Vl(this.productDetails,u,this.filteredSkuMenus,h),u.pageHistory=[u.currentPage],this.setState(u)}},{key:"getSelectedPaywall",value:function(){return this.state.selectedPaywall}},{key:"getSelectedCampaign",value:function(){return this.state.selectedCampaign}},{key:"getCurrentPlacementLabel",value:function(){var e,t;return null!==(e=this.state.selectedCampaign)&&void 0!==e&&e.value?this.state.selectedCampaign.value:null!==(t=this.flow)&&void 0!==t&&null!==(t=t.campaign)&&void 0!==t&&t.value?this.flow.campaign.value:void 0}},{key:"getPaywallActionEventData",value:function(){var t,n,i,a,r,o,s,u,l,d=this.state.selectedCampaign,c=this.state.selectedPaywall;return{paywallId:null!==(t=null==c?void 0:c.id)&&void 0!==t?t:"",paywallName:null!==(n=null==c?void 0:c.name)&&void 0!==n?n:"",campaignId:null!==(i=null==d?void 0:d.rule)&&void 0!==i?i:"",campaignName:null!==(a=null==d?void 0:d.name)&&void 0!==a?a:"",campaignType:null!==(r=null==d?void 0:d.type)&&void 0!==r?r:"",campaignLabel:null!==(o=null==d?void 0:d.value)&&void 0!==o?o:"",campaignUrl:(null==d?void 0:d.type)===e.NamiCampaignRuleType.URL&&null!==(s=null==d?void 0:d.value)&&void 0!==s?s:"",segmentId:null!==(u=null==d?void 0:d.segment)&&void 0!==u?u:"",externalSegmentId:null!==(l=null==d?void 0:d.external_segment)&&void 0!==l?l:""}}},{key:"paywallId",value:function(){return this.state.paywallId}},{key:"setCurrentPage",value:function(e){if(e&&e!==this.state.currentPage){var t=this.state.pageHistory&&this.state.pageHistory.length?this.state.pageHistory:[this.state.currentPage];this.setState(m({},this.state,{currentPage:e,pageHistory:[...t,e]}))}}},{key:"canGoBackPage",value:function(){var e,t;return(null!==(e=null===(t=this.state.pageHistory)||void 0===t?void 0:t.length)&&void 0!==e?e:0)>1}},{key:"goBackPage",value:function(){var e=this.state.pageHistory&&this.state.pageHistory.length?[...this.state.pageHistory]:[this.state.currentPage];if(e.length<=1)return!1;e.pop();var t=e[e.length-1];return!!t&&(this.setState(m({},this.state,{currentPage:t,pageHistory:e})),!0)}},{key:"setCustomerAttribute",value:function(e){this.setState(m({},this.state,{customer:m({},this.state.customer,e)}))}},{key:"removeCustomerAttribute",value:function(e){var t=m({},this.state.customer);delete t[e],this.setState(m({},this.state,{customer:t}))}},{key:"setIsLoggedIn",value:function(e){this.setState(m({},this.state,{isLoggedIn:e}))}},{key:"setMediaList",value:function(e){this.setState(m({},this.state,{mediaList:e.reduce((e,t)=>m({},e,{[t.name]:t}))}))}},{key:"setSafeAreaTop",value:function(e){this.setState(m({},this.state,{safeAreaTop:e}))}},{key:"setFullScreenPresentation",value:function(e){this.setState(m({},this.state,{fullScreenPresentation:e}))}},{key:"setFormFactor",value:function(e){this.setState(m({},this.state,{formFactor:e}))}},{key:"getFormFactor",value:function(){return this.state.formFactor}},{key:"setPurchaseInProgress",value:function(e){this.setState(m({},this.state,{purchaseInProgress:e}))}},{key:"setPurchase",value:function(e,t){this.setState(m({},this.state,{purchaseInProgress:e,productBeingPurchased:t}))}},{key:"setTimeSpentOnPaywall",value:function(e){this.setState(m({},this.state,{timeSpentOnPaywall:e}))}},{key:"setAppSuppliedVideoDetails",value:function({url:e,name:t}){this.setState(m({},this.state,{appSuppliedVideoUrl:e,appSuppliedVideoName:t}))}},{key:"resetAppSuppliedVideoDetails",value:function(){var e=m({},this.state);delete e.appSuppliedVideoUrl,delete e.appSuppliedVideoName,this.setState(e)}},{key:"setLaunchDetails",value:function(e,t){this.setState(m({},this.state,{launchValue:e,launchType:t}))}},{key:"setOpenHeaderIds",value:function(e,t){e=null!=t&&t.skuId?`${e}_${t.skuId}`:e;var n=[...this.state.openHeaderIds],i=n.indexOf(e);-1!==i?n.splice(i,1):n.push(e),this.setState(m({},this.state,{openHeaderIds:n,currentCollapsibleSku:null!=t?t:null}))}},{key:"getCurrentCollapsibleSku",value:function(){return this.state.currentCollapsibleSku}},{key:"setFlow",value:function(e){this.flow=e}},{key:"setUserInteractionEnabled",value:function(e){this.setState(m({},this.state,{userInteractionEnabled:e})),this.emitEvent("user-interaction-changed",{enabled:e})}},{key:"setUserTags",value:function(e){this.setState(m({},this.state,{userTags:m({},this.state.userTags,e)}))}},{key:"setCurrentSlideIndex",value:function(e){this.setState(m({},this.state,{currentSlideIndex:e}))}}],[{key:"create",value:function(e,t,i){var a=new n(e,t,i);return this.providers.push(a),a}},{key:"remove",value:function(e){this.providers=this.providers.filter(t=>t!==e)}},{key:"reset",value:function(){this.providers=[]}},{key:"currentProvider",get:function(){return n.providers[0]}},{key:"setCustomerAttribute",value:function(e){this.providers.forEach(t=>{t.setCustomerAttribute(e)})}},{key:"removeCustomerAttribute",value:function(e){this.providers.forEach(t=>{t.removeCustomerAttribute(e)})}},{key:"setAppSuppliedVideoDetails",value:function(e){this.providers.forEach(t=>{t.setAppSuppliedVideoDetails(e)})}},{key:"getSelectedPaywall",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.getSelectedPaywall()}},{key:"setUserInteractionEnabled",value:function(e){this.providers.forEach(t=>{t.setUserInteractionEnabled(e)})}},{key:"setUserTags",value:function(e){this.providers.forEach(t=>{t.setUserTags(e)})}},{key:"setProductDetails",value:function(e){this.providers.forEach(t=>{t.setProductDetails(e)}),Td=e}},{key:"setPurchaseInProgress",value:function(e){this.providers.forEach(t=>{t.setPurchaseInProgress(e)})}},{key:"setIsLoggedIn",value:function(e){this.providers.forEach(t=>{t.setIsLoggedIn(e)})}},{key:"setPurchase",value:function(e,t){this.providers.forEach(n=>{n.setPurchase(e,t)})}},{key:"getSelectedSlideIndex",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.state.currentSlideIndex}}])}(Pd);_d.providers=[];var Ad=c(function e(){o(this,e),this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}});Ad.instance=new Ad;var Dd=()=>Lr(li([...Fr.getNamiEntitlements(pt),...Fr.getNamiEntitlements(Mt)]),"referenceId"),xd=()=>{Ou.getInstance().emit(Xn,Dd())};function Cd(e){return{id:e.id,skuId:e.sku_ref_id,name:e.name,type:e.sku_type||"unknown",entitlements:e.entitlements,productDetails:"product_details"in e?e.product_details:null}}var Id=function(){return c(function e(){o(this,e)},[{key:"fetchActiveEntitlements",value:function(){var e,t,n;return k(function(i){for(;;)switch(i.n){case 0:if(e=null,il()||Ds(Pe.THIRD_PARTY_TRANSACTIONS)||!Ds(Pe.ENTITLEMENT_MANAGEMENT)){i.n=3;break}if(null==(t=Fr.getDevice())||!t.id){i.n=2;break}return i.n=1,a(this.getAPIEntitlements(t.id));case 1:n=i.v,(e=null==n?void 0:n.results)&&(Fr.setActiveEntitlements(ft,e),this.invokeActiveEntitlementsHandler(e));case 2:i.n=4;break;case 3:il()&&ui.debug("Skipping active entitlements update - anonymous mode"),Ds(Pe.THIRD_PARTY_TRANSACTIONS)&&ui.debug("Skipping active entitlements update - paywalls-only mode"),Ds(Pe.ENTITLEMENT_MANAGEMENT)||ui.debug("Skipping active entitlements update - no entitlement_management capability");case 4:return i.a(2,e)}},null,this,null,Promise)}},{key:"getAPIEntitlements",value:function(e){var t,n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:return t=`device/${e}/active_entitlements/`,n={},r.p=1,r.n=2,a(js.instance.fetchAPI(t));case 2:n=r.v,r.n=4;break;case 3:throw r.p=3,i=r.v,ui.error(Zr(i.status,t)),i;case 4:return r.a(2,n)}},null,null,[[1,3]],Promise)}},{key:"invokeActiveEntitlementsHandler",value:function(e){Cs()&&(e=>{Fr.setNamiEntitlements(pt,e);var t=Fr.getNamiEntitlements(Mt),n=new Set(e.map(e=>e.referenceId)),i=t.filter(e=>{var t=n.has(e.referenceId);return t&&ui.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t});i.length!==t.length&&Fr.setNamiEntitlements(Mt,i),xd()})(e.map(e=>(e=>{var t=e.entitlement_ref_id;return{name:e.name||"",desc:e.description||"",namiId:"",referenceId:t,relatedSkus:Ad.instance.refIdToRelatedSKUs[t]||[],activePurchases:Ad.instance.refIdToActivePurchases[t]||[],purchasedSkus:Ad.instance.refIdToPurchasedSKUs[t]||[],expires:e.expires?new Date(e.expires).valueOf():0}})(e)))}}])}();Id.instance=new Id;var Ld=function(){return c(function e(){o(this,e)},[{key:"fetchCustomerJourneyState",value:function(){var e,t,n,i;return k(function(r){for(;;)switch(r.p=r.n){case 0:if(!il()){r.n=1;break}return ui.debug("Skipping customer journey state update - anonymous mode"),r.a(2,null);case 1:if(null!=(e=Fr.getDevice())&&e.id){r.n=2;break}return r.a(2,null);case 2:return t=`device/${e.id}/profile/`,n=null,r.p=3,r.n=4,a(js.instance.fetchAPI(t,void 0,0));case 4:n=r.v,r.n=6;break;case 5:throw r.p=5,i=r.v,ui.error(Zr(i.status,t)),i;case 6:if(!n){r.n=7;break}return Fr.setCustomerJourneyState(n.customer_journey_state),r.a(2,n.customer_journey_state);case 7:return r.a(2,null)}},null,null,[[3,5]],Promise)}}])}();Ld.instance=new Ld;var Rd="[NamiStartup]",Fd=function(){return c(function e(){o(this,e),this.enabled=!1,this.t0=0,this.lastMark=0,this.decodeDuration=0,this.processDuration=0,this.placements=0,this.firstLaunchLogged=!1},[{key:"start",value:function(){var e,t,n;this.enabled=(n=null===(e=Fr.getNamiConfig())||void 0===e?void 0:e.namiCommands,null!==(t=null==n?void 0:n.includes(wn))&&void 0!==t&&t),this.enabled&&(this.t0=Date.now(),this.lastMark=this.t0,this.decodeDuration=0,this.processDuration=0,this.placements=0,this.firstLaunchLogged=!1)}},{key:"mark",value:function(e,t){if(this.enabled){var n=Date.now(),i=n-this.lastMark;this.lastMark=n,"initial_config_decoded"===e?this.decodeDuration=i:"initial_processed"===e&&(this.processDuration=i,void 0!==(null==t?void 0:t.count)&&(this.placements=t.count));var a=t?" "+Object.entries(t).map(([e,t])=>`${e}=${t}`).join(" "):"";if("ready"===e){var r=n-this.t0;ui.info(`${Rd} phase=${e} ms=${i} total_to_ready=${r}${a}`),ui.info(`${Rd} SUMMARY total_to_ready=${r} decode=${this.decodeDuration} process=${this.processDuration} placements=${this.placements}`)}else ui.info(`${Rd} phase=${e} ms=${i}${a}`)}}},{key:"firstLaunchLookup",value:function(e,t){if(!this.enabled||this.firstLaunchLogged)return t();this.firstLaunchLogged=!0;var n=Date.now(),i=t(),a=Date.now()-n;return ui.info(`${Rd} phase=first_launch_lookup ms=${a} label=${e}`),i}},{key:"serverFetch",value:function(e){var t,n,i;return k(function(r){for(;;)switch(r.n){case 0:if(this.enabled){r.n=1;break}return r.a(2,e());case 1:return t=Date.now(),r.n=2,a(e());case 2:return n=r.v,i=Date.now()-t,ui.info(`${Rd} phase=server_fetch ms=${i} campaigns=${n.length}`),r.a(2,n)}},null,this,null,Promise)}}])}(),Od=new Fd,Nd=function(){return c(function e(){o(this,e),this.inMemoryAnonymousMode=!1,tl=this},[{key:"setInMemoryAnonymousMode",value:function(e){this.inMemoryAnonymousMode=e,ui.info(`In-memory anonymous mode ${e?"enabled":"disabled"} due to failed device registration`)}},{key:"isInMemoryAnonymousMode",value:function(){return this.inMemoryAnonymousMode}},{key:"isAnonymousMode",value:function(){return Fr.getAnonymousMode()||this.inMemoryAnonymousMode}},{key:"init",value:function(e){return k(function(t){for(;;)switch(t.n){case 0:return this.setInitialValues(e),el.instance.fetchConfig(),t.n=1,a(this.initAndFetchRequiredData(e));case 1:al.instance.startSession();case 2:return t.a(2)}},null,this,null,Promise)}},{key:"setInitialValues",value:function(e){var t=m({},e);delete t.initialConfig,Fr.clearSessionId(),Fr.setNamiConfig(t),Fr.setLanguageCode(e.namiLanguageCode),Fr.setPurchaseChannel(e.purchaseChannel);var n=e.initialConfig;if(n.appConfig||n.platform_config){var i=(null==n?void 0:n.appConfig)||(null==n?void 0:n.platform_config);i&&Fr.setAppConfig(yt,i)}null!=n&&n.paywalls&&Fr.setPaywalls(St,n.paywalls),null!=n&&n.products&&Fr.setProducts(Pt,n.products)}},{key:"initAnonymousDevice",value:function(){return{deviceId:Wu.instance.getOrCreateAnonymousUUID(),deviceTask:null}}},{key:"initIdentifiedDevice",value:function(e){var t=m({},ru(e.namiCommands),e.formFactor?{form_factor:e.formFactor}:{}),n=function(e){if(e){var t=e.find(e=>e.startsWith("splitPosition="));if(t){var n=t.split("=")[1],i=Number(n);return n&&!isNaN(i)?du(i):void 0}}}(e.namiCommands),i=Wu.instance.createOrUpdateDevice(t,n,this);return{deviceId:i.id,deviceTask:i.device}}},{key:"initAndFetchRequiredData",value:function(e,t=0,n=1){var i,r,o,s,u,l,d,c,h,m,f,v;return k(function(p){for(;;)switch(p.n){case 0:if(s=e.initialConfig,u=null!==(i=e.formFactor)&&void 0!==i?i:ou(),l=this.isAnonymousMode(),d=l?this.initAnonymousDevice():this.initIdentifiedDevice(e),c=d.deviceId,h=d.deviceTask,m=uu(c),s.campaign_rules&&(f=pu(s.campaign_rules,m,u),Fr.setCampaignRules(wt,f),Od.mark("initial_processed",{count:f.length})),!h){p.n=1;break}return p.n=1,a(h);case 1:if(Nu.instance.configure(u,m,e.namiCommands),xs(),v=Promise.all([ju.instance.fetchProducts(),Ld.instance.fetchCustomerJourneyState(),Id.instance.fetchActiveEntitlements(),Od.serverFetch(()=>this.fetchCampaignsAndPaywalls())]).catch(i=>{var r;return k(function(o){for(;;)switch(o.n){case 0:if(!(i instanceof $r)){o.n=3;break}if(Fr.resetDevice(),!(t<n)){o.n=2;break}return r=100*Math.pow(2,t),o.n=1,a(new Promise(e=>setTimeout(e,r)));case 1:return o.a(2,this.initAndFetchRequiredData(e,t+1,n));case 2:if(l){o.n=3;break}return ui.warn(`Max retries reached for ConflictError. ${i.message}`),this.setInMemoryAnonymousMode(!0),o.a(2,this.initAndFetchRequiredData(e,0,n));case 3:throw i;case 4:return o.a(2)}},null,this,null,Promise)}),null!==(r=s.campaign_rules)&&void 0!==r&&r.length&&null!==(o=s.paywalls)&&void 0!==o&&o.length){p.n=2;break}return p.n=2,a(v);case 2:v.then(()=>this.reRenderPaywall());case 3:return p.a(2)}},null,this,null,Promise)}},{key:"fetchCampaignsAndPaywalls",value:function(){var e,t,n,i,r,o,s,u,l,d,c,h,m,f;return k(function(v){for(;;)switch(v.n){case 0:return e=Nu.instance,t=Zu.instance,n=Date.now(),i=Date.now(),v.n=1,a(e.fetchCampaignRulesRaw());case 1:return r=v.v,o=Date.now()-i,v.n=2,a(Promise.all(r.filter(e=>{var t;return(null===(t=e.flow)||void 0===t?void 0:t.url)&&!e.flow.object}).map(e=>{var t,n;return k(function(i){for(;;)switch(i.p=i.n){case 0:return i.p=0,i.n=1,a(fetch(e.flow.url,{cache:"no-cache"}));case 1:if(!(t=i.v).ok){i.n=3;break}return i.n=2,a(t.json());case 2:e.flow.object=i.v,i.n=4;break;case 3:ui.warn(`Failed to fetch flow object from ${e.flow.url}: ${t.status}`);case 4:i.n=6;break;case 5:i.p=5,n=i.v,ui.warn(`Error fetching flow object from ${e.flow.url}: ${n}`);case 6:return i.a(2)}},null,null,[[0,5]],Promise)})));case 2:if(s=!e.useLegacyPaywallFetch&&Nu.hasPaywallUrls(r),l=0,d=Date.now(),!s){v.n=4;break}return c=Nu.extractPaywallUrls(r),v.n=3,a(t.fetchPaywallsByUrls(c));case 3:h=v.v,u=h.paywalls,l=h.retryCount,v.n=6;break;case 4:return v.n=5,a(t.fetchPaywalls());case 5:u=v.v;case 6:return m=Date.now()-d,f=Date.now()-n,ui.info(`Paywall fetch telemetry: strategy=${s?"individual":"bulk"}, count=${u.length}, total=${f}ms, campaigns=${o}ms, paywalls=${m}ms`+(s?`, retry_count=${l}`:"")),v.a(2,e.finalizeCampaignRules(r,u))}},null,null,null,Promise)}},{key:"reRenderPaywall",value:function(){we().ui.reRenderPaywall()}}])}();function $d(e){return Array.isArray(e)?e.map($d):e&&"object"==typeof e?Object.entries(e).reduce((e,[t,n])=>(void 0!==n&&(e[t]=$d(n)),e),{}):e}function Wd(e,t){return $u($d(e),$d(t))}Nd.instance=new Nd;var jd,Bd=function(){return c(function e(){o(this,e),this.load()},[{key:"setExternalId",value:function(e){return this.externalId=e,this}},{key:"getExternalId",value:function(){return this.externalId}},{key:"isLoggedIn",value:function(){return!!this.externalId}},{key:"save",value:function(){return this.externalId?Fr.setNamiProfile({externalId:this.externalId}):Fr.removeNamiProfile(),this}},{key:"load",value:function(){var e=Fr.getNamiProfile();e&&(this.externalId=e.externalId),_d.setIsLoggedIn(!!this.externalId)}},{key:"loginLocal",value:function(e){this.setExternalId(e).save(),_d.setIsLoggedIn(!0)}},{key:"loginRemote",value:function(e){var t;return k(function(n){for(;;)switch(n.n){case 0:return n.n=1,a(js.instance.login(e));case 1:(t=n.v).external_id&&t.external_id!==this.externalId&&this.setExternalId(t.external_id).save();case 2:return n.a(2)}},null,this,null,Promise)}},{key:"logoutLocal",value:function(){this.setExternalId(void 0).save(),_d.setIsLoggedIn(!1)}},{key:"logoutRemote",value:function(){return k(function(e){for(;;)switch(e.n){case 0:return e.n=1,a(js.instance.logout());case 1:return e.a(2)}},null,null,null,Promise)}},{key:"login",value:function(e){return k(function(t){for(;;)switch(t.n){case 0:return this.loginLocal(e),t.n=1,a(this.loginRemote(e));case 1:return t.a(2)}},null,this,null,Promise)}},{key:"logout",value:function(){return k(function(e){for(;;)switch(e.n){case 0:return this.logoutLocal(),e.n=1,a(this.logoutRemote());case 1:return e.a(2)}},null,this,null,Promise)}}])}();Bd.instance=new Bd;var zd=function(){function e(){o(this,e),jd.set(this,!1),this.maxLogging=!1}return c(e,[{key:"isInitialized",get:function(){return Se(this,jd,"f")||null!=Fr.getNamiConfig()}},{key:"initializeSDK",value:function(t){var n,i,r,o,s,u,l,d,c,h;return k(function(f){for(;;)switch(f.n){case 0:if(o=!1,s=!1,u=Se(this,jd,"f")?Fr.getNamiConfig():null,ui.setLogger(t.logLevel),e.instance.maxLogging=null!==(n=t.maxLogging)&&void 0!==n&&n,null===u){f.n=3;break}if(delete(l=m({},t)).initialConfig,!Wd(l,u)){f.n=1;break}return ui.warn("Nami SDK is already configured, ignoring this configure call."),f.a(2,{sdkInitialized:!0,configureState:zn});case 1:s=!0;case 2:d=As(t.namiCommands),c=As(u.namiCommands),t.appPlatformID==u.appPlatformID&&d==c||(o=!0),t.namiLanguageCode===u.namiLanguageCode&&t.logLevel==u.logLevel||(s=!0);case 3:return o&&(ui.info("SDK full reconfigure called"),Fr.resetDevice()),Ee(this,jd,!0),js.configure(t),f.n=4,a(Nd.instance.init(t));case 4:return ui.info("SDK successfully initialized!"),h=s||o?jn:$n,null===(i=(r=we().ui).postConfigure)||void 0===i||i.call(r),Od.mark("ready"),f.a(2,{sdkInitialized:!0,configureState:h})}},null,this,null,Promise)}}],[{key:"sdkVersion",value:function(){return Ae}},{key:"sdkPackageVersion",value:function(){return xe}},{key:"reset",value:function(){var t,n,i;return k(function(r){for(;;)switch(r.n){case 0:return Fr.clearAll(),nl(),Ee(e.instance,jd,!1),Bd.instance.setExternalId(void 0),_d.reset(),js.reset(),Nu.instance.reset(),r.n=1,a(Promise.resolve().then(function(){return Fc}));case 1:i=r.v,i.NamiFlowManager.reset(),null===(t=(n=we().ui).onReset)||void 0===t||t.call(n);case 2:return r.a(2)}},null,null,null,Promise)}},{key:"configure",value:function(t){return k(function(n){for(;;)switch(n.n){case 0:if(Od.start(),t.appPlatformID){n.n=1;break}throw new jr;case 1:return this.setInitialConfig(t),Od.mark("initial_config_decoded"),n.n=2,a(e.instance.initializeSDK(t));case 2:return n.a(2,n.v)}},null,this,null,Promise)}},{key:"setInitialConfig",value:function(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){ui.warn("[DEPRECATED] NamiConfiguration.initialConfig should be an object");var t=function(e){var t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.parse(t)}catch(e){return}}(e.initialConfig);if(!t)return ui.error("Failed to parse NamiConfiguration.initialConfig"),void(e.initialConfig={});e.initialConfig=t}if("object"!=typeof e.initialConfig)e.initialConfig={};else if((e=>"object"==typeof e&&"initial_config"in e)(e.initialConfig)){var n=Rs(e.initialConfig.initial_config);n?e.initialConfig=n:(e.initialConfig={},ui.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}}])}();jd=new WeakMap,zd.instance=new zd;var Ud,Hd,Gd,Vd=new Set(["fullscreen","sheet","compact_sheet","modal"]);e.NamiPaywallManagerEvents=void 0,(Ud=e.NamiPaywallManagerEvents||(e.NamiPaywallManagerEvents={})).BuySku="RegisterBuySKU",Ud.Close="PaywallCloseRequested",Ud.SignIn="PaywallSignInRequested",Ud.Restore="PaywallRestoreRequested",Ud.DeeplinkAction="PaywallDeeplinkAction",e.NamiPaywallAction=void 0,(Hd=e.NamiPaywallAction||(e.NamiPaywallAction={})).BUY_SKU="BUY_SKU",Hd.SELECT_SKU="SELECT_SKU",Hd.RESTORE_PURCHASES="RESTORE_PURCHASES",Hd.SIGN_IN="SIGN_IN",Hd.CLOSE_PAYWALL="CLOSE_PAYWALL",Hd.SHOW_PAYWALL="SHOW_PAYWALL",Hd.PURCHASE_SELECTED_SKU="PURCHASE_SELECTED_SKU",Hd.PURCHASE_SUCCESS="PURCHASE_SUCCESS",Hd.PURCHASE_FAILED="PURCHASE_FAILED",Hd.PURCHASE_CANCELLED="PURCHASE_CANCELLED",Hd.PURCHASE_PENDING="PURCHASE_PENDING",Hd.PURCHASE_UNKNOWN="PURCHASE_UNKNOWN",Hd.PURCHASE_DEFERRED="PURCHASE_DEFERRED",Hd.DEEPLINK="DEEPLINK",Hd.TOGGLE_CHANGE="TOGGLE_CHANGE",Hd.PAGE_CHANGE="PAGE_CHANGE",Hd.SLIDE_CHANGE="SLIDE_CHANGE",Hd.COLLAPSIBLE_DRAWER_OPEN="COLLAPSIBLE_DRAWER_OPEN",Hd.COLLAPSIBLE_DRAWER_CLOSE="COLLAPSIBLE_DRAWER_CLOSE",Hd.VIDEO_STARTED="VIDEO_STARTED",Hd.VIDEO_PAUSED="VIDEO_PAUSED",Hd.VIDEO_RESUMED="VIDEO_RESUMED",Hd.VIDEO_ENDED="VIDEO_ENDED",Hd.VIDEO_CHANGED="VIDEO_CHANGED",Hd.VIDEO_MUTED="VIDEO_MUTED",Hd.VIDEO_UNMUTED="VIDEO_UNMUTED",Hd.COUNTDOWN_TIMER_COMPLETED="COUNTDOWN_TIMER_COMPLETED",Hd.UNKNOWN="UNKNOWN",e.LaunchCampaignError=void 0,(Gd=e.LaunchCampaignError||(e.LaunchCampaignError={})).DEFAULT_CAMPAIGN_NOT_FOUND="Default campaign not found",Gd.LABELED_CAMPAIGN_NOT_FOUND="Labeled campaign not found",Gd.CAMPAIGN_DATA_NOT_FOUND="Campaign data not found",Gd.PAYWALL_ALREADY_DISPLAYED="Paywall is already being displayed",Gd.SDK_NOT_INITIALIZED="SDK has not been initialized",Gd.PAYWALL_COULD_NOT_DISPLAY="Failed to display paywall",Gd.URL_CAMPAIGN_NOT_FOUND="URL campaign not found",Gd.PRODUCT_DATA_NOT_FOUND="Product data not found",Gd.PRODUCT_GROUPS_NOT_FOUND="Product groups not found",Gd.FLOW_SCREEN_DATA_UNAVILABLE="Flow unavailable due to missing screen data";var Kd,Xd="entry",Yd="screen",qd="branch",Jd="exit",Qd="unknown";!function(e){e.NAVIGATE="flowNav",e.BACK="flowPrev",e.NEXT="flowNext",e.FINISHED="flowDone",e.DISMISS="flowDismiss",e.EXIT="flowExit",e.HANDOFF="flowHandoff",e.TRACK="trackEvent",e.LOG="logEvent",e.SET_VIDEO="setVideo",e.FLOW_EVENT="flowEvent",e.BLOCK_BACK="blockBackToStep",e.FLOW_ENABLED="flowInteractionEnabled",e.FLOW_DISABLED="flowInteractionDisabled",e.SET_TAGS="setTags",e.PAUSE="flowPause",e.RESUME="flowResume",e.SET_LAUNCH_CONTEXT="setLaunchContext"}(Kd||(Kd={}));var Zd="__handoff_sequence__",ec="__buy_sku__",tc="__default__",nc="__appear__",ic="__disappear__",ac="__login_success__",rc="__login_failure__",oc="__logout_success__",sc="__logout_failure__",uc="__purchase_success__",lc="__remoteback__",dc="__tag_update__",cc="and",hc="or",mc="i_contains",fc="equals",vc="i_equals",pc="not_equals",gc="not_i_equals",yc="not_contains",bc="set",wc="notSet",kc=function(){function e(){o(this,e),this.resolvers=new Map,this.namespaceResolvers=new Map}return c(e,[{key:"registerNamespaceResolver",value:function(e,t){this.namespaceResolvers.set(e,t)}},{key:"resetResolvers",value:function(){this.resolvers.clear()}},{key:"evaluate",value:function(e){var t,n=null!==(t=e.filter)&&void 0!==t?t:[];if(0===n.length)return!0;var i=n.map(e=>this.evaluateFilter(e));switch(e.operator){case cc:return i.every(e=>e);case hc:return i.some(e=>e);default:return i.every(e=>e)}}},{key:"evaluateOrdered",value:function(e){var t;if(!e)return!0;var n=null!==(t=e.filter)&&void 0!==t?t:[];if(0===n.length)return!0;switch(e.operator){case cc:for(var i,a=h(n);!(i=a()).done;){var r=i.value;if(!this.evaluateFilter(r))return!1}return!0;case hc:for(var o,s=h(n);!(o=s()).done;){var u=o.value;if(this.evaluateFilter(u))return!0}return!1;default:for(var l,d=h(n);!(l=d()).done;){var c=l.value;if(!this.evaluateFilter(c))return!1}return!0}}},{key:"evaluateFilter",value:function(e){var t=this.resolve(e.identifier);if(zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] resolve(${e.identifier}) → ${JSON.stringify(t)} (type: ${typeof t})`),e.operator===bc)return null!=t;if(e.operator===wc)return null==t;if(null==t)return zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] ${e.identifier} resolved to null — registeredNamespaces: [${[...this.namespaceResolvers.keys()].join(", ")}]`),!![pc,gc,yc].includes(e.operator);switch(e.operator){case mc:return Array.isArray(t)?e.values.some(e=>t.some(t=>0===t.localeCompare(e,void 0,{sensitivity:"accent"}))):(this.log("Resolved value is not an array of strings for i_contains."),!1);case fc:return e.values.some(e=>{if("string"==typeof t)return t===e;if("boolean"==typeof t){var n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for equals comparison: "+typeof t),!1});case vc:return e.values.some(e=>{if("string"==typeof t)return 0===t.localeCompare(e,void 0,{sensitivity:"accent"});if("boolean"==typeof t){var n="true"===e.toLowerCase();return t===n}return this.log("Unsupported type for i_equals comparison: "+typeof t),!1});case pc:return e.values.every(e=>"string"!=typeof t||t!==e);case gc:return e.values.every(e=>"string"!=typeof t||0!==t.localeCompare(e,void 0,{sensitivity:"accent"}));case yc:return e.values.every(e=>"string"!=typeof t||!t.includes(e));default:return this.log(`Unsupported operator: ${e.operator}`),!1}}},{key:"resolve",value:function(e){var t=this.resolveRaw(e);if(void 0!==t)return zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] resolve(${e}) — exact hit: ${JSON.stringify(t)}`),t;var n=e.lastIndexOf(".");if(-1===n);else{var i=e.slice(0,n),a=e.slice(n+1),r=this.resolveRaw(i);if(void 0!==r){var o=this.extractProperty(a,r);return zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] resolve(${e}) — fallback: base=${i} → ${typeof r}, extract(.${a}) → ${JSON.stringify(o)}`),o}this.log(`Could not resolve base identifier: ${i}`)}}},{key:"resolveRaw",value:function(e){for(var t,n=[...this.namespaceResolvers.keys()].sort((e,t)=>t.length-e.length),i=h(n);!(t=i()).done;){var a=t.value;if(e.startsWith(a)){var r=this.namespaceResolvers.get(a);if(r){var o=r(e);return zd.instance.maxLogging&&ui.debug(`[NamiConditionEvaluator] resolveRaw(${e}) — ns=${a} → ${JSON.stringify(o)}`),o}}}}},{key:"extractProperty",value:function(e,t){switch(e){case"last":if(Array.isArray(t))return t[t.length-1];break;case"first":if(Array.isArray(t))return t[0];break;case"count":if(Array.isArray(t))return t.length;if(t&&"object"==typeof t)return Object.keys(t).length;break;default:return}this.log(`Could not extract .${e} from type ${typeof t}`)}},{key:"log",value:function(e){ui.debug(`[NamiConditionEvaluator] ${e}`)}}],[{key:"shared",get:function(){return e.instance||(e.instance=new e),e.instance}}])}(),Sc=function(){return c(function e(){o(this,e)},[{key:"register",value:function(){kc.shared.registerNamespaceResolver(this.namespace,e=>{var t=e.replace(new RegExp(`^${this.namespace}\\.`),"");return this.resolveValue(t)})}},{key:"resolveKeyPath",value:function(e,t){for(var n,i=t,a=h(e.replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean));!(n=a()).done;){var r=n.value;if(null==i||"object"!=typeof i)return;i=i[r]}return i}}])}(),Ec=function(e){function t(e){var n;return o(this,t),(n=r(this,t)).namespace="LaunchContext",n.context=e,n.register(),n}return p(t,e),c(t,[{key:"resolveValue",value:function(e){if(e.startsWith("customAttributes.")){var t=e.substring(17);return this.resolveKeyPath(t,this.context.customAttributes)}if(e.startsWith("customObject.")){var n=e.substring(13);return this.resolveKeyPath(n,this.context.customObject)}return this.resolveKeyPath(e,{customAttributes:this.context.customAttributes,customObject:this.context.customObject,productGroups:this.context.productGroups})}}])}(Sc),Pc=function(e){function t(){var e,n,i,a;o(this,t),(a=r(this,t)).namespace="Device";var s=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[1]||"",u=Intl.DateTimeFormat().resolvedOptions().timeZone,l=ru(),d=we().device.getScreenInfo();return a.context={osName:l.os_name,osVersion:l.os_version,appVersion:l.extended_platform_version,sdkVersion:l.sdk_version,deviceModel:l.device_model,screenWidth:Math.round(d.width),screenHeight:Math.round(d.height),formFactor:l.form_factor,tvQuality:a.tvQuality(null!==(e=l.form_factor)&&void 0!==e?e:"desktop",d),tvResolution:a.tvResolution(null!==(n=l.form_factor)&&void 0!==n?n:"desktop",d),screenSize:a.screenSizeTier(null!==(i=l.form_factor)&&void 0!==i?i:"desktop",d),language:l.language,country:s,timezone:u},a.register(),a}return p(t,e),c(t,[{key:"screenSizeTier",value:function(e,t){var n=Math.round(t.width*t.scale),i=Math.round(t.height*t.scale),a=Math.max(n,i);switch(e){case"phone":return a<1136?"tiny":a<1334?"small":a<1920?"medium":a<2560?"large":"huge";case"tablet":return a<2048?"medium":a<2732?"large":"huge";case"television":return a<1920?"medium":a<3840?"large":"huge";case"desktop":return a<1440?"small":a<2560?"medium":a<3840?"large":"huge";default:return"medium"}}},{key:"tvQuality",value:function(e,t){if("television"!==e)return"";var n=Math.round(t.width*t.scale),i=Math.round(t.height*t.scale),a=Math.max(n,i),r=Math.min(n,i);return a>=3840||r>=2160?"4K":a>=1920||r>=1080?"1080p":"720p"}},{key:"tvResolution",value:function(e,t){if("television"!==e)return"";var n=Math.round(t.width*t.scale),i=Math.round(t.height*t.scale),a=Math.max(n,i),r=Math.min(n,i);return r<720&&a<1280?"SD":r>=720&&r<1080&&a>=1280&&a<1920?"720p":r>=1080&&r<1440&&a>=1920&&a<2560?"1080p":r>=1440&&r<2160&&a>=2560&&a<3840?"1440p":r>=2160&&r<3e3&&a>=3840&&a<5e3?"4K":r>=3e3&&a>=5e3?"8K":"Unknown"}},{key:"resolveValue",value:function(e){return this.resolveKeyPath(e,this.context)}}])}(Sc),Tc=[/(^|_)api(_|$)?key/i,/^key$/i,/^token$/i,/id[_-]?token/i,/access[_-]?token/i,/^auth/i,/password/i,/secret/i,/signature/i,/hmac/i,/^jwt$/i,/^code$/i,/redirect[_-]?uri/i,/return[_-]?url/i,/^state$/i,/^session$/i,/^sid$/i,/^sso$/i,/assertion/i],Mc=function(){function e(){o(this,e),this.params={},"undefined"!=typeof window&&this.setSearchParams()}return c(e,[{key:"setSearchParams",value:function(){this.params=this.extractSafeParams()}},{key:"safeValue",value:function(e){if(!e)return null;try{var t=decodeURIComponent(e).trim();return!t||/^null|undefined$/i.test(t)||((e=>e.includes("://")||/^\/.*\?/.test(e))(t)||(e=>/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+$/.test(e))(t)||(e=>/^[A-Za-z0-9_-]{40,}$/.test(e)||/^[A-Fa-f0-9]{40,}$/.test(e)||/^ya29\./.test(e)||/^sk_/.test(e)||/^ghp_/.test(e))(t))?null:((e,t=128)=>e.length>t?e.slice(0,t):e)(t)}catch(e){return null}}},{key:"extractSafeParams",value:function(){var e=window.location,t={},n=new Set;try{for(var i,a=new URLSearchParams(e.search),r=(e,i)=>{var a=(e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[-\s]/g,"_").toLowerCase())(e);if(!(n.size>=10||(e=>Tc.some(t=>t.test(e)))(a))){var r=this.safeValue(i);r&&(t[a]=r,n.add(a))}},o=h(a.entries());!(i=o()).done;){var s=i.value;r(s[0],s[1])}}catch(e){}return t}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"refresh",value:function(){"undefined"!=typeof window&&this.instance.setSearchParams()}}])}();Mc._instance=null;var _c,Ac=()=>Mc.instance.params,Dc=/\{\{\s*([^}]+?)\s*\}\}/g,xc=function(){return c(function e(t){o(this,e),this.flowManager=t,this.urlParams=Ac()},[{key:"resolve",value:function(e){var t,n,i,a,r,o,s,u,l,d,c,h,m=this.flowManager.currentFlow,f=null==m?void 0:m.component;if(e.startsWith("launchContext.")){var v,p=null===(v=this.flowManager.currentFlow)||void 0===v?void 0:v.context;if(p){var g=e.substring(14),y=new Ec(p).resolveValue(g);return null==y?void 0:y.toString()}}else switch(e){case"campaignId":return null==f||null===(t=f.campaign)||void 0===t?void 0:t.rule;case"campaignName":return null==f||null===(n=f.campaign)||void 0===n?void 0:n.name;case"campaignLabel":case"campaignPlacement":return null!==(i=null==f||null===(a=f.campaign)||void 0===a?void 0:a.value)&&void 0!==i?i:void 0;case"campaignSegment":case"campaignSegmentId":return null==f||null===(r=f.campaign)||void 0===r?void 0:r.segment;case"campaignExternalSegment":case"campaignExternalSegmentId":return null!==(o=null==f||null===(s=f.campaign)||void 0===s?void 0:s.external_segment)&&void 0!==o?o:void 0;case"pageName":return null==f||null===(u=f.paywall)||void 0===u?void 0:u.name;case"pageId":return null==f||null===(l=f.paywall)||void 0===l?void 0:l.id;case"flowName":return null==m?void 0:m.name;case"flowId":return null==m?void 0:m.id;case"objectId":return null==f||null===(d=f.campaign)||void 0===d||null===(d=d.flow)||void 0===d?void 0:d.object_id;case"stepName":return null==m||null===(c=m.currentFlowStep)||void 0===c?void 0:c.name;case"buttonText":var b=null==m?void 0:m.currentButton;if(!b)return;var w=b.firstTextValue;if("function"!=typeof w)return;return w.call(b);case"slideNumber":var k=null==f?void 0:f.getSelectedSlideIndexForCurrentCarousel();return null!=k?`${k+1}`:void 0;case"productGroupId":return(null===(h=_d.currentProvider)||void 0===h?void 0:h.state.currentGroupId)||void 0;case"productGroupName":var S,E,P,T=null===(S=_d.currentProvider)||void 0===S?void 0:S.state;return null!==(E=null==T||null===(P=T.groups)||void 0===P||null===(P=P.find(e=>e.id===T.currentGroupId))||void 0===P?void 0:P.displayName)&&void 0!==E?E:void 0;case"productGroupRef":var M,_,A,D=null===(M=_d.currentProvider)||void 0===M?void 0:M.state;return null!==(_=null==D||null===(A=D.groups)||void 0===A||null===(A=A.find(e=>e.id===D.currentGroupId))||void 0===A?void 0:A.ref)&&void 0!==_?_:void 0;default:return}}},{key:"interpolateLiquidVariables",value:function(e){return e.replace(Dc,(e,t)=>{var n,i=null!==(n=this.resolve(t))&&void 0!==n?n:this.urlParams[t];return null!=i?i:""})}},{key:"interpolateDeep",value:function(e){return"string"==typeof e?this.interpolateLiquidVariables(e):Array.isArray(e)?e.map(e=>this.interpolateDeep(e)):e&&"object"==typeof e?Object.entries(e).reduce((e,[t,n])=>m({},e,{[t]:this.interpolateDeep(n)}),{}):e}}])}(),Cc=function(e){function t(){var e;return o(this,t),(e=r(this,t)).namespace="urlParams",e.context=Ac(),e.register(),e}return p(t,e),c(t,[{key:"resolveValue",value:function(e){return ui.debug("[URLParamsResolver]","Resolving keyPath",e),this.resolveKeyPath(e,this.context)}}])}(Sc),Ic=function(e){function t(){var e;return o(this,t),(e=r(this,t)).namespace="state",e.register(),e}return p(t,e),c(t,[{key:"getContextProvider",value:function(){var e=_d.providers;if(0!==e.length){var t=e.find(e=>e.flow);return t||e[e.length-1]}}},{key:"resolveValue",value:function(e){var t=this.getContextProvider();if(t){if(e.startsWith("formStates.")){var n=e.substring(11);return t.getCurrentFormId(n)}return this.resolveKeyPath(e,t.state)}}}])}(Sc),Lc=function(e){function t(e){var n;return o(this,t),(n=r(this,t)).namespace="Placement",n.campaign=e,n.register(),n}return p(t,e),c(t,[{key:"resolveValue",value:function(e){var t;if("label"===e){if(this.campaign&&void 0!==this.campaign.value&&null!==this.campaign.value)return this.campaign.value;var n=_d.providers;if(0!==n.length){var i=n.find(e=>e.flow);return i?i.getCurrentPlacementLabel():null===(t=n[n.length-1])||void 0===t?void 0:t.getCurrentPlacementLabel()}}}}])}(Sc);!function(e){e.LOGIN="login",e.LOGOUT="logout",e.ADVERTISING_ID_SET="advertising_id_set",e.ADVERTISING_ID_CLEARED="advertising_id_cleared",e.VENDOR_ID_SET="vendor_id_set",e.VENDOR_ID_CLEARED="vendor_id_cleared",e.CUSTOMER_DATA_PLATFORM_ID_SET="customer_data_platform_id_set",e.CUSTOMER_DATA_PLATFORM_ID_CLEARED="customer_data_platform_id_cleared",e.ANONYMOUS_MODE_ON="anonymous_mode_on",e.ANONYMOUS_MODE_OFF="anonymous_mode_off",e.NAMI_DEVICE_ID_SET="nami_device_id_set",e.NAMI_DEVICE_ID_CLEARED="nami_device_id_cleared"}(_c||(_c={}));var Rc=function(){function e(){o(this,e),this.flowOpen=!1,this.lastAnimatedFlowProgress=new Map,this.navGraphCache=new WeakMap}return c(e,[{key:"resume",value:function(){e.resume()}},{key:"presentFlow",value:function(e,t,n){var i=new Wc(e,t,this,n);return this.flowOpen=!0,this.currentFlow=i,i}},{key:"finishFlow",value:function(){zd.instance.maxLogging&&ui.debug("[NamiFlowManager] finishFlow() — closing flow"),this.flowOpen=!1,this.currentFlow=void 0,this.lastAnimatedFlowProgress.clear()}},{key:"getLastAnimatedFlowProgress",value:function(e){var t;return null!==(t=this.lastAnimatedFlowProgress.get(e))&&void 0!==t?t:0}},{key:"setLastAnimatedFlowProgress",value:function(e,t){this.currentFlow&&this.lastAnimatedFlowProgress.set(e,t)}},{key:"getCurrentFlowProgress",value:function(e){if(!this.currentFlow)return 1;if(!this.currentFlow.currentFlowStep)return 0;var t=this.currentFlow.steps.filter(e=>e.type===Yd);if(0===t.length)return 0;var n=this.currentFlow.stepcrumbs.filter(e=>e.type===Yd);if(0===n.length)return 0;var i=this.buildNavGraph(this.currentFlow),a=this.currentFlow.currentFlowStep,r=this.findBranchPoint(t,i),o=0;if(r)o=this.calculateBranchingProgress(n,t,a,r,i);else{var s=t.findIndex(e=>e.id===a.id);o=s>=0?(s+1)/t.length:0}return o=Math.max(0,Math.min(1,o)),e&&this.setLastAnimatedFlowProgress(e,o),o}},{key:"findBranchPoint",value:function(e,t){for(var n,i=h(e);!(n=i()).done;){var a=n.value;if(this.hasBranching(a,e,t))return a}return null}},{key:"calculateBranchingProgress",value:function(e,t,n,i,a){var r=e.length,o=t.findIndex(e=>e.id===i.id),s=e.findIndex(e=>e.id===i.id),u=t.findIndex(e=>e.id===n.id);if(-1===s||n.id===i.id)return(u+1)/(o+2);var l=this.countForwardScreens(n,t,a),d=r+l;return ui.debug(`Branching progress: visited=${r}, remaining=${l}, total=${d}, step=${n.id}`),r/d}},{key:"countForwardScreens",value:function(e,t,n){var i=t.findIndex(t=>t.id===e.id);if(-1===i)return 0;var a=new Set,r=0,o=(e,s)=>{if(!a.has(e)){a.add(e);var u=(n.get(e)||[]).filter(e=>{var n=t.findIndex(t=>t.id===e);return n>i});if(0!==u.length)for(var l,d=h(u);!(l=d()).done;){var c=l.value;o(c,s+1)}else r=Math.max(r,s)}};return o(e.id,0),r}},{key:"hasBranching",value:function(e,t,n){var i=t.findIndex(t=>t.id===e.id);if(-1===i)return!1;var a=(n.get(e.id)||[]).filter(e=>{var n=t.findIndex(t=>t.id===e);return n>i});return a.length>1}},{key:"buildNavGraph",value:function(e){var t=this.navGraphCache.get(e);if(t)return t;var n=new Map;e.steps.forEach(e=>{e.actions&&Object.values(e.actions).forEach(t=>{Array.isArray(t)&&t.forEach(t=>{t.action&&t.action.forEach(t=>{if("flowNav"===t.function){var i,a=null===(i=t.parameters)||void 0===i?void 0:i.step;a&&(n.has(e.id)||n.set(e.id,new Set),n.get(e.id).add(a))}})})})});var i=new Map;return n.forEach((e,t)=>{i.set(t,Array.from(e))}),this.navGraphCache.set(e,i),i}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){var e,t,n=null===(e=this.currentFlow)||void 0===e?void 0:e.currentFlowStep;if(!n)return null;var i=null===(t=n.actions)||void 0===t?void 0:t[nc];if(!i)return null;for(var a,r=h(i);!(a=r()).done;)for(var o,s,u=h(null!==(o=a.value.action)&&void 0!==o?o:[]);!(s=u()).done;){var l,d=s.value;if((d.function===Kd.NAVIGATE||d.function===Kd.NEXT)&&null!=(null===(l=d.parameters)||void 0===l?void 0:l.delay)){var c=d.parameters.delay,m=Number(c);if(!isNaN(m)&&m>0)return m/1e3}}return null}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"reset",value:function(){var t=e.instance;t.currentFlow=void 0,t.flowOpen=!1,t.lastAnimatedFlowProgress=new Map,t.navGraphCache=new WeakMap}},{key:"registerStepHandoff",value:function(e){this.instance.handoffStepHandler=e;var t=e;return()=>{this.instance.handoffStepHandler===t&&(this.instance.handoffStepHandler=void 0)}}},{key:"registerEventHandler",value:function(e){this.instance.eventHandler=e;var t=e;return()=>{this.instance.eventHandler===t&&(this.instance.eventHandler=void 0)}}},{key:"resume",value:function(){var t,n,i,a=e.instance,r=a.flowOpen,o=a.currentFlow;zd.instance.maxLogging&&ui.debug(`[NamiFlowManager] resume() — flowOpen=${r}, hasFlow=${!!o}, currentStep=${null!==(t=null==o||null===(n=o.currentFlowStep)||void 0===n?void 0:n.id)&&void 0!==t?t:"none"}, isPaused=${null!==(i=null==o?void 0:o.isPaused)&&void 0!==i?i:"N/A"}`);if(r&&o&&o.currentFlowStep){if(o.activeHandoffSequence)return ui.debug(`Resuming flow at handoff sequence ${o.currentFlowStep.id}`),void o.resumeNextHandoff();ui.debug(`Resuming flow at step ${o.currentFlowStep.id}`),o.executeLifecycle(o.currentFlowStep,"__resume__")}else ui.warn("Cannot resume: no active flow or current step")}},{key:"finish",value:function(){var t=e.instance,n=t.flowOpen,i=t.currentFlow;n&&i&&i.currentFlowStep?(ui.debug(`Finishing flow programmatically at step ${i.currentFlowStep.id}`),i.finished()):ui.debug("Cannot finish: no active flow or current step")}},{key:"pause",value:function(){var t=e.instance,n=t.flowOpen,i=t.currentFlow;n&&i&&i.currentFlowStep?!0===i.resumeFromBookmark?i.pause():ui.warn("This flow cannot be paused"):ui.warn("Cannot pause: no active flow or current step")}},{key:"isFlowOpen",value:function(){return e.instance.flowOpen}},{key:"getLastAnimatedFlowProgress",value:function(e){return this.instance.getLastAnimatedFlowProgress(e)}},{key:"setLastAnimatedFlowProgress",value:function(e,t){this.instance.setLastAnimatedFlowProgress(e,t)}},{key:"getCurrentFlowProgress",value:function(e){return this.instance.getCurrentFlowProgress(e)}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){return this.instance.getCurrentFlowStepAutoAdvanceDelay()}}])}(),Fc=Object.freeze({__proto__:null,NamiFlowManager:Rc}),Oc=()=>{var e,t;return null!==(e=null===(t=Fr.getNamiConfig())||void 0===t||null===(t=t.namiCommands)||void 0===t?void 0:t.includes("disableAsyncLoginLogout"))&&void 0!==e&&e},Nc=function(){return c(function e(){o(this,e),this.emitter=Ou.getInstance(),kc.shared.registerNamespaceResolver("UserTags",t=>{var n=t.replace("UserTags.",""),i=e.getCustomerAttribute(n);if(null!=i){var a=i.toLowerCase();return"true"===a||"false"===a?"true"===a:isNaN(Number(i))?i:parseInt(i,10)}return null})},[{key:"isSDKInitialized",get:function(){return zd.instance.isInitialized}}],[{key:"isLoggedIn",value:function(){return Bd.instance.isLoggedIn()}},{key:"loggedInId",value:function(){return this.instance.isSDKInitialized||ui.debug($e),Bd.instance.getExternalId()}},{key:"login",value:function(e){var t,n,i,r,o,s,u,l,d;return k(function(c){for(;;)switch(c.p=c.n){case 0:if(this.instance.isSDKInitialized){c.n=1;break}throw t=new Wr,this.invokeStateHandler(_c.LOGIN,!1,t),t;case 1:if(!this.inAnonymousMode()){c.n=2;break}throw n=new Kr,this.invokeStateHandler(_c.LOGIN,!1,n),n;case 2:if(Oc()){c.n=3;break}return Bd.instance.loginLocal(e),this.invokeStateHandler(_c.LOGIN,!0),Rc.instance.flowOpen&&(i=Rc.instance.currentFlow,(r=null==i?void 0:i.currentFlowStep)&&(zd.instance.maxLogging&&ui.debug(`[NamiCustomerManager] async login success — triggering __login_success__ on step ${r.id}`),i.executeLifecycle(r,ac))),Bd.instance.loginRemote(e).catch(e=>{ui.error("[NamiCustomerManager] async login API failed",e)}),Id.instance.fetchActiveEntitlements().catch(e=>{ui.error("[NamiCustomerManager] async login entitlement refresh failed",e)}),c.a(2);case 3:return c.p=3,c.n=4,a(Bd.instance.login(e));case 4:return c.n=5,a(Id.instance.fetchActiveEntitlements());case 5:this.invokeStateHandler(_c.LOGIN,!0),Rc.instance.flowOpen&&(o=Rc.instance.currentFlow,(s=null==o?void 0:o.currentFlowStep)&&(zd.instance.maxLogging&&ui.debug(`[NamiCustomerManager] login success — triggering __login_success__ on step ${s.id}`),o.executeLifecycle(s,ac))),c.n=7;break;case 6:throw c.p=6,d=c.v,this.invokeStateHandler(_c.LOGIN,!1,d),Rc.instance.flowOpen&&(u=Rc.instance.currentFlow,(l=null==u?void 0:u.currentFlowStep)&&(zd.instance.maxLogging&&ui.debug(`[NamiCustomerManager] login failure — triggering __login_failure__ on step ${l.id}`),u.executeLifecycle(l,rc))),d;case 7:return c.a(2)}},null,this,[[3,6]],Promise)}},{key:"logout",value:function(){var e,t,n,i,r,o,s,u,l;return k(function(d){for(;;)switch(d.p=d.n){case 0:if(this.instance.isSDKInitialized){d.n=1;break}throw e=new Wr,this.invokeStateHandler(_c.LOGOUT,!1,e),e;case 1:if(!this.inAnonymousMode()){d.n=2;break}throw t=new Kr,this.invokeStateHandler(_c.LOGOUT,!1,t),t;case 2:if(Oc()){d.n=3;break}return Bd.instance.logoutLocal(),this.invokeStateHandler(_c.LOGOUT,!0),Rc.instance.flowOpen&&(n=Rc.instance.currentFlow,(i=null==n?void 0:n.currentFlowStep)&&(zd.instance.maxLogging&&ui.debug(`[NamiCustomerManager] async logout success — triggering __logout_success__ on step ${i.id}`),n.executeLifecycle(i,oc))),Bd.instance.logoutRemote().catch(e=>{ui.error("[NamiCustomerManager] async logout API failed",e)}),Id.instance.fetchActiveEntitlements().catch(e=>{ui.error("[NamiCustomerManager] async logout entitlement refresh failed",e)}),d.a(2);case 3:return d.p=3,d.n=4,a(Bd.instance.logout());case 4:return d.n=5,a(Id.instance.fetchActiveEntitlements());case 5:this.invokeStateHandler(_c.LOGOUT,!0),Rc.instance.flowOpen&&(r=Rc.instance.currentFlow,(o=null==r?void 0:r.currentFlowStep)&&r.executeLifecycle(o,oc)),d.n=7;break;case 6:throw d.p=6,l=d.v,this.invokeStateHandler(_c.LOGOUT,!1,l),Rc.instance.flowOpen&&(s=Rc.instance.currentFlow,(u=null==s?void 0:s.currentFlowStep)&&s.executeLifecycle(u,sc)),l;case 7:return d.a(2)}},null,this,[[3,6]],Promise)}},{key:"setCustomerDataPlatformId",value:function(e){return k(function(t){for(;;)switch(t.n){case 0:return t.n=1,a(this.updateCustomerDataPlatformId(e));case 1:return t.a(2)}},null,this,null,Promise)}},{key:"clearCustomerDataPlatformId",value:function(){return k(function(e){for(;;)switch(e.n){case 0:return e.n=1,a(this.updateCustomerDataPlatformId(null));case 1:return e.a(2)}},null,this,null,Promise)}},{key:"registerAccountStateHandler",value:function(e){return this.instance.emitter.on("accountStateChange",e),()=>{this.instance.emitter.off("accountStateChange",e)}}},{key:"setAnonymousMode",value:function(e){var t,n,i,r,o;return k(function(s){for(;;)switch(s.n){case 0:if(t=e?_c.ANONYMOUS_MODE_ON:_c.ANONYMOUS_MODE_OFF,this.instance.isSDKInitialized){s.n=1;break}throw n=new Wr,this.invokeStateHandler(t,!1,n),n;case 1:if(this.anonymousModeCapability()){s.n=2;break}return ui.warn("Anonymous mode feature is not enabled for your Nami account. Contact support@nami.ml for details."),s.a(2);case 2:if(this.inAnonymousMode()!==e){s.n=3;break}return i=e?new Gr:new Vr,this.invokeStateHandler(t,!1,i),s.a(2);case 3:if(!e){s.n=4;break}Fr.setAnonymousMode(e),Fr.resetDevice(),this.refetchConfig(),this.invokeStateHandler(_c.ANONYMOUS_MODE_ON,!0),s.n=6;break;case 4:return Fr.clearAnonymousMode(),nl(),o=null===(r=Fr.getNamiConfig())||void 0===r?void 0:r.namiCommands,s.n=5,a(Wu.instance.createOrUpdateDevice(ru(o)));case 5:Fr.clearAnonymousUUID(),this.refetchConfig(),this.invokeStateHandler(_c.ANONYMOUS_MODE_OFF,!0);case 6:return s.a(2)}},null,this,null,Promise)}},{key:"inAnonymousMode",value:function(){return!!this.instance.isSDKInitialized&&il()}},{key:"setCustomerAttribute",value:function(e,t){if(!this.instance.isSDKInitialized)throw new Wr;if(Fr.setCustomerAttribute(e,t),Ds(Pe.PAYWALL_PERSONALIZATION)?(_d.setCustomerAttribute({[e]:t}),ui.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):ui.warn(`The customer attribute ${e} is not available for using on a paywall, because your account's plan does not include paywall personalization. Contact support@nami.ml for details.`),Rc.instance.flowOpen){var n=Rc.instance.currentFlow;if(n){var i=n.currentFlowStep;i&&n.executeLifecycle(i,dc)}}}},{key:"getCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new Wr;var t=Fr.getCustomerAttribute(e);return null!=t?Ds(Pe.PAYWALL_PERSONALIZATION)?ui.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):ui.warn(`Found customer attribute. ${e} is not available for use on a paywall because paywall personalization is not included in your account's plan. Contact support@nami.ml for details.`):ui.warn(`No ${e} customer attribute found.`),t}},{key:"getAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new Wr;return Fr.getAllCustomerAttributes()}},{key:"clearCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new Wr;Fr.clearCustomerAttribute(e)?(_d.removeCustomerAttribute(e),ui.warn(`This customer attribute has been cleared. ${e} is no longer available for paywall personalization on this device. A default value will be used if set in the Nami Control Center.`)):ui.warn(`No value to clear for attribute ${e}.`)}},{key:"clearAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new Wr;Fr.getAllCustomerAttributesKeys().forEach(e=>{_d.removeCustomerAttribute(e)}),Fr.clearAllCustomerAttributes(),ui.warn("All customer attribute have been cleared. customer's smart text will no longer be personalized for this device. A default value will be used if set in the Nami Control Center.")}},{key:"journeyState",value:function(){if(!this.instance.isSDKInitialized)throw new Wr;return Fr.getCustomerJourneyState()}},{key:"deviceId",value:function(){var e,t;return this.instance.isSDKInitialized&&null!==(e=null===(t=Fr.getDevice())||void 0===t?void 0:t.id)&&void 0!==e?e:qe}},{key:"registerJourneyStateHandler",value:function(e){if(Cs("NamiCustomerManager.registerJourneyStateHandler"))return this.instance.emitter.addListener(qn,e),()=>{this.instance.emitter.removeListener(qn,e)}}},{key:"invokeStateHandler",value:function(e,t,n){this.instance.emitter.emit("accountStateChange",e,t,n)}},{key:"updateCustomerDataPlatformId",value:function(e){var t,n,i,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:if(this.instance.isSDKInitialized){o.n=1;break}throw t=new Wr,this.invokeStateHandler(_c.CUSTOMER_DATA_PLATFORM_ID_SET,!1,t),t;case 1:if(this.inAnonymousMode()){o.n=6;break}return o.p=2,o.n=3,a(Wu.instance.updateDeviceField("customer_data_platform_id",e));case 3:this.invokeStateHandler(_c.CUSTOMER_DATA_PLATFORM_ID_SET,!0),o.n=5;break;case 4:o.p=4,r=o.v,this.invokeStateHandler(_c.CUSTOMER_DATA_PLATFORM_ID_SET,!1,r);case 5:o.n=7;break;case 6:return ui.info("Unable to set CDP ID in anonymous mode",{deviceId:null===(n=Fr.getDevice())||void 0===n?void 0:n.id,anonymousMode:!0}),i=new Xr,this.invokeStateHandler(_c.CUSTOMER_DATA_PLATFORM_ID_SET,!1,i),o.a(2);case 7:return o.a(2)}},null,this,[[2,4]],Promise)}},{key:"anonymousModeCapability",value:function(){if(!this.instance.isSDKInitialized)return!1;var e=Ds(Pe.ANONYMOUS_MODE_CAPABILITY),t=Ds(Pe.THIRD_PARTY_TRANSACTIONS);return e&&t}},{key:"refetchConfig",value:function(){return k(function(e){for(;;)switch(e.n){case 0:if(!this.instance.isSDKInitialized){e.n=1;break}return e.n=1,a(Promise.all([ju.instance.fetchProducts(),Zu.instance.fetchPaywalls().then(e=>Nu.instance.fetchCampaignRules(e))]));case 1:return e.a(2)}},null,this,null,Promise)}}])}();Nc.instance=new Nc;var $c=function(){return c(function e(t={}){var n,i,a,r,s;o(this,e),this.id=null!==(n=t.id)&&void 0!==n?n:"",this.name=null!==(i=t.name)&&void 0!==i?i:"",this.steps=null!==(a=t.steps)&&void 0!==a?a:[],this.screens=null!==(r=t.screens)&&void 0!==r?r:[],this.resumeFromBookmark=Boolean(t.resume_from_bookmark),this.transition=null!==(s=t.transition)&&void 0!==s?s:"none"},[{key:"allScreensAvailable",get:function(){return this.screens.length>0&&Vs(this.screens)}}])}(),Wc=function(e){function t(e,n,i,a){var s,u;o(this,t),(u=r(this,t,[null!==(s=e.flow.object)&&void 0!==s?s:{}])).stepcrumbs=[],u.branchcrumbs=[],u.activeHandoffSequence=null,u.currentScreenState=null,u.isPaused=!1,u.timerStates={},u.campaign=e,u.component=n,u.context=a,u.manager=i,u.branchcrumbs=[],u.stepcrumbs=[],u.registerResolvers(a);var l=u.findStepByType(Xd);return l&&u.forward(l.id),u}return p(t,e),c(t,[{key:"applyLaunchContextAttributes",value:function(e){var t,n;this.context||(this.context={customAttributes:{}},new Ec(this.context)),null!==(n=(t=this.context).customAttributes)&&void 0!==n||(t.customAttributes={}),Object.assign(this.context.customAttributes,e)}},{key:"registerResolvers",value:function(e){e&&new Ec(e),new Pc,new Cc,new Ic,new Lc(this.campaign),kc.shared.registerNamespaceResolver("Flow",e=>{switch(e){case"Flow.stepcrumbs":return this.stepcrumbs.map(e=>e.id);case"Flow.branchcrumbs":return this.branchcrumbs;default:return}})}},{key:"currentFlowStep",get:function(){return this.stepcrumbs.at(-1)}},{key:"nextStepAvailable",get:function(){return void 0!==this.nextFlowStep}},{key:"previousStepAvailable",get:function(){var e,t=!!this.previousFlowStep,n=!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to),i=this.stepcrumbs.slice(0,-1).some(e=>"screen"===e.type);return t&&n&&i}},{key:"previousFlowStep",get:function(){var e=this.stepcrumbs.length-2;return e>=0?this.stepcrumbs[e]:void 0}},{key:"nextFlowStep",get:function(){return this.nextStep(this.currentFlowStep)}},{key:"getStep",value:function(e){return this.steps.find(t=>t.id===e)}},{key:"findStepByType",value:function(e){return this.steps.find(t=>t.type===e)}},{key:"isStepActive",value:function(e){return!e.branch_tags||!e.branch_tags.length||e.branch_tags.some(e=>this.branchcrumbs.includes(e))}},{key:"flowLog",value:function(e,...t){zd.instance.maxLogging&&ui.debug(`[NamiFlow] ${e}`,...t)}},{key:"finished",value:function(){var e;this.flowLog(`finished() — closing flow, isPaused=${this.isPaused}, step=${null===(e=this.currentFlowStep)||void 0===e?void 0:e.id}`),this.manager.finishFlow()}},{key:"back",value:function(){var e;if(!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to)){if(!this.stepcrumbs.slice(0,-1).some(e=>"screen"===e.type))return this.flowLog("back() — no previous screen step, exiting flow"),void this.finished();this.backToPreviousScreenStep()}else ui.debug(`Not allowed to go back to ${this.previousFlowStep.id}`)}},{key:"next",value:function(){var e=this.nextFlowStep;e&&this.forward(e.id)}},{key:"backToPreviousScreenStep",value:function(){var e;if(!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to)){for(var t=this.stepcrumbs.length-2;t>=0;t--){var n=this.stepcrumbs[t];if(this.stepcrumbs.pop(),"branch"===n.type&&this.branchcrumbs.length>0&&this.branchcrumbs.pop(),"screen"===n.type&&n.screen){var i,a,r=Gs(n.screen);return r&&we().ui.flowNavigateToScreen(r,{transition:this.transition,direction:"backward"}),void(this.currentScreenState=null!==(i=null===(a=_d.currentProvider)||void 0===a?void 0:a.state)&&void 0!==i?i:null)}}ui.warn("No previous screen step found to return to")}else ui.warn(`Not allowed to go back to ${this.previousFlowStep.id}`)}},{key:"forward",value:function(e){var t=this.getStep(e);if(t)if(this.isStepActive(t))switch(this.flowLog(`forward(${e}) — type=${t.type}, name=${t.name}, isPaused=${this.isPaused}`),t.type){case Xd:case Jd:return this.stepcrumbs.push(t),void this.executeLifecycle(t,tc);case qd:return void this.handleBranchStep(t);case Yd:return void this.handleScreenStep(t);case Qd:return}else this.flowLog(`forward(${e}) — step not active (branch_tags=${JSON.stringify(t.branch_tags)}, branchcrumbs=${JSON.stringify(this.branchcrumbs)})`);else ui.error(`No step found with id: ${e}`)}},{key:"pause",value:function(){var e;this.isPaused?ui.info("Flow is already paused"):(this.isPaused=!0,this.pausedStepID=null===(e=this.currentFlowStep)||void 0===e?void 0:e.id,this.flowLog(`pause() — pausedStepID=${this.pausedStepID}`),ui.info("Flow paused"))}},{key:"resumeFromPause",value:function(){if(this.isPaused)if(this.isPaused=!1,this.pausedStepID){var e=this.pausedStepID;this.pausedStepID=void 0,this.flowLog(`resumeFromPause() — resuming from step ${e}`),ui.info(`Flow resumed from step ${e}`),this.forward(e)}else ui.warn("No step to resume from");else ui.info("Flow is not paused")}},{key:"executeLifecycle",value:function(e,t,n){var i=e.actions[t];i?(this.flowLog(`executeLifecycle(${t}) — step=${e.id}, isPaused=${this.isPaused}, ${i.length} lifecycle(s)`),this.executeFullLifecycles(i,n)):this.flowLog(`executeLifecycle(${t}) — no actions on step ${e.id}`)}},{key:"lifecycles",value:function(e){if(this.currentFlowStep){var t=this.currentFlowStep.actions[e];if(t)return t;ui.info(`No actions found for button ${e} on step ${this.currentFlowStep.id}`)}}},{key:"triggerActions",value:function(e,t,n){var i,a=this.lifecycles(e);a&&(this.flowLog(`triggerActions(${e}) — step=${null===(i=this.currentFlowStep)||void 0===i?void 0:i.id}, isPaused=${this.isPaused}`),this.currentButton=t,this.executeFullLifecycles(a,n))}},{key:"executeFullLifecycles",value:function(e,t){for(var n,i=this,a=function(){var e=n.value,a=["before","action","after"];[e.before,e.action,e.after].forEach((e,n)=>null==e?void 0:e.forEach(e=>{var r=i.shouldRun(e);i.flowLog(` ${a[n]}: ${e.function}${e.id?` (${e.id})`:""} — shouldRun=${r}`),r&&i.performAction(e,t)}))},r=h(e);!(n=r()).done;)a()}},{key:"triggerBeforeActions",value:function(e,t,n){var i=this.lifecycles(e);if(i){this.currentButton=t;for(var a,r=h(i);!(a=r()).done;){var o;null===(o=a.value.before)||void 0===o||o.forEach(e=>this.shouldRun(e)&&this.performAction(e,n))}}}},{key:"triggerAfterActions",value:function(e,t,n){var i=this.lifecycles(e);if(i){this.currentButton=t;for(var a,r=h(i);!(a=r()).done;){var o;null===(o=a.value.after)||void 0===o||o.forEach(e=>this.shouldRun(e)&&this.performAction(e,n))}}}},{key:"currentStepHasHoistedPrimaryActions",value:function(e){var t=this.lifecycles(e);return!!t&&t.some(e=>{var t;return null===(t=e.action)||void 0===t?void 0:t.length})}},{key:"shouldRun",value:function(e){if(!e.conditions)return!0;var t=e.conditions.every(e=>{var t=kc.shared.evaluate(e);if(zd.instance.maxLogging){var n,i,a,r=null!==(n=null===(i=e.filter)||void 0===i?void 0:i.map(e=>`${e.identifier} ${e.operator} ${JSON.stringify(e.values)}`).join(", "))&&void 0!==n?n:"none";ui.debug(`[NamiFlow] condition: [${r}] op=${null!==(a=e.operator)&&void 0!==a?a:"default"} → ${t}`)}return t});return t}},{key:"performAction",value:function(e,t){var n,i;if(this.currentFlowStep){var a=(null!==(n=e.parameters)&&void 0!==n&&n.delay?+e.parameters.delay:0)||0;this.flowLog(`performAction(${e.function}) — step=${this.currentFlowStep.id}, delay=${a}, params=${JSON.stringify(null!==(i=e.parameters)&&void 0!==i?i:{})}`);var r=n=>{var i,a,r,o,s,u,l,d,c,h;if((null===(i=this.currentFlowStep)||void 0===i?void 0:i.id)===n)switch(e.function){case Kd.BACK:this.back();break;case Kd.NEXT:null!==(a=e.parameters)&&void 0!==a&&a.customAttributes&&this.applyLaunchContextAttributes(e.parameters.customAttributes),null!==(r=e.parameters)&&void 0!==r&&r.step?this.forward(e.parameters.step):this.next();break;case Kd.NAVIGATE:var m;if(null!==(o=e.parameters)&&void 0!==o&&o.customAttributes&&this.applyLaunchContextAttributes(e.parameters.customAttributes),null!==(s=e.parameters)&&void 0!==s&&s.step)(null===(m=this.previousFlowStep)||void 0===m?void 0:m.id)===e.parameters.step?this.back():this.forward(e.parameters.step);else this.next();break;case Kd.FINISHED:case Kd.DISMISS:this.finished();break;case Kd.EXIT:var f=this.steps.find(e=>e.type===Jd);f&&this.forward(f.id);break;case Kd.PAUSE:this.pause();break;case Kd.RESUME:this.resumeFromPause();break;case Kd.HANDOFF:if(null!==(u=e.parameters)&&void 0!==u&&u.handoffTag)if(this.manager.handoffStepHandler)if(e.parameters.handoffData)ui.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(e.parameters.handoffData)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,e.parameters.handoffData);else if(t)ui.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(t)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,t);else if(e.parameters.handoffFormId){var v=this.getFormData();e.parameters.handoffTag===Zd?this.flowHandoffFormSequence():this.manager.handoffStepHandler(e.parameters.handoffTag,v)}else ui.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} and no data`),this.manager.handoffStepHandler(e.parameters.handoffTag);else ui.debug("No handoffStepHandler found",e);break;case Kd.LOG:var p;if(null!==(l=e.parameters)&&void 0!==l&&l.eventName)ui.info(`logEvent → ${e.parameters.eventName}`);else ui.warn(`Missing 'eventName' in logEvent action ${null!==(p=e.id)&&void 0!==p?p:"unknown"}`);break;case Kd.TRACK:var g;if(null!==(d=e.parameters)&&void 0!==d&&d.eventName)ui.info(`trackEvent → ${e.parameters.eventName}`);else ui.warn(`Missing 'eventName' in logEvent action ${null!==(g=e.id)&&void 0!==g?g:"unknown"}`);break;case Kd.SET_VIDEO:null!==(c=e.parameters)&&void 0!==c&&c.name&&e.parameters.url?_d.setAppSuppliedVideoDetails({name:e.parameters.name,url:e.parameters.url}):ui.warn("Missing name, url for setting video details");break;case Kd.BLOCK_BACK:var y,b=null===(y=e.parameters)||void 0===y?void 0:y.step,w=b?this.getStep(b):void 0;w?w.allow_back_to=!1:this.currentFlowStep?this.currentFlowStep.allow_back_to=!1:ui.warn("Missing step for blocking back");break;case Kd.FLOW_EVENT:var k,S=new xc(this.manager),E=Object.fromEntries(Object.entries(null!==(k=e.parameters)&&void 0!==k?k:{}).map(([e,t])=>[e,S.interpolateDeep(t)]));this.manager.eventHandler?this.manager.eventHandler(E):ui.warn("Missing event handler",E);break;case Kd.FLOW_ENABLED:_d.setUserInteractionEnabled(!0);break;case Kd.FLOW_DISABLED:_d.setUserInteractionEnabled(!1);break;case Kd.SET_TAGS:e.parameters&&(_d.setUserTags(e.parameters),Object.entries(e.parameters).forEach(([e,t])=>{Nc.setCustomerAttribute(e,t)}));break;case Kd.SET_LAUNCH_CONTEXT:var P=e.parameters;null!=P&&P.customAttributes?this.applyLaunchContextAttributes(P.customAttributes):void 0!==(null==P?void 0:P.key)&&void 0!==(null==P?void 0:P.value)&&this.applyLaunchContextAttributes({[P.key]:P.value});break;default:ui.warn(`Missing action handler for ${e.function}`,e)}else this.flowLog(`performAction(${e.function}) — SKIPPED stale step ${n}, current=${null===(h=this.currentFlowStep)||void 0===h?void 0:h.id}`)};a?setTimeout(r.bind(this,this.currentFlowStep.id),a):r(this.currentFlowStep.id)}else ui.warn("No current flow step")}},{key:"nextStep",value:function(e){if(e){var t=this.steps.findIndex(t=>t.id===e.id);if(-1!==t){for(var n,i=h(this.steps.slice(t+1));!(n=i()).done;){var a=n.value;if(this.isStepActive(a))return a}ui.debug(`No active next step found after ${e.id}`)}else ui.error(`Could not find next step for step ${e.id}`)}else ui.error("Next step not found")}},{key:"handleScreenStep",value:function(e){var t,n=Gs(null!==(t=e.screen)&&void 0!==t?t:"");e.screen&&n&&this.campaign?(this.stepcrumbs.push(e),we().ui.flowNavigateToScreen(n,{transition:this.transition,direction:"forward"})):ui.error("No paywall or campaign found for next step")}},{key:"handleBranchStep",value:function(e){this.stepcrumbs.push(e);for(var t=0,n=Object.entries(e.actions);t<n.length;t++){var i=n[t],a=i[0],r=i[1];if(r)for(var o,s=h(r);!(o=s()).done;){var u=o.value;if(u.action)for(var l,d=h(u.action);!(l=d()).done;){var c,m,f=l.value;if(this.shouldRun(f))return this.branchcrumbs.push(a),null===(c=u.before)||void 0===c||c.forEach(e=>{this.performAction(e)}),u.action.forEach(e=>{this.shouldRun(e)&&this.performAction(e)}),void(null===(m=u.after)||void 0===m||m.forEach(e=>{this.performAction(e)}))}else ui.warn(`No actions defined for branch tag ${a}`)}}ui.warn(`No matching branch condition matched for step ${e.id}`)}},{key:"getFormData",value:function(){var e,t;return m({},null!==(e=null===(t=_d.currentProvider)||void 0===t||null===(t=t.state)||void 0===t?void 0:t.formStates)&&void 0!==e?e:{})}},{key:"flowHandoffFormSequence",value:function(){var e,t=null===(e=this.currentScreenState)||void 0===e?void 0:e.formStates;if(t){var n=Object.keys(t).sort();if(0!==n.length){var i=n.filter(e=>!0===t[e]);if(0===i.length)return ui.info("No eligible handoff keys after filtering"),void this.manager.resume();this.activeHandoffSequence={formStates:m({},t),remainingKeys:[...i]},this.resumeNextHandoff()}else ui.warn("formStates is empty, no handoffs to perform")}else ui.warn("No formStates available for handoff sequence")}},{key:"resumeNextHandoff",value:function(){var e,t,n=this.activeHandoffSequence;if(!n)return ui.warn("No active handoff sequence to resume"),void this.manager.resume();if(0===n.remainingKeys.length)return ui.info("All handoffs in the sequence are complete"),this.activeHandoffSequence=null,void this.manager.resume();var i=n.remainingKeys.shift(),a=n.formStates[i];ui.debug(`Starting handoff for ${i} → ${String(a)}`),this.activeHandoffSequence=n;var r=`${i}`;null===(e=(t=this.manager).handoffStepHandler)||void 0===e||e.call(t,r,void 0)}}])}($c),jc=function(){return c(function e(){o(this,e),this.emitter=Ou.getInstance()},[{key:"sdkInitialized",get:function(){return zd.instance.isInitialized}},{key:"campaignTypeAndLabel",value:function(t,n){var i,a="";return t&&!n&&fu(t)?(a=t,i=e.NamiCampaignRuleType.URL):t?(a=t,i=e.NamiCampaignRuleType.LABEL):n&&(a=n,i=e.NamiCampaignRuleType.URL),{type:i,value:a}}}],[{key:"allCampaigns",value:function(){if(!this.instance.sdkInitialized)throw new Wr;return gu()}},{key:"isCampaignAvailable",value:function(e){if(!this.instance.sdkInitialized)throw new Wr;var t=this.instance.campaignTypeAndLabel(e),n=t.type,i=t.value,a=Su(i,n),r=a.campaign,o=a.paywall;return null!=r&&r.flow?new $c(r.flow.object).allScreensAvailable:Boolean(r&&o)}},{key:"isFlow",value:function(e,t){if(!this.instance.sdkInitialized)throw new Wr;var n=this.instance.campaignTypeAndLabel(e,t),i=n.type,a=n.value;return Bs(Su(a,i).campaign)}},{key:"refresh",value:function(){return k(function(e){for(;;)switch(e.n){case 0:if(this.instance.sdkInitialized){e.n=1;break}throw new Wr;case 1:return xs(),e.n=2,a(Nd.instance.fetchCampaignsAndPaywalls());case 2:return e.a(2,gu())}},null,this,null,Promise)}},{key:"registerAvailableCampaignsHandler",value:function(e){return this.instance.emitter.addListener(Hn,e),()=>{this.instance.emitter.removeListener(Hn,e)}}},{key:"launch",value:function(t,n,i,a,r){var o,s,u,l,d,c,h,f,v,p;a=null!=a?a:()=>{},i=null!=i?i:{customAttributes:{}};var g=this.instance.campaignTypeAndLabel(t,n),b=g.type,w=g.value;if(!this.instance.sdkInitialized)throw a(!1,e.LaunchCampaignError.SDK_NOT_INITIALIZED),new Wr;var k,S=Od.firstLaunchLookup(w,()=>Su(w,b)),E=S.paywall,P=S.campaign;P&&(E||P.flow)||(k=t||n?t?e.LaunchCampaignError.LABELED_CAMPAIGN_NOT_FOUND:n?e.LaunchCampaignError.URL_CAMPAIGN_NOT_FOUND:e.LaunchCampaignError.CAMPAIGN_DATA_NOT_FOUND:e.LaunchCampaignError.DEFAULT_CAMPAIGN_NOT_FOUND,a(!1,k),E={});var T={campaignId:null!==(o=null==P?void 0:P.rule)&&void 0!==o?o:"",campaignName:null!==(s=null==P?void 0:P.name)&&void 0!==s?s:"",campaignType:null!==(u=null==P?void 0:P.type)&&void 0!==u?u:"",campaignLabel:t?w:"",campaignUrl:n?w:"",paywallId:null!=P&&P.flow?void 0:(null===(l=E)||void 0===l?void 0:l.id)||"",paywallName:null!=P&&P.flow?void 0:(null===(d=E)||void 0===d?void 0:d.name)||"",segmentId:null==P?void 0:P.segment,externalSegmentId:null!==(c=null==P?void 0:P.external_segment)&&void 0!==c?c:null,action:e.NamiPaywallAction.UNKNOWN},M=Fr.getPurchaseChannel();M&&(T=m({},T,{purchaseChannel:M}));var _,A,D,x=null===(h=i)||void 0===h?void 0:h.productGroups,C=null===(f=E)||void 0===f||null===(f=f.sku_menus)||void 0===f?void 0:f.map(e=>e.ref);if((D=null===(_=Fr.getNamiConfig())||void 0===_?void 0:_.namiCommands,null!==(A=null==D?void 0:D.includes(fn))&&void 0!==A&&A&&null!=x&&x.length&&null!=C)&&0==(null==C?void 0:C.filter(e=>null==x?void 0:x.some(t=>t===e))).length)throw a(!1,e.LaunchCampaignError.PRODUCT_GROUPS_NOT_FOUND),new Ur;if(null!=P&&P.flow&&!Vs(null!==(v=null===(p=P.flow.object)||void 0===p?void 0:p.screens)&&void 0!==v?v:[]))throw a(!1,e.LaunchCampaignError.FLOW_SCREEN_DATA_UNAVILABLE),new Hr;var I=we().ui.createPaywall(b,w,i),L=su();return Fr.setLaunchId(L),r&&this.instance.emitter.addListener(Vn,t=>{var n=t.action,i=y(t,ge);r(m({},T,i,{action:null!=n?n:e.NamiPaywallAction.UNKNOWN}))}),setTimeout(()=>a(!0),0),I}},{key:"getProductGroups",value:function(e,t){var n,i,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value;return null!==(n=null===(i=Su(o,r).paywall)||void 0===i||null===(i=i.sku_menus)||void 0===i?void 0:i.map(e=>e.ref))&&void 0!==n?n:[]}},{key:"getAllProducts",value:function(e,t){var n,i,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value;return null!==(n=null===(i=Su(o,r).paywall)||void 0===i||null===(i=i.sku_menus)||void 0===i?void 0:i.flatMap(e=>{var t,n;return null!==(t=null===(n=e.products)||void 0===n?void 0:n.map(e=>e.sku_ref_id))&&void 0!==t?t:[]}))&&void 0!==n?n:[]}},{key:"getCurrentProducts",value:function(e,t){var n,i,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value,s=Su(o,r),u=_d.currentProvider,l=null==u?void 0:u.getCurrentGroupId();return l&&null!==(n=null===(i=s.paywall)||void 0===i||null===(i=i.sku_menus)||void 0===i?void 0:i.filter(e=>e.id===l).flatMap(e=>{var t,n;return null!==(t=null===(n=e.products)||void 0===n?void 0:n.map(e=>e.sku_ref_id))&&void 0!==t?t:[]}))&&void 0!==n?n:[]}}])}();jc.instance=new jc;var Bc=jc,zc=Nc,Uc=function(){return c(function e(){o(this,e),this.emitter=Ou.getInstance()},[{key:"sdkInitialized",get:function(){return zd.instance.isInitialized}}],[{key:"active",value:function(){return Cs(),Dd()}},{key:"isEntitlementActive",value:function(e){return!!Cs("NamiEntitlementManager.isEntitlementActive")&&this.active().some(t=>t.referenceId==e)}},{key:"refresh",value:function(){return k(function(e){for(;;)switch(e.n){case 0:if(this.instance.sdkInitialized){e.n=1;break}throw new Wr;case 1:if(Cs("NamiEntitlementManager.refresh")){e.n=2;break}return e.a(2,[]);case 2:return e.n=3,a(Id.instance.fetchActiveEntitlements());case 3:return e.a(2,Dd())}},null,this,null,Promise)}},{key:"registerActiveEntitlementsHandler",value:function(e){if(Cs("NamiEntitlementManager.registerActiveEntitlementsHandler"))return this.instance.emitter.addListener(Xn,e),()=>{this.instance.emitter.removeListener(Xn,e)}}},{key:"clearProvisionalEntitlementGrants",value:function(){var e=Dd();e=e.filter(e=>e.expires&&e.expires>(new Date).valueOf()),Fr.setNamiEntitlements(Mt,e),this.instance.emitter.emit(Xn)}}])}();Uc.instance=new Uc;var Hc=Uc,Gc=Rc,Vc=e=>{var t;return k(function(n){for(;;)switch(n.p=n.n){case 0:if(!il()){n.n=1;break}return ui.info("Skipping transaction post - anonymous mode"),n.a(2);case 1:return n.p=1,n.n=2,a(js.instance.postConversion(e));case 2:n.n=4;break;case 3:n.p=3,t=n.v,ui.error("Error posting conversion",t);case 4:return n.a(2)}},null,null,[[1,3]],Promise)},Kc=function(){return c(function e(){o(this,e),this.emitter=Ou.getInstance()},[{key:"sdkInitialized",get:function(){return zd.instance.isInitialized}}],[{key:"allPaywalls",value:function(){if(!this.instance.sdkInitialized)throw new Wr;return Hs()}},{key:"setProductDetails",value:function(e){this.instance.productDetails=e,_d.setProductDetails(e)}},{key:"registerSignInHandler",value:function(t){return this.instance.emitter.addListener(e.NamiPaywallManagerEvents.SignIn,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.SignIn,t)}}},{key:"registerCloseHandler",value:function(t){return this.instance.emitter.addListener(e.NamiPaywallManagerEvents.Close,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.Close,t)}}},{key:"registerDeeplinkActionHandler",value:function(t){return this.instance.emitter.addListener(e.NamiPaywallManagerEvents.DeeplinkAction,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.DeeplinkAction,t)}}},{key:"registerBuySkuHandler",value:function(t){return Cs()&&ui.debug("This handler will not be invoked because this account's plan includes built-in purchase management. Contact support@namiml.com for details."),this.instance.emitter.addListener(e.NamiPaywallManagerEvents.BuySku,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.BuySku,t)}}},{key:"registerRestoreHandler",value:function(t){return this.instance.emitter.addListener(e.NamiPaywallManagerEvents.Restore,t),()=>{this.instance.emitter.removeListener(e.NamiPaywallManagerEvents.Restore,t)}}},{key:"buySkuComplete",value:function(e){var t,n,i,r,o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:if(_d.setPurchaseInProgress(!1),Rc.instance.flowOpen&&(t=Rc.instance.currentFlow,n=null==t?void 0:t.currentFlowStep,t&&n&&t.executeLifecycle(n,uc)),!Nc.inAnonymousMode()){u.n=1;break}return ui.debug("Skipping purchase validation - anonymous mode"),u.a(2);case 1:if(i=Fr.getSessionId(),r=Fr.getPurchaseImpression()){u.n=2;break}return ui.debug("Not sending paywall conversion call complete due to unknown impression"),u.a(2);case 2:return u.p=2,u.n=3,a(Vc({purchase_env:"production",app_env:"production",impression:r,session:i,amount:e.amount,currency:e.currency,transaction_id:e.transactionId,sku:e.skuId}));case 3:u.n=5;break;case 4:u.p=4,o=u.v,ui.error("Error posting conversion",o);case 5:if(Ds(Pe.THIRD_PARTY_TRANSACTIONS)){u.n=9;break}return u.p=6,u.n=7,a(js.instance.purchaseValidation({app_env:"production",payload:"",sku:e.skuId}));case 7:u.n=9;break;case 8:u.p=8,s=u.v,ui.error("Error validating purchase",s);case 9:return u.a(2)}},null,null,[[6,8],[2,4]],Promise)}},{key:"buySkuCancel",value:function(){Ds(Pe.THIRD_PARTY_TRANSACTIONS)?_d.setPurchase(!1):ui.warn("Call this method is not needed for this app because Nami is responsible for purchase management. Contact support@nami.ml for details.")}},{key:"setAppSuppliedVideoDetails",value:function(e,t){fu(e)?(ui.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received valid url ${e}`),_d.setAppSuppliedVideoDetails({url:e,name:t})):ui.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received invalid url ${e}`)}},{key:"allowUserInteraction",value:function(e){ui.debug(`NamiPaywallManager: allowUserInteraction called with ${e}`),_d.setUserInteractionEnabled(e)}}])}();Kc.instance=new Kc,Kc.emitter=Ou.getInstance();var Xc,Yc,qc=Kc,Jc=rl,Qc={upperLeft:"border-top-left-radius",upperRight:"border-top-right-radius",lowerLeft:"border-bottom-left-radius",lowerRight:"border-bottom-right-radius"},Zc={left:"border-left-style",right:"border-right-style",top:"border-top-style",bottom:"border-bottom-style"},eh="wave",th="pulse",nh="none";function ih(e){var t,n=null!==(t=e.match(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/))&&void 0!==t?t:[],i=n[0],a=n[1],r=n[2],o=n[3],s=n[4],u=n[5];return{semver:i,major:Number.parseInt(a)||3,minor:Number.parseInt(r)||0,patch:Number.parseInt(o)||0,prerelease:s,buildmetadata:u}}function ah(e,t){e&&(function(e,t){return e.major!==t.major?e.major>t.major?1:-1:e.minor!==t.minor?e.minor>t.minor?1:-1:e.patch!==t.patch?e.patch>t.patch?1:-1:0}(ih(Ae),e)>=0||ui.warn(`Component ${t} requires SDK version ${e.semver} or higher, but current SDK version is ${Ae}`))}function rh(e){return!e||"object"==typeof e&&0==Object.keys(e).length}!function(e){e.DEFAULT="default",e.LABEL="label",e.URL="url"}(Xc||(Xc={})),function(e){e.DEEPLINK="deeplink",e.IN_APP="in_app"}(Yc||(Yc={})),new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z"));var oh=Bc,sh=zc,uh=qc,lh=Hc,dh=Gc,ch=Jc,hh=Bd,mh=Object.freeze({__proto__:null,NamiCampaignManager:oh,NamiCustomerManager:sh,NamiEntitlementManager:lh,NamiFlowManager:dh,NamiPaywallManager:uh,NamiProfileManager:hh,NamiPurchaseManager:ch}),fh=function(){return c(function e(){o(this,e)},[{key:"getItem",value:function(e){try{return localStorage.getItem(e)}catch(e){return null}}},{key:"setItem",value:function(e,t){try{localStorage.setItem(e,t)}catch(e){}}},{key:"removeItem",value:function(e){try{localStorage.removeItem(e)}catch(e){}}},{key:"clear",value:function(){try{localStorage.clear()}catch(e){}}},{key:"getAllKeys",value:function(){try{return Object.keys(localStorage)}catch(e){return[]}}}])}();function vh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ph,gh={exports:{}};var yh=(ph||(ph=1,function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=n(18),a=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});t.push(0);var n=t[0],i=t[1];if(10===n)switch(i){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(n){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,i){void 0===i&&(i=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(n),o=Math.max(a,r),s=0,u=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(i&&(s=o-Math.min(a,r)),o-=1;o>=s;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===s)return 0;o-=1}else if(u[0][o]<u[1][o])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var a=e[n];if(t(a,n))return a}},e.assign=function(e){for(var t,n,i=e,a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(r));var s=function(){var e=r[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){i[t]=e[t]})};for(t=0,n=r.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=a,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(91))&&i.__esModule?i:{default:i},r=n(18);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var s=function(){function e(){}var t,n,i;return e.getParser=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new a.default(e,t,n)},e.parse=function(e,t){return void 0===t&&(t=null),new a.default(e,t).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return r.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return r.ENGINE_MAP}},{key:"OS_MAP",get:function(){return r.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return r.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),i&&o(t,i),e}();t.default=s,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=u(n(92)),a=u(n(93)),r=u(n(94)),o=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var i=!1;"boolean"==typeof t?(i=t,this._hints=n):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==i&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),n=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return n?n.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(a.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},i=0,a={},r=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(a[t]=o,r+=1):"object"==typeof o&&(n[t]=o,i+=1)}),i>0){var o=Object.keys(n),u=s.default.find(o,function(e){return t.isOS(e)});if(u){var l=this.satisfies(n[u]);if(void 0!==l)return l}var d=s.default.find(o,function(e){return t.isPlatform(e)});if(d){var c=this.satisfies(n[d]);if(void 0!==c)return c}}if(r>0){var h=Object.keys(a),m=s.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==m)return this.compareVersion(a[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(i);return t&&a&&(i=a.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(a,n,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=l,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},n=a.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},n=a.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},n=a.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},n=a.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},n=a.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},n=a.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},n=a.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},n=a.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},n=a.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},n=a.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},n=a.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},n=a.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},n=a.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},n=a.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},n=a.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},n=a.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},n=a.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},n=a.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},n=a.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},n=a.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=a.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=a.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=a.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=a.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=a.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},n=a.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=a.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},n=a.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),i=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),r=a.default.getFirstMatch(/se ([\d.]+)x/i,e),o=n||i||r;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=a.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var n={name:"DuckDuckGo"};if(t){var i=t.getBrandVersion("DuckDuckGo");if(i)return n.version=i,n}var r=a.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(n.version=r),n}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var n={name:"Brave"};if(t){var i=t.getBrandVersion("Brave");if(i)return n.version=i,n}return n}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=a.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:a.default.getFirstMatch(t,e),version:a.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=a.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:r.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=a.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=a.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=a.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},n=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=a.default.getMacOSVersionName(t),i={name:r.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=a.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:r.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=a.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=a.default.getAndroidVersionName(t),i={name:r.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:r.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=a.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||a.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||a.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=a.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=a.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:r.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:r.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=a.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:r.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=a.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=a.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:r.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=a.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:r.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:r.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,a=(i=n(17))&&i.__esModule?i:{default:i},r=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:r.ENGINE_MAP.Blink};var t=a.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:r.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:r.ENGINE_MAP.Trident},n=a.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},n=a.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},n=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:r.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:r.ENGINE_MAP.WebKit},n=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})}(gh)),gh.exports),bh=vh(yh),wh={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},kh={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4},Sh=function(){return c(function e(){o(this,e)},[{key:"getDeviceData",value:function(e){if("undefined"==typeof window)return{os_version:"X.X.X",os_name:"Server",browser_name:"Unknown",browser_version:"X.X.X",sdk_client:"web",sdk_version:Ae,language:"en"};var t=bh.getParser(window.navigator.userAgent),n=t.getPlatform(),i={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:Ae,language:window.navigator.language};if(n.type&&(i.form_factor=wh[n.type]),n.model&&(i.device_model=n.model),e&&e.length>0){var a=(e=>{var t=e.find(e=>e.includes(dn)),n={platform:"",version:""};if(t){var i=t.split(hn);n.platform=i[1],n.version=i[2]}return n})(e);i.extended_platform=a.platform,i.extended_platform_version=a.version}return i}},{key:"getDeviceFormFactor",value:function(){if("undefined"==typeof window)return"desktop";var e=bh.getParser(window.navigator.userAgent).getPlatform();return e.type&&wh[e.type]||"desktop"}},{key:"getDeviceScaleFactor",value:function(e){var t;if(e||(e=this.getDeviceFormFactor()),"television"!==e)return 1;var n=window,i=n.innerWidth,a=n.innerHeight,r=i.toString()+"x"+a.toString();return null!==(t=kh[r])&&void 0!==t?t:Math.min(i/1920,a/1080)||1}},{key:"getScreenInfo",value:function(){var e,t,n,i;return"undefined"==typeof window?{width:1920,height:1080,scale:1}:{width:null!==(e=null===(t=window.screen)||void 0===t?void 0:t.width)&&void 0!==e?e:window.innerWidth,height:null!==(n=null===(i=window.screen)||void 0===i?void 0:i.height)&&void 0!==n?n:window.innerHeight,scale:window.devicePixelRatio||1}}},{key:"getLanguage",value:function(){return"undefined"==typeof window?"en":window.navigator.language||"en"}},{key:"generateUUID",value:function(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}])}();function Eh(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}"function"==typeof SuppressedError&&SuppressedError;var Ph,Th,Mh,_h=globalThis,Ah=_h.ShadowRoot&&(void 0===_h.ShadyCSS||_h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Dh=Symbol(),xh=new WeakMap,Ch=function(){return c(function e(t,n,i){if(o(this,e),this._$cssResult$=!0,i!==Dh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Ah&&void 0===e){var n=void 0!==t&&1===t.length;n&&(e=xh.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&xh.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Ih=e=>new Ch("string"==typeof e?e:e+"",void 0,Dh),Lh=(e,...t)=>{var n=1===e.length?e[0]:t.reduce((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1],e[0]);return new Ch(n,e,Dh)},Rh=Ah?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,n="",i=h(e.cssRules);!(t=i()).done;){n+=t.value.cssText}return Ih(n)})(e):e,Fh=Object.is,Oh=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,$h=Object.getOwnPropertyNames,Wh=Object.getOwnPropertySymbols,jh=Object.getPrototypeOf,Bh=globalThis,zh=Bh.trustedTypes,Uh=zh?zh.emptyScript:"",Hh=Bh.reactiveElementPolyfillSupport,Gh=(e,t)=>e,Vh={toAttribute(e,t){switch(t){case Boolean:e=e?Uh:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Kh=(e,t)=>!Fh(e,t),Xh={attribute:!0,type:String,converter:Vh,reflect:!1,useDefault:!1,hasChanged:Kh};null!==(Ph=Symbol.metadata)&&void 0!==Ph||(Symbol.metadata=Symbol("metadata")),null!==(Th=Bh.litPropertyMetadata)&&void 0!==Th||(Bh.litPropertyMetadata=new WeakMap);var Yh,qh=function(e){function t(){var e;return o(this,t),(e=r(this,t))._$Ep=void 0,e.isUpdatePending=!1,e.hasUpdated=!1,e._$Em=null,e._$Ev(),e}return p(t,e),c(t,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}},{key:"addController",value:function(e){var t,n;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,n=h(this.constructor.elementProperties.keys());!(e=n()).done;){var i=e.value;this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Ah)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var n,i=h(t);!(n=i()).done;){var a=n.value,r=document.createElement("style"),o=_h.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}})(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}},{key:"attributeChangedCallback",value:function(e,t,n){this._$AK(e,n)}},{key:"_$ET",value:function(e,t){var n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){var a,r=(void 0!==(null===(a=n.converter)||void 0===a?void 0:a.toAttribute)?n.converter:Vh).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){var a,r,o,s=n.getPropertyOptions(i),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:Vh;this._$Em=i;var l=u.fromAttribute(t,s.type);this[i]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(i))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,n,i=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===i&&(a=this[e]),null!=n||(n=s.getPropertyOptions(e)),!((null!==(r=n.hasChanged)&&void 0!==r?r:Kh)(a,t)||n.useDefault&&n.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:n,reflect:i,wrapped:a},r){var o,s,u;n&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return k(function(n){for(;;)switch(n.p=n.n){case 0:return this.isUpdatePending=!0,n.p=1,n.n=2,a(this._$ES);case 2:n.n=4;break;case 3:n.p=3,t=n.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){n.n=5;break}return n.n=5,a(e);case 5:return n.a(2,!this.isUpdatePending)}},null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,n=h(this._$Ep);!(t=n()).done;){var i=t.value,a=i[0],r=i[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=h(o);!(s=u()).done;){var l=s.value,d=l[0],c=l[1],m=c.wrapped,f=this[d];!0!==m||this._$AL.has(d)||void 0===f||this.C(d,void 0,c,f)}}var v=!1,p=this._$AL;try{var g;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(g=this._$EO)&&void 0!==g&&g.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=Xh){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Oh(this.prototype,e,i)}}},{key:"getPropertyDescriptor",value:function(e,t,n){var i,a=null!==(i=Nh(this.prototype,e))&&void 0!==i?i:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var i=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:Xh}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Gh("elementProperties"))){var e=jh(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Gh("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Gh("properties")))for(var e=this.properties,t=0,n=[...$h(e),...Wh(e)];t<n.length;t++){var i=n[t];this.createProperty(i,e[i])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=h(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var c,m=h(this.elementProperties);!(c=m()).done;){var f=c.value,v=f[0],p=f[1],g=this._$Eu(v,p);void 0!==g&&this._$Eh.set(g,v)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var n,i=h(new Set(e.flat(1/0).reverse()));!(n=i()).done;){var a=n.value;t.unshift(Rh(a))}else void 0!==e&&t.push(Rh(e));return t}},{key:"_$Eu",value:function(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}}])}(_(HTMLElement));qh.elementStyles=[],qh.shadowRootOptions={mode:"open"},qh[Gh("elementProperties")]=new Map,qh[Gh("finalized")]=new Map,null!=Hh&&Hh({ReactiveElement:qh}),(null!==(Mh=Bh.reactiveElementVersions)&&void 0!==Mh?Mh:Bh.reactiveElementVersions=[]).push("2.1.2");var Jh=globalThis,Qh=e=>e,Zh=Jh.trustedTypes,em=Zh?Zh.createPolicy("lit-html",{createHTML:e=>e}):void 0,tm="$lit$",nm=`lit$${Math.random().toFixed(9).slice(2)}$`,im="?"+nm,am=`<${im}>`,rm=document,om=()=>rm.createComment(""),sm=e=>null===e||"object"!=typeof e&&"function"!=typeof e,um=Array.isArray,lm="[ \t\n\f\r]",dm=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,cm=/-->/g,hm=/>/g,mm=RegExp(`>|${lm}(?:([^\\s"'>=/]+)(${lm}*=${lm}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),fm=/'/g,vm=/"/g,pm=/^(?:script|style|textarea|title)$/i,gm=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),ym=gm(1),bm=gm(2),wm=Symbol.for("lit-noChange"),km=Symbol.for("lit-nothing"),Sm=new WeakMap,Em=rm.createTreeWalker(rm,129);function Pm(e,t){if(!um(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==em?em.createHTML(t):t}var Tm=function(){return c(function e({strings:t,_$litType$:n},i){var a;o(this,e),this.parts=[];var r=0,s=0,u=t.length-1,l=this.parts,d=((e,t)=>{for(var n,i=e.length-1,a=[],r=2===t?"<svg>":3===t?"<math>":"",o=dm,s=0;s<i;s++){for(var u=e[s],l=void 0,d=void 0,c=-1,h=0;h<u.length&&(o.lastIndex=h,null!==(d=o.exec(u)));)h=o.lastIndex,o===dm?"!--"===d[1]?o=cm:void 0!==d[1]?o=hm:void 0!==d[2]?(pm.test(d[2])&&(n=RegExp("</"+d[2],"g")),o=mm):void 0!==d[3]&&(o=mm):o===mm?">"===d[0]?(o=null!=n?n:dm,c=-1):void 0===d[1]?c=-2:(c=o.lastIndex-d[2].length,l=d[1],o=void 0===d[3]?mm:'"'===d[3]?vm:fm):o===vm||o===fm?o=mm:o===cm||o===hm?o=dm:(o=mm,n=void 0);var m=o===mm&&e[s+1].startsWith("/>")?" ":"";r+=o===dm?u+am:c>=0?(a.push(l),u.slice(0,c)+tm+u.slice(c)+nm+m):u+nm+(-2===c?s:m)}return[Pm(e,r+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),a]})(t,n),c=d[0],m=d[1];if(this.el=e.createElement(c,i),Em.currentNode=this.el.content,2===n||3===n){var f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;null!==(a=Em.nextNode())&&l.length<u;){if(1===a.nodeType){if(a.hasAttributes())for(var v,p=h(a.getAttributeNames());!(v=p()).done;){var g=v.value;if(g.endsWith(tm)){var y=m[s++],b=a.getAttribute(g).split(nm),w=/([.?@])?(.*)/.exec(y);l.push({type:1,index:r,name:w[2],strings:b,ctor:"."===w[1]?xm:"?"===w[1]?Cm:"@"===w[1]?Im:Dm}),a.removeAttribute(g)}else g.startsWith(nm)&&(l.push({type:6,index:r}),a.removeAttribute(g))}if(pm.test(a.tagName)){var k=a.textContent.split(nm),S=k.length-1;if(S>0){a.textContent=Zh?Zh.emptyScript:"";for(var E=0;E<S;E++)a.append(k[E],om()),Em.nextNode(),l.push({type:2,index:++r});a.append(k[S],om())}}}else if(8===a.nodeType)if(a.data===im)l.push({type:2,index:r});else for(var P=-1;-1!==(P=a.data.indexOf(nm,P+1));)l.push({type:7,index:r}),P+=nm.length-1;r++}},null,[{key:"createElement",value:function(e,t){var n=rm.createElement("template");return n.innerHTML=e,n}}])}();function Mm(e,t,n=e,i){var a,r,o,s,u;if(t===wm)return t;var l=void 0!==i?null===(a=n._$Co)||void 0===a?void 0:a[i]:n._$Cl,d=sm(t)?void 0:t._$litDirective$;return(null===(r=l)||void 0===r?void 0:r.constructor)!==d&&(null!==(o=l)&&void 0!==o&&null!==(s=o._$AO)&&void 0!==s&&s.call(o,!1),void 0===d?l=void 0:(l=new d(e))._$AT(e,n,i),void 0!==i?(null!==(u=n._$Co)&&void 0!==u?u:n._$Co=[])[i]=l:n._$Cl=l),void 0!==l&&(t=Mm(e,l._$AS(e,t.values),l,i)),t}var _m=function(){return c(function e(t,n){o(this,e),this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n},[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(e){var t,n=this._$AD,i=n.el.content,a=n.parts,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:rm).importNode(i,!0);Em.currentNode=r;for(var o=Em.nextNode(),s=0,u=0,l=a[0];void 0!==l;){var d;if(s===l.index){var c=void 0;2===l.type?c=new Am(o,o.nextSibling,this,e):1===l.type?c=new l.ctor(o,l.name,l.strings,this,e):6===l.type&&(c=new Lm(o,this,e)),this._$AV.push(c),l=a[++u]}s!==(null===(d=l)||void 0===d?void 0:d.index)&&(o=Em.nextNode(),s++)}return Em.currentNode=rm,r}},{key:"p",value:function(e){for(var t,n=0,i=h(this._$AV);!(t=i()).done;){var a=t.value;void 0!==a&&(void 0!==a.strings?(a._$AI(e,a,n),n+=a.strings.length-2):a._$AI(e[n])),n++}}}])}(),Am=function(){return c(function e(t,n,i,a){var r;o(this,e),this.type=2,this._$AH=km,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=i,this.options=a,this._$Cv=null===(r=null==a?void 0:a.isConnected)||void 0===r||r},[{key:"_$AU",get:function(){var e,t;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cv}},{key:"parentNode",get:function(){var e,t=this._$AA.parentNode,n=this._$AM;return void 0!==n&&11===(null===(e=t)||void 0===e?void 0:e.nodeType)&&(t=n.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(e,t=this){e=Mm(this,e,t),sm(e)?e===km||null==e||""===e?(this._$AH!==km&&this._$AR(),this._$AH=km):e!==this._$AH&&e!==wm&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>um(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.k(e):this._(e)}},{key:"O",value:function(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}},{key:"T",value:function(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}},{key:"_",value:function(e){this._$AH!==km&&sm(this._$AH)?this._$AA.nextSibling.data=e:this.T(rm.createTextNode(e)),this._$AH=e}},{key:"$",value:function(e){var t,n=e.values,i=e._$litType$,a="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Tm.createElement(Pm(i.h,i.h[0]),this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===a)this._$AH.p(n);else{var r=new _m(a,this),o=r.u(this.options);r.p(n),this.T(o),this._$AH=r}}},{key:"_$AC",value:function(e){var t=Sm.get(e.strings);return void 0===t&&Sm.set(e.strings,t=new Tm(e)),t}},{key:"k",value:function(e){um(this._$AH)||(this._$AH=[],this._$AR());for(var t,n,i=this._$AH,a=0,r=h(e);!(n=r()).done;){var o=n.value;a===i.length?i.push(t=new _k(this.O(om()),this.O(om()),this,this.options)):t=i[a],t._$AI(o),a++}a<i.length&&(this._$AR(t&&t._$AB.nextSibling,a),i.length=a)}},{key:"_$AR",value:function(e=this._$AA.nextSibling,t){for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e!==this._$AB;){var n,i=Qh(e).nextSibling;Qh(e).remove(),e=i}}},{key:"setConnected",value:function(e){var t;void 0===this._$AM&&(this._$Cv=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}])}(),Dm=function(){return c(function e(t,n,i,a,r){o(this,e),this.type=1,this._$AH=km,this._$AN=void 0,this.element=t,this.name=n,this._$AM=a,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=km},[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e,t=this,n,i){var a=this.strings,r=!1;if(void 0===a)e=Mm(this,e,t,0),(r=!sm(e)||e!==this._$AH&&e!==wm)&&(this._$AH=e);else{var o,s,u=e;for(e=a[0],o=0;o<a.length-1;o++)(s=Mm(this,u[n+o],t,o))===wm&&(s=this._$AH[o]),r||(r=!sm(s)||s!==this._$AH[o]),s===km?e=km:e!==km&&(e+=(null!=s?s:"")+a[o+1]),this._$AH[o]=s}r&&!i&&this.j(e)}},{key:"j",value:function(e){e===km?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}])}(),xm=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).type=3,e}return p(t,e),c(t,[{key:"j",value:function(e){this.element[this.name]=e===km?void 0:e}}])}(Dm),Cm=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).type=4,e}return p(t,e),c(t,[{key:"j",value:function(e){this.element.toggleAttribute(this.name,!!e&&e!==km)}}])}(Dm),Im=function(e){function t(e,n,i,a,s){var u;return o(this,t),(u=r(this,t,[e,n,i,a,s])).type=5,u}return p(t,e),c(t,[{key:"_$AI",value:function(e,t=this){var n;if((e=null!==(n=Mm(this,e,t,0))&&void 0!==n?n:km)!==wm){var i=this._$AH,a=e===km&&i!==km||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==km&&(i===km||a);a&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}}},{key:"handleEvent",value:function(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(t=null===(n=this.options)||void 0===n?void 0:n.host)&&void 0!==t?t:this.element,e):this._$AH.handleEvent(e)}}])}(Dm),Lm=function(){return c(function e(t,n,i){o(this,e),this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i},[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){Mm(this,e)}}])}(),Rm={I:Am},Fm=Jh.litHtmlPolyfillSupport;null!=Fm&&Fm(Tm,Am),(null!==(Yh=Jh.litHtmlVersions)&&void 0!==Yh?Yh:Jh.litHtmlVersions=[]).push("3.3.3");var Om,Nm,$m=globalThis,Wm=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).renderOptions={host:i(e)},e._$Do=void 0,e}return p(t,e),c(t,[{key:"createRenderRoot",value:function(){var e,n,i=T(t,"createRenderRoot",this,3)([]);return null!==(n=(e=this.renderOptions).renderBefore)&&void 0!==n||(e.renderBefore=i.firstChild),i}},{key:"update",value:function(e){var n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),T(t,"update",this,3)([e]),this._$Do=((e,t,n)=>{var i,a=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t,r=a._$litPart$;if(void 0===r){var o,s=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:null;a._$litPart$=r=new Am(t.insertBefore(om(),s),s,void 0,null!=n?n:{})}return r._$AI(e),r})(n,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var e;T(t,"connectedCallback",this,3)([]),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var e;T(t,"disconnectedCallback",this,3)([]),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}},{key:"render",value:function(){return wm}}])}(qh);Wm._$litElement$=!0,Wm.finalized=!0,null===(Om=$m.litElementHydrateSupport)||void 0===Om||Om.call($m,{LitElement:Wm});var jm=$m.litElementPolyfillSupport;null==jm||jm({LitElement:Wm}),(null!==(Nm=$m.litElementVersions)&&void 0!==Nm?Nm:$m.litElementVersions=[]).push("4.2.2");var Bm,zm,Um=Lh(Bm||(Bm=(e=>e)`
|
|
2
2
|
/* ——— keyframes ——— */
|
|
3
3
|
@keyframes nami-slide-up {
|
|
4
4
|
from { transform: translateY(100%); }
|
|
@@ -485,10 +485,21 @@
|
|
|
485
485
|
>
|
|
486
486
|
${0}
|
|
487
487
|
</div>
|
|
488
|
-
`),this.isCollapsed?"Expand":"Collapse",!this.isCollapsed,this._handleClick,xk(this.contextProvider,n,this.scaleFactor,this.inFocusedState,this.minSDKVersion),this.isCollapsed,this.isCollapsed?"-1":"0",o)}}])}(yw);Eh([Xm({type:Object})],aV.prototype,"component",void 0),Eh([Xm({type:Boolean})],aV.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],aV.prototype,"height",void 0),Eh([Xm({type:Number})],aV.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],aV.prototype,"minSDKVersion",void 0),aV=Eh([Gm("nami-collapse-container")],aV);var rV=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e.mouseDown=!1,e.startDragging=t=>{t.preventDefault(),e.mouseDown=!0,e.startX=t.pageX-e.offsetLeft},e.stopDragging=()=>{e.mouseDown=!1},e.move=t=>{t.preventDefault(),e.mouseDown&&(e.scrollLeft=e.scrollLeft-(t.pageX-e.offsetLeft-e.startX))},e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),this.addEventListener("mousemove",this.move,!1),this.addEventListener("mousedown",this.startDragging,!1),this.addEventListener("mouseup",this.stopDragging,!1),this.addEventListener("mouseleave",this.stopDragging,!1)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),this.removeEventListener("mousemove",this.move,!1),this.removeEventListener("mousedown",this.startDragging,!1),this.removeEventListener("mouseup",this.stopDragging,!1),this.removeEventListener("mouseleave",this.stopDragging,!1)}},{key:"styles",value:function(){var e="vertical"===this.component.direction,t=e?"margin-top":"margin-left",
|
|
488
|
+
`),this.isCollapsed?"Expand":"Collapse",!this.isCollapsed,this._handleClick,xk(this.contextProvider,n,this.scaleFactor,this.inFocusedState,this.minSDKVersion),this.isCollapsed,this.isCollapsed?"-1":"0",o)}}])}(yw);Eh([Xm({type:Object})],aV.prototype,"component",void 0),Eh([Xm({type:Boolean})],aV.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],aV.prototype,"height",void 0),Eh([Xm({type:Number})],aV.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],aV.prototype,"minSDKVersion",void 0),aV=Eh([Gm("nami-collapse-container")],aV);var rV,oV,sV=e=>e,uV=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e.mouseDown=!1,e.startDragging=t=>{t.preventDefault(),e.mouseDown=!0,e.startX=t.pageX-e.offsetLeft},e.stopDragging=()=>{e.mouseDown=!1},e.move=t=>{t.preventDefault(),e.mouseDown&&(e.scrollLeft=e.scrollLeft-(t.pageX-e.offsetLeft-e.startX))},e._rowMouseDown=!1,e._rowStartX=0,e._rowStartDragging=t=>{t.preventDefault(),e._rowMouseDown=!0,e._rowStartX=t.pageX},e._rowStopDragging=()=>{e._rowMouseDown=!1},e._rowMove=t=>{(t.preventDefault(),e._rowMouseDown)&&(t.currentTarget.scrollLeft-=t.pageX-e._rowStartX,e._rowStartX=t.pageX)},e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),this.addEventListener("mousemove",this.move,!1),this.addEventListener("mousedown",this.startDragging,!1),this.addEventListener("mouseup",this.stopDragging,!1),this.addEventListener("mouseleave",this.stopDragging,!1)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),this.removeEventListener("mousemove",this.move,!1),this.removeEventListener("mousedown",this.startDragging,!1),this.removeEventListener("mouseup",this.stopDragging,!1),this.removeEventListener("mouseleave",this.stopDragging,!1)}},{key:"isGroupedHorizontal",value:function(){return"horizontal"===this.component.direction&&!!this.component.groupBy&&!!this.component.groupHeaderTemplate}},{key:"styles",value:function(){var e="vertical"===this.component.direction,t=this.isGroupedHorizontal(),n=e?"margin-top":"margin-left",i=this.component.spacing?this.component.spacing*this.scaleFactor:0;return Ih(t?`\n :host {\n display: ${this.component.hidden?"none":"flex"};\n flex-direction: column;\n overflow: visible;\n ${Lw(this.component,!1)}\n ${Kw(this.component,!1)}\n align-self: baseline;\n }\n :host(:focus) {\n ${Lw(this.component,!0)}\n ${Kw(this.component,!0)}\n }\n :host(:focus-visible) {\n ${Qw(this.component)}\n }\n .nami-group-header {\n width: 100%;\n }\n .nami-group-items-row {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: flex-start;\n overflow-x: auto;\n width: 100%;\n cursor: -webkit-grab;\n cursor: grab;\n gap: ${i}px;\n }\n .nami-group-items-row > * {\n flex: 0 0 auto;\n }\n `:`\n :host {\n display: ${this.component.hidden?"none":"flex"};\n flex-direction: ${e?"column":"row"};\n flex-wrap: ${e?"nowrap":"wrap"};\n overflow: auto;\n align-items: center;\n justify-content: center;\n ${Lw(this.component,!1)}\n ${Kw(this.component,!1)}\n align-self: baseline;\n cursor: -webkit-grab;\n cursor: grab;\n }\n :host(:focus){\n ${Lw(this.component,!0)}\n ${Kw(this.component,!0)}\n }\n :host(:focus-visible){\n ${Qw(this.component)}\n }\n @supports not (display: grid) {\n :host > *:not(:first-child) {\n ${n}: ${i}px;\n }\n }\n @supports (display: grid) {\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-row-gap: ${i}px;\n grid-column-gap: ${i}px;\n grid-gap: ${i}px;\n grid-auto-flow: ${e?"row":"column"};\n align-items: center;\n justify-items: center;\n place-items: center;\n }\n :host > * {\n margin: 0;\n }\n }\n `)}},{key:"render",value:function(){var e=this.component,t=e.focusedBorderColor,n=e.focusedFillColor,i=e.fillColor;!t&&ig(i,n)||(this.tabIndex=0);var a=e=>xk(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion);return this.isGroupedHorizontal()?Kp(this.contextProvider,this.component).map(e=>ym(rV||(rV=sV`
|
|
489
|
+
${0}
|
|
490
|
+
<div
|
|
491
|
+
class="nami-group-items-row"
|
|
492
|
+
@mousedown=${0}
|
|
493
|
+
@mousemove=${0}
|
|
494
|
+
@mouseup=${0}
|
|
495
|
+
@mouseleave=${0}
|
|
496
|
+
>
|
|
497
|
+
${0}
|
|
498
|
+
</div>
|
|
499
|
+
`),e.header?ym(oV||(oV=sV`<div class="nami-group-header">${0}</div>`),e.header.map(a)):null,this._rowStartDragging,this._rowMove,this._rowStopDragging,this._rowStopDragging,e.items.map(e=>e.map(a)))):(this.contextProvider,Kp(0,this.component).flatMap(e=>e.header?[e.header,...e.items]:e.items)).map(e=>e.map(e=>xk(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))}}])}(yw);Eh([Xm({type:Object})],uV.prototype,"component",void 0),Eh([Xm({type:Boolean})],uV.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],uV.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],uV.prototype,"minSDKVersion",void 0),uV=Eh([Gm("nami-responsive-grid")],uV);var lV,dV,cV=e=>e,hV=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return p(t,e),c(t,[{key:"styles",value:function(){var e,t,n,i,a=Math.max(1,null!==(e=this.component.columns)&&void 0!==e?e:2),r=(null!==(t=this.component.columnSpacing)&&void 0!==t?t:0)*this.scaleFactor,o=(null!==(n=this.component.rowSpacing)&&void 0!==n?n:0)*this.scaleFactor,s=null!==(i=this.component.itemAlignment)&&void 0!==i?i:"start";return Ih(`\n :host {\n display: ${this.component.hidden?"none":"grid"};\n grid-template-columns: repeat(${a}, 1fr);\n column-gap: ${r}px;\n row-gap: ${o}px;\n justify-items: ${s};\n ${Lw(this.component,!1)}\n ${Kw(this.component,!1)}\n }\n .nami-group-header {\n grid-column: 1 / -1;\n justify-self: stretch;\n }\n :host(:focus) {\n ${Lw(this.component,!0)}\n ${Kw(this.component,!0)}\n }\n :host(:focus-visible) {\n ${Qw(this.component)}\n }\n `)}},{key:"render",value:function(){var e=this.component,t=e.focusedBorderColor,n=e.focusedFillColor,i=e.fillColor;!t&&ig(i,n)||(this.tabIndex=0);var a=e=>xk(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion);return Kp(this.contextProvider,this.component).map(e=>ym(lV||(lV=cV`
|
|
489
500
|
${0}
|
|
490
501
|
${0}
|
|
491
|
-
`),e.header?ym(sV||(sV=uV`<div class="nami-group-header">${0}</div>`),e.header.map(a)):null,e.items.map(e=>e.map(a))))}}])}(yw);function dV(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function cV(e={},t={}){var n=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>n.indexOf(e)<0).forEach(n=>{void 0===e[n]?e[n]=t[n]:dV(t[n])&&dV(e[n])&&Object.keys(t[n]).length>0&&cV(e[n],t[n])})}Eh([Xm({type:Object})],lV.prototype,"component",void 0),Eh([Xm({type:Boolean})],lV.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],lV.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],lV.prototype,"minSDKVersion",void 0),lV=Eh([Gm("nami-repeating-grid")],lV);var hV={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function mV(){var e="undefined"!=typeof document?document:{};return cV(e,hV),e}var fV,vV,pV,gV={document:hV,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function yV(){var e="undefined"!=typeof window?window:{};return cV(e,gV),e}function bV(e,t=0){return setTimeout(e,t)}function wV(){return Date.now()}function kV(e,t="x"){var n,i,a,r=yV(),o=function(e){var t,n=yV();return n.getComputedStyle&&(t=n.getComputedStyle(e,null)),!t&&e.currentStyle&&(t=e.currentStyle),t||(t=e.style),t}(e);return r.WebKitCSSMatrix?((i=o.transform||o.webkitTransform).split(",").length>6&&(i=i.split(", ").map(e=>e.replace(",",".")).join(", ")),a=new r.WebKitCSSMatrix("none"===i?"":i)):n=(a=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=r.WebKitCSSMatrix?a.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===t&&(i=r.WebKitCSSMatrix?a.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),i||0}function SV(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function EV(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function PV(...e){for(var t=Object(e[0]),n=1;n<e.length;n+=1){var i=e[n];if(null!=i&&!EV(i))for(var a=Object.keys(Object(i)).filter(e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e),r=0,o=a.length;r<o;r+=1){var s=a[r],u=Object.getOwnPropertyDescriptor(i,s);void 0!==u&&u.enumerable&&(SV(t[s])&&SV(i[s])?i[s].__swiper__?t[s]=i[s]:PV(t[s],i[s]):!SV(t[s])&&SV(i[s])?(t[s]={},i[s].__swiper__?t[s]=i[s]:PV(t[s],i[s])):t[s]=i[s])}}return t}function TV(e,t,n){e.style.setProperty(t,n)}function MV({swiper:e,targetPosition:t,side:n}){var i,a=yV(),r=-e.translate,o=null,s=e.params.speed;e.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(e.cssModeFrameID);var u=t>r?"next":"prev",l=(e,t)=>"next"===u&&e>=t||"prev"===u&&e<=t,d=()=>{i=(new Date).getTime(),null===o&&(o=i);var u=Math.max(Math.min((i-o)/s,1),0),c=.5-Math.cos(u*Math.PI)/2,h=r+c*(t-r);if(l(h,t)&&(h=t),e.wrapperEl.scrollTo({[n]:h}),l(h,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:h})}),void a.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=a.requestAnimationFrame(d)};d()}function _V(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function AV(e,t=""){var n=yV(),i=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&i.push(...e.assignedElements()),t?i.filter(e=>e.matches(t)):i}function DV(e){try{return void console.warn(e)}catch(e){}}function xV(e,t=[]){var n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}(t)),n}function CV(e,t){return yV().getComputedStyle(e,null).getPropertyValue(t)}function IV(e){var t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function LV(e,t){for(var n=[],i=e.parentElement;i;)t?i.matches(t)&&n.push(i):n.push(i),i=i.parentElement;return n}function RV(e,t,n){var i=yV();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function FV(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function OV(e,t=""){"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function NV(){return fV||(fV=function(){var e=yV(),t=mV();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),fV}function $V(e={}){return vV||(vV=function({userAgent:e}={}){var t=NV(),n=yV(),i=n.navigator.platform,a=e||n.navigator.userAgent,r={ios:!1,android:!1},o=n.screen.width,s=n.screen.height,u=a.match(/(Android);?[\s\/]+([\d.]+)?/),l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/),d=a.match(/(iPod)(.*OS\s([\d_]+))?/),c=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i,m="MacIntel"===i;return!l&&m&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${s}`)>=0&&((l=a.match(/(Version)\/([\d.]+)/))||(l=[0,1,"13_0_0"]),m=!1),u&&!h&&(r.os="android",r.android=!0),(l||c||d)&&(r.os="ios",r.ios=!0),r}(e)),vV}function WV(){return pV||(pV=function(){var e=yV(),t=$V(),n=!1;function i(){var t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){var a=String(e.navigator.userAgent);if(a.includes("Version/")){var r=a.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e)),o=r[0],s=r[1];n=o<16||16===o&&s<2}}var u=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),l=i();return{isSafari:n||l,needPerspectiveFix:n,need3dFix:l||u&&t.ios,isWebView:u}}()),pV}var jV={on(e,t,n){var i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;var a=n?"unshift":"push";return e.split(" ").forEach(e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)}),i},once(e,t,n){var i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function a(...n){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(i,n)}return a.__emitterProxy=t,i.on(e,a,n)},onAny(e,t){var n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;var i=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[i](e),n},offAny(e){var t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;var n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){var n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((i,a)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[e].splice(a,1)})}),n):n},emit(...e){var t,n,i,a=this;return!a.eventsListeners||a.destroyed?a:a.eventsListeners?("string"==typeof e[0]||Array.isArray(e[0])?(t=e[0],n=e.slice(1,e.length),i=a):(t=e[0].events,n=e[0].data,i=e[0].context||a),n.unshift(i),(Array.isArray(t)?t:t.split(" ")).forEach(e=>{a.eventsAnyListeners&&a.eventsAnyListeners.length&&a.eventsAnyListeners.forEach(t=>{t.apply(i,[e,...n])}),a.eventsListeners&&a.eventsListeners[e]&&a.eventsListeners[e].forEach(e=>{e.apply(i,n)})}),a):a}};var BV=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};var zV=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};var UV=(e,t)=>{if(e&&!e.destroyed&&e.params){var n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){var i=n.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(n.shadowRoot?i=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(i=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`))&&!i.lazyPreloaderManaged&&i.remove()})),i&&!i.lazyPreloaderManaged&&i.remove()}}},HV=(e,t)=>{if(e.slides[t]){var n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")}},GV=e=>{if(e&&!e.destroyed&&e.params){var t=e.params.lazyPreloadPrevNext,n=e.slides.length;if(n&&t&&!(t<0)){t=Math.min(t,n);var i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){var r=a,o=[r-t];return o.push(...Array.from({length:t}).map((e,t)=>r+i+t)),void e.slides.forEach((t,n)=>{o.includes(t.column)&&HV(e,n)})}var s=a+i-1;if(e.params.rewind||e.params.loop)for(var u=a-t;u<=s+t;u+=1){var l=(u%n+n)%n;(l<a||l>s)&&HV(e,l)}else for(var d=Math.max(a-t,0);d<=Math.min(s+t,n-1);d+=1)d!==a&&(d>s||d<a)&&HV(e,d)}}};var VV={updateSize:function(){var e,t,n=this,i=n.el;e=void 0!==n.params.width&&null!==n.params.width?n.params.width:i.clientWidth,t=void 0!==n.params.height&&null!==n.params.height?n.params.height:i.clientHeight,0===e&&n.isHorizontal()||0===t&&n.isVertical()||(e=e-parseInt(CV(i,"padding-left")||0,10)-parseInt(CV(i,"padding-right")||0,10),t=t-parseInt(CV(i,"padding-top")||0,10)-parseInt(CV(i,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(n,{width:e,height:t,size:n.isHorizontal()?e:t}))},updateSlides:function(){var e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}var n=e.params,i=e.wrapperEl,a=e.slidesEl,r=e.rtlTranslate,o=e.wrongRTL,s=e.virtual&&n.virtual.enabled,u=s?e.virtual.slides.length:e.slides.length,l=AV(a,`.${e.params.slideClass}, swiper-slide`),d=s?e.virtual.slides.length:l.length,c=[],h=[],m=[],f=n.slidesOffsetBefore;"function"==typeof f&&(f=n.slidesOffsetBefore.call(e));var v=n.slidesOffsetAfter;"function"==typeof v&&(v=n.slidesOffsetAfter.call(e));var p=e.snapGrid.length,g=e.slidesGrid.length,y=e.size-f-v,b=n.spaceBetween,w=-f,k=0,S=0;if(void 0!==y){"string"==typeof b&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*y:"string"==typeof b&&(b=parseFloat(b)),e.virtualSize=-b-f-v,l.forEach(e=>{r?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(TV(i,"--swiper-centered-offset-before",""),TV(i,"--swiper-centered-offset-after","")),n.cssMode&&(TV(i,"--swiper-slides-offset-before",`${f}px`),TV(i,"--swiper-slides-offset-after",`${v}px`));var E,P=n.grid&&n.grid.rows>1&&e.grid;P?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();for(var T="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter(e=>void 0!==n.breakpoints[e].slidesPerView).length>0,M=0;M<d;M+=1){E=0;var _=l[M];if(!_||(P&&e.grid.updateSlide(M,_,l),"none"!==CV(_,"display"))){if(s&&"auto"===n.slidesPerView)n.virtual.slidesPerViewAutoSlideSize&&(E=n.virtual.slidesPerViewAutoSlideSize),E&&_&&(n.roundLengths&&(E=Math.floor(E)),_.style[e.getDirectionLabel("width")]=`${E}px`);else if("auto"===n.slidesPerView){T&&(_.style[e.getDirectionLabel("width")]="");var A=getComputedStyle(_),D=_.style.transform,x=_.style.webkitTransform;if(D&&(_.style.transform="none"),x&&(_.style.webkitTransform="none"),n.roundLengths)E=e.isHorizontal()?RV(_,"width"):RV(_,"height");else{var C=t(A,"width"),I=t(A,"padding-left"),L=t(A,"padding-right"),R=t(A,"margin-left"),F=t(A,"margin-right"),O=A.getPropertyValue("box-sizing");if(O&&"border-box"===O)E=C+R+F;else{var N=_.clientWidth;E=C+I+L+R+F+(_.offsetWidth-N)}}D&&(_.style.transform=D),x&&(_.style.webkitTransform=x),n.roundLengths&&(E=Math.floor(E))}else E=(y-(n.slidesPerView-1)*b)/n.slidesPerView,n.roundLengths&&(E=Math.floor(E)),_&&(_.style[e.getDirectionLabel("width")]=`${E}px`);_&&(_.swiperSlideSize=E),m.push(E),n.centeredSlides?(w=w+E/2+k/2+b,0===k&&0!==M&&(w=w-y/2-b),0===M&&(w=w-y/2-b),Math.abs(w)<.001&&(w=0),n.roundLengths&&(w=Math.floor(w)),S%n.slidesPerGroup===0&&c.push(w),h.push(w)):(n.roundLengths&&(w=Math.floor(w)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&c.push(w),h.push(w),w=w+E+b),e.virtualSize+=E+b,k=E,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,y)+v,r&&o&&("slide"===n.effect||"coverflow"===n.effect)&&(i.style.width=`${e.virtualSize+b}px`),n.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),P&&e.grid.updateWrapperSize(E,c),!n.centeredSlides){var $="auto"!==n.slidesPerView&&n.slidesPerView%1!=0,W=n.snapToSlideEdge&&!n.loop&&("auto"===n.slidesPerView||$),j=c.length;if(W){var B;if("auto"===n.slidesPerView){B=1;for(var z=0,U=m.length-1;U>=0&&(z+=m[U]+(U<m.length-1?b:0))<=y;U-=1)B=m.length-U}else B=Math.floor(n.slidesPerView);j=Math.max(d-B,0)}for(var H=[],G=0;G<c.length;G+=1){var V=c[G];n.roundLengths&&(V=Math.floor(V)),W?G<=j&&H.push(V):c[G]<=e.virtualSize-y&&H.push(V)}c=H,Math.floor(e.virtualSize-y)-Math.floor(c[c.length-1])>1&&(W||c.push(e.virtualSize-y))}if(s&&n.loop){var K=m[0]+b;if(n.slidesPerGroup>1)for(var X=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),Y=K*n.slidesPerGroup,q=0;q<X;q+=1)c.push(c[c.length-1]+Y);for(var J=0;J<e.virtual.slidesBefore+e.virtual.slidesAfter;J+=1)1===n.slidesPerGroup&&c.push(c[c.length-1]+K),h.push(h[h.length-1]+K),e.virtualSize+=K}if(0===c.length&&(c=[0]),0!==b){var Q=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");l.filter((e,t)=>!(n.cssMode&&!n.loop)||t!==l.length-1).forEach(e=>{e.style[Q]=`${b}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){var Z=0;m.forEach(e=>{Z+=e+(b||0)});var ee=(Z-=b)>y?Z-y:0;c=c.map(e=>e<=0?-f:e>ee?ee+v:e)}if(n.centerInsufficientSlides){var te=0;if(m.forEach(e=>{te+=e+(b||0)}),(te-=b)<y){var ne=(y-te)/2;c.forEach((e,t)=>{c[t]=e-ne}),h.forEach((e,t)=>{h[t]=e+ne})}}if(Object.assign(e,{slides:l,snapGrid:c,slidesGrid:h,slidesSizesGrid:m}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){TV(i,"--swiper-centered-offset-before",-c[0]+"px"),TV(i,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");var ie=-e.snapGrid[0],ae=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+ie),e.slidesGrid=e.slidesGrid.map(e=>e+ae)}if(d!==u&&e.emit("slidesLengthChange"),c.length!==p&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(s||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){var re=`${n.containerModifierClass}backface-hidden`,oe=e.el.classList.contains(re);d<=n.maxBackfaceHiddenSlides?oe||e.el.classList.add(re):oe&&e.el.classList.remove(re)}}},updateAutoHeight:function(e){var t,n=this,i=[],a=n.virtual&&n.params.virtual.enabled,r=0;"number"==typeof e?n.setTransition(e):!0===e&&n.setTransition(n.params.speed);var o=e=>a?n.slides[n.getSlideIndexByData(e)]:n.slides[e];if("auto"!==n.params.slidesPerView&&n.params.slidesPerView>1)if(n.params.centeredSlides)(n.visibleSlides||[]).forEach(e=>{i.push(e)});else for(t=0;t<Math.ceil(n.params.slidesPerView);t+=1){var s=n.activeIndex+t;if(s>n.slides.length&&!a)break;i.push(o(s))}else i.push(o(n.activeIndex));for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var u=i[t].offsetHeight;r=u>r?u:r}(r||0===r)&&(n.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){for(var e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0,i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){var t=this,n=t.params,i=t.slides,a=t.rtlTranslate,r=t.snapGrid;if(0!==i.length){void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();var o=-e;a&&(o=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];var s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(var u=0;u<i.length;u+=1){var l=i[u],d=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(d-=i[0].swiperSlideOffset);var c=(o+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),h=(o-r[0]+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),m=-(o-d),f=m+t.slidesSizesGrid[u],v=m>=0&&m<=t.size-t.slidesSizesGrid[u],p=m>=0&&m<t.size-1||f>1&&f<=t.size||m<=0&&f>=t.size;p&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(u)),BV(l,p,n.slideVisibleClass),BV(l,v,n.slideFullyVisibleClass),l.progress=a?-c:c,l.originalProgress=a?-h:h}}},updateProgress:function(e){var t=this;if(void 0===e){var n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}var i=t.params,a=t.maxTranslate()-t.minTranslate(),r=t.progress,o=t.isBeginning,s=t.isEnd,u=t.progressLoop,l=o,d=s;if(0===a)r=0,o=!0,s=!0;else{r=(e-t.minTranslate())/a;var c=Math.abs(e-t.minTranslate())<1,h=Math.abs(e-t.maxTranslate())<1;o=c||r<=0,s=h||r>=1,c&&(r=0),h&&(r=1)}if(i.loop){var m=t.getSlideIndexByData(0),f=t.getSlideIndexByData(t.slides.length-1),v=t.slidesGrid[m],p=t.slidesGrid[f],g=t.slidesGrid[t.slidesGrid.length-1],y=Math.abs(e);(u=y>=v?(y-v)/g:(y+g-p)/g)>1&&(u-=1)}Object.assign(t,{progress:r,progressLoop:u,isBeginning:o,isEnd:s}),(i.watchSlidesProgress||i.centeredSlides&&i.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!d&&t.emit("reachEnd toEdge"),(l&&!o||d&&!s)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){var e,t,n,i=this,a=i.slides,r=i.params,o=i.slidesEl,s=i.activeIndex,u=i.virtual&&r.virtual.enabled,l=i.grid&&r.grid&&r.grid.rows>1,d=e=>AV(o,`.${r.slideClass}${e}, swiper-slide${e}`)[0];if(u)if(r.loop){var c=s-i.virtual.slidesBefore;c<0&&(c=i.virtual.slides.length+c),c>=i.virtual.slides.length&&(c-=i.virtual.slides.length),e=d(`[data-swiper-slide-index="${c}"]`)}else e=d(`[data-swiper-slide-index="${s}"]`);else l?(e=a.find(e=>e.column===s),n=a.find(e=>e.column===s+1),t=a.find(e=>e.column===s-1)):e=a[s];e&&(l||(n=function(e,t){for(var n=[];e.nextElementSibling;){var i=e.nextElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(e,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!n&&(n=a[0]),t=function(e,t){for(var n=[];e.previousElementSibling;){var i=e.previousElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(e,`.${r.slideClass}, swiper-slide`)[0],r.loop&&0===!t&&(t=a[a.length-1]))),a.forEach(i=>{zV(i,i===e,r.slideActiveClass),zV(i,i===n,r.slideNextClass),zV(i,i===t,r.slidePrevClass)}),i.emitSlidesClasses()},updateActiveIndex:function(e){var t,n=this,i=n.rtlTranslate?n.translate:-n.translate,a=n.snapGrid,r=n.params,o=n.activeIndex,s=n.realIndex,u=n.snapIndex,l=e,d=e=>{var t=e-n.virtual.slidesBefore;return t<0&&(t=n.virtual.slides.length+t),t>=n.virtual.slides.length&&(t-=n.virtual.slides.length),t};if(void 0===l&&(l=function(e){for(var t,n=e.slidesGrid,i=e.params,a=e.rtlTranslate?e.translate:-e.translate,r=0;r<n.length;r+=1)void 0!==n[r+1]?a>=n[r]&&a<n[r+1]-(n[r+1]-n[r])/2?t=r:a>=n[r]&&a<n[r+1]&&(t=r+1):a>=n[r]&&(t=r);return i.normalizeSlideIndex&&(t<0||void 0===t)&&(t=0),t}(n)),a.indexOf(i)>=0)t=a.indexOf(i);else{var c=Math.min(r.slidesPerGroupSkip,l);t=c+Math.floor((l-c)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),l!==o||n.params.loop)if(l===o&&n.params.loop&&n.virtual&&n.params.virtual.enabled)n.realIndex=d(l);else{var h,m=n.grid&&r.grid&&r.grid.rows>1;if(n.virtual&&r.virtual.enabled)h=r.loop?d(l):l;else if(m){var f=n.slides.find(e=>e.column===l),v=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(v)&&(v=Math.max(n.slides.indexOf(f),0)),h=Math.floor(v/r.grid.rows)}else if(n.slides[l]){var p=n.slides[l].getAttribute("data-swiper-slide-index");h=p?parseInt(p,10):l}else h=l;Object.assign(n,{previousSnapIndex:u,snapIndex:t,previousRealIndex:s,realIndex:h,previousIndex:o,activeIndex:l}),n.initialized&&GV(n),n.emit("activeIndexChange"),n.emit("snapIndexChange"),(n.initialized||n.params.runCallbacksOnInit)&&(s!==h&&n.emit("realIndexChange"),n.emit("slideChange"))}else t!==u&&(n.snapIndex=t,n.emit("snapIndexChange"))},updateClickedSlide:function(e,t){var n=this,i=n.params,a=e.closest(`.${i.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!a&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(a=e)});var r,o=!1;if(a)for(var s=0;s<n.slides.length;s+=1)if(n.slides[s]===a){o=!0,r=s;break}if(!a||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=r,i.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var KV={getTranslate:function(e=(this.isHorizontal()?"x":"y")){var t=this,n=t.params,i=t.rtlTranslate,a=t.translate,r=t.wrapperEl;if(n.virtualTranslate)return i?-a:a;if(n.cssMode)return a;var o=kV(r,e);return o+=t.cssOverflowAdjustment(),i&&(o=-o),o||0},setTranslate:function(e,t){var n=this,i=n.rtlTranslate,a=n.params,r=n.wrapperEl,o=n.progress,s=0,u=0;n.isHorizontal()?s=i?-e:e:u=e,a.roundLengths&&(s=Math.floor(s),u=Math.floor(u)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?s:u,a.cssMode?r[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-s:-u:a.virtualTranslate||(n.isHorizontal()?s-=n.cssOverflowAdjustment():u-=n.cssOverflowAdjustment(),r.style.transform=`translate3d(${s}px, ${u}px, 0px)`);var l=n.maxTranslate()-n.minTranslate();(0===l?0:(e-n.minTranslate())/l)!==o&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,n=!0,i=!0,a){var r=this,o=r.params,s=r.wrapperEl;if(r.animating&&o.preventInteractionOnTransition)return!1;var u,l=r.minTranslate(),d=r.maxTranslate();if(u=i&&e>l?l:i&&e<d?d:e,r.updateProgress(u),o.cssMode){var c=r.isHorizontal();if(0===t)s[c?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return MV({swiper:r,targetPosition:-u,side:c?"left":"top"}),!0;s.scrollTo({[c?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,n&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function XV({swiper:e,runCallbacks:t,direction:n,step:i}){var a=e.activeIndex,r=e.previousIndex,o=n;o||(o=a>r?"next":a<r?"prev":"reset"),e.emit(`transition${i}`),t&&"reset"===o?e.emit(`slideResetTransition${i}`):t&&a!==r&&(e.emit(`slideChangeTransition${i}`),"next"===o?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`))}var YV={slideTo:function(e=0,t,n=!0,i,a){"string"==typeof e&&(e=parseInt(e,10));var r=this,o=e;o<0&&(o=0);var s=r.params,u=r.snapGrid,l=r.slidesGrid,d=r.previousIndex,c=r.activeIndex,h=r.rtlTranslate,m=r.wrapperEl;if(!r.enabled&&!i&&!a||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);var f=Math.min(r.params.slidesPerGroupSkip,o),v=f+Math.floor((o-f)/r.params.slidesPerGroup);v>=u.length&&(v=u.length-1);var p,g=-u[v];if(s.normalizeSlideIndex)for(var y=0;y<l.length;y+=1){var b=-Math.floor(100*g),w=Math.floor(100*l[y]),k=Math.floor(100*l[y+1]);void 0!==l[y+1]?b>=w&&b<k-(k-w)/2?o=y:b>=w&&b<k&&(o=y+1):b>=w&&(o=y)}if(r.initialized&&o!==c){if(!r.allowSlideNext&&(h?g>r.translate&&g>r.minTranslate():g<r.translate&&g<r.minTranslate()))return!1;if(!r.allowSlidePrev&&g>r.translate&&g>r.maxTranslate()&&(c||0)!==o)return!1}o!==(d||0)&&n&&r.emit("beforeSlideChangeStart"),r.updateProgress(g),p=o>c?"next":o<c?"prev":"reset";var S=r.virtual&&r.params.virtual.enabled;if(!(S&&a)&&(h&&-g===r.translate||!h&&g===r.translate))return r.updateActiveIndex(o),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(g),"reset"!==p&&(r.transitionStart(n,p),r.transitionEnd(n,p)),!1;if(s.cssMode){var E=r.isHorizontal(),P=h?g:-g;if(0===t)S&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),S&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[E?"scrollLeft":"scrollTop"]=P})):m[E?"scrollLeft":"scrollTop"]=P,S&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return MV({swiper:r,targetPosition:P,side:E?"left":"top"}),!0;m.scrollTo({[E?"left":"top"]:P,behavior:"smooth"})}return!0}var T=WV().isSafari;return S&&!a&&T&&r.isElement&&r.virtual.update(!1,!1,o),r.setTransition(t),r.setTranslate(g),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(n,p),0===t?r.transitionEnd(n,p):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(n,p))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,n=!0,i){"string"==typeof e&&(e=parseInt(e,10));var a=this;if(!a.destroyed){void 0===t&&(t=a.params.speed);var r=a.grid&&a.params.grid&&a.params.grid.rows>1,o=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)o+=a.virtual.slidesBefore;else{var s;if(r){var u=o*a.params.grid.rows;s=a.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===u).column}else s=a.getSlideIndexByData(o);var l=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,d=a.params,c=d.centeredSlides,h=d.slidesOffsetBefore,m=d.slidesOffsetAfter,f=c||!!h||!!m,v=a.params.slidesPerView;"auto"===v?v=a.slidesPerViewDynamic():(v=Math.ceil(parseFloat(a.params.slidesPerView,10)),f&&v%2==0&&(v+=1));var p=l-s<v;if(f&&(p=p||s<Math.ceil(v/2)),i&&f&&"auto"!==a.params.slidesPerView&&!r&&(p=!1),p){var g=f?s<a.activeIndex?"prev":"next":s-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:g,slideTo:!0,activeSlideIndex:"next"===g?s+1:s-l+1,slideRealIndex:"next"===g?a.realIndex:void 0})}if(r){var y=o*a.params.grid.rows;o=a.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===y).column}else o=a.getSlideIndexByData(o)}return requestAnimationFrame(()=>{a.slideTo(o,t,n,i)}),a}},slideNext:function(e,t=!0,n){var i=this,a=i.enabled,r=i.params,o=i.animating;if(!a||i.destroyed)return i;void 0===e&&(e=i.params.speed);var s=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(s=Math.max(i.slidesPerViewDynamic("current",!0),1));var u=i.activeIndex<r.slidesPerGroupSkip?1:s,l=i.virtual&&r.virtual.enabled;if(r.loop){if(o&&!l&&r.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{i.slideTo(i.activeIndex+u,e,t,n)}),!0}return r.rewind&&i.isEnd?i.slideTo(0,e,t,n):i.slideTo(i.activeIndex+u,e,t,n)},slidePrev:function(e,t=!0,n){var i=this,a=i.params,r=i.snapGrid,o=i.slidesGrid,s=i.rtlTranslate,u=i.enabled,l=i.animating;if(!u||i.destroyed)return i;void 0===e&&(e=i.params.speed);var d=i.virtual&&a.virtual.enabled;if(a.loop){if(l&&!d&&a.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function c(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var h,m=c(s?i.translate:-i.translate),f=r.map(e=>c(e)),v=a.freeMode&&a.freeMode.enabled,p=r[f.indexOf(m)-1];void 0===p&&(a.cssMode||v)&&(r.forEach((e,t)=>{m>=e&&(h=t)}),void 0!==h&&(p=v?r[h]:r[h>0?h-1:h]));var g=0;if(void 0!==p&&((g=o.indexOf(p))<0&&(g=i.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(g=g-i.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&i.isBeginning){var y=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(y,e,t,n)}return a.loop&&0===i.activeIndex&&a.cssMode?(requestAnimationFrame(()=>{i.slideTo(g,e,t,n)}),!0):i.slideTo(g,e,t,n)},slideReset:function(e,t=!0,n){var i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,n)},slideToClosest:function(e,t=!0,n,i=.5){var a=this;if(!a.destroyed){void 0===e&&(e=a.params.speed);var r=a.activeIndex,o=Math.min(a.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/a.params.slidesPerGroup),u=a.rtlTranslate?a.translate:-a.translate;if(u>=a.snapGrid[s]){var l=a.snapGrid[s];u-l>(a.snapGrid[s+1]-l)*i&&(r+=a.params.slidesPerGroup)}else{var d=a.snapGrid[s-1];u-d<=(a.snapGrid[s]-d)*i&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,n)}},slideToClickedSlide:function(){var e=this;if(!e.destroyed){var t,n=e.params,i=e.slidesEl,a="auto"===n.slidesPerView?e.slidesPerViewDynamic():n.slidesPerView,r=e.getSlideIndexWhenGrid(e.clickedIndex),o=e.isElement?"swiper-slide":`.${n.slideClass}`,s=e.grid&&e.params.grid&&e.params.grid.rows>1;if(n.loop){if(e.animating)return;t=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),n.centeredSlides?e.slideToLoop(t):r>(s?(e.slides.length-a)/2-(e.params.grid.rows-1):e.slides.length-a)?(e.loopFix(),r=e.getSlideIndex(AV(i,`${o}[data-swiper-slide-index="${t}"]`)[0]),bV(()=>{e.slideTo(r)})):e.slideTo(r)}else e.slideTo(r)}}};var qV={loopCreate:function(e,t){var n=this,i=n.params,a=n.slidesEl;if(!(!i.loop||n.virtual&&n.params.virtual.enabled)){var r,o=()=>{AV(a,`.${i.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},s=n.grid&&i.grid&&i.grid.rows>1;i.loopAddBlankSlides&&(i.slidesPerGroup>1||s)&&((r=AV(a,`.${i.slideBlankClass}`)).forEach(e=>{e.remove()}),r.length>0&&(n.recalcSlides(),n.updateSlides()));var u=i.slidesPerGroup*(s?i.grid.rows:1),l=n.slides.length%u!==0,d=s&&n.slides.length%i.grid.rows!==0,c=e=>{for(var t=0;t<e;t+=1){var a=n.isElement?xV("swiper-slide",[i.slideBlankClass]):xV("div",[i.slideClass,i.slideBlankClass]);n.slidesEl.append(a)}};if(l){if(i.loopAddBlankSlides)c(u-n.slides.length%u),n.recalcSlides(),n.updateSlides();else DV("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(d){if(i.loopAddBlankSlides)c(i.grid.rows-n.slides.length%i.grid.rows),n.recalcSlides(),n.updateSlides();else DV("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();var h=i.centeredSlides||!!i.slidesOffsetBefore||!!i.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:h?void 0:"next",initial:t})}},loopFix:function({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:i,activeSlideIndex:a,initial:r,byController:o,byMousewheel:s}={}){var u=this;if(u.params.loop){u.emit("beforeLoopFix");var l=u.slides,d=u.allowSlidePrev,c=u.allowSlideNext,h=u.slidesEl,f=u.params,v=f.centeredSlides,p=f.slidesOffsetBefore,g=f.slidesOffsetAfter,y=f.initialSlide,b=v||!!p||!!g;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&f.virtual.enabled)return t&&(b||0!==u.snapIndex?b&&u.snapIndex<f.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0):u.slideTo(u.virtual.slides.length,0,!1,!0)),u.allowSlidePrev=d,u.allowSlideNext=c,void u.emit("loopFix");var w=f.slidesPerView;"auto"===w?w=u.slidesPerViewDynamic():(w=Math.ceil(parseFloat(f.slidesPerView,10)),b&&w%2==0&&(w+=1));var k=f.slidesPerGroupAuto?w:f.slidesPerGroup,S=b?Math.max(k,Math.ceil(w/2)):k;S%k!==0&&(S+=k-S%k),S+=f.loopAdditionalSlides,u.loopedSlides=S;var E=u.grid&&f.grid&&f.grid.rows>1;l.length<w+S||"cards"===u.params.effect&&l.length<w+2*S?DV("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):E&&"row"===f.grid.fill&&DV("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");var P=[],T=[],M=E?Math.ceil(l.length/f.grid.rows):l.length,_=r&&M-y<w&&!b,A=_?y:u.activeIndex;void 0===a?a=u.getSlideIndex(l.find(e=>e.classList.contains(f.slideActiveClass))):A=a;var D="next"===n||!n,x="prev"===n||!n,C=0,I=0,L=(E?l[a].column:a)+(b&&void 0===i?-w/2+.5:0);if(L<S){C=Math.max(S-L,k);for(var R=0;R<S-L;R+=1){var F=R-Math.floor(R/M)*M;if(E)for(var O=M-F-1,N=l.length-1;N>=0;N-=1)l[N].column===O&&P.push(N);else P.push(M-F-1)}}else if(L+w>M-S){I=Math.max(L-(M-2*S),k),_&&(I=Math.max(I,w-M+y+1));for(var $=function(){var e=W-Math.floor(W/M)*M;E?l.forEach((t,n)=>{t.column===e&&T.push(n)}):T.push(e)},W=0;W<I;W+=1)$()}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),"cards"===u.params.effect&&l.length<w+2*S&&(T.includes(a)&&T.splice(T.indexOf(a),1),P.includes(a)&&P.splice(P.indexOf(a),1)),x&&P.forEach(e=>{l[e].swiperLoopMoveDOM=!0,h.prepend(l[e]),l[e].swiperLoopMoveDOM=!1}),D&&T.forEach(e=>{l[e].swiperLoopMoveDOM=!0,h.append(l[e]),l[e].swiperLoopMoveDOM=!1}),u.recalcSlides(),"auto"===f.slidesPerView?u.updateSlides():E&&(P.length>0&&x||T.length>0&&D)&&u.slides.forEach((e,t)=>{u.grid.updateSlide(t,e,u.slides)}),f.watchSlidesProgress&&u.updateSlidesOffset(),t)if(P.length>0&&x){if(void 0===e){var j=u.slidesGrid[A],B=u.slidesGrid[A+C]-j;s?u.setTranslate(u.translate-B):(u.slideTo(A+Math.ceil(C),0,!1,!0),i&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-B,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-B))}else if(i){var z=E?P.length/f.grid.rows:P.length;u.slideTo(u.activeIndex+z,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(T.length>0&&D)if(void 0===e){var U=u.slidesGrid[A],H=u.slidesGrid[A-I]-U;s?u.setTranslate(u.translate-H):(u.slideTo(A-I,0,!1,!0),i&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-H,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-H))}else{var G=E?T.length/f.grid.rows:T.length;u.slideTo(u.activeIndex-G,0,!1,!0)}if(u.allowSlidePrev=d,u.allowSlideNext=c,u.controller&&u.controller.control&&!o){var V={slideRealIndex:e,direction:n,setTranslate:i,activeSlideIndex:a,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(e=>{!e.destroyed&&e.params.loop&&e.loopFix(m({},V,{slideTo:e.params.slidesPerView===f.slidesPerView&&t}))}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix(m({},V,{slideTo:u.controller.control.params.slidesPerView===f.slidesPerView&&t}))}u.emit("loopFix")}},loopDestroy:function(){var e=this,t=e.params,n=e.slidesEl;if(t.loop&&n&&(!e.virtual||!e.params.virtual.enabled)){e.recalcSlides();var i=[];e.slides.forEach(e=>{var t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),i.forEach(e=>{n.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}}};var JV={setGrabCursor:function(e){var t=this;if(!(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}},unsetGrabCursor:function(){var e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}};function QV(e,t,n){var i=yV(),a=e.params,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(n<=o||n>=i.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function ZV(e){var t=this,n=mV(),i=e;i.originalEvent&&(i=i.originalEvent);var a=t.touchEventsData;if("pointerdown"===i.type){if(null!==a.pointerId&&a.pointerId!==i.pointerId)return;a.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(a.touchId=i.targetTouches[0].identifier);if("touchstart"!==i.type){var r=t.params,o=t.touches;if(t.enabled&&(r.simulateTouch||"mouse"!==i.pointerType)&&(!t.animating||!r.preventInteractionOnTransition)){!t.animating&&r.cssMode&&r.loop&&t.loopFix();var s=i.target;if(("wrapper"!==r.touchEventsTarget||function(e,t){var n=yV(),i=t.contains(e);return!i&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&((i=[...t.assignedElements()].includes(e))||(i=function(e,t){for(var n=[t];n.length>0;){var i=n.shift();if(e===i)return!0;n.push(...i.children,...i.shadowRoot?i.shadowRoot.children:[],...i.assignedElements?i.assignedElements():[])}}(e,t))),i}(s,t.wrapperEl))&&!("which"in i&&3===i.which||"button"in i&&i.button>0||a.isTouched&&a.isMoved)){var u=!!r.noSwipingClass&&""!==r.noSwipingClass,l=i.composedPath?i.composedPath():i.path;u&&i.target&&i.target.shadowRoot&&l&&(s=l[0]);var d=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,c=!(!i.target||!i.target.shadowRoot);if(r.noSwiping&&(c?function(e,t=this){return function t(n){if(!n||n===mV()||n===yV())return null;n.assignedSlot&&(n=n.assignedSlot);var i=n.closest(e);return i||n.getRootNode?i||t(n.getRootNode().host):null}(t)}(d,s):s.closest(d)))t.allowClick=!0;else if(!r.swipeHandler||s.closest(r.swipeHandler)){o.currentX=i.pageX,o.currentY=i.pageY;var h=o.currentX,m=o.currentY;if(QV(t,i,h)){Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=h,o.startY=m,a.touchStartTime=wV(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);var f=!0;s.matches(a.focusableElements)&&(f=!1,"SELECT"===s.nodeName&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==s&&("mouse"===i.pointerType||"mouse"!==i.pointerType&&!s.matches(a.focusableElements))&&n.activeElement.blur();var v=f&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!v||s.isContentEditable||i.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}}}}}else QV(t,i,i.targetTouches[0].pageX)}function eK(e){var t=mV(),n=this,i=n.touchEventsData,a=n.params,r=n.touches,o=n.rtlTranslate;if(n.enabled&&(a.simulateTouch||"mouse"!==e.pointerType)){var s,u=e;if(u.originalEvent&&(u=u.originalEvent),"pointermove"===u.type){if(null!==i.touchId)return;if(u.pointerId!==i.pointerId)return}if("touchmove"===u.type){if(s=[...u.changedTouches].find(e=>e.identifier===i.touchId),!s||s.identifier!==i.touchId)return}else s=u;if(i.isTouched){var l=s.pageX,d=s.pageY;if(u.preventedByNestedSwiper)return r.startX=l,void(r.startY=d);if(!n.allowTouchMove)return u.target.matches(i.focusableElements)||(n.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:l,startY:d,currentX:l,currentY:d}),i.touchStartTime=wV()));if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(d<r.startY&&n.translate<=n.maxTranslate()||d>r.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else{if(o&&(l>r.startX&&-n.translate<=n.maxTranslate()||l<r.startX&&-n.translate>=n.minTranslate()))return;if(!o&&(l<r.startX&&n.translate<=n.maxTranslate()||l>r.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==u.target&&"mouse"!==u.pointerType&&t.activeElement.blur(),t.activeElement&&u.target===t.activeElement&&u.target.matches(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);i.allowTouchCallbacks&&n.emit("touchMove",u),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=l,r.currentY=d;var c=r.currentX-r.startX,h=r.currentY-r.startY;if(!(n.params.threshold&&Math.sqrt(c**2+h**2)<n.params.threshold)){var m;if(void 0===i.isScrolling)n.isHorizontal()&&r.currentY===r.startY||n.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:c*c+h*h>=25&&(m=180*Math.atan2(Math.abs(h),Math.abs(c))/Math.PI,i.isScrolling=n.isHorizontal()?m>a.touchAngle:90-m>a.touchAngle);if(i.isScrolling&&n.emit("touchMoveOpposite",u),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===u.type&&i.preventTouchMoveFromPointerMove)i.isTouched=!1;else if(i.startMoving){n.allowClick=!1,!a.cssMode&&u.cancelable&&u.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&u.stopPropagation();var f=n.isHorizontal()?c:h,v=n.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(f=Math.abs(f)*(o?1:-1),v=Math.abs(v)*(o?1:-1)),r.diff=f,f*=a.touchRatio,o&&(f=-f,v=-v);var p=n.touchesDirection;n.swipeDirection=f>0?"prev":"next",n.touchesDirection=v>0?"prev":"next";var g=n.params.loop&&!a.cssMode,y="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!i.isMoved){if(g&&y&&n.loopFix({direction:n.swipeDirection}),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){var b=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(b)}i.allowMomentumBounce=!1,!a.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",u)}if((new Date).getTime(),!1!==a._loopSwapReset&&i.isMoved&&i.allowThresholdMove&&p!==n.touchesDirection&&g&&y&&Math.abs(f)>=1)return Object.assign(r,{startX:l,startY:d,currentX:l,currentY:d,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);n.emit("sliderMove",u),i.isMoved=!0,i.currentTranslate=f+i.startTranslate;var w=!0,k=a.resistanceRatio;if(a.touchReleaseOnEdges&&(k=0),f>0?(g&&y&&i.allowThresholdMove&&i.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>n.minTranslate()&&(w=!1,a.resistance&&(i.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+i.startTranslate+f)**k))):f<0&&(g&&y&&i.allowThresholdMove&&i.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===a.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),i.currentTranslate<n.maxTranslate()&&(w=!1,a.resistance&&(i.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-i.startTranslate-f)**k))),w&&(u.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=n.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}}}else i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",u)}}function tK(e){var t,n=this,i=n.touchEventsData,a=e;if(a.originalEvent&&(a=a.originalEvent),"touchend"===a.type||"touchcancel"===a.type){if(t=[...a.changedTouches].find(e=>e.identifier===i.touchId),!t||t.identifier!==i.touchId)return}else{if(null!==i.touchId)return;if(a.pointerId!==i.pointerId)return;t=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)&&!(["pointercancel","contextmenu"].includes(a.type)&&(n.browser.isSafari||n.browser.isWebView)))return;i.pointerId=null,i.touchId=null;var r=n.params,o=n.touches,s=n.rtlTranslate,u=n.slidesGrid;if(n.enabled&&(r.simulateTouch||"mouse"!==a.pointerType)){if(i.allowTouchCallbacks&&n.emit("touchEnd",a),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&r.grabCursor&&n.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);r.grabCursor&&i.isMoved&&i.isTouched&&(!0===n.allowSlideNext||!0===n.allowSlidePrev)&&n.setGrabCursor(!1);var l,d=wV(),c=d-i.touchStartTime;if(n.allowClick){var h=a.path||a.composedPath&&a.composedPath();n.updateClickedSlide(h&&h[0]||a.target,h),n.emit("tap click",a),c<300&&d-i.lastClickTime<300&&n.emit("doubleTap doubleClick",a)}if(i.lastClickTime=wV(),bV(()=>{n.destroyed||(n.allowClick=!0)}),!i.isTouched||!i.isMoved||!n.swipeDirection||0===o.diff&&!i.loopSwapReset||i.currentTranslate===i.startTranslate&&!i.loopSwapReset)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,l=r.followFinger?s?n.translate:-n.translate:-i.currentTranslate,!r.cssMode)if(r.freeMode&&r.freeMode.enabled)n.freeMode.onTouchEnd({currentPos:l});else{for(var m=l>=-n.maxTranslate()&&!n.params.loop,f=0,v=n.slidesSizesGrid[0],p=0;p<u.length;p+=p<r.slidesPerGroupSkip?1:r.slidesPerGroup){var g=p<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==u[p+g]?(m||l>=u[p]&&l<u[p+g])&&(f=p,v=u[p+g]-u[p]):(m||l>=u[p])&&(f=p,v=u[u.length-1]-u[u.length-2])}var y=null,b=null;r.rewind&&(n.isBeginning?b=r.virtual&&r.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1:n.isEnd&&(y=0));var w=(l-u[f])/v,k=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(c>r.longSwipesMs){if(!r.longSwipes)return void n.slideTo(n.activeIndex);"next"===n.swipeDirection&&(w>=r.longSwipesRatio?n.slideTo(r.rewind&&n.isEnd?y:f+k):n.slideTo(f)),"prev"===n.swipeDirection&&(w>1-r.longSwipesRatio?n.slideTo(f+k):null!==b&&w<0&&Math.abs(w)>r.longSwipesRatio?n.slideTo(b):n.slideTo(f))}else{if(!r.shortSwipes)return void n.slideTo(n.activeIndex);n.navigation&&(a.target===n.navigation.nextEl||a.target===n.navigation.prevEl)?a.target===n.navigation.nextEl?n.slideTo(f+k):n.slideTo(f):("next"===n.swipeDirection&&n.slideTo(null!==y?y:f+k),"prev"===n.swipeDirection&&n.slideTo(null!==b?b:f))}}}}function nK(){var e=this,t=e.params,n=e.el;if(!n||0!==n.offsetWidth){t.breakpoints&&e.setBreakpoint();var i=e.allowSlideNext,a=e.allowSlidePrev,r=e.snapGrid,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();var s=o&&t.loop;if(!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s)e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{var u=o?e.virtual.slides:e.slides;e.slideTo(u.length-1,0,!1,!0)}e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}function iK(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function aK(){var e=this,t=e.wrapperEl,n=e.rtlTranslate;if(e.enabled){e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();var i=e.maxTranslate()-e.minTranslate();(0===i?0:(e.translate-e.minTranslate())/i)!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}}function rK(e){var t=this;UV(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function oK(){var e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}var sK=(e,t)=>{var n=mV(),i=e.params,a=e.el,r=e.wrapperEl,o=e.device,s=!!i.nested,u="on"===t?"addEventListener":"removeEventListener",l=t;a&&"string"!=typeof a&&(n[u]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),a[u]("touchstart",e.onTouchStart,{passive:!1}),a[u]("pointerdown",e.onTouchStart,{passive:!1}),n[u]("touchmove",e.onTouchMove,{passive:!1,capture:s}),n[u]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[u]("touchend",e.onTouchEnd,{passive:!0}),n[u]("pointerup",e.onTouchEnd,{passive:!0}),n[u]("pointercancel",e.onTouchEnd,{passive:!0}),n[u]("touchcancel",e.onTouchEnd,{passive:!0}),n[u]("pointerout",e.onTouchEnd,{passive:!0}),n[u]("pointerleave",e.onTouchEnd,{passive:!0}),n[u]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&a[u]("click",e.onClick,!0),i.cssMode&&r[u]("scroll",e.onScroll),i.updateOnWindowResize?e[l](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",nK,!0):e[l]("observerUpdate",nK,!0),a[u]("load",e.onLoad,{capture:!0}))};var uK=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var lK={setBreakpoint:function(){var e=this,t=e.realIndex,n=e.initialized,i=e.params,a=e.el,r=i.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var o=mV(),s="window"!==i.breakpointsBase&&i.breakpointsBase?"container":i.breakpointsBase,u=["window","container"].includes(i.breakpointsBase)||!i.breakpointsBase?e.el:o.querySelector(i.breakpointsBase),l=e.getBreakpoint(r,s,u);if(l&&e.currentBreakpoint!==l){var d=(l in r?r[l]:void 0)||e.originalParams,c=uK(e,i),h=uK(e,d),m=e.params.grabCursor,f=d.grabCursor,v=i.enabled;c&&!h?(a.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&h&&(a.classList.add(`${i.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===i.grid.fill)&&a.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),m&&!f?e.unsetGrabCursor():!m&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0!==d[t]){var n=i[t]&&i[t].enabled,a=d[t]&&d[t].enabled;n&&!a&&e[t].disable(),!n&&a&&e[t].enable()}});var p=d.direction&&d.direction!==i.direction,g=i.loop&&(d.slidesPerView!==i.slidesPerView||p),y=i.loop;p&&n&&e.changeDirection(),PV(e.params,d);var b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),v&&!b?e.disable():!v&&b&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",d),n&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&w?(e.loopCreate(t),e.updateSlides()):y&&!w&&e.loopDestroy()),e.emit("breakpoint",d)}}},getBreakpoint:function(e,t="window",n){if(e&&("container"!==t||n)){var i=!1,a=yV(),r="window"===t?a.innerHeight:n.clientHeight,o=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}});o.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(var s=0;s<o.length;s+=1){var u=o[s],l=u.point,d=u.value;"window"===t?a.matchMedia(`(min-width: ${d}px)`).matches&&(i=l):d<=n.clientWidth&&(i=l)}return i||"max"}}};var dK={addClasses:function(){var e,t,n,i=this,a=i.classNames,r=i.params,o=i.rtl,s=i.el,u=i.device,l=(e=["initialized",r.direction,{"free-mode":i.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:o},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&"column"===r.grid.fill},{android:u.android},{ios:u.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],t=r.containerModifierClass,n=[],e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(i=>{e[i]&&n.push(t+i)}):"string"==typeof e&&n.push(t+e)}),n);a.push(...l),s.classList.add(...a),i.emitContainerClasses()},removeClasses:function(){var e=this,t=e.el,n=e.classNames;t&&"string"!=typeof t&&(t.classList.remove(...n),e.emitContainerClasses())}};var cK={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function hK(e,t){return function(n={}){var i=Object.keys(n)[0],a=n[i];"object"==typeof a&&null!==a?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in a?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),PV(t,n)):PV(t,n)):PV(t,n)}}var mK={eventsEmitter:jV,update:VV,translate:KV,transition:{setTransition:function(e,t){var n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e=!0,t){var n=this,i=n.params;i.cssMode||(i.autoHeight&&n.updateAutoHeight(),XV({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){var n=this,i=n.params;n.animating=!1,i.cssMode||(n.setTransition(0),XV({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:YV,loop:qV,grabCursor:JV,events:{attachEvents:function(){var e=this,t=e.params;e.onTouchStart=ZV.bind(e),e.onTouchMove=eK.bind(e),e.onTouchEnd=tK.bind(e),e.onDocumentTouchStart=oK.bind(e),t.cssMode&&(e.onScroll=aK.bind(e)),e.onClick=iK.bind(e),e.onLoad=rK.bind(e),sK(e,"on")},detachEvents:function(){sK(this,"off")}},breakpoints:lK,checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked,n=e.params,i=n.slidesOffsetBefore;if(i){var a=e.slides.length-1,r=e.slidesGrid[a]+e.slidesSizesGrid[a]+2*i;e.isLocked=e.size>r}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:dK},fK={},vK=function(){function e(...t){var n,i;o(this,e),1===t.length&&t[0].constructor&&"Object"===Object.prototype.toString.call(t[0]).slice(8,-1)?i=t[0]:(n=t[0],i=t[1]),i||(i={}),i=PV({},i),n&&!i.el&&(i.el=n);var a=mV();if(i.el&&"string"==typeof i.el&&a.querySelectorAll(i.el).length>1){var r=[];return a.querySelectorAll(i.el).forEach(t=>{var n=PV({},i,{el:t});r.push(new e(n))}),r}var s=this;s.__swiper__=!0,s.support=NV(),s.device=$V({userAgent:i.userAgent}),s.browser=WV(),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],i.modules&&Array.isArray(i.modules)&&i.modules.forEach(e=>{"function"==typeof e&&s.modules.indexOf(e)<0&&s.modules.push(e)});var u={};s.modules.forEach(e=>{e({params:i,swiper:s,extendParams:hK(i,u),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})});var l=PV({},cK,u);return s.params=PV({},l,fK,i),s.originalParams=PV({},s.params),s.passedParams=PV({},i),s.params&&s.params.on&&Object.keys(s.params.on).forEach(e=>{s.on(e,s.params.on[e])}),s.params&&s.params.onAny&&s.onAny(s.params.onAny),Object.assign(s,{enabled:s.params.enabled,el:n,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===s.params.direction,isVertical:()=>"vertical"===s.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}return c(e,[{key:"getDirectionLabel",value:function(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}},{key:"getSlideIndex",value:function(e){var t=IV(AV(this.slidesEl,`.${this.params.slideClass}, swiper-slide`)[0]);return IV(e)-t}},{key:"getSlideIndexByData",value:function(e){return this.getSlideIndex(this.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e))}},{key:"getSlideIndexWhenGrid",value:function(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}},{key:"recalcSlides",value:function(){var e=this,t=e.slidesEl,n=e.params;e.slides=AV(t,`.${n.slideClass}, swiper-slide`)}},{key:"enable",value:function(){var e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}},{key:"disable",value:function(){var e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}},{key:"setProgress",value:function(e,t){var n=this;e=Math.min(Math.max(e,0),1);var i=n.minTranslate(),a=(n.maxTranslate()-i)*e+i;n.translateTo(a,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}},{key:"emitContainerClasses",value:function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}}},{key:"getSlideClasses",value:function(e){var t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}},{key:"emitSlidesClasses",value:function(){var e=this;if(e.params._emitClasses&&e.el){var t=[];e.slides.forEach(n=>{var i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)}),e.emit("_slideClasses",t)}}},{key:"slidesPerViewDynamic",value:function(e="current",t=!1){var n=this,i=n.params,a=n.slides,r=n.slidesGrid,o=n.slidesSizesGrid,s=n.size,u=n.activeIndex,l=1;if("number"==typeof i.slidesPerView)return i.slidesPerView;if(i.centeredSlides){for(var d,c=a[u]?Math.ceil(a[u].swiperSlideSize):0,h=u+1;h<a.length;h+=1)a[h]&&!d&&(l+=1,(c+=Math.ceil(a[h].swiperSlideSize))>s&&(d=!0));for(var m=u-1;m>=0;m-=1)a[m]&&!d&&(l+=1,(c+=a[m].swiperSlideSize)>s&&(d=!0))}else if("current"===e)for(var f=u+1;f<a.length;f+=1){(t?r[f]+o[f]-r[u]<s:r[f]-r[u]<s)&&(l+=1)}else for(var v=u-1;v>=0;v-=1){r[u]-r[v]<s&&(l+=1)}return l}},{key:"update",value:function(){var e=this;if(e&&!e.destroyed){var t,n=e.snapGrid,i=e.params;if(i.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&UV(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),i.freeMode&&i.freeMode.enabled&&!i.cssMode)r(),i.autoHeight&&e.updateAutoHeight();else{if(("auto"===i.slidesPerView||i.slidesPerView>1)&&e.isEnd&&!i.centeredSlides){var a=e.virtual&&i.virtual.enabled?e.virtual.slides:e.slides;t=e.slideTo(a.length-1,0,!1,!0)}else t=e.slideTo(e.activeIndex,0,!1,!0);t||r()}i.watchOverflow&&n!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function r(){var t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}}},{key:"changeDirection",value:function(e,t=!0){var n=this,i=n.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}},{key:"changeLanguageDirection",value:function(e){var t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}},{key:"mount",value:function(e){var t=this;if(t.mounted)return!0;var n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);var i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`,a=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(i()):AV(n,i())[0];return!a&&t.params.createElements&&(a=xV("div",t.params.wrapperClass),n.append(a),AV(n,`.${t.params.slideClass}`).forEach(e=>{a.append(e)})),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===CV(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===CV(n,"direction")),wrongRTL:"-webkit-box"===CV(a,"display")}),!0}},{key:"init",value:function(e){var t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();var n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach(e=>{e.complete?UV(t,e):e.addEventListener("load",e=>{UV(t,e.target)})}),GV(t),t.initialized=!0,GV(t),t.emit("init"),t.emit("afterInit"),t}},{key:"destroy",value:function(e=!0,t=!0){var n=this,i=n.params,a=n.el,r=n.wrapperEl,o=n.slides;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.loop&&n.loopDestroy(),t&&(n.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),o&&o.length&&o.forEach(e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(e=>{n.off(e)}),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){var t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(n)),n.destroyed=!0),null}}],[{key:"extendDefaults",value:function(e){PV(fK,e)}},{key:"extendedDefaults",get:function(){return fK}},{key:"defaults",get:function(){return cK}},{key:"installModule",value:function(t){e.prototype.__modules__||(e.prototype.__modules__=[]);var n=e.prototype.__modules__;"function"==typeof t&&n.indexOf(t)<0&&n.push(t)}},{key:"use",value:function(t){return Array.isArray(t)?(t.forEach(t=>e.installModule(t)),e):(e.installModule(t),e)}}])}();function pK(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function gK({swiper:e,extendParams:t,on:n,emit:i}){var a,r="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),e.pagination={el:null,bullets:[]};var o=0;function s(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&0===e.pagination.el.length}function u(t,n){var i=e.params.pagination.bulletActiveClass;t&&(t=t[("prev"===n?"previous":"next")+"ElementSibling"])&&(t.classList.add(`${i}-${n}`),(t=t[("prev"===n?"previous":"next")+"ElementSibling"])&&t.classList.add(`${i}-${n}-${n}`))}function l(t){var n=t.target.closest(pK(e.params.pagination.bulletClass));if(n){t.preventDefault();var i,a,r,o=IV(n)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===o)return;var s=(i=e.realIndex,a=o,r=e.slides.length,(a%=r)===1+(i%=r)?"next":a===i-1?"previous":void 0);"next"===s?e.slideNext():"previous"===s?e.slidePrev():e.slideToLoop(o)}else e.slideTo(o)}}function d(){var t=e.rtl,n=e.params.pagination;if(!s()){var r,l,d=e.pagination.el;d=FV(d);var c=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,h=e.params.loop?Math.ceil(c/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(l=e.previousRealIndex||0,r=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):void 0!==e.snapIndex?(r=e.snapIndex,l=e.previousSnapIndex):(l=e.previousIndex||0,r=e.activeIndex||0),"bullets"===n.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var m,f,v,p=e.pagination.bullets;if(n.dynamicBullets&&(a=RV(p[0],e.isHorizontal()?"width":"height"),d.forEach(t=>{t.style[e.isHorizontal()?"width":"height"]=a*(n.dynamicMainBullets+4)+"px"}),n.dynamicMainBullets>1&&void 0!==l&&((o+=r-(l||0))>n.dynamicMainBullets-1?o=n.dynamicMainBullets-1:o<0&&(o=0)),m=Math.max(r-o,0),v=((f=m+(Math.min(p.length,n.dynamicMainBullets)-1))+m)/2),p.forEach(e=>{var t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${n.bulletActiveClass}${e}`)].map(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e).flat();e.classList.remove(...t)}),d.length>1)p.forEach(t=>{var i=IV(t);i===r?t.classList.add(...n.bulletActiveClass.split(" ")):e.isElement&&t.setAttribute("part","bullet"),n.dynamicBullets&&(i>=m&&i<=f&&t.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),i===m&&u(t,"prev"),i===f&&u(t,"next"))});else{var g=p[r];if(g&&g.classList.add(...n.bulletActiveClass.split(" ")),e.isElement&&p.forEach((e,t)=>{e.setAttribute("part",t===r?"bullet-active":"bullet")}),n.dynamicBullets){for(var y=p[m],b=p[f],w=m;w<=f;w+=1)p[w]&&p[w].classList.add(...`${n.bulletActiveClass}-main`.split(" "));u(y,"prev"),u(b,"next")}}if(n.dynamicBullets){var k=Math.min(p.length,n.dynamicMainBullets+4),S=(a*k-a)/2-v*a,E=t?"right":"left";p.forEach(t=>{t.style[e.isHorizontal()?E:"top"]=`${S}px`})}}d.forEach((t,a)=>{if("fraction"===n.type&&(t.querySelectorAll(pK(n.currentClass)).forEach(e=>{e.textContent=n.formatFractionCurrent(r+1)}),t.querySelectorAll(pK(n.totalClass)).forEach(e=>{e.textContent=n.formatFractionTotal(h)})),"progressbar"===n.type){var o;o=n.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var s=(r+1)/h,u=1,l=1;"horizontal"===o?u=s:l=s,t.querySelectorAll(pK(n.progressbarFillClass)).forEach(t=>{t.style.transform=`translate3d(0,0,0) scaleX(${u}) scaleY(${l})`,t.style.transitionDuration=`${e.params.speed}ms`})}"custom"===n.type&&n.renderCustom?(OV(t,n.renderCustom(e,r+1,h)),0===a&&i("paginationRender",t)):(0===a&&i("paginationRender",t),i("paginationUpdate",t)),e.params.watchOverflow&&e.enabled&&t.classList[e.isLocked?"add":"remove"](n.lockClass)})}}function c(){var t=e.params.pagination;if(!s()){var n=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length,a=e.pagination.el;a=FV(a);var r="";if("bullets"===t.type){var o=e.params.loop?Math.ceil(n/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&o>n&&(o=n);for(var u=0;u<o;u+=1)t.renderBullet?r+=t.renderBullet.call(e,u,t.bulletClass):r+=`<${t.bulletElement} ${e.isElement?'part="bullet"':""} class="${t.bulletClass}"></${t.bulletElement}>`}"fraction"===t.type&&(r=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`),"progressbar"===t.type&&(r=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`),e.pagination.bullets=[],a.forEach(n=>{"custom"!==t.type&&OV(n,r||""),"bullets"===t.type&&e.pagination.bullets.push(...n.querySelectorAll(pK(t.bulletClass)))}),"custom"!==t.type&&i("paginationRender",a[0])}}function h(){e.params.pagination=function(e,t,n,i){return e.params.createElements&&Object.keys(i).forEach(a=>{if(!n[a]&&!0===n.auto){var r=AV(e.el,`.${i[a]}`)[0];r||((r=xV("div",i[a])).className=i[a],e.el.append(r)),n[a]=r,t[a]=r}}),n}(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});var t,n=e.params.pagination;n.el&&("string"==typeof n.el&&e.isElement&&(t=e.el.querySelector(n.el)),t||"string"!=typeof n.el||(t=[...document.querySelectorAll(n.el)]),t||(t=n.el),t&&0!==t.length&&(e.params.uniqueNavElements&&"string"==typeof n.el&&Array.isArray(t)&&t.length>1&&(t=[...e.el.querySelectorAll(n.el)]).length>1&&(t=t.find(t=>LV(t,".swiper")[0]===e.el)),Array.isArray(t)&&1===t.length&&(t=t[0]),Object.assign(e.pagination,{el:t}),(t=FV(t)).forEach(t=>{"bullets"===n.type&&n.clickable&&t.classList.add(...(n.clickableClass||"").split(" ")),t.classList.add(n.modifierClass+n.type),t.classList.add(e.isHorizontal()?n.horizontalClass:n.verticalClass),"bullets"===n.type&&n.dynamicBullets&&(t.classList.add(`${n.modifierClass}${n.type}-dynamic`),o=0,n.dynamicMainBullets<1&&(n.dynamicMainBullets=1)),"progressbar"===n.type&&n.progressbarOpposite&&t.classList.add(n.progressbarOppositeClass),n.clickable&&t.addEventListener("click",l),e.enabled||t.classList.add(n.lockClass)})))}function m(){var t=e.params.pagination;if(!s()){var n=e.pagination.el;n&&(n=FV(n)).forEach(n=>{n.classList.remove(t.hiddenClass),n.classList.remove(t.modifierClass+t.type),n.classList.remove(e.isHorizontal()?t.horizontalClass:t.verticalClass),t.clickable&&(n.classList.remove(...(t.clickableClass||"").split(" ")),n.removeEventListener("click",l))}),e.pagination.bullets&&e.pagination.bullets.forEach(e=>e.classList.remove(...t.bulletActiveClass.split(" ")))}}n("changeDirection",()=>{if(e.pagination&&e.pagination.el){var t=e.params.pagination,n=e.pagination.el;(n=FV(n)).forEach(n=>{n.classList.remove(t.horizontalClass,t.verticalClass),n.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass)})}}),n("init",()=>{!1===e.params.pagination.enabled?f():(h(),c(),d())}),n("activeIndexChange",()=>{void 0===e.snapIndex&&d()}),n("snapIndexChange",()=>{d()}),n("snapGridLengthChange",()=>{c(),d()}),n("destroy",()=>{m()}),n("enable disable",()=>{var t=e.pagination.el;t&&(t=FV(t)).forEach(t=>t.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass))}),n("lock unlock",()=>{d()}),n("click",(t,n)=>{var a=n.target,r=FV(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&r&&r.length>0&&!a.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&a===e.navigation.nextEl||e.navigation.prevEl&&a===e.navigation.prevEl))return;var o=r[0].classList.contains(e.params.pagination.hiddenClass);i(!0===o?"paginationShow":"paginationHide"),r.forEach(t=>t.classList.toggle(e.params.pagination.hiddenClass))}});var f=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);var t=e.pagination.el;t&&(t=FV(t)).forEach(t=>t.classList.add(e.params.pagination.paginationDisabledClass)),m()};Object.assign(e.pagination,{enable:()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);var t=e.pagination.el;t&&(t=FV(t)).forEach(t=>t.classList.remove(e.params.pagination.paginationDisabledClass)),h(),c(),d()},disable:f,render:c,update:d,init:h,destroy:m})}function yK({swiper:e,extendParams:t,on:n,emit:i,params:a}){var r,o;e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});var s,u,l,d,c,h,m,f=a&&a.autoplay?a.autoplay.delay:3e3,v=a&&a.autoplay?a.autoplay.delay:3e3,p=(new Date).getTime();function g(t){e&&!e.destroyed&&e.wrapperEl&&t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",g),m||t.detail&&t.detail.bySwiperTouchMove||P())}var y=()=>{if(!e.destroyed&&e.autoplay.running){e.autoplay.paused?u=!0:u&&(v=s,u=!1);var t=e.autoplay.paused?s:p+v-(new Date).getTime();e.autoplay.timeLeft=t,i("autoplayTimeLeft",t,t/f),o=requestAnimationFrame(()=>{y()})}},b=()=>{var t=e.params.autoplay.delay,n=(()=>{var t;if(t=e.virtual&&e.params.virtual.enabled?e.slides.find(e=>e.classList.contains("swiper-slide-active")):e.slides[e.activeIndex])return parseInt(t.getAttribute("data-swiper-autoplay"),10)})();return!Number.isNaN(n)&&n>0&&(t=n),t},w=t=>{if(!e.destroyed&&e.autoplay.running){cancelAnimationFrame(o),y();var n=t;void 0===n&&(n=b(),f=n,v=n),s=n;var a=e.params.speed,u=()=>{e&&!e.destroyed&&(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(a,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,a,!0,!0),i("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(a,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,a,!0,!0),i("autoplay")),e.params.cssMode&&(p=(new Date).getTime(),requestAnimationFrame(()=>{w()})))};return n>0?(clearTimeout(r),r=setTimeout(()=>{u()},n)):requestAnimationFrame(()=>{u()}),n}},k=()=>{p=(new Date).getTime(),e.autoplay.running=!0,w(),i("autoplayStart")},S=()=>{e.autoplay.running=!1,clearTimeout(r),cancelAnimationFrame(o),i("autoplayStop")},E=(t,n)=>{if(!e.destroyed&&e.autoplay.running){clearTimeout(r),t||(h=!0);var a=()=>{i("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",g):P()};if(e.autoplay.paused=!0,n)a();else{var o=s||e.params.autoplay.delay;s=o-((new Date).getTime()-p),e.isEnd&&s<0&&!e.params.loop||(s<0&&(s=0),a())}}},P=()=>{e.isEnd&&s<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(p=(new Date).getTime(),h?(h=!1,w(s)):w(),e.autoplay.paused=!1,i("autoplayResume"))},T=()=>{if(!e.destroyed&&e.autoplay.running){var t=mV();"hidden"===t.visibilityState&&(h=!0,E(!0)),"visible"===t.visibilityState&&P()}},M=t=>{"mouse"===t.pointerType&&(h=!0,m=!0,e.animating||e.autoplay.paused||E(!0))},_=t=>{"mouse"===t.pointerType&&(m=!1,e.autoplay.paused&&P())};n("init",()=>{e.params.autoplay.enabled&&(e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",M),e.el.addEventListener("pointerleave",_)),mV().addEventListener("visibilitychange",T),k())}),n("destroy",()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",M),e.el.removeEventListener("pointerleave",_)),mV().removeEventListener("visibilitychange",T),e.autoplay.running&&S()}),n("_freeModeStaticRelease",()=>{(d||h)&&P()}),n("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?S():E(!0,!0)}),n("beforeTransitionStart",(t,n,i)=>{!e.destroyed&&e.autoplay.running&&(i||!e.params.autoplay.disableOnInteraction?E(!0,!0):S())}),n("sliderFirstMove",()=>{!e.destroyed&&e.autoplay.running&&(e.params.autoplay.disableOnInteraction?S():(l=!0,d=!1,h=!1,c=setTimeout(()=>{h=!0,d=!0,E(!0)},200)))}),n("touchEnd",()=>{if(!e.destroyed&&e.autoplay.running&&l){if(clearTimeout(c),clearTimeout(r),e.params.autoplay.disableOnInteraction)return d=!1,void(l=!1);d&&e.params.cssMode&&P(),d=!1,l=!1}}),n("slideChange",()=>{!e.destroyed&&e.autoplay.running&&e.autoplay.paused&&(s=b(),f=b())}),Object.assign(e.autoplay,{start:k,stop:S,pause:E,resume:P})}function bK(e,t){var n=_V(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function wK(e,t,n){var i=`swiper-slide-shadow${n?`-${n}`:""} swiper-slide-shadow-${e}`,a=_V(t),r=a.querySelector(`.${i.split(" ").join(".")}`);return r||(r=xV("div",i.split(" ")),a.append(r)),r}function kK({swiper:e,extendParams:t,on:n}){t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});!function(e){var t,n=e.effect,i=e.swiper,a=e.on,r=e.setTranslate,o=e.setTransition,s=e.overwriteParams,u=e.perspective,l=e.recreateShadows,d=e.getEffectParams;a("beforeInit",()=>{if(i.params.effect===n){i.classNames.push(`${i.params.containerModifierClass}${n}`),u&&u()&&i.classNames.push(`${i.params.containerModifierClass}3d`);var e=s?s():{};Object.assign(i.params,e),Object.assign(i.originalParams,e)}}),a("setTranslate _virtualUpdated",()=>{i.params.effect===n&&r()}),a("setTransition",(e,t)=>{i.params.effect===n&&o(t)}),a("transitionEnd",()=>{if(i.params.effect===n&&l){if(!d||!d().slideShadows)return;i.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),l()}}),a("virtualUpdate",()=>{i.params.effect===n&&(i.slides.length||(t=!0),requestAnimationFrame(()=>{t&&i.slides&&i.slides.length&&(r(),t=!1)}))})}({effect:"coverflow",swiper:e,on:n,setTranslate:()=>{for(var t=e.width,n=e.height,i=e.slides,a=e.slidesSizesGrid,r=e.params.coverflowEffect,o=e.isHorizontal(),s=e.translate,u=o?t/2-s:n/2-s,l=o?r.rotate:-r.rotate,d=r.depth,c=function(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}(e),h=0,m=i.length;h<m;h+=1){var f=i[h],v=a[h],p=(u-f.swiperSlideOffset-v/2)/v,g="function"==typeof r.modifier?r.modifier(p):p*r.modifier,y=o?l*g:0,b=o?0:l*g,w=-d*Math.abs(g),k=r.stretch;"string"==typeof k&&-1!==k.indexOf("%")&&(k=parseFloat(r.stretch)/100*v);var S=o?0:k*g,E=o?k*g:0,P=1-(1-r.scale)*Math.abs(g);Math.abs(E)<.001&&(E=0),Math.abs(S)<.001&&(S=0),Math.abs(w)<.001&&(w=0),Math.abs(y)<.001&&(y=0),Math.abs(b)<.001&&(b=0),Math.abs(P)<.001&&(P=0);var T=`translate3d(${E}px,${S}px,${w}px) rotateX(${c(b)}deg) rotateY(${c(y)}deg) scale(${P})`;if(bK(0,f).style.transform=T,f.style.zIndex=1-Math.abs(Math.round(g)),r.slideShadows){var M=o?f.querySelector(".swiper-slide-shadow-left"):f.querySelector(".swiper-slide-shadow-top"),_=o?f.querySelector(".swiper-slide-shadow-right"):f.querySelector(".swiper-slide-shadow-bottom");M||(M=wK("coverflow",f,o?"left":"top")),_||(_=wK("coverflow",f,o?"right":"bottom")),M&&(M.style.opacity=g>0?g:0),_&&(_.style.opacity=-g>0?-g:0)}}},setTransition:t=>{e.slides.map(e=>_V(e)).forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>{e.style.transitionDuration=`${t}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}Object.keys(mK).forEach(e=>{Object.keys(mK[e]).forEach(t=>{vK.prototype[t]=mK[e][t]})}),vK.use([function({swiper:e,on:t,emit:n}){var i=yV(),a=null,r=null,o=()=>{e&&!e.destroyed&&e.initialized&&(n("beforeResize"),n("resize"))},s=()=>{e&&!e.destroyed&&e.initialized&&n("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==i.ResizeObserver?e&&!e.destroyed&&e.initialized&&(a=new ResizeObserver(t=>{r=i.requestAnimationFrame(()=>{var n=e.width,i=e.height,a=n,r=i;t.forEach(({contentBoxSize:t,contentRect:n,target:i})=>{i&&i!==e.el||(a=n?n.width:(t[0]||t).inlineSize,r=n?n.height:(t[0]||t).blockSize)}),a===n&&r===i||o()})})).observe(e.el):(i.addEventListener("resize",o),i.addEventListener("orientationchange",s))}),t("destroy",()=>{r&&i.cancelAnimationFrame(r),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",s)})},function({swiper:e,extendParams:t,on:n,emit:i}){var a=[],r=yV(),o=(t,n={})=>{var o=new(r.MutationObserver||r.WebkitMutationObserver)(t=>{if(!e.__preventObserver__)if(1!==t.length){var n=function(){i("observerUpdate",t[0])};r.requestAnimationFrame?r.requestAnimationFrame(n):r.setTimeout(n,0)}else i("observerUpdate",t[0])});o.observe(t,{attributes:void 0===n.attributes||n.attributes,childList:e.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),a.push(o)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",()=>{if(e.params.observer){if(e.params.observeParents)for(var t=LV(e.hostEl),n=0;n<t.length;n+=1)o(t[n]);o(e.hostEl,{childList:e.params.observeSlideChildren}),o(e.wrapperEl,{attributes:!1})}}),n("destroy",()=>{a.forEach(e=>{e.disconnect()}),a.splice(0,a.length)})}]);var SK,EK,PK=e=>e,TK=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e.updateSpacing=t=>{e.slideSpacing=t.detail.spacing,e.swiperInstance&&(e.swiperInstance.params.spaceBetween=e.slideSpacing,e.swiperInstance.update())},e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),window.addEventListener("child-spacing",this.updateSpacing,!1)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),window.removeEventListener("child-spacing",this.updateSpacing,!1)}},{key:"styles",value:function(){var e,t,n,i=this.scaleFactor,a=this.component,r=a.backgroundBlur,o=a.indicator,s=a.activeIndicator,u=a.previousSlidePadding,l=a.nextSlidePadding,d="vertical"===a.direction?"margin-top":"margin-left";return Ih(`\n :host {\n display: ${a.hidden?"none":"flex"};\n flex-direction: column !important;\n ${Xw(a.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n z-index: ${null!==(e=a.zIndex)&&void 0!==e?e:1};\n top: 0px;\n transition: all 0.3s;\n ${$w(a,i)}\n ${function(e,t){return`\n padding-right: ${Aw(t,e.nextSlidePadding)}px !important;\n padding-left: ${Aw(t,e.previousSlidePadding)}px !important;\n `}(a,i)}\n ${Rw(a)}\n ${Lw(a,!1)}\n max-width: 100vw;\n }\n :host(:focus){\n ${Lw(a,!0)}\n ${Vw(a,i,!0)}\n }\n :host(:focus-visible){\n ${Qw(a)}\n }\n :host > *:not(:first-child) {\n ${d}: ${a.spacing?a.spacing*i:0}px;\n }\n .swiper-container {\n ${Bw(a,i)};\n padding-left: ${null!=u?u:0}px;\n padding-right: ${null!=l?l:0}px;\n box-sizing: border-box;\n }\n .swiper-pagination{\n position: relative;\n padding: 8px;\n }\n .swiper-pagination-bullet {\n opacity: 1 !important;\n ${null!=(null==o?void 0:o.width)?`width: ${o.width}px !important;`:""}\n ${null!=(null==o?void 0:o.height)?`height: ${o.height}px !important;`:""}\n ${null!=(null==o?void 0:o.borderRadius)?`border-radius: ${o.borderRadius}px !important;`:""}\n background: ${null!==(t=null==o?void 0:o.fillColor)&&void 0!==t?t:a.indicatorColor} !important;\n }\n .swiper-pagination-bullet-active {\n ${null!=(null==s?void 0:s.width)?`width: ${s.width}px !important;`:""}\n ${null!=(null==s?void 0:s.height)?`height: ${s.height}px !important;`:""}\n ${null!=(null==s?void 0:s.borderRadius)?`border-radius: ${s.borderRadius}px !important;`:""}\n background: ${null!==(n=null==s?void 0:s.fillColor)&&void 0!==n?n:a.activeIndicatorColor} !important;\n }\n `)}},{key:"updated",value:function(){var e,t,n=[gK,yK],i=this.component,a=i.autoplay,r=i.autoplaySeconds,o=i.showIndicators,s=i.slideSpacing,u=i.inactiveSlideScale;u&&n.push(kK),vK.use(n);var l=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".swiper-container"),d=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".swiper-pagination");if(l&&!this.swiperInstance){var c,h={initialSlide:0,slidesPerView:1,loop:a,spaceBetween:null!==(c=null!=s?s:this.slideSpacing)&&void 0!==c?c:0,autoplay:!!a&&{delay:1e3*r,disableOnInteraction:!1},pagination:!(null!=o&&!o)&&{el:d,clickable:!0},on:{init:e=>{this.handleSlideChange(e)},slideChange:e=>{this.handleSlideChange(e)}}};u&&(h.effect="coverflow",h.coverflowEffect={rotate:0,stretch:0,depth:100,modifier:1,slideShadows:!1,scale:u}),this.swiperInstance=new vK(l,h)}}},{key:"handleSlideChange",value:function(e){if(this.contextProvider.setCurrentSlideIndex(e.realIndex),this.component.onChange){var t,n=this.getCarouselOnChange(this.component),i=null==n||null===(t=n.parameters)||void 0===t||null===(t=t.partialState)||void 0===t?void 0:t.currentGroupId;i&&this.contextProvider.setCurrentGroupData(i,"")}}},{key:"getCarouselOnChange",value:function(e){var t;if(e.onChange&&e.onChange.parameters){var n=this.contextProvider.state.slides,i="string"==typeof e.loopSource?e.loopSource:"",a=null==n||null===(t=n[i])||void 0===t||null===(t=t.carouselName)||void 0===t?void 0:t[this.contextProvider.state.currentSlideIndex];return Gp(e.onChange,{slide:a,sku:this.contextProvider.state.sku,state:this.contextProvider.state,launch:this.contextProvider.state.launch,customer:this.contextProvider.state.customer})}}},{key:"getCarouselSlides",value:function(e){var t,n;if(!e.loopSource)return[];var i,a=this.contextProvider.state,r=a.slides,o=a.selectedProducts,s="string"==typeof e.loopSource?e.loopSource:"",u=Wp(this.contextProvider.productDetails,null!==(t=null===(n=this.contextProvider.getSelectedPaywall())||void 0===n?void 0:n.sku_menus)&&void 0!==t?t:[],s),l=[];rh(r)||(l=""!=s?r[s].carouselName:null!==(i=e.loopSource)&&void 0!==i?i:[]);var d=this.contextProvider.filteredSkuMenus.map(e=>e.id);return l.filter(e=>!e.productGroupId||d.includes(e.productGroupId)).map(t=>{var n=u.find(e=>e.id==o[t.productGroupId]);return Gp(e.components,Gp({slide:t},{sku:m({},Bp(null==n?void 0:n.product_details,t,u))}))||[]})}},{key:"render",value:function(){var e=this.getCarouselSlides(this.component),t=this.component,n=t.focusedBorderColor,i=t.focusedFillColor,a=t.fillColor;return!n&&ig(a,i)||(this.tabIndex=0),ym(SK||(SK=PK`
|
|
502
|
+
`),e.header?ym(dV||(dV=cV`<div class="nami-group-header">${0}</div>`),e.header.map(a)):null,e.items.map(e=>e.map(a))))}}])}(yw);function mV(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function fV(e={},t={}){var n=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>n.indexOf(e)<0).forEach(n=>{void 0===e[n]?e[n]=t[n]:mV(t[n])&&mV(e[n])&&Object.keys(t[n]).length>0&&fV(e[n],t[n])})}Eh([Xm({type:Object})],hV.prototype,"component",void 0),Eh([Xm({type:Boolean})],hV.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],hV.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],hV.prototype,"minSDKVersion",void 0),hV=Eh([Gm("nami-repeating-grid")],hV);var vV={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function pV(){var e="undefined"!=typeof document?document:{};return fV(e,vV),e}var gV,yV,bV,wV={document:vV,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function kV(){var e="undefined"!=typeof window?window:{};return fV(e,wV),e}function SV(e,t=0){return setTimeout(e,t)}function EV(){return Date.now()}function PV(e,t="x"){var n,i,a,r=kV(),o=function(e){var t,n=kV();return n.getComputedStyle&&(t=n.getComputedStyle(e,null)),!t&&e.currentStyle&&(t=e.currentStyle),t||(t=e.style),t}(e);return r.WebKitCSSMatrix?((i=o.transform||o.webkitTransform).split(",").length>6&&(i=i.split(", ").map(e=>e.replace(",",".")).join(", ")),a=new r.WebKitCSSMatrix("none"===i?"":i)):n=(a=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=r.WebKitCSSMatrix?a.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===t&&(i=r.WebKitCSSMatrix?a.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),i||0}function TV(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function MV(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function _V(...e){for(var t=Object(e[0]),n=1;n<e.length;n+=1){var i=e[n];if(null!=i&&!MV(i))for(var a=Object.keys(Object(i)).filter(e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e),r=0,o=a.length;r<o;r+=1){var s=a[r],u=Object.getOwnPropertyDescriptor(i,s);void 0!==u&&u.enumerable&&(TV(t[s])&&TV(i[s])?i[s].__swiper__?t[s]=i[s]:_V(t[s],i[s]):!TV(t[s])&&TV(i[s])?(t[s]={},i[s].__swiper__?t[s]=i[s]:_V(t[s],i[s])):t[s]=i[s])}}return t}function AV(e,t,n){e.style.setProperty(t,n)}function DV({swiper:e,targetPosition:t,side:n}){var i,a=kV(),r=-e.translate,o=null,s=e.params.speed;e.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(e.cssModeFrameID);var u=t>r?"next":"prev",l=(e,t)=>"next"===u&&e>=t||"prev"===u&&e<=t,d=()=>{i=(new Date).getTime(),null===o&&(o=i);var u=Math.max(Math.min((i-o)/s,1),0),c=.5-Math.cos(u*Math.PI)/2,h=r+c*(t-r);if(l(h,t)&&(h=t),e.wrapperEl.scrollTo({[n]:h}),l(h,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:h})}),void a.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=a.requestAnimationFrame(d)};d()}function xV(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function CV(e,t=""){var n=kV(),i=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&i.push(...e.assignedElements()),t?i.filter(e=>e.matches(t)):i}function IV(e){try{return void console.warn(e)}catch(e){}}function LV(e,t=[]){var n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}(t)),n}function RV(e,t){return kV().getComputedStyle(e,null).getPropertyValue(t)}function FV(e){var t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function OV(e,t){for(var n=[],i=e.parentElement;i;)t?i.matches(t)&&n.push(i):n.push(i),i=i.parentElement;return n}function NV(e,t,n){var i=kV();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function $V(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function WV(e,t=""){"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function jV(){return gV||(gV=function(){var e=kV(),t=pV();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),gV}function BV(e={}){return yV||(yV=function({userAgent:e}={}){var t=jV(),n=kV(),i=n.navigator.platform,a=e||n.navigator.userAgent,r={ios:!1,android:!1},o=n.screen.width,s=n.screen.height,u=a.match(/(Android);?[\s\/]+([\d.]+)?/),l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/),d=a.match(/(iPod)(.*OS\s([\d_]+))?/),c=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i,m="MacIntel"===i;return!l&&m&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${s}`)>=0&&((l=a.match(/(Version)\/([\d.]+)/))||(l=[0,1,"13_0_0"]),m=!1),u&&!h&&(r.os="android",r.android=!0),(l||c||d)&&(r.os="ios",r.ios=!0),r}(e)),yV}function zV(){return bV||(bV=function(){var e=kV(),t=BV(),n=!1;function i(){var t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){var a=String(e.navigator.userAgent);if(a.includes("Version/")){var r=a.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e)),o=r[0],s=r[1];n=o<16||16===o&&s<2}}var u=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),l=i();return{isSafari:n||l,needPerspectiveFix:n,need3dFix:l||u&&t.ios,isWebView:u}}()),bV}var UV={on(e,t,n){var i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;var a=n?"unshift":"push";return e.split(" ").forEach(e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)}),i},once(e,t,n){var i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function a(...n){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(i,n)}return a.__emitterProxy=t,i.on(e,a,n)},onAny(e,t){var n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;var i=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[i](e),n},offAny(e){var t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;var n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){var n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((i,a)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[e].splice(a,1)})}),n):n},emit(...e){var t,n,i,a=this;return!a.eventsListeners||a.destroyed?a:a.eventsListeners?("string"==typeof e[0]||Array.isArray(e[0])?(t=e[0],n=e.slice(1,e.length),i=a):(t=e[0].events,n=e[0].data,i=e[0].context||a),n.unshift(i),(Array.isArray(t)?t:t.split(" ")).forEach(e=>{a.eventsAnyListeners&&a.eventsAnyListeners.length&&a.eventsAnyListeners.forEach(t=>{t.apply(i,[e,...n])}),a.eventsListeners&&a.eventsListeners[e]&&a.eventsListeners[e].forEach(e=>{e.apply(i,n)})}),a):a}};var HV=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};var GV=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};var VV=(e,t)=>{if(e&&!e.destroyed&&e.params){var n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){var i=n.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(n.shadowRoot?i=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(i=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`))&&!i.lazyPreloaderManaged&&i.remove()})),i&&!i.lazyPreloaderManaged&&i.remove()}}},KV=(e,t)=>{if(e.slides[t]){var n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")}},XV=e=>{if(e&&!e.destroyed&&e.params){var t=e.params.lazyPreloadPrevNext,n=e.slides.length;if(n&&t&&!(t<0)){t=Math.min(t,n);var i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){var r=a,o=[r-t];return o.push(...Array.from({length:t}).map((e,t)=>r+i+t)),void e.slides.forEach((t,n)=>{o.includes(t.column)&&KV(e,n)})}var s=a+i-1;if(e.params.rewind||e.params.loop)for(var u=a-t;u<=s+t;u+=1){var l=(u%n+n)%n;(l<a||l>s)&&KV(e,l)}else for(var d=Math.max(a-t,0);d<=Math.min(s+t,n-1);d+=1)d!==a&&(d>s||d<a)&&KV(e,d)}}};var YV={updateSize:function(){var e,t,n=this,i=n.el;e=void 0!==n.params.width&&null!==n.params.width?n.params.width:i.clientWidth,t=void 0!==n.params.height&&null!==n.params.height?n.params.height:i.clientHeight,0===e&&n.isHorizontal()||0===t&&n.isVertical()||(e=e-parseInt(RV(i,"padding-left")||0,10)-parseInt(RV(i,"padding-right")||0,10),t=t-parseInt(RV(i,"padding-top")||0,10)-parseInt(RV(i,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(n,{width:e,height:t,size:n.isHorizontal()?e:t}))},updateSlides:function(){var e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}var n=e.params,i=e.wrapperEl,a=e.slidesEl,r=e.rtlTranslate,o=e.wrongRTL,s=e.virtual&&n.virtual.enabled,u=s?e.virtual.slides.length:e.slides.length,l=CV(a,`.${e.params.slideClass}, swiper-slide`),d=s?e.virtual.slides.length:l.length,c=[],h=[],m=[],f=n.slidesOffsetBefore;"function"==typeof f&&(f=n.slidesOffsetBefore.call(e));var v=n.slidesOffsetAfter;"function"==typeof v&&(v=n.slidesOffsetAfter.call(e));var p=e.snapGrid.length,g=e.slidesGrid.length,y=e.size-f-v,b=n.spaceBetween,w=-f,k=0,S=0;if(void 0!==y){"string"==typeof b&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*y:"string"==typeof b&&(b=parseFloat(b)),e.virtualSize=-b-f-v,l.forEach(e=>{r?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(AV(i,"--swiper-centered-offset-before",""),AV(i,"--swiper-centered-offset-after","")),n.cssMode&&(AV(i,"--swiper-slides-offset-before",`${f}px`),AV(i,"--swiper-slides-offset-after",`${v}px`));var E,P=n.grid&&n.grid.rows>1&&e.grid;P?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();for(var T="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter(e=>void 0!==n.breakpoints[e].slidesPerView).length>0,M=0;M<d;M+=1){E=0;var _=l[M];if(!_||(P&&e.grid.updateSlide(M,_,l),"none"!==RV(_,"display"))){if(s&&"auto"===n.slidesPerView)n.virtual.slidesPerViewAutoSlideSize&&(E=n.virtual.slidesPerViewAutoSlideSize),E&&_&&(n.roundLengths&&(E=Math.floor(E)),_.style[e.getDirectionLabel("width")]=`${E}px`);else if("auto"===n.slidesPerView){T&&(_.style[e.getDirectionLabel("width")]="");var A=getComputedStyle(_),D=_.style.transform,x=_.style.webkitTransform;if(D&&(_.style.transform="none"),x&&(_.style.webkitTransform="none"),n.roundLengths)E=e.isHorizontal()?NV(_,"width"):NV(_,"height");else{var C=t(A,"width"),I=t(A,"padding-left"),L=t(A,"padding-right"),R=t(A,"margin-left"),F=t(A,"margin-right"),O=A.getPropertyValue("box-sizing");if(O&&"border-box"===O)E=C+R+F;else{var N=_.clientWidth;E=C+I+L+R+F+(_.offsetWidth-N)}}D&&(_.style.transform=D),x&&(_.style.webkitTransform=x),n.roundLengths&&(E=Math.floor(E))}else E=(y-(n.slidesPerView-1)*b)/n.slidesPerView,n.roundLengths&&(E=Math.floor(E)),_&&(_.style[e.getDirectionLabel("width")]=`${E}px`);_&&(_.swiperSlideSize=E),m.push(E),n.centeredSlides?(w=w+E/2+k/2+b,0===k&&0!==M&&(w=w-y/2-b),0===M&&(w=w-y/2-b),Math.abs(w)<.001&&(w=0),n.roundLengths&&(w=Math.floor(w)),S%n.slidesPerGroup===0&&c.push(w),h.push(w)):(n.roundLengths&&(w=Math.floor(w)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&c.push(w),h.push(w),w=w+E+b),e.virtualSize+=E+b,k=E,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,y)+v,r&&o&&("slide"===n.effect||"coverflow"===n.effect)&&(i.style.width=`${e.virtualSize+b}px`),n.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),P&&e.grid.updateWrapperSize(E,c),!n.centeredSlides){var $="auto"!==n.slidesPerView&&n.slidesPerView%1!=0,W=n.snapToSlideEdge&&!n.loop&&("auto"===n.slidesPerView||$),j=c.length;if(W){var B;if("auto"===n.slidesPerView){B=1;for(var z=0,U=m.length-1;U>=0&&(z+=m[U]+(U<m.length-1?b:0))<=y;U-=1)B=m.length-U}else B=Math.floor(n.slidesPerView);j=Math.max(d-B,0)}for(var H=[],G=0;G<c.length;G+=1){var V=c[G];n.roundLengths&&(V=Math.floor(V)),W?G<=j&&H.push(V):c[G]<=e.virtualSize-y&&H.push(V)}c=H,Math.floor(e.virtualSize-y)-Math.floor(c[c.length-1])>1&&(W||c.push(e.virtualSize-y))}if(s&&n.loop){var K=m[0]+b;if(n.slidesPerGroup>1)for(var X=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),Y=K*n.slidesPerGroup,q=0;q<X;q+=1)c.push(c[c.length-1]+Y);for(var J=0;J<e.virtual.slidesBefore+e.virtual.slidesAfter;J+=1)1===n.slidesPerGroup&&c.push(c[c.length-1]+K),h.push(h[h.length-1]+K),e.virtualSize+=K}if(0===c.length&&(c=[0]),0!==b){var Q=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");l.filter((e,t)=>!(n.cssMode&&!n.loop)||t!==l.length-1).forEach(e=>{e.style[Q]=`${b}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){var Z=0;m.forEach(e=>{Z+=e+(b||0)});var ee=(Z-=b)>y?Z-y:0;c=c.map(e=>e<=0?-f:e>ee?ee+v:e)}if(n.centerInsufficientSlides){var te=0;if(m.forEach(e=>{te+=e+(b||0)}),(te-=b)<y){var ne=(y-te)/2;c.forEach((e,t)=>{c[t]=e-ne}),h.forEach((e,t)=>{h[t]=e+ne})}}if(Object.assign(e,{slides:l,snapGrid:c,slidesGrid:h,slidesSizesGrid:m}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){AV(i,"--swiper-centered-offset-before",-c[0]+"px"),AV(i,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");var ie=-e.snapGrid[0],ae=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+ie),e.slidesGrid=e.slidesGrid.map(e=>e+ae)}if(d!==u&&e.emit("slidesLengthChange"),c.length!==p&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(s||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){var re=`${n.containerModifierClass}backface-hidden`,oe=e.el.classList.contains(re);d<=n.maxBackfaceHiddenSlides?oe||e.el.classList.add(re):oe&&e.el.classList.remove(re)}}},updateAutoHeight:function(e){var t,n=this,i=[],a=n.virtual&&n.params.virtual.enabled,r=0;"number"==typeof e?n.setTransition(e):!0===e&&n.setTransition(n.params.speed);var o=e=>a?n.slides[n.getSlideIndexByData(e)]:n.slides[e];if("auto"!==n.params.slidesPerView&&n.params.slidesPerView>1)if(n.params.centeredSlides)(n.visibleSlides||[]).forEach(e=>{i.push(e)});else for(t=0;t<Math.ceil(n.params.slidesPerView);t+=1){var s=n.activeIndex+t;if(s>n.slides.length&&!a)break;i.push(o(s))}else i.push(o(n.activeIndex));for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var u=i[t].offsetHeight;r=u>r?u:r}(r||0===r)&&(n.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){for(var e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0,i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){var t=this,n=t.params,i=t.slides,a=t.rtlTranslate,r=t.snapGrid;if(0!==i.length){void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();var o=-e;a&&(o=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];var s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(var u=0;u<i.length;u+=1){var l=i[u],d=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(d-=i[0].swiperSlideOffset);var c=(o+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),h=(o-r[0]+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+s),m=-(o-d),f=m+t.slidesSizesGrid[u],v=m>=0&&m<=t.size-t.slidesSizesGrid[u],p=m>=0&&m<t.size-1||f>1&&f<=t.size||m<=0&&f>=t.size;p&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(u)),HV(l,p,n.slideVisibleClass),HV(l,v,n.slideFullyVisibleClass),l.progress=a?-c:c,l.originalProgress=a?-h:h}}},updateProgress:function(e){var t=this;if(void 0===e){var n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}var i=t.params,a=t.maxTranslate()-t.minTranslate(),r=t.progress,o=t.isBeginning,s=t.isEnd,u=t.progressLoop,l=o,d=s;if(0===a)r=0,o=!0,s=!0;else{r=(e-t.minTranslate())/a;var c=Math.abs(e-t.minTranslate())<1,h=Math.abs(e-t.maxTranslate())<1;o=c||r<=0,s=h||r>=1,c&&(r=0),h&&(r=1)}if(i.loop){var m=t.getSlideIndexByData(0),f=t.getSlideIndexByData(t.slides.length-1),v=t.slidesGrid[m],p=t.slidesGrid[f],g=t.slidesGrid[t.slidesGrid.length-1],y=Math.abs(e);(u=y>=v?(y-v)/g:(y+g-p)/g)>1&&(u-=1)}Object.assign(t,{progress:r,progressLoop:u,isBeginning:o,isEnd:s}),(i.watchSlidesProgress||i.centeredSlides&&i.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!d&&t.emit("reachEnd toEdge"),(l&&!o||d&&!s)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){var e,t,n,i=this,a=i.slides,r=i.params,o=i.slidesEl,s=i.activeIndex,u=i.virtual&&r.virtual.enabled,l=i.grid&&r.grid&&r.grid.rows>1,d=e=>CV(o,`.${r.slideClass}${e}, swiper-slide${e}`)[0];if(u)if(r.loop){var c=s-i.virtual.slidesBefore;c<0&&(c=i.virtual.slides.length+c),c>=i.virtual.slides.length&&(c-=i.virtual.slides.length),e=d(`[data-swiper-slide-index="${c}"]`)}else e=d(`[data-swiper-slide-index="${s}"]`);else l?(e=a.find(e=>e.column===s),n=a.find(e=>e.column===s+1),t=a.find(e=>e.column===s-1)):e=a[s];e&&(l||(n=function(e,t){for(var n=[];e.nextElementSibling;){var i=e.nextElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(e,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!n&&(n=a[0]),t=function(e,t){for(var n=[];e.previousElementSibling;){var i=e.previousElementSibling;t?i.matches(t)&&n.push(i):n.push(i),e=i}return n}(e,`.${r.slideClass}, swiper-slide`)[0],r.loop&&0===!t&&(t=a[a.length-1]))),a.forEach(i=>{GV(i,i===e,r.slideActiveClass),GV(i,i===n,r.slideNextClass),GV(i,i===t,r.slidePrevClass)}),i.emitSlidesClasses()},updateActiveIndex:function(e){var t,n=this,i=n.rtlTranslate?n.translate:-n.translate,a=n.snapGrid,r=n.params,o=n.activeIndex,s=n.realIndex,u=n.snapIndex,l=e,d=e=>{var t=e-n.virtual.slidesBefore;return t<0&&(t=n.virtual.slides.length+t),t>=n.virtual.slides.length&&(t-=n.virtual.slides.length),t};if(void 0===l&&(l=function(e){for(var t,n=e.slidesGrid,i=e.params,a=e.rtlTranslate?e.translate:-e.translate,r=0;r<n.length;r+=1)void 0!==n[r+1]?a>=n[r]&&a<n[r+1]-(n[r+1]-n[r])/2?t=r:a>=n[r]&&a<n[r+1]&&(t=r+1):a>=n[r]&&(t=r);return i.normalizeSlideIndex&&(t<0||void 0===t)&&(t=0),t}(n)),a.indexOf(i)>=0)t=a.indexOf(i);else{var c=Math.min(r.slidesPerGroupSkip,l);t=c+Math.floor((l-c)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),l!==o||n.params.loop)if(l===o&&n.params.loop&&n.virtual&&n.params.virtual.enabled)n.realIndex=d(l);else{var h,m=n.grid&&r.grid&&r.grid.rows>1;if(n.virtual&&r.virtual.enabled)h=r.loop?d(l):l;else if(m){var f=n.slides.find(e=>e.column===l),v=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(v)&&(v=Math.max(n.slides.indexOf(f),0)),h=Math.floor(v/r.grid.rows)}else if(n.slides[l]){var p=n.slides[l].getAttribute("data-swiper-slide-index");h=p?parseInt(p,10):l}else h=l;Object.assign(n,{previousSnapIndex:u,snapIndex:t,previousRealIndex:s,realIndex:h,previousIndex:o,activeIndex:l}),n.initialized&&XV(n),n.emit("activeIndexChange"),n.emit("snapIndexChange"),(n.initialized||n.params.runCallbacksOnInit)&&(s!==h&&n.emit("realIndexChange"),n.emit("slideChange"))}else t!==u&&(n.snapIndex=t,n.emit("snapIndexChange"))},updateClickedSlide:function(e,t){var n=this,i=n.params,a=e.closest(`.${i.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!a&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(a=e)});var r,o=!1;if(a)for(var s=0;s<n.slides.length;s+=1)if(n.slides[s]===a){o=!0,r=s;break}if(!a||!o)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=r,i.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var qV={getTranslate:function(e=(this.isHorizontal()?"x":"y")){var t=this,n=t.params,i=t.rtlTranslate,a=t.translate,r=t.wrapperEl;if(n.virtualTranslate)return i?-a:a;if(n.cssMode)return a;var o=PV(r,e);return o+=t.cssOverflowAdjustment(),i&&(o=-o),o||0},setTranslate:function(e,t){var n=this,i=n.rtlTranslate,a=n.params,r=n.wrapperEl,o=n.progress,s=0,u=0;n.isHorizontal()?s=i?-e:e:u=e,a.roundLengths&&(s=Math.floor(s),u=Math.floor(u)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?s:u,a.cssMode?r[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-s:-u:a.virtualTranslate||(n.isHorizontal()?s-=n.cssOverflowAdjustment():u-=n.cssOverflowAdjustment(),r.style.transform=`translate3d(${s}px, ${u}px, 0px)`);var l=n.maxTranslate()-n.minTranslate();(0===l?0:(e-n.minTranslate())/l)!==o&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,n=!0,i=!0,a){var r=this,o=r.params,s=r.wrapperEl;if(r.animating&&o.preventInteractionOnTransition)return!1;var u,l=r.minTranslate(),d=r.maxTranslate();if(u=i&&e>l?l:i&&e<d?d:e,r.updateProgress(u),o.cssMode){var c=r.isHorizontal();if(0===t)s[c?"scrollLeft":"scrollTop"]=-u;else{if(!r.support.smoothScroll)return DV({swiper:r,targetPosition:-u,side:c?"left":"top"}),!0;s.scrollTo({[c?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(u),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,n&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function JV({swiper:e,runCallbacks:t,direction:n,step:i}){var a=e.activeIndex,r=e.previousIndex,o=n;o||(o=a>r?"next":a<r?"prev":"reset"),e.emit(`transition${i}`),t&&"reset"===o?e.emit(`slideResetTransition${i}`):t&&a!==r&&(e.emit(`slideChangeTransition${i}`),"next"===o?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`))}var QV={slideTo:function(e=0,t,n=!0,i,a){"string"==typeof e&&(e=parseInt(e,10));var r=this,o=e;o<0&&(o=0);var s=r.params,u=r.snapGrid,l=r.slidesGrid,d=r.previousIndex,c=r.activeIndex,h=r.rtlTranslate,m=r.wrapperEl;if(!r.enabled&&!i&&!a||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);var f=Math.min(r.params.slidesPerGroupSkip,o),v=f+Math.floor((o-f)/r.params.slidesPerGroup);v>=u.length&&(v=u.length-1);var p,g=-u[v];if(s.normalizeSlideIndex)for(var y=0;y<l.length;y+=1){var b=-Math.floor(100*g),w=Math.floor(100*l[y]),k=Math.floor(100*l[y+1]);void 0!==l[y+1]?b>=w&&b<k-(k-w)/2?o=y:b>=w&&b<k&&(o=y+1):b>=w&&(o=y)}if(r.initialized&&o!==c){if(!r.allowSlideNext&&(h?g>r.translate&&g>r.minTranslate():g<r.translate&&g<r.minTranslate()))return!1;if(!r.allowSlidePrev&&g>r.translate&&g>r.maxTranslate()&&(c||0)!==o)return!1}o!==(d||0)&&n&&r.emit("beforeSlideChangeStart"),r.updateProgress(g),p=o>c?"next":o<c?"prev":"reset";var S=r.virtual&&r.params.virtual.enabled;if(!(S&&a)&&(h&&-g===r.translate||!h&&g===r.translate))return r.updateActiveIndex(o),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(g),"reset"!==p&&(r.transitionStart(n,p),r.transitionEnd(n,p)),!1;if(s.cssMode){var E=r.isHorizontal(),P=h?g:-g;if(0===t)S&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),S&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[E?"scrollLeft":"scrollTop"]=P})):m[E?"scrollLeft":"scrollTop"]=P,S&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return DV({swiper:r,targetPosition:P,side:E?"left":"top"}),!0;m.scrollTo({[E?"left":"top"]:P,behavior:"smooth"})}return!0}var T=zV().isSafari;return S&&!a&&T&&r.isElement&&r.virtual.update(!1,!1,o),r.setTransition(t),r.setTranslate(g),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(n,p),0===t?r.transitionEnd(n,p):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(n,p))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,n=!0,i){"string"==typeof e&&(e=parseInt(e,10));var a=this;if(!a.destroyed){void 0===t&&(t=a.params.speed);var r=a.grid&&a.params.grid&&a.params.grid.rows>1,o=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)o+=a.virtual.slidesBefore;else{var s;if(r){var u=o*a.params.grid.rows;s=a.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===u).column}else s=a.getSlideIndexByData(o);var l=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,d=a.params,c=d.centeredSlides,h=d.slidesOffsetBefore,m=d.slidesOffsetAfter,f=c||!!h||!!m,v=a.params.slidesPerView;"auto"===v?v=a.slidesPerViewDynamic():(v=Math.ceil(parseFloat(a.params.slidesPerView,10)),f&&v%2==0&&(v+=1));var p=l-s<v;if(f&&(p=p||s<Math.ceil(v/2)),i&&f&&"auto"!==a.params.slidesPerView&&!r&&(p=!1),p){var g=f?s<a.activeIndex?"prev":"next":s-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:g,slideTo:!0,activeSlideIndex:"next"===g?s+1:s-l+1,slideRealIndex:"next"===g?a.realIndex:void 0})}if(r){var y=o*a.params.grid.rows;o=a.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===y).column}else o=a.getSlideIndexByData(o)}return requestAnimationFrame(()=>{a.slideTo(o,t,n,i)}),a}},slideNext:function(e,t=!0,n){var i=this,a=i.enabled,r=i.params,o=i.animating;if(!a||i.destroyed)return i;void 0===e&&(e=i.params.speed);var s=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(s=Math.max(i.slidesPerViewDynamic("current",!0),1));var u=i.activeIndex<r.slidesPerGroupSkip?1:s,l=i.virtual&&r.virtual.enabled;if(r.loop){if(o&&!l&&r.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{i.slideTo(i.activeIndex+u,e,t,n)}),!0}return r.rewind&&i.isEnd?i.slideTo(0,e,t,n):i.slideTo(i.activeIndex+u,e,t,n)},slidePrev:function(e,t=!0,n){var i=this,a=i.params,r=i.snapGrid,o=i.slidesGrid,s=i.rtlTranslate,u=i.enabled,l=i.animating;if(!u||i.destroyed)return i;void 0===e&&(e=i.params.speed);var d=i.virtual&&a.virtual.enabled;if(a.loop){if(l&&!d&&a.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function c(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var h,m=c(s?i.translate:-i.translate),f=r.map(e=>c(e)),v=a.freeMode&&a.freeMode.enabled,p=r[f.indexOf(m)-1];void 0===p&&(a.cssMode||v)&&(r.forEach((e,t)=>{m>=e&&(h=t)}),void 0!==h&&(p=v?r[h]:r[h>0?h-1:h]));var g=0;if(void 0!==p&&((g=o.indexOf(p))<0&&(g=i.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(g=g-i.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&i.isBeginning){var y=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(y,e,t,n)}return a.loop&&0===i.activeIndex&&a.cssMode?(requestAnimationFrame(()=>{i.slideTo(g,e,t,n)}),!0):i.slideTo(g,e,t,n)},slideReset:function(e,t=!0,n){var i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,n)},slideToClosest:function(e,t=!0,n,i=.5){var a=this;if(!a.destroyed){void 0===e&&(e=a.params.speed);var r=a.activeIndex,o=Math.min(a.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/a.params.slidesPerGroup),u=a.rtlTranslate?a.translate:-a.translate;if(u>=a.snapGrid[s]){var l=a.snapGrid[s];u-l>(a.snapGrid[s+1]-l)*i&&(r+=a.params.slidesPerGroup)}else{var d=a.snapGrid[s-1];u-d<=(a.snapGrid[s]-d)*i&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,n)}},slideToClickedSlide:function(){var e=this;if(!e.destroyed){var t,n=e.params,i=e.slidesEl,a="auto"===n.slidesPerView?e.slidesPerViewDynamic():n.slidesPerView,r=e.getSlideIndexWhenGrid(e.clickedIndex),o=e.isElement?"swiper-slide":`.${n.slideClass}`,s=e.grid&&e.params.grid&&e.params.grid.rows>1;if(n.loop){if(e.animating)return;t=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),n.centeredSlides?e.slideToLoop(t):r>(s?(e.slides.length-a)/2-(e.params.grid.rows-1):e.slides.length-a)?(e.loopFix(),r=e.getSlideIndex(CV(i,`${o}[data-swiper-slide-index="${t}"]`)[0]),SV(()=>{e.slideTo(r)})):e.slideTo(r)}else e.slideTo(r)}}};var ZV={loopCreate:function(e,t){var n=this,i=n.params,a=n.slidesEl;if(!(!i.loop||n.virtual&&n.params.virtual.enabled)){var r,o=()=>{CV(a,`.${i.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},s=n.grid&&i.grid&&i.grid.rows>1;i.loopAddBlankSlides&&(i.slidesPerGroup>1||s)&&((r=CV(a,`.${i.slideBlankClass}`)).forEach(e=>{e.remove()}),r.length>0&&(n.recalcSlides(),n.updateSlides()));var u=i.slidesPerGroup*(s?i.grid.rows:1),l=n.slides.length%u!==0,d=s&&n.slides.length%i.grid.rows!==0,c=e=>{for(var t=0;t<e;t+=1){var a=n.isElement?LV("swiper-slide",[i.slideBlankClass]):LV("div",[i.slideClass,i.slideBlankClass]);n.slidesEl.append(a)}};if(l){if(i.loopAddBlankSlides)c(u-n.slides.length%u),n.recalcSlides(),n.updateSlides();else IV("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(d){if(i.loopAddBlankSlides)c(i.grid.rows-n.slides.length%i.grid.rows),n.recalcSlides(),n.updateSlides();else IV("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();var h=i.centeredSlides||!!i.slidesOffsetBefore||!!i.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:h?void 0:"next",initial:t})}},loopFix:function({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:i,activeSlideIndex:a,initial:r,byController:o,byMousewheel:s}={}){var u=this;if(u.params.loop){u.emit("beforeLoopFix");var l=u.slides,d=u.allowSlidePrev,c=u.allowSlideNext,h=u.slidesEl,f=u.params,v=f.centeredSlides,p=f.slidesOffsetBefore,g=f.slidesOffsetAfter,y=f.initialSlide,b=v||!!p||!!g;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&f.virtual.enabled)return t&&(b||0!==u.snapIndex?b&&u.snapIndex<f.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0):u.slideTo(u.virtual.slides.length,0,!1,!0)),u.allowSlidePrev=d,u.allowSlideNext=c,void u.emit("loopFix");var w=f.slidesPerView;"auto"===w?w=u.slidesPerViewDynamic():(w=Math.ceil(parseFloat(f.slidesPerView,10)),b&&w%2==0&&(w+=1));var k=f.slidesPerGroupAuto?w:f.slidesPerGroup,S=b?Math.max(k,Math.ceil(w/2)):k;S%k!==0&&(S+=k-S%k),S+=f.loopAdditionalSlides,u.loopedSlides=S;var E=u.grid&&f.grid&&f.grid.rows>1;l.length<w+S||"cards"===u.params.effect&&l.length<w+2*S?IV("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):E&&"row"===f.grid.fill&&IV("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");var P=[],T=[],M=E?Math.ceil(l.length/f.grid.rows):l.length,_=r&&M-y<w&&!b,A=_?y:u.activeIndex;void 0===a?a=u.getSlideIndex(l.find(e=>e.classList.contains(f.slideActiveClass))):A=a;var D="next"===n||!n,x="prev"===n||!n,C=0,I=0,L=(E?l[a].column:a)+(b&&void 0===i?-w/2+.5:0);if(L<S){C=Math.max(S-L,k);for(var R=0;R<S-L;R+=1){var F=R-Math.floor(R/M)*M;if(E)for(var O=M-F-1,N=l.length-1;N>=0;N-=1)l[N].column===O&&P.push(N);else P.push(M-F-1)}}else if(L+w>M-S){I=Math.max(L-(M-2*S),k),_&&(I=Math.max(I,w-M+y+1));for(var $=function(){var e=W-Math.floor(W/M)*M;E?l.forEach((t,n)=>{t.column===e&&T.push(n)}):T.push(e)},W=0;W<I;W+=1)$()}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),"cards"===u.params.effect&&l.length<w+2*S&&(T.includes(a)&&T.splice(T.indexOf(a),1),P.includes(a)&&P.splice(P.indexOf(a),1)),x&&P.forEach(e=>{l[e].swiperLoopMoveDOM=!0,h.prepend(l[e]),l[e].swiperLoopMoveDOM=!1}),D&&T.forEach(e=>{l[e].swiperLoopMoveDOM=!0,h.append(l[e]),l[e].swiperLoopMoveDOM=!1}),u.recalcSlides(),"auto"===f.slidesPerView?u.updateSlides():E&&(P.length>0&&x||T.length>0&&D)&&u.slides.forEach((e,t)=>{u.grid.updateSlide(t,e,u.slides)}),f.watchSlidesProgress&&u.updateSlidesOffset(),t)if(P.length>0&&x){if(void 0===e){var j=u.slidesGrid[A],B=u.slidesGrid[A+C]-j;s?u.setTranslate(u.translate-B):(u.slideTo(A+Math.ceil(C),0,!1,!0),i&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-B,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-B))}else if(i){var z=E?P.length/f.grid.rows:P.length;u.slideTo(u.activeIndex+z,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(T.length>0&&D)if(void 0===e){var U=u.slidesGrid[A],H=u.slidesGrid[A-I]-U;s?u.setTranslate(u.translate-H):(u.slideTo(A-I,0,!1,!0),i&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-H,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-H))}else{var G=E?T.length/f.grid.rows:T.length;u.slideTo(u.activeIndex-G,0,!1,!0)}if(u.allowSlidePrev=d,u.allowSlideNext=c,u.controller&&u.controller.control&&!o){var V={slideRealIndex:e,direction:n,setTranslate:i,activeSlideIndex:a,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(e=>{!e.destroyed&&e.params.loop&&e.loopFix(m({},V,{slideTo:e.params.slidesPerView===f.slidesPerView&&t}))}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix(m({},V,{slideTo:u.controller.control.params.slidesPerView===f.slidesPerView&&t}))}u.emit("loopFix")}},loopDestroy:function(){var e=this,t=e.params,n=e.slidesEl;if(t.loop&&n&&(!e.virtual||!e.params.virtual.enabled)){e.recalcSlides();var i=[];e.slides.forEach(e=>{var t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),i.forEach(e=>{n.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}}};var eK={setGrabCursor:function(e){var t=this;if(!(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}},unsetGrabCursor:function(){var e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}};function tK(e,t,n){var i=kV(),a=e.params,r=a.edgeSwipeDetection,o=a.edgeSwipeThreshold;return!r||!(n<=o||n>=i.innerWidth-o)||"prevent"===r&&(t.preventDefault(),!0)}function nK(e){var t=this,n=pV(),i=e;i.originalEvent&&(i=i.originalEvent);var a=t.touchEventsData;if("pointerdown"===i.type){if(null!==a.pointerId&&a.pointerId!==i.pointerId)return;a.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(a.touchId=i.targetTouches[0].identifier);if("touchstart"!==i.type){var r=t.params,o=t.touches;if(t.enabled&&(r.simulateTouch||"mouse"!==i.pointerType)&&(!t.animating||!r.preventInteractionOnTransition)){!t.animating&&r.cssMode&&r.loop&&t.loopFix();var s=i.target;if(("wrapper"!==r.touchEventsTarget||function(e,t){var n=kV(),i=t.contains(e);return!i&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&((i=[...t.assignedElements()].includes(e))||(i=function(e,t){for(var n=[t];n.length>0;){var i=n.shift();if(e===i)return!0;n.push(...i.children,...i.shadowRoot?i.shadowRoot.children:[],...i.assignedElements?i.assignedElements():[])}}(e,t))),i}(s,t.wrapperEl))&&!("which"in i&&3===i.which||"button"in i&&i.button>0||a.isTouched&&a.isMoved)){var u=!!r.noSwipingClass&&""!==r.noSwipingClass,l=i.composedPath?i.composedPath():i.path;u&&i.target&&i.target.shadowRoot&&l&&(s=l[0]);var d=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,c=!(!i.target||!i.target.shadowRoot);if(r.noSwiping&&(c?function(e,t=this){return function t(n){if(!n||n===pV()||n===kV())return null;n.assignedSlot&&(n=n.assignedSlot);var i=n.closest(e);return i||n.getRootNode?i||t(n.getRootNode().host):null}(t)}(d,s):s.closest(d)))t.allowClick=!0;else if(!r.swipeHandler||s.closest(r.swipeHandler)){o.currentX=i.pageX,o.currentY=i.pageY;var h=o.currentX,m=o.currentY;if(tK(t,i,h)){Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=h,o.startY=m,a.touchStartTime=EV(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);var f=!0;s.matches(a.focusableElements)&&(f=!1,"SELECT"===s.nodeName&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==s&&("mouse"===i.pointerType||"mouse"!==i.pointerType&&!s.matches(a.focusableElements))&&n.activeElement.blur();var v=f&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!v||s.isContentEditable||i.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}}}}}else tK(t,i,i.targetTouches[0].pageX)}function iK(e){var t=pV(),n=this,i=n.touchEventsData,a=n.params,r=n.touches,o=n.rtlTranslate;if(n.enabled&&(a.simulateTouch||"mouse"!==e.pointerType)){var s,u=e;if(u.originalEvent&&(u=u.originalEvent),"pointermove"===u.type){if(null!==i.touchId)return;if(u.pointerId!==i.pointerId)return}if("touchmove"===u.type){if(s=[...u.changedTouches].find(e=>e.identifier===i.touchId),!s||s.identifier!==i.touchId)return}else s=u;if(i.isTouched){var l=s.pageX,d=s.pageY;if(u.preventedByNestedSwiper)return r.startX=l,void(r.startY=d);if(!n.allowTouchMove)return u.target.matches(i.focusableElements)||(n.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:l,startY:d,currentX:l,currentY:d}),i.touchStartTime=EV()));if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(d<r.startY&&n.translate<=n.maxTranslate()||d>r.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else{if(o&&(l>r.startX&&-n.translate<=n.maxTranslate()||l<r.startX&&-n.translate>=n.minTranslate()))return;if(!o&&(l<r.startX&&n.translate<=n.maxTranslate()||l>r.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==u.target&&"mouse"!==u.pointerType&&t.activeElement.blur(),t.activeElement&&u.target===t.activeElement&&u.target.matches(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);i.allowTouchCallbacks&&n.emit("touchMove",u),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=l,r.currentY=d;var c=r.currentX-r.startX,h=r.currentY-r.startY;if(!(n.params.threshold&&Math.sqrt(c**2+h**2)<n.params.threshold)){var m;if(void 0===i.isScrolling)n.isHorizontal()&&r.currentY===r.startY||n.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:c*c+h*h>=25&&(m=180*Math.atan2(Math.abs(h),Math.abs(c))/Math.PI,i.isScrolling=n.isHorizontal()?m>a.touchAngle:90-m>a.touchAngle);if(i.isScrolling&&n.emit("touchMoveOpposite",u),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===u.type&&i.preventTouchMoveFromPointerMove)i.isTouched=!1;else if(i.startMoving){n.allowClick=!1,!a.cssMode&&u.cancelable&&u.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&u.stopPropagation();var f=n.isHorizontal()?c:h,v=n.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(f=Math.abs(f)*(o?1:-1),v=Math.abs(v)*(o?1:-1)),r.diff=f,f*=a.touchRatio,o&&(f=-f,v=-v);var p=n.touchesDirection;n.swipeDirection=f>0?"prev":"next",n.touchesDirection=v>0?"prev":"next";var g=n.params.loop&&!a.cssMode,y="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!i.isMoved){if(g&&y&&n.loopFix({direction:n.swipeDirection}),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){var b=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(b)}i.allowMomentumBounce=!1,!a.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",u)}if((new Date).getTime(),!1!==a._loopSwapReset&&i.isMoved&&i.allowThresholdMove&&p!==n.touchesDirection&&g&&y&&Math.abs(f)>=1)return Object.assign(r,{startX:l,startY:d,currentX:l,currentY:d,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);n.emit("sliderMove",u),i.isMoved=!0,i.currentTranslate=f+i.startTranslate;var w=!0,k=a.resistanceRatio;if(a.touchReleaseOnEdges&&(k=0),f>0?(g&&y&&i.allowThresholdMove&&i.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>n.minTranslate()&&(w=!1,a.resistance&&(i.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+i.startTranslate+f)**k))):f<0&&(g&&y&&i.allowThresholdMove&&i.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==a.slidesPerView&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===a.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),i.currentTranslate<n.maxTranslate()&&(w=!1,a.resistance&&(i.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-i.startTranslate-f)**k))),w&&(u.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=n.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}}}else i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",u)}}function aK(e){var t,n=this,i=n.touchEventsData,a=e;if(a.originalEvent&&(a=a.originalEvent),"touchend"===a.type||"touchcancel"===a.type){if(t=[...a.changedTouches].find(e=>e.identifier===i.touchId),!t||t.identifier!==i.touchId)return}else{if(null!==i.touchId)return;if(a.pointerId!==i.pointerId)return;t=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)&&!(["pointercancel","contextmenu"].includes(a.type)&&(n.browser.isSafari||n.browser.isWebView)))return;i.pointerId=null,i.touchId=null;var r=n.params,o=n.touches,s=n.rtlTranslate,u=n.slidesGrid;if(n.enabled&&(r.simulateTouch||"mouse"!==a.pointerType)){if(i.allowTouchCallbacks&&n.emit("touchEnd",a),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&r.grabCursor&&n.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);r.grabCursor&&i.isMoved&&i.isTouched&&(!0===n.allowSlideNext||!0===n.allowSlidePrev)&&n.setGrabCursor(!1);var l,d=EV(),c=d-i.touchStartTime;if(n.allowClick){var h=a.path||a.composedPath&&a.composedPath();n.updateClickedSlide(h&&h[0]||a.target,h),n.emit("tap click",a),c<300&&d-i.lastClickTime<300&&n.emit("doubleTap doubleClick",a)}if(i.lastClickTime=EV(),SV(()=>{n.destroyed||(n.allowClick=!0)}),!i.isTouched||!i.isMoved||!n.swipeDirection||0===o.diff&&!i.loopSwapReset||i.currentTranslate===i.startTranslate&&!i.loopSwapReset)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,l=r.followFinger?s?n.translate:-n.translate:-i.currentTranslate,!r.cssMode)if(r.freeMode&&r.freeMode.enabled)n.freeMode.onTouchEnd({currentPos:l});else{for(var m=l>=-n.maxTranslate()&&!n.params.loop,f=0,v=n.slidesSizesGrid[0],p=0;p<u.length;p+=p<r.slidesPerGroupSkip?1:r.slidesPerGroup){var g=p<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==u[p+g]?(m||l>=u[p]&&l<u[p+g])&&(f=p,v=u[p+g]-u[p]):(m||l>=u[p])&&(f=p,v=u[u.length-1]-u[u.length-2])}var y=null,b=null;r.rewind&&(n.isBeginning?b=r.virtual&&r.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1:n.isEnd&&(y=0));var w=(l-u[f])/v,k=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(c>r.longSwipesMs){if(!r.longSwipes)return void n.slideTo(n.activeIndex);"next"===n.swipeDirection&&(w>=r.longSwipesRatio?n.slideTo(r.rewind&&n.isEnd?y:f+k):n.slideTo(f)),"prev"===n.swipeDirection&&(w>1-r.longSwipesRatio?n.slideTo(f+k):null!==b&&w<0&&Math.abs(w)>r.longSwipesRatio?n.slideTo(b):n.slideTo(f))}else{if(!r.shortSwipes)return void n.slideTo(n.activeIndex);n.navigation&&(a.target===n.navigation.nextEl||a.target===n.navigation.prevEl)?a.target===n.navigation.nextEl?n.slideTo(f+k):n.slideTo(f):("next"===n.swipeDirection&&n.slideTo(null!==y?y:f+k),"prev"===n.swipeDirection&&n.slideTo(null!==b?b:f))}}}}function rK(){var e=this,t=e.params,n=e.el;if(!n||0!==n.offsetWidth){t.breakpoints&&e.setBreakpoint();var i=e.allowSlideNext,a=e.allowSlidePrev,r=e.snapGrid,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();var s=o&&t.loop;if(!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s)e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{var u=o?e.virtual.slides:e.slides;e.slideTo(u.length-1,0,!1,!0)}e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}function oK(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function sK(){var e=this,t=e.wrapperEl,n=e.rtlTranslate;if(e.enabled){e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();var i=e.maxTranslate()-e.minTranslate();(0===i?0:(e.translate-e.minTranslate())/i)!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}}function uK(e){var t=this;VV(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function lK(){var e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}var dK=(e,t)=>{var n=pV(),i=e.params,a=e.el,r=e.wrapperEl,o=e.device,s=!!i.nested,u="on"===t?"addEventListener":"removeEventListener",l=t;a&&"string"!=typeof a&&(n[u]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),a[u]("touchstart",e.onTouchStart,{passive:!1}),a[u]("pointerdown",e.onTouchStart,{passive:!1}),n[u]("touchmove",e.onTouchMove,{passive:!1,capture:s}),n[u]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[u]("touchend",e.onTouchEnd,{passive:!0}),n[u]("pointerup",e.onTouchEnd,{passive:!0}),n[u]("pointercancel",e.onTouchEnd,{passive:!0}),n[u]("touchcancel",e.onTouchEnd,{passive:!0}),n[u]("pointerout",e.onTouchEnd,{passive:!0}),n[u]("pointerleave",e.onTouchEnd,{passive:!0}),n[u]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&a[u]("click",e.onClick,!0),i.cssMode&&r[u]("scroll",e.onScroll),i.updateOnWindowResize?e[l](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",rK,!0):e[l]("observerUpdate",rK,!0),a[u]("load",e.onLoad,{capture:!0}))};var cK=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var hK={setBreakpoint:function(){var e=this,t=e.realIndex,n=e.initialized,i=e.params,a=e.el,r=i.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var o=pV(),s="window"!==i.breakpointsBase&&i.breakpointsBase?"container":i.breakpointsBase,u=["window","container"].includes(i.breakpointsBase)||!i.breakpointsBase?e.el:o.querySelector(i.breakpointsBase),l=e.getBreakpoint(r,s,u);if(l&&e.currentBreakpoint!==l){var d=(l in r?r[l]:void 0)||e.originalParams,c=cK(e,i),h=cK(e,d),m=e.params.grabCursor,f=d.grabCursor,v=i.enabled;c&&!h?(a.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&h&&(a.classList.add(`${i.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===i.grid.fill)&&a.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),m&&!f?e.unsetGrabCursor():!m&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0!==d[t]){var n=i[t]&&i[t].enabled,a=d[t]&&d[t].enabled;n&&!a&&e[t].disable(),!n&&a&&e[t].enable()}});var p=d.direction&&d.direction!==i.direction,g=i.loop&&(d.slidesPerView!==i.slidesPerView||p),y=i.loop;p&&n&&e.changeDirection(),_V(e.params,d);var b=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),v&&!b?e.disable():!v&&b&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",d),n&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&w?(e.loopCreate(t),e.updateSlides()):y&&!w&&e.loopDestroy()),e.emit("breakpoint",d)}}},getBreakpoint:function(e,t="window",n){if(e&&("container"!==t||n)){var i=!1,a=kV(),r="window"===t?a.innerHeight:n.clientHeight,o=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}});o.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(var s=0;s<o.length;s+=1){var u=o[s],l=u.point,d=u.value;"window"===t?a.matchMedia(`(min-width: ${d}px)`).matches&&(i=l):d<=n.clientWidth&&(i=l)}return i||"max"}}};var mK={addClasses:function(){var e,t,n,i=this,a=i.classNames,r=i.params,o=i.rtl,s=i.el,u=i.device,l=(e=["initialized",r.direction,{"free-mode":i.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:o},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&"column"===r.grid.fill},{android:u.android},{ios:u.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],t=r.containerModifierClass,n=[],e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(i=>{e[i]&&n.push(t+i)}):"string"==typeof e&&n.push(t+e)}),n);a.push(...l),s.classList.add(...a),i.emitContainerClasses()},removeClasses:function(){var e=this,t=e.el,n=e.classNames;t&&"string"!=typeof t&&(t.classList.remove(...n),e.emitContainerClasses())}};var fK={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function vK(e,t){return function(n={}){var i=Object.keys(n)[0],a=n[i];"object"==typeof a&&null!==a?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in a?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),_V(t,n)):_V(t,n)):_V(t,n)}}var pK={eventsEmitter:UV,update:YV,translate:qV,transition:{setTransition:function(e,t){var n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e=!0,t){var n=this,i=n.params;i.cssMode||(i.autoHeight&&n.updateAutoHeight(),JV({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){var n=this,i=n.params;n.animating=!1,i.cssMode||(n.setTransition(0),JV({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:QV,loop:ZV,grabCursor:eK,events:{attachEvents:function(){var e=this,t=e.params;e.onTouchStart=nK.bind(e),e.onTouchMove=iK.bind(e),e.onTouchEnd=aK.bind(e),e.onDocumentTouchStart=lK.bind(e),t.cssMode&&(e.onScroll=sK.bind(e)),e.onClick=oK.bind(e),e.onLoad=uK.bind(e),dK(e,"on")},detachEvents:function(){dK(this,"off")}},breakpoints:hK,checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked,n=e.params,i=n.slidesOffsetBefore;if(i){var a=e.slides.length-1,r=e.slidesGrid[a]+e.slidesSizesGrid[a]+2*i;e.isLocked=e.size>r}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:mK},gK={},yK=function(){function e(...t){var n,i;o(this,e),1===t.length&&t[0].constructor&&"Object"===Object.prototype.toString.call(t[0]).slice(8,-1)?i=t[0]:(n=t[0],i=t[1]),i||(i={}),i=_V({},i),n&&!i.el&&(i.el=n);var a=pV();if(i.el&&"string"==typeof i.el&&a.querySelectorAll(i.el).length>1){var r=[];return a.querySelectorAll(i.el).forEach(t=>{var n=_V({},i,{el:t});r.push(new e(n))}),r}var s=this;s.__swiper__=!0,s.support=jV(),s.device=BV({userAgent:i.userAgent}),s.browser=zV(),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],i.modules&&Array.isArray(i.modules)&&i.modules.forEach(e=>{"function"==typeof e&&s.modules.indexOf(e)<0&&s.modules.push(e)});var u={};s.modules.forEach(e=>{e({params:i,swiper:s,extendParams:vK(i,u),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})});var l=_V({},fK,u);return s.params=_V({},l,gK,i),s.originalParams=_V({},s.params),s.passedParams=_V({},i),s.params&&s.params.on&&Object.keys(s.params.on).forEach(e=>{s.on(e,s.params.on[e])}),s.params&&s.params.onAny&&s.onAny(s.params.onAny),Object.assign(s,{enabled:s.params.enabled,el:n,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===s.params.direction,isVertical:()=>"vertical"===s.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}return c(e,[{key:"getDirectionLabel",value:function(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}},{key:"getSlideIndex",value:function(e){var t=FV(CV(this.slidesEl,`.${this.params.slideClass}, swiper-slide`)[0]);return FV(e)-t}},{key:"getSlideIndexByData",value:function(e){return this.getSlideIndex(this.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e))}},{key:"getSlideIndexWhenGrid",value:function(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}},{key:"recalcSlides",value:function(){var e=this,t=e.slidesEl,n=e.params;e.slides=CV(t,`.${n.slideClass}, swiper-slide`)}},{key:"enable",value:function(){var e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}},{key:"disable",value:function(){var e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}},{key:"setProgress",value:function(e,t){var n=this;e=Math.min(Math.max(e,0),1);var i=n.minTranslate(),a=(n.maxTranslate()-i)*e+i;n.translateTo(a,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}},{key:"emitContainerClasses",value:function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}}},{key:"getSlideClasses",value:function(e){var t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}},{key:"emitSlidesClasses",value:function(){var e=this;if(e.params._emitClasses&&e.el){var t=[];e.slides.forEach(n=>{var i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)}),e.emit("_slideClasses",t)}}},{key:"slidesPerViewDynamic",value:function(e="current",t=!1){var n=this,i=n.params,a=n.slides,r=n.slidesGrid,o=n.slidesSizesGrid,s=n.size,u=n.activeIndex,l=1;if("number"==typeof i.slidesPerView)return i.slidesPerView;if(i.centeredSlides){for(var d,c=a[u]?Math.ceil(a[u].swiperSlideSize):0,h=u+1;h<a.length;h+=1)a[h]&&!d&&(l+=1,(c+=Math.ceil(a[h].swiperSlideSize))>s&&(d=!0));for(var m=u-1;m>=0;m-=1)a[m]&&!d&&(l+=1,(c+=a[m].swiperSlideSize)>s&&(d=!0))}else if("current"===e)for(var f=u+1;f<a.length;f+=1){(t?r[f]+o[f]-r[u]<s:r[f]-r[u]<s)&&(l+=1)}else for(var v=u-1;v>=0;v-=1){r[u]-r[v]<s&&(l+=1)}return l}},{key:"update",value:function(){var e=this;if(e&&!e.destroyed){var t,n=e.snapGrid,i=e.params;if(i.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&VV(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),i.freeMode&&i.freeMode.enabled&&!i.cssMode)r(),i.autoHeight&&e.updateAutoHeight();else{if(("auto"===i.slidesPerView||i.slidesPerView>1)&&e.isEnd&&!i.centeredSlides){var a=e.virtual&&i.virtual.enabled?e.virtual.slides:e.slides;t=e.slideTo(a.length-1,0,!1,!0)}else t=e.slideTo(e.activeIndex,0,!1,!0);t||r()}i.watchOverflow&&n!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function r(){var t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}}},{key:"changeDirection",value:function(e,t=!0){var n=this,i=n.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${i}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}},{key:"changeLanguageDirection",value:function(e){var t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}},{key:"mount",value:function(e){var t=this;if(t.mounted)return!0;var n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);var i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`,a=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(i()):CV(n,i())[0];return!a&&t.params.createElements&&(a=LV("div",t.params.wrapperClass),n.append(a),CV(n,`.${t.params.slideClass}`).forEach(e=>{a.append(e)})),Object.assign(t,{el:n,wrapperEl:a,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:a,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===RV(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===RV(n,"direction")),wrongRTL:"-webkit-box"===RV(a,"display")}),!0}},{key:"init",value:function(e){var t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();var n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach(e=>{e.complete?VV(t,e):e.addEventListener("load",e=>{VV(t,e.target)})}),XV(t),t.initialized=!0,XV(t),t.emit("init"),t.emit("afterInit"),t}},{key:"destroy",value:function(e=!0,t=!0){var n=this,i=n.params,a=n.el,r=n.wrapperEl,o=n.slides;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),i.loop&&n.loopDestroy(),t&&(n.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),o&&o.length&&o.forEach(e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(e=>{n.off(e)}),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){var t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(n)),n.destroyed=!0),null}}],[{key:"extendDefaults",value:function(e){_V(gK,e)}},{key:"extendedDefaults",get:function(){return gK}},{key:"defaults",get:function(){return fK}},{key:"installModule",value:function(t){e.prototype.__modules__||(e.prototype.__modules__=[]);var n=e.prototype.__modules__;"function"==typeof t&&n.indexOf(t)<0&&n.push(t)}},{key:"use",value:function(t){return Array.isArray(t)?(t.forEach(t=>e.installModule(t)),e):(e.installModule(t),e)}}])}();function bK(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function wK({swiper:e,extendParams:t,on:n,emit:i}){var a,r="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),e.pagination={el:null,bullets:[]};var o=0;function s(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&0===e.pagination.el.length}function u(t,n){var i=e.params.pagination.bulletActiveClass;t&&(t=t[("prev"===n?"previous":"next")+"ElementSibling"])&&(t.classList.add(`${i}-${n}`),(t=t[("prev"===n?"previous":"next")+"ElementSibling"])&&t.classList.add(`${i}-${n}-${n}`))}function l(t){var n=t.target.closest(bK(e.params.pagination.bulletClass));if(n){t.preventDefault();var i,a,r,o=FV(n)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===o)return;var s=(i=e.realIndex,a=o,r=e.slides.length,(a%=r)===1+(i%=r)?"next":a===i-1?"previous":void 0);"next"===s?e.slideNext():"previous"===s?e.slidePrev():e.slideToLoop(o)}else e.slideTo(o)}}function d(){var t=e.rtl,n=e.params.pagination;if(!s()){var r,l,d=e.pagination.el;d=$V(d);var c=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,h=e.params.loop?Math.ceil(c/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(l=e.previousRealIndex||0,r=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):void 0!==e.snapIndex?(r=e.snapIndex,l=e.previousSnapIndex):(l=e.previousIndex||0,r=e.activeIndex||0),"bullets"===n.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var m,f,v,p=e.pagination.bullets;if(n.dynamicBullets&&(a=NV(p[0],e.isHorizontal()?"width":"height"),d.forEach(t=>{t.style[e.isHorizontal()?"width":"height"]=a*(n.dynamicMainBullets+4)+"px"}),n.dynamicMainBullets>1&&void 0!==l&&((o+=r-(l||0))>n.dynamicMainBullets-1?o=n.dynamicMainBullets-1:o<0&&(o=0)),m=Math.max(r-o,0),v=((f=m+(Math.min(p.length,n.dynamicMainBullets)-1))+m)/2),p.forEach(e=>{var t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${n.bulletActiveClass}${e}`)].map(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e).flat();e.classList.remove(...t)}),d.length>1)p.forEach(t=>{var i=FV(t);i===r?t.classList.add(...n.bulletActiveClass.split(" ")):e.isElement&&t.setAttribute("part","bullet"),n.dynamicBullets&&(i>=m&&i<=f&&t.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),i===m&&u(t,"prev"),i===f&&u(t,"next"))});else{var g=p[r];if(g&&g.classList.add(...n.bulletActiveClass.split(" ")),e.isElement&&p.forEach((e,t)=>{e.setAttribute("part",t===r?"bullet-active":"bullet")}),n.dynamicBullets){for(var y=p[m],b=p[f],w=m;w<=f;w+=1)p[w]&&p[w].classList.add(...`${n.bulletActiveClass}-main`.split(" "));u(y,"prev"),u(b,"next")}}if(n.dynamicBullets){var k=Math.min(p.length,n.dynamicMainBullets+4),S=(a*k-a)/2-v*a,E=t?"right":"left";p.forEach(t=>{t.style[e.isHorizontal()?E:"top"]=`${S}px`})}}d.forEach((t,a)=>{if("fraction"===n.type&&(t.querySelectorAll(bK(n.currentClass)).forEach(e=>{e.textContent=n.formatFractionCurrent(r+1)}),t.querySelectorAll(bK(n.totalClass)).forEach(e=>{e.textContent=n.formatFractionTotal(h)})),"progressbar"===n.type){var o;o=n.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var s=(r+1)/h,u=1,l=1;"horizontal"===o?u=s:l=s,t.querySelectorAll(bK(n.progressbarFillClass)).forEach(t=>{t.style.transform=`translate3d(0,0,0) scaleX(${u}) scaleY(${l})`,t.style.transitionDuration=`${e.params.speed}ms`})}"custom"===n.type&&n.renderCustom?(WV(t,n.renderCustom(e,r+1,h)),0===a&&i("paginationRender",t)):(0===a&&i("paginationRender",t),i("paginationUpdate",t)),e.params.watchOverflow&&e.enabled&&t.classList[e.isLocked?"add":"remove"](n.lockClass)})}}function c(){var t=e.params.pagination;if(!s()){var n=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length,a=e.pagination.el;a=$V(a);var r="";if("bullets"===t.type){var o=e.params.loop?Math.ceil(n/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&o>n&&(o=n);for(var u=0;u<o;u+=1)t.renderBullet?r+=t.renderBullet.call(e,u,t.bulletClass):r+=`<${t.bulletElement} ${e.isElement?'part="bullet"':""} class="${t.bulletClass}"></${t.bulletElement}>`}"fraction"===t.type&&(r=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`),"progressbar"===t.type&&(r=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`),e.pagination.bullets=[],a.forEach(n=>{"custom"!==t.type&&WV(n,r||""),"bullets"===t.type&&e.pagination.bullets.push(...n.querySelectorAll(bK(t.bulletClass)))}),"custom"!==t.type&&i("paginationRender",a[0])}}function h(){e.params.pagination=function(e,t,n,i){return e.params.createElements&&Object.keys(i).forEach(a=>{if(!n[a]&&!0===n.auto){var r=CV(e.el,`.${i[a]}`)[0];r||((r=LV("div",i[a])).className=i[a],e.el.append(r)),n[a]=r,t[a]=r}}),n}(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});var t,n=e.params.pagination;n.el&&("string"==typeof n.el&&e.isElement&&(t=e.el.querySelector(n.el)),t||"string"!=typeof n.el||(t=[...document.querySelectorAll(n.el)]),t||(t=n.el),t&&0!==t.length&&(e.params.uniqueNavElements&&"string"==typeof n.el&&Array.isArray(t)&&t.length>1&&(t=[...e.el.querySelectorAll(n.el)]).length>1&&(t=t.find(t=>OV(t,".swiper")[0]===e.el)),Array.isArray(t)&&1===t.length&&(t=t[0]),Object.assign(e.pagination,{el:t}),(t=$V(t)).forEach(t=>{"bullets"===n.type&&n.clickable&&t.classList.add(...(n.clickableClass||"").split(" ")),t.classList.add(n.modifierClass+n.type),t.classList.add(e.isHorizontal()?n.horizontalClass:n.verticalClass),"bullets"===n.type&&n.dynamicBullets&&(t.classList.add(`${n.modifierClass}${n.type}-dynamic`),o=0,n.dynamicMainBullets<1&&(n.dynamicMainBullets=1)),"progressbar"===n.type&&n.progressbarOpposite&&t.classList.add(n.progressbarOppositeClass),n.clickable&&t.addEventListener("click",l),e.enabled||t.classList.add(n.lockClass)})))}function m(){var t=e.params.pagination;if(!s()){var n=e.pagination.el;n&&(n=$V(n)).forEach(n=>{n.classList.remove(t.hiddenClass),n.classList.remove(t.modifierClass+t.type),n.classList.remove(e.isHorizontal()?t.horizontalClass:t.verticalClass),t.clickable&&(n.classList.remove(...(t.clickableClass||"").split(" ")),n.removeEventListener("click",l))}),e.pagination.bullets&&e.pagination.bullets.forEach(e=>e.classList.remove(...t.bulletActiveClass.split(" ")))}}n("changeDirection",()=>{if(e.pagination&&e.pagination.el){var t=e.params.pagination,n=e.pagination.el;(n=$V(n)).forEach(n=>{n.classList.remove(t.horizontalClass,t.verticalClass),n.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass)})}}),n("init",()=>{!1===e.params.pagination.enabled?f():(h(),c(),d())}),n("activeIndexChange",()=>{void 0===e.snapIndex&&d()}),n("snapIndexChange",()=>{d()}),n("snapGridLengthChange",()=>{c(),d()}),n("destroy",()=>{m()}),n("enable disable",()=>{var t=e.pagination.el;t&&(t=$V(t)).forEach(t=>t.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass))}),n("lock unlock",()=>{d()}),n("click",(t,n)=>{var a=n.target,r=$V(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&r&&r.length>0&&!a.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&a===e.navigation.nextEl||e.navigation.prevEl&&a===e.navigation.prevEl))return;var o=r[0].classList.contains(e.params.pagination.hiddenClass);i(!0===o?"paginationShow":"paginationHide"),r.forEach(t=>t.classList.toggle(e.params.pagination.hiddenClass))}});var f=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);var t=e.pagination.el;t&&(t=$V(t)).forEach(t=>t.classList.add(e.params.pagination.paginationDisabledClass)),m()};Object.assign(e.pagination,{enable:()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);var t=e.pagination.el;t&&(t=$V(t)).forEach(t=>t.classList.remove(e.params.pagination.paginationDisabledClass)),h(),c(),d()},disable:f,render:c,update:d,init:h,destroy:m})}function kK({swiper:e,extendParams:t,on:n,emit:i,params:a}){var r,o;e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});var s,u,l,d,c,h,m,f=a&&a.autoplay?a.autoplay.delay:3e3,v=a&&a.autoplay?a.autoplay.delay:3e3,p=(new Date).getTime();function g(t){e&&!e.destroyed&&e.wrapperEl&&t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",g),m||t.detail&&t.detail.bySwiperTouchMove||P())}var y=()=>{if(!e.destroyed&&e.autoplay.running){e.autoplay.paused?u=!0:u&&(v=s,u=!1);var t=e.autoplay.paused?s:p+v-(new Date).getTime();e.autoplay.timeLeft=t,i("autoplayTimeLeft",t,t/f),o=requestAnimationFrame(()=>{y()})}},b=()=>{var t=e.params.autoplay.delay,n=(()=>{var t;if(t=e.virtual&&e.params.virtual.enabled?e.slides.find(e=>e.classList.contains("swiper-slide-active")):e.slides[e.activeIndex])return parseInt(t.getAttribute("data-swiper-autoplay"),10)})();return!Number.isNaN(n)&&n>0&&(t=n),t},w=t=>{if(!e.destroyed&&e.autoplay.running){cancelAnimationFrame(o),y();var n=t;void 0===n&&(n=b(),f=n,v=n),s=n;var a=e.params.speed,u=()=>{e&&!e.destroyed&&(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(a,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,a,!0,!0),i("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(a,!0,!0),i("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,a,!0,!0),i("autoplay")),e.params.cssMode&&(p=(new Date).getTime(),requestAnimationFrame(()=>{w()})))};return n>0?(clearTimeout(r),r=setTimeout(()=>{u()},n)):requestAnimationFrame(()=>{u()}),n}},k=()=>{p=(new Date).getTime(),e.autoplay.running=!0,w(),i("autoplayStart")},S=()=>{e.autoplay.running=!1,clearTimeout(r),cancelAnimationFrame(o),i("autoplayStop")},E=(t,n)=>{if(!e.destroyed&&e.autoplay.running){clearTimeout(r),t||(h=!0);var a=()=>{i("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",g):P()};if(e.autoplay.paused=!0,n)a();else{var o=s||e.params.autoplay.delay;s=o-((new Date).getTime()-p),e.isEnd&&s<0&&!e.params.loop||(s<0&&(s=0),a())}}},P=()=>{e.isEnd&&s<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(p=(new Date).getTime(),h?(h=!1,w(s)):w(),e.autoplay.paused=!1,i("autoplayResume"))},T=()=>{if(!e.destroyed&&e.autoplay.running){var t=pV();"hidden"===t.visibilityState&&(h=!0,E(!0)),"visible"===t.visibilityState&&P()}},M=t=>{"mouse"===t.pointerType&&(h=!0,m=!0,e.animating||e.autoplay.paused||E(!0))},_=t=>{"mouse"===t.pointerType&&(m=!1,e.autoplay.paused&&P())};n("init",()=>{e.params.autoplay.enabled&&(e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",M),e.el.addEventListener("pointerleave",_)),pV().addEventListener("visibilitychange",T),k())}),n("destroy",()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",M),e.el.removeEventListener("pointerleave",_)),pV().removeEventListener("visibilitychange",T),e.autoplay.running&&S()}),n("_freeModeStaticRelease",()=>{(d||h)&&P()}),n("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?S():E(!0,!0)}),n("beforeTransitionStart",(t,n,i)=>{!e.destroyed&&e.autoplay.running&&(i||!e.params.autoplay.disableOnInteraction?E(!0,!0):S())}),n("sliderFirstMove",()=>{!e.destroyed&&e.autoplay.running&&(e.params.autoplay.disableOnInteraction?S():(l=!0,d=!1,h=!1,c=setTimeout(()=>{h=!0,d=!0,E(!0)},200)))}),n("touchEnd",()=>{if(!e.destroyed&&e.autoplay.running&&l){if(clearTimeout(c),clearTimeout(r),e.params.autoplay.disableOnInteraction)return d=!1,void(l=!1);d&&e.params.cssMode&&P(),d=!1,l=!1}}),n("slideChange",()=>{!e.destroyed&&e.autoplay.running&&e.autoplay.paused&&(s=b(),f=b())}),Object.assign(e.autoplay,{start:k,stop:S,pause:E,resume:P})}function SK(e,t){var n=xV(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function EK(e,t,n){var i=`swiper-slide-shadow${n?`-${n}`:""} swiper-slide-shadow-${e}`,a=xV(t),r=a.querySelector(`.${i.split(" ").join(".")}`);return r||(r=LV("div",i.split(" ")),a.append(r)),r}function PK({swiper:e,extendParams:t,on:n}){t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});!function(e){var t,n=e.effect,i=e.swiper,a=e.on,r=e.setTranslate,o=e.setTransition,s=e.overwriteParams,u=e.perspective,l=e.recreateShadows,d=e.getEffectParams;a("beforeInit",()=>{if(i.params.effect===n){i.classNames.push(`${i.params.containerModifierClass}${n}`),u&&u()&&i.classNames.push(`${i.params.containerModifierClass}3d`);var e=s?s():{};Object.assign(i.params,e),Object.assign(i.originalParams,e)}}),a("setTranslate _virtualUpdated",()=>{i.params.effect===n&&r()}),a("setTransition",(e,t)=>{i.params.effect===n&&o(t)}),a("transitionEnd",()=>{if(i.params.effect===n&&l){if(!d||!d().slideShadows)return;i.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),l()}}),a("virtualUpdate",()=>{i.params.effect===n&&(i.slides.length||(t=!0),requestAnimationFrame(()=>{t&&i.slides&&i.slides.length&&(r(),t=!1)}))})}({effect:"coverflow",swiper:e,on:n,setTranslate:()=>{for(var t=e.width,n=e.height,i=e.slides,a=e.slidesSizesGrid,r=e.params.coverflowEffect,o=e.isHorizontal(),s=e.translate,u=o?t/2-s:n/2-s,l=o?r.rotate:-r.rotate,d=r.depth,c=function(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}(e),h=0,m=i.length;h<m;h+=1){var f=i[h],v=a[h],p=(u-f.swiperSlideOffset-v/2)/v,g="function"==typeof r.modifier?r.modifier(p):p*r.modifier,y=o?l*g:0,b=o?0:l*g,w=-d*Math.abs(g),k=r.stretch;"string"==typeof k&&-1!==k.indexOf("%")&&(k=parseFloat(r.stretch)/100*v);var S=o?0:k*g,E=o?k*g:0,P=1-(1-r.scale)*Math.abs(g);Math.abs(E)<.001&&(E=0),Math.abs(S)<.001&&(S=0),Math.abs(w)<.001&&(w=0),Math.abs(y)<.001&&(y=0),Math.abs(b)<.001&&(b=0),Math.abs(P)<.001&&(P=0);var T=`translate3d(${E}px,${S}px,${w}px) rotateX(${c(b)}deg) rotateY(${c(y)}deg) scale(${P})`;if(SK(0,f).style.transform=T,f.style.zIndex=1-Math.abs(Math.round(g)),r.slideShadows){var M=o?f.querySelector(".swiper-slide-shadow-left"):f.querySelector(".swiper-slide-shadow-top"),_=o?f.querySelector(".swiper-slide-shadow-right"):f.querySelector(".swiper-slide-shadow-bottom");M||(M=EK("coverflow",f,o?"left":"top")),_||(_=EK("coverflow",f,o?"right":"bottom")),M&&(M.style.opacity=g>0?g:0),_&&(_.style.opacity=-g>0?-g:0)}}},setTransition:t=>{e.slides.map(e=>xV(e)).forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>{e.style.transitionDuration=`${t}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}Object.keys(pK).forEach(e=>{Object.keys(pK[e]).forEach(t=>{yK.prototype[t]=pK[e][t]})}),yK.use([function({swiper:e,on:t,emit:n}){var i=kV(),a=null,r=null,o=()=>{e&&!e.destroyed&&e.initialized&&(n("beforeResize"),n("resize"))},s=()=>{e&&!e.destroyed&&e.initialized&&n("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==i.ResizeObserver?e&&!e.destroyed&&e.initialized&&(a=new ResizeObserver(t=>{r=i.requestAnimationFrame(()=>{var n=e.width,i=e.height,a=n,r=i;t.forEach(({contentBoxSize:t,contentRect:n,target:i})=>{i&&i!==e.el||(a=n?n.width:(t[0]||t).inlineSize,r=n?n.height:(t[0]||t).blockSize)}),a===n&&r===i||o()})})).observe(e.el):(i.addEventListener("resize",o),i.addEventListener("orientationchange",s))}),t("destroy",()=>{r&&i.cancelAnimationFrame(r),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",s)})},function({swiper:e,extendParams:t,on:n,emit:i}){var a=[],r=kV(),o=(t,n={})=>{var o=new(r.MutationObserver||r.WebkitMutationObserver)(t=>{if(!e.__preventObserver__)if(1!==t.length){var n=function(){i("observerUpdate",t[0])};r.requestAnimationFrame?r.requestAnimationFrame(n):r.setTimeout(n,0)}else i("observerUpdate",t[0])});o.observe(t,{attributes:void 0===n.attributes||n.attributes,childList:e.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),a.push(o)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",()=>{if(e.params.observer){if(e.params.observeParents)for(var t=OV(e.hostEl),n=0;n<t.length;n+=1)o(t[n]);o(e.hostEl,{childList:e.params.observeSlideChildren}),o(e.wrapperEl,{attributes:!1})}}),n("destroy",()=>{a.forEach(e=>{e.disconnect()}),a.splice(0,a.length)})}]);var TK,MK,_K=e=>e,AK=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e.updateSpacing=t=>{e.slideSpacing=t.detail.spacing,e.swiperInstance&&(e.swiperInstance.params.spaceBetween=e.slideSpacing,e.swiperInstance.update())},e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),window.addEventListener("child-spacing",this.updateSpacing,!1)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),window.removeEventListener("child-spacing",this.updateSpacing,!1)}},{key:"styles",value:function(){var e,t,n,i=this.scaleFactor,a=this.component,r=a.backgroundBlur,o=a.indicator,s=a.activeIndicator,u=a.previousSlidePadding,l=a.nextSlidePadding,d="vertical"===a.direction?"margin-top":"margin-left";return Ih(`\n :host {\n display: ${a.hidden?"none":"flex"};\n flex-direction: column !important;\n ${Xw(a.position)} \n width: 100%;\n bottom: -1px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n z-index: ${null!==(e=a.zIndex)&&void 0!==e?e:1};\n top: 0px;\n transition: all 0.3s;\n ${$w(a,i)}\n ${function(e,t){return`\n padding-right: ${Aw(t,e.nextSlidePadding)}px !important;\n padding-left: ${Aw(t,e.previousSlidePadding)}px !important;\n `}(a,i)}\n ${Rw(a)}\n ${Lw(a,!1)}\n max-width: 100vw;\n }\n :host(:focus){\n ${Lw(a,!0)}\n ${Vw(a,i,!0)}\n }\n :host(:focus-visible){\n ${Qw(a)}\n }\n :host > *:not(:first-child) {\n ${d}: ${a.spacing?a.spacing*i:0}px;\n }\n .swiper-container {\n ${Bw(a,i)};\n padding-left: ${null!=u?u:0}px;\n padding-right: ${null!=l?l:0}px;\n box-sizing: border-box;\n }\n .swiper-pagination{\n position: relative;\n padding: 8px;\n }\n .swiper-pagination-bullet {\n opacity: 1 !important;\n ${null!=(null==o?void 0:o.width)?`width: ${o.width}px !important;`:""}\n ${null!=(null==o?void 0:o.height)?`height: ${o.height}px !important;`:""}\n ${null!=(null==o?void 0:o.borderRadius)?`border-radius: ${o.borderRadius}px !important;`:""}\n background: ${null!==(t=null==o?void 0:o.fillColor)&&void 0!==t?t:a.indicatorColor} !important;\n }\n .swiper-pagination-bullet-active {\n ${null!=(null==s?void 0:s.width)?`width: ${s.width}px !important;`:""}\n ${null!=(null==s?void 0:s.height)?`height: ${s.height}px !important;`:""}\n ${null!=(null==s?void 0:s.borderRadius)?`border-radius: ${s.borderRadius}px !important;`:""}\n background: ${null!==(n=null==s?void 0:s.fillColor)&&void 0!==n?n:a.activeIndicatorColor} !important;\n }\n `)}},{key:"updated",value:function(){var e,t,n=[wK,kK],i=this.component,a=i.autoplay,r=i.autoplaySeconds,o=i.showIndicators,s=i.slideSpacing,u=i.inactiveSlideScale;u&&n.push(PK),yK.use(n);var l=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".swiper-container"),d=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".swiper-pagination");if(l&&!this.swiperInstance){var c,h={initialSlide:0,slidesPerView:1,loop:a,spaceBetween:null!==(c=null!=s?s:this.slideSpacing)&&void 0!==c?c:0,autoplay:!!a&&{delay:1e3*r,disableOnInteraction:!1},pagination:!(null!=o&&!o)&&{el:d,clickable:!0},on:{init:e=>{this.handleSlideChange(e)},slideChange:e=>{this.handleSlideChange(e)}}};u&&(h.effect="coverflow",h.coverflowEffect={rotate:0,stretch:0,depth:100,modifier:1,slideShadows:!1,scale:u}),this.swiperInstance=new yK(l,h)}}},{key:"handleSlideChange",value:function(e){if(this.contextProvider.setCurrentSlideIndex(e.realIndex),this.component.onChange){var t,n=this.getCarouselOnChange(this.component),i=null==n||null===(t=n.parameters)||void 0===t||null===(t=t.partialState)||void 0===t?void 0:t.currentGroupId;i&&this.contextProvider.setCurrentGroupData(i,"")}}},{key:"getCarouselOnChange",value:function(e){var t;if(e.onChange&&e.onChange.parameters){var n=this.contextProvider.state.slides,i="string"==typeof e.loopSource?e.loopSource:"",a=null==n||null===(t=n[i])||void 0===t||null===(t=t.carouselName)||void 0===t?void 0:t[this.contextProvider.state.currentSlideIndex];return Gp(e.onChange,{slide:a,sku:this.contextProvider.state.sku,state:this.contextProvider.state,launch:this.contextProvider.state.launch,customer:this.contextProvider.state.customer})}}},{key:"getCarouselSlides",value:function(e){var t,n;if(!e.loopSource)return[];var i,a=this.contextProvider.state,r=a.slides,o=a.selectedProducts,s="string"==typeof e.loopSource?e.loopSource:"",u=Wp(this.contextProvider.productDetails,null!==(t=null===(n=this.contextProvider.getSelectedPaywall())||void 0===n?void 0:n.sku_menus)&&void 0!==t?t:[],s),l=[];rh(r)||(l=""!=s?r[s].carouselName:null!==(i=e.loopSource)&&void 0!==i?i:[]);var d=this.contextProvider.filteredSkuMenus.map(e=>e.id);return l.filter(e=>!e.productGroupId||d.includes(e.productGroupId)).map(t=>{var n=u.find(e=>e.id==o[t.productGroupId]);return Gp(e.components,Gp({slide:t},{sku:m({},Bp(null==n?void 0:n.product_details,t,u))}))||[]})}},{key:"render",value:function(){var e=this.getCarouselSlides(this.component),t=this.component,n=t.focusedBorderColor,i=t.focusedFillColor,a=t.fillColor;return!n&&ig(a,i)||(this.tabIndex=0),ym(TK||(TK=_K`
|
|
492
503
|
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css"/>
|
|
493
504
|
<div class="swiper-container" aria-live="assertive" aria-atomic="true">
|
|
494
505
|
<div class="swiper-wrapper">
|
|
@@ -496,10 +507,10 @@
|
|
|
496
507
|
</div>
|
|
497
508
|
</div>
|
|
498
509
|
<div class="swiper-pagination"></div>
|
|
499
|
-
`),e.map(e=>e.map(e=>(e.spacing&&(this.slideSpacing=2*e.spacing),ym(
|
|
510
|
+
`),e.map(e=>e.map(e=>(e.spacing&&(this.slideSpacing=2*e.spacing),ym(MK||(MK=_K`
|
|
500
511
|
<div class="swiper-slide">
|
|
501
512
|
${0}
|
|
502
|
-
</div>`),xk(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}(yw);Eh([Xm({type:Object})],
|
|
513
|
+
</div>`),xk(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}(yw);Eh([Xm({type:Object})],AK.prototype,"component",void 0),Eh([Xm({type:Boolean})],AK.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],AK.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],AK.prototype,"minSDKVersion",void 0),AK=Eh([Gm("nami-carousel-container")],AK);var DK=function(e){function t(){var e;return o(this,t),(e=r(this,t)).inFocusedState=!1,e.scaleFactor=1,e._handleFocus=()=>{e.inFocusedState=!0},e._handleBlur=()=>{e.inFocusedState=!1},e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key&&142!==t.keyCode&&195!==t.keyCode||e._handleClick()},e._handleClick=()=>{Mb({contextProvider:e.contextProvider,onTap:e.muted?e.component.mutedOnTap:e.component.volumeOnTap}),e.requestUpdate()},e.addEventListener("click",e._handleClick,!1),e.addEventListener("focus",e._handleFocus,!1),e.addEventListener("blur",e._handleBlur,!1),e.addEventListener("keydown",e._handleKeyDown,!1),e}return p(t,e),c(t,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return Ih(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${Lw(e,!1)}\n ${Rw(e)}\n ${Vw(e,t,!1)}\n }\n :host(:focus){\n ${Lw(e,!0)}\n ${Vw(e,t,!0)}\n }\n :host(:focus-visible){\n ${Qw(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;this.muted=null!==(e=null===(t=Tb.instance)||void 0===t?void 0:t.muted)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});var n=this.muted?this.component.mutedComponents:this.component.volumeComponents;return null==n?void 0:n.map(e=>xk(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}(yw);Eh([Xm({type:Object})],DK.prototype,"component",void 0),Eh([Xm({type:Boolean})],DK.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],DK.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],DK.prototype,"minSDKVersion",void 0),DK=Eh([Gm("nami-volume-button")],DK);var xK=function(e){function t(){var e;return o(this,t),(e=r(this,t)).inFocusedState=!1,e.scaleFactor=1,e._handleFocus=()=>{e.inFocusedState=!0},e._handleBlur=()=>{e.inFocusedState=!1},e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key&&142!==t.keyCode&&195!==t.keyCode||e._handleClick()},e._handleClick=()=>{Mb({contextProvider:e.contextProvider,onTap:e.playing?e.component.playingOnTap:e.component.pausedOnTap}),e.requestUpdate()},e.addEventListener("click",e._handleClick,!1),e.addEventListener("focus",e._handleFocus,!1),e.addEventListener("blur",e._handleBlur,!1),e.addEventListener("keydown",e._handleKeyDown,!1),e}return p(t,e),c(t,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return Ih(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${Lw(e,!1)}\n ${Rw(e)}\n ${Vw(e,t,!1)}\n }\n :host(:focus){\n ${Lw(e,!0)}\n ${Vw(e,t,!0)}\n }\n :host(:focus-visible){\n ${Qw(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;return this.playing=null!==(e=null===(t=Tb.instance)||void 0===t?void 0:t.playing)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0}),(this.playing?this.component.playingComponents:this.component.pausedComponents).map(e=>xk(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}(yw);Eh([Xm({type:Object})],xK.prototype,"component",void 0),Eh([Xm({type:Boolean})],xK.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],xK.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],xK.prototype,"minSDKVersion",void 0),xK=Eh([Gm("nami-play-pause-button")],xK);var CK=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return p(t,e),c(t,[{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,n=this.minSDKVersion,i=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=e.fillImage?Ih(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):Ih(Lw(e,!1));return Ih(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${s};\n ${Xw(e.position)}\n ${Rw(e)}\n ${Vw(e,t,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${Lw(e,!0)}\n ${Vw(e,t,!0)}\n }\n :host(:focus-visible){\n ${Qw(e)}\n }\n :host > *:not(nami-text) {\n position: absolute;\n }\n :host > * {\n ${Ow(n,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e,t=this.component,n=t.focusedBorderColor,i=t.focusedFillColor,a=t.fillColor;return!n&&ig(a,i)||(this.tabIndex=0),(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>xk(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}(yw);Eh([Xm({type:Object})],CK.prototype,"component",void 0),Eh([Xm({type:Boolean})],CK.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],CK.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],CK.prototype,"minSDKVersion",void 0),CK=Eh([Gm("nami-stack")],CK);var IK,LK,RK=e=>e,FK="nami-disabled",OK=function(t){function n(){var e;return o(this,n),(e=r(this,n,arguments)).active=!0,e.timeSpentOnPaywall=0,e.activeTemplate=null,e}return p(n,t),c(n,[{key:"connectedCallback",value:function(){T(n,"connectedCallback",this,3)([]),this.minSDKVersion=ih(this.paywall.template.min_sdk_version),this.contextProvider=qm.create(this.paywall,this.context,this.campaign),this.contextConsumer=new lw(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(FK),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}},{key:"disconnectedCallback",value:function(){T(n,"disconnectedCallback",this,3)([]),qm.remove(this.contextProvider),this.teardownEvent(),this.active&&Pb()}},{key:"userInteractionListener",value:function(e){this.classList.toggle(FK,!e.enabled)}},{key:"firstUpdated",value:function(){this.postImpression(),this.postPaywallScreenData(),this.updateActiveRenderRoot()}},{key:"updated",value:function(){this.updateActiveRenderRoot()}},{key:"updateActiveRenderRoot",value:function(){this.active&&this.activeTemplate&&(gb(this.activeTemplate,this.contextProvider),function(e){if(Wg("setActivePageRenderRoot:enter",{hasRoot:!!e,rootType:e instanceof Element?Bg(e):e instanceof DocumentFragment?"document-fragment":String(e),activePageKey:vg,activePageAnnounced:fg,activeElement:Bg(Yg())}),mg=e,e&&cg&&!fg){var t=Yg();if(t&&"contains"in e&&e.contains(t))yb(t);else if(e instanceof DocumentFragment){var n=e.activeElement;n&&yb(n)}}}(this.renderRoot))}},{key:"postImpression",value:function(){var e,t;null!==(e=this.paywall)&&void 0!==e&&e.id&&(e=>{var t,n,i;k(function(r){for(;;)switch(r.p=r.n){case 0:if(!il()){r.n=1;break}return ui.info("Skipping paywall impression - anonymous mode"),r.a(2);case 1:return(t=Fr.getSessionId())&&(e.session=t),(n=Fr.getLaunchId())&&(e.launch_id=n),e.app_env="production",e.url_params=Ac(),ui.info("Post paywall impression - segment ",e.segment),r.p=2,r.n=3,a(js.instance.postImpression(e));case 3:r.n=5;break;case 4:r.p=4,i=r.v,ui.error("Error posting impression",i);case 5:return r.a(2)}},null,null,[[2,4]],Promise)})({segment:null===(t=this.campaign)||void 0===t?void 0:t.segment,call_to_action:this.paywall.id})}},{key:"postPaywallScreenData",value:function(){Ou.getInstance().emit(Vn,m({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.SHOW_PAYWALL}))}},{key:"getTemplate",value:function(){var e,t,n,i;this.contextProvider.state.selectedPaywall===this.paywall?t=this.contextProvider.state.currentPage:t=null!==(n=null===(i=this.paywall.template)||void 0===i||null===(i=i.initialState)||void 0===i?void 0:i.currentPage)&&void 0!==n?n:"page1";var a=null===(e=this.paywall.template)||void 0===e?void 0:e.pages.find(e=>e.name===t);if(!a)throw new Error(`Page with name ${t} not found in paywall template.`);return this.activeTemplate=a,this.active&&gb(a,this.contextProvider),a}},{key:"render",value:function(){var e,t=this.getTemplate(),n=t.backgroundContainer,i=t.header,a=void 0===i?[]:i,r=t.footer,o=void 0===r?[]:r,s=t.contentContainer,u=null!==(e=this.contextProvider.state.fullScreenPresentation)&&void 0!==e&&e,l=this.contextProvider.getFormFactor(),d=function(e){return we().device.getDeviceScaleFactor(e)}(l);return ym(IK||(IK=RK`
|
|
503
514
|
<nami-background-container
|
|
504
515
|
.component=${0}
|
|
505
516
|
.scaleFactor=${0}
|
|
@@ -523,7 +534,7 @@
|
|
|
523
534
|
.scaleFactor=${0}
|
|
524
535
|
.minSDKVersion=${0}
|
|
525
536
|
></nami-footer>
|
|
526
|
-
`),n,d,this.minSDKVersion,a,l,d,u,this.minSDKVersion,s,d,l,this.minSDKVersion,o,d,this.minSDKVersion)}}])}(Wm);
|
|
537
|
+
`),n,d,this.minSDKVersion,a,l,d,u,this.minSDKVersion,s,d,l,this.minSDKVersion,o,d,this.minSDKVersion)}}])}(Wm);OK.styles=Lh(LK||(LK=RK`
|
|
527
538
|
:host {
|
|
528
539
|
display: flex;
|
|
529
540
|
flex-direction: column;
|
|
@@ -532,15 +543,15 @@
|
|
|
532
543
|
min-height: 0;
|
|
533
544
|
overflow: hidden;
|
|
534
545
|
}
|
|
535
|
-
`)),Eh([Xm({type:Object})],LK.prototype,"paywall",void 0),Eh([Xm({type:Object})],LK.prototype,"campaign",void 0),Eh([Xm({type:Object})],LK.prototype,"context",void 0),Eh([Xm({type:Boolean})],LK.prototype,"active",void 0),Eh([function({context:e}){return(t,n)=>{var i=new WeakMap;if("object"==typeof n)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new uw(this,{context:e,initialValue:t})),t}};t.constructor.addInitializer(t=>{i.set(t,new uw(t,{context:e}))});var a,r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var o=new WeakMap;a={get(){return o.get(this)},set(e){i.get(this).setValue(e),o.set(this,e)},configurable:!0,enumerable:!0}}else{var s=r.set;a=m({},r,{set(e){i.get(this).setValue(e),null==s||s.call(this,e)}})}Object.defineProperty(t,n,a)}}({context:dw})],LK.prototype,"contextProvider",void 0),LK=Eh([Gm("nami-paywall-screen")],LK);var RK,FK,OK={};function NK(){return FK?RK:(FK=1,RK=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var $K,WK={},jK={};function BK(){if($K)return jK;var e;$K=1;var t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return jK.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},jK.getSymbolTotalCodewords=function(e){return t[e]},jK.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},jK.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},jK.isKanjiModeEnabled=function(){return void 0!==e},jK.toSJIS=function(t){return e(t)},jK}var zK,UK,HK,GK,VK,KK={};function XK(){return zK||(zK=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}}(KK)),KK}var YK,qK={};var JK,QK={};var ZK,eX={};var tX,nX={};function iX(){if(tX)return nX;tX=1;var e=XK(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return nX.getBlocksCount=function(n,i){switch(i){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},nX.getTotalCodewordsCount=function(t,i){switch(i){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},nX}var aX,rX,oX,sX,uX={},lX={};function dX(){return rX||(rX=1,function(e){var t=function(){if(aX)return lX;aX=1;var e=new Uint8Array(512),t=new Uint8Array(256);return function(){for(var n=1,i=0;i<255;i++)e[i]=n,t[n]=i,256&(n<<=1)&&(n^=285);for(var a=255;a<512;a++)e[a]=e[a-255]}(),lX.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},lX.exp=function(t){return e[t]},lX.mul=function(n,i){return 0===n||0===i?0:e[t[n]+t[i]]},lX}();e.mul=function(e,n){for(var i=new Uint8Array(e.length+n.length-1),a=0;a<e.length;a++)for(var r=0;r<n.length;r++)i[a+r]^=t.mul(e[a],n[r]);return i},e.mod=function(e,n){for(var i=new Uint8Array(e);i.length-n.length>=0;){for(var a=i[0],r=0;r<n.length;r++)i[r]^=t.mul(n[r],a);for(var o=0;o<i.length&&0===i[o];)o++;i=i.slice(o)}return i},e.generateECPolynomial=function(n){for(var i=new Uint8Array([1]),a=0;a<n;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}}(uX)),uX}var cX,hX={},mX={},fX={};function vX(){return cX||(cX=1,fX.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),fX}var pX,gX,yX,bX={};function wX(){if(pX)return bX;pX=1;var e="[0-9]+",t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",n="(?:(?![A-Z0-9 $%*+\\-./:]|"+(t=t.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";bX.KANJI=new RegExp(t,"g"),bX.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),bX.BYTE=new RegExp(n,"g"),bX.NUMERIC=new RegExp(e,"g"),bX.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var i=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return bX.testKanji=function(e){return i.test(e)},bX.testNumeric=function(e){return a.test(e)},bX.testAlphanumeric=function(e){return r.test(e)},bX}function kX(){return gX||(gX=1,function(e){var t=vX(),n=wX();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}(mX)),mX}function SX(){return yX||(yX=1,function(e){var t=BK(),n=iX(),i=XK(),a=kX(),r=vX(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){var n=0;return e.forEach(function(e){var i=s(e.mode,t);n+=i+e.getBitsLength()}),n}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,i,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);var u=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,i));if(o===a.MIXED)return u;var l=u-s(o,e);switch(o){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){var r,o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(var i=1;i<=40;i++)if(u(t,i)<=e.getCapacity(i,n,a.MIXED))return i}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,i){for(var a=1;a<=40;a++)if(n<=e.getCapacity(a,i,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var n=e<<12;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(hX)),hX}var EX,PX={};var TX,MX,_X,AX,DX,xX,CX,IX,LX={};var RX,FX,OX,NX={exports:{}};function $X(){return RX||(RX=1,function(e){var t={single_source_shortest_paths:function(e,n,i){var a={},r={};r[n]=0;var o,s,u,l,d,c,h,m=t.PriorityQueue.make();for(m.push(n,0);!m.empty();)for(u in s=(o=m.pop()).value,l=o.cost,d=e[s]||{})d.hasOwnProperty(u)&&(c=l+d[u],h=r[u],(void 0===r[u]||h>c)&&(r[u]=c,m.push(u,c),a[u]=s));if(void 0!==i&&void 0===r[i]){var f=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],i=t;i;)n.push(i),e[i],i=e[i];return n.reverse(),n},find_path:function(e,n,i){var a=t.single_source_shortest_paths(e,n,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(e){var n,i=t.PriorityQueue,a={};for(n in e=e||{},i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a.queue=[],a.sorter=e.sorter||i.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(NX)),NX.exports}function WX(){return FX||(FX=1,function(e){var t=kX(),n=function(){if(MX)return TX;MX=1;var e=kX();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){var t,n,i;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),i=parseInt(n,10),e.put(i,10);var a=this.data.length-t;a>0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,3*a+1))},TX=t}(),i=function(){if(AX)return _X;AX=1;var e=kX(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var n;for(n=0;n+2<=this.data.length;n+=2){var i=45*t.indexOf(this.data[n]);i+=t.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},_X=n}(),a=function(){if(xX)return DX;xX=1;var e=kX();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(var t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},DX=t}(),r=function(){if(IX)return CX;IX=1;var e=kX(),t=BK();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var n;for(n=0;n<this.data.length;n++){var i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}},CX=n}(),o=wX(),s=BK(),u=$X();function l(e){return unescape(encodeURIComponent(e)).length}function d(e,t,n){for(var i,a=[];null!==(i=e.exec(n));)a.push({data:i[0],index:i.index,mode:t,length:i[0].length});return a}function c(e){var n,i,a=d(o.NUMERIC,t.NUMERIC,e),r=d(o.ALPHANUMERIC,t.ALPHANUMERIC,e);return s.isKanjiModeEnabled()?(n=d(o.BYTE,t.BYTE,e),i=d(o.KANJI,t.KANJI,e)):(n=d(o.BYTE_KANJI,t.BYTE,e),i=[]),a.concat(r,n,i).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function h(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return i.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){var u,l=t.getBestModeForData(e);if((u=t.from(o,l))!==t.BYTE&&u.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(u)+".\n Suggested mode is: "+t.toString(l));switch(u!==t.KANJI||s.isKanjiModeEnabled()||(u=t.BYTE),u){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new i(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},e.fromString=function(n,i){for(var a=function(e){for(var n=[],i=0;i<e.length;i++){var a=e[i];switch(a.mode){case t.NUMERIC:n.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:n.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:n.push([a,{data:a.data,mode:t.BYTE,length:l(a.data)}]);break;case t.BYTE:n.push([{data:a.data,mode:t.BYTE,length:l(a.data)}])}}return n}(c(n,s.isKanjiModeEnabled())),r=function(e,n){for(var i={},a={start:{}},r=["start"],o=0;o<e.length;o++){for(var s=e[o],u=[],l=0;l<s.length;l++){var d=s[l],c=""+o+l;u.push(c),i[c]={node:d,lastCount:0},a[c]={};for(var m=0;m<r.length;m++){var f=r[m];i[f]&&i[f].node.mode===d.mode?(a[f][c]=h(i[f].lastCount+d.length,d.mode)-h(i[f].lastCount,d.mode),i[f].lastCount+=d.length):(i[f]&&(i[f].lastCount=d.length),a[f][c]=h(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,n))}}r=u}for(var v=0;v<r.length;v++)a[r[v]].end=0;return{map:a,table:i}}(a,i),o=u.find_path(r.map,"start","end"),d=[],m=1;m<o.length-1;m++)d.push(r.table[o[m]].node);return e.fromArray(function(e){return e.reduce(function(e,t){var n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(d))},e.rawSplit=function(t){return e.fromArray(c(t,s.isKanjiModeEnabled()))}}(LX)),LX}function jX(){if(OX)return WK;OX=1;var e=BK(),t=XK(),n=function(){if(HK)return UK;function e(){this.buffer=[],this.length=0}return HK=1,e.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},UK=e}(),i=function(){if(VK)return GK;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return VK=1,e.prototype.set=function(e,t,n,i){var a=e*this.size+t;this.data[a]=n,i&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},GK=e}(),a=(YK||(YK=1,function(e){var t=BK().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];for(var n=Math.floor(e/7)+2,i=t(e),a=145===i?26:2*Math.ceil((i-13)/(2*n-2)),r=[i-7],o=1;o<n-1;o++)r[o]=r[o-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){for(var n=[],i=e.getRowColCoords(t),a=i.length,r=0;r<a;r++)for(var o=0;o<a;o++)0===r&&0===o||0===r&&o===a-1||r===a-1&&0===o||n.push([i[r],i[o]]);return n}}(qK)),qK),r=function(){if(JK)return QK;JK=1;var e=BK().getSymbolSize;return QK.getPositions=function(t){var n=e(t);return[[0,0],[n-7,0],[0,n-7]]},QK}(),o=(ZK||(ZK=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t=3,n=3,i=40,a=10;function r(t,n,i){switch(t){case e.Patterns.PATTERN000:return(n+i)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return i%3==0;case e.Patterns.PATTERN011:return(n+i)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2==0;case e.Patterns.PATTERN101:return n*i%2+n*i%3==0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2==0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){for(var n=e.size,i=0,a=0,r=0,o=null,s=null,u=0;u<n;u++){a=r=0,o=s=null;for(var l=0;l<n;l++){var d=e.get(u,l);d===o?a++:(a>=5&&(i+=t+(a-5)),o=d,a=1),(d=e.get(l,u))===s?r++:(r>=5&&(i+=t+(r-5)),s=d,r=1)}a>=5&&(i+=t+(a-5)),r>=5&&(i+=t+(r-5))}return i},e.getPenaltyN2=function(e){for(var t=e.size,i=0,a=0;a<t-1;a++)for(var r=0;r<t-1;r++){var o=e.get(a,r)+e.get(a,r+1)+e.get(a+1,r)+e.get(a+1,r+1);4!==o&&0!==o||i++}return i*n},e.getPenaltyN3=function(e){for(var t=e.size,n=0,a=0,r=0,o=0;o<t;o++){a=r=0;for(var s=0;s<t;s++)a=a<<1&2047|e.get(o,s),s>=10&&(1488===a||93===a)&&n++,r=r<<1&2047|e.get(s,o),s>=10&&(1488===r||93===r)&&n++}return n*i},e.getPenaltyN4=function(e){for(var t=0,n=e.data.length,i=0;i<n;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/n/5)-10)*a},e.applyMask=function(e,t){for(var n=t.size,i=0;i<n;i++)for(var a=0;a<n;a++)t.isReserved(a,i)||t.xor(a,i,r(e,a,i))},e.getBestMask=function(t,n){for(var i=Object.keys(e.Patterns).length,a=0,r=1/0,o=0;o<i;o++){n(o),e.applyMask(o,t);var s=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),s<r&&(r=s,a=o)}return a}}(eX)),eX),s=iX(),u=function(){if(sX)return oX;sX=1;var e=dX();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=new Uint8Array(t.length+this.degree);n.set(t);var i=e.mod(n,this.genPoly),a=this.degree-i.length;if(a>0){var r=new Uint8Array(this.degree);return r.set(i,a),r}return i},oX=t}(),l=SX(),d=function(){if(EX)return PX;EX=1;var e=BK(),t=e.getBCHDigit(1335);return PX.getEncodedBits=function(n,i){for(var a=n.bit<<3|i,r=a<<10;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},PX}(),c=kX(),h=WX();function m(e,t,n){var i,a,r=e.size,o=d.getEncodedBits(t,n);for(i=0;i<15;i++)a=1==(o>>i&1),i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(r-15+i,8,a,!0),i<8?e.set(8,r-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(r-8,8,1,!0)}function f(t,i,a){var r=new n;a.forEach(function(e){r.put(e.mode.bit,4),r.put(e.getLength(),c.getCharCountIndicator(e.mode,t)),e.write(r)});var o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,i));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);for(var l=(o-r.getLengthInBits())/8,d=0;d<l;d++)r.put(d%2?17:236,8);return function(t,n,i){for(var a=e.getSymbolTotalCodewords(n),r=s.getTotalCodewordsCount(n,i),o=a-r,l=s.getBlocksCount(n,i),d=l-a%l,c=Math.floor(a/l),h=Math.floor(o/l),m=h+1,f=c-h,v=new u(f),p=0,g=new Array(l),y=new Array(l),b=0,w=new Uint8Array(t.buffer),k=0;k<l;k++){var S=k<d?h:m;g[k]=w.slice(p,p+S),y[k]=v.encode(g[k]),p+=S,b=Math.max(b,S)}var E,P,T=new Uint8Array(a),M=0;for(E=0;E<b;E++)for(P=0;P<l;P++)E<g[P].length&&(T[M++]=g[P][E]);for(E=0;E<f;E++)for(P=0;P<l;P++)T[M++]=y[P][E];return T}(r,t,i)}function v(t,n,s,u){var d;if(Array.isArray(t))d=h.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var c=n;if(!c){var v=h.rawSplit(t);c=l.getBestVersionForData(v,s)}d=h.fromString(t,c||40)}var p=l.getBestVersionForData(d,s);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else n=p;var g=f(n,s,d),y=e.getSymbolSize(n),b=new i(y);return function(e,t){for(var n=e.size,i=r.getPositions(t),a=0;a<i.length;a++)for(var o=i[a][0],s=i[a][1],u=-1;u<=7;u++)if(!(o+u<=-1||n<=o+u))for(var l=-1;l<=7;l++)s+l<=-1||n<=s+l||(u>=0&&u<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===u||6===u)||u>=2&&u<=4&&l>=2&&l<=4?e.set(o+u,s+l,!0,!0):e.set(o+u,s+l,!1,!0))}(b,n),function(e){for(var t=e.size,n=8;n<t-8;n++){var i=n%2==0;e.set(n,6,i,!0),e.set(6,n,i,!0)}}(b),function(e,t){for(var n=a.getPositions(t),i=0;i<n.length;i++)for(var r=n[i][0],o=n[i][1],s=-2;s<=2;s++)for(var u=-2;u<=2;u++)-2===s||2===s||-2===u||2===u||0===s&&0===u?e.set(r+s,o+u,!0,!0):e.set(r+s,o+u,!1,!0)}(b,n),m(b,s,0),n>=7&&function(e,t){for(var n,i,a,r=e.size,o=l.getEncodedBits(t),s=0;s<18;s++)n=Math.floor(s/3),i=s%3+r-8-3,a=1==(o>>s&1),e.set(n,i,a,!0),e.set(i,n,a,!0)}(b,n),function(e,t){for(var n=e.size,i=-1,a=n-1,r=7,o=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!e.isReserved(a,s-u)){var l=!1;o<t.length&&(l=1==(t[o]>>>r&1)),e.set(a,s-u,l),-1===--r&&(o++,r=7)}if((a+=i)<0||n<=a){a-=i,i=-i;break}}}(b,g),isNaN(u)&&(u=o.getBestMask(b,m.bind(null,b,s))),o.applyMask(u,b),m(b,s,u),{modules:b,version:n,errorCorrectionLevel:s,maskPattern:u,segments:d}}return WK.create=function(n,i){if(void 0===n||""===n)throw new Error("No input text");var a,r,s=t.M;return void 0!==i&&(s=t.from(i.errorCorrectionLevel,t.M),a=l.from(i.version),r=o.from(i.maskPattern),i.toSJISFunc&&e.setToSJISFunction(i.toSJISFunc)),v(n,a,s,r)},WK}var BX,zX,UX={},HX={};function GX(){return BX||(BX=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});var n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){var i=e.getScale(t,n);return Math.floor((t+2*n.margin)*i)},e.qrToImageData=function(t,n,i){for(var a=n.modules.size,r=n.modules.data,o=e.getScale(a,i),s=Math.floor((a+2*i.margin)*o),u=i.margin*o,l=[i.color.light,i.color.dark],d=0;d<s;d++)for(var c=0;c<s;c++){var h=4*(d*s+c),m=i.color.light;if(d>=u&&c>=u&&d<s-u&&c<s-u)m=l[r[Math.floor((d-u)/o)*a+Math.floor((c-u)/o)]?1:0];t[h++]=m.r,t[h++]=m.g,t[h++]=m.b,t[h]=m.a}}}(HX)),HX}function VX(){return zX||(zX=1,function(e){var t=GX();e.render=function(e,n,i){var a=i,r=n;void 0!==a||n&&n.getContext||(a=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);var o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),u=s.createImageData(o,o);return t.qrToImageData(u.data,e,a),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,r,o),s.putImageData(u,0,0),r},e.renderToDataURL=function(t,n,i){var a=i;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});var r=e.render(t,n,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(UX)),UX}var KX,XX,YX={};function qX(){if(KX)return YX;KX=1;var e=GX();function t(e,t){var n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function n(e,t,n){var i=e+t;return void 0!==n&&(i+=" "+n),i}return YX.render=function(i,a,r){var o=e.getOptions(a),s=i.modules.size,u=i.modules.data,l=s+2*o.margin,d=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,i){for(var a="",r=0,o=!1,s=0,u=0;u<e.length;u++){var l=Math.floor(u%t),d=Math.floor(u/t);l||o||(o=!0),e[u]?(s++,u>0&&l>0&&e[u-1]||(a+=o?n("M",l+i,.5+d+i):n("m",r,0),r=0,o=!1),l+1<t&&e[u+1]||(a+=n("h",s),s=0)):r++}return a}(u,s,o.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+d+c+"</svg>\n";return"function"==typeof r&&r(null,m),m},YX}var JX,QX,ZX=function(){if(XX)return OK;XX=1;var e=NK(),t=jX(),n=VX(),i=qX();function a(n,i,a,r,o){var s=[].slice.call(arguments,1),u=s.length,l="function"==typeof s[u-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(u<1)throw new Error("Too few arguments provided");return 1===u?(a=i,i=r=void 0):2!==u||i.getContext||(r=a,a=i,i=void 0),new Promise(function(e,o){try{var s=t.create(a,r);e(n(s,i,r))}catch(e){o(e)}})}if(u<2)throw new Error("Too few arguments provided");2===u?(o=a,a=i,i=r=void 0):3===u&&(i.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=i,i=void 0));try{var d=t.create(a,r);o(null,n(d,i,r))}catch(e){o(e)}}return OK.create=t.create,OK.toCanvas=a.bind(null,n.render),OK.toDataURL=a.bind(null,n.renderToDataURL),OK.toString=a.bind(null,function(e,t,n){return i.render(e,n)}),OK}(),eY=vh(ZX),tY=e=>e,nY=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).scaleFactor=1,e}return p(t,e),c(t,[{key:"styles",value:function(){var e;return this.component?Ih(`\n :host {\n box-sizing: border-box;\n ${Bw(this.component,this.scaleFactor)}\n ${$w(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${null!==(e=this.component.borderWidth)&&void 0!==e?e:0}px;\n ${Cw(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):Ih(":host { box-sizing: border-box; display: inline-block; }")}},{key:"renderQr",value:function(){var e,t,n,i,r,o,s,u;return k(function(l){for(;;)switch(l.p=l.n){case 0:if((i=this.renderRoot.querySelector("canvas"))&&null!==(e=this.component)&&void 0!==e&&e.url){l.n=1;break}return l.a(2);case 1:return r=this.computedSize,i.width=r,i.height=r,i.style.width=`${r}px`,i.style.height=`${r}px`,o=null!==(t=ng(this.component.color))&&void 0!==t?t:"#000000",s=null!==(n=ng(this.component.fillColor))&&void 0!==n?n:"#ffffff",l.p=2,l.n=3,a(eY.toCanvas(i,this.component.url,{width:r,color:{dark:o,light:s},margin:0}));case 3:l.n=5;break;case 4:l.p=4,u=l.v,ui.error(`QR render failed for URL "${this.component.url}":`,u);case 5:return l.a(2)}},null,this,[[2,4]],Promise)}},{key:"firstUpdated",value:function(){this.renderQr()}},{key:"updated",value:function(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then(()=>this.renderQr())}},{key:"computedSize",get:function(){var e,t=Number(null!==(e=this.component.borderWidth)&&void 0!==e?e:0),n=Number(this.component.width)*this.scaleFactor,i=Math.floor(this.component.width?n-2*t:360);return Math.max(1,i)}},{key:"render",value:function(){if(this.component){var e=this.computedSize;return ym(JX||(JX=tY`<canvas width="${0}" height="${0}" style="width:${0}px;height:${0}px;"></canvas>`),e,e,e,e)}return ym(QX||(QX=tY`<canvas></canvas>`))}}])}(yw);Eh([Xm({type:Object})],nY.prototype,"component",void 0),Eh([Xm({type:Number})],nY.prototype,"scaleFactor",void 0),nY=Eh([Gm("nami-qr-code")],nY);var iY,aY=e=>e,rY=function(e){function t(){var e;return o(this,t),(e=r(this,t)).inFocusedState=!1,e.scaleFactor=1,e.isActive=!1,e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key&&142!==t.keyCode&&195!==t.keyCode||e._handleClick()},e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}},{key:"_handleClick",value:function(){var e=this.component,t=e.onTap,n=e.disabled,i=e.formId;if(!0!==n){this.component.checked=!this.component.checked,this.isActive=this.component.checked;var a=void 0;a=i?{function:(null==t?void 0:t.function)||"",parameters:m({},null==t?void 0:t.parameters,{formId:i||""})}:t,!this.contextProvider.flow||i?Mb({onTap:a,contextProvider:this.contextProvider}):this.component.id?(ui.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):ui.warn("Cannot trigger button hoisting without an id")}}},{key:"styles",value:function(){return Ih(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}},{key:"applyPlateStyles",value:function(){var e=this.component,t=this.scaleFactor,n=this.isActive||e.checked||!1,i=n?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",a=n?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Bw(e,t)};\n ${Cw(a)}\n border-width: ${n?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${xw(i)}\n `}},{key:"applyHandleStyles",value:function(){var e=this.component,t=e.checked||!1,n=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",i=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${Cw(i)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Uw(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${xw(n)}\n `}},{key:"render",value:function(){return this.tabIndex=0,this.role="switch",ym(iY||(iY=aY`
|
|
546
|
+
`)),Eh([Xm({type:Object})],OK.prototype,"paywall",void 0),Eh([Xm({type:Object})],OK.prototype,"campaign",void 0),Eh([Xm({type:Object})],OK.prototype,"context",void 0),Eh([Xm({type:Boolean})],OK.prototype,"active",void 0),Eh([function({context:e}){return(t,n)=>{var i=new WeakMap;if("object"==typeof n)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new uw(this,{context:e,initialValue:t})),t}};t.constructor.addInitializer(t=>{i.set(t,new uw(t,{context:e}))});var a,r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var o=new WeakMap;a={get(){return o.get(this)},set(e){i.get(this).setValue(e),o.set(this,e)},configurable:!0,enumerable:!0}}else{var s=r.set;a=m({},r,{set(e){i.get(this).setValue(e),null==s||s.call(this,e)}})}Object.defineProperty(t,n,a)}}({context:dw})],OK.prototype,"contextProvider",void 0),OK=Eh([Gm("nami-paywall-screen")],OK);var NK,$K,WK={};function jK(){return $K?NK:($K=1,NK=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var BK,zK={},UK={};function HK(){if(BK)return UK;var e;BK=1;var t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return UK.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},UK.getSymbolTotalCodewords=function(e){return t[e]},UK.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},UK.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},UK.isKanjiModeEnabled=function(){return void 0!==e},UK.toSJIS=function(t){return e(t)},UK}var GK,VK,KK,XK,YK,qK={};function JK(){return GK||(GK=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}}(qK)),qK}var QK,ZK={};var eX,tX={};var nX,iX={};var aX,rX={};function oX(){if(aX)return rX;aX=1;var e=JK(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return rX.getBlocksCount=function(n,i){switch(i){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},rX.getTotalCodewordsCount=function(t,i){switch(i){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},rX}var sX,uX,lX,dX,cX={},hX={};function mX(){return uX||(uX=1,function(e){var t=function(){if(sX)return hX;sX=1;var e=new Uint8Array(512),t=new Uint8Array(256);return function(){for(var n=1,i=0;i<255;i++)e[i]=n,t[n]=i,256&(n<<=1)&&(n^=285);for(var a=255;a<512;a++)e[a]=e[a-255]}(),hX.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},hX.exp=function(t){return e[t]},hX.mul=function(n,i){return 0===n||0===i?0:e[t[n]+t[i]]},hX}();e.mul=function(e,n){for(var i=new Uint8Array(e.length+n.length-1),a=0;a<e.length;a++)for(var r=0;r<n.length;r++)i[a+r]^=t.mul(e[a],n[r]);return i},e.mod=function(e,n){for(var i=new Uint8Array(e);i.length-n.length>=0;){for(var a=i[0],r=0;r<n.length;r++)i[r]^=t.mul(n[r],a);for(var o=0;o<i.length&&0===i[o];)o++;i=i.slice(o)}return i},e.generateECPolynomial=function(n){for(var i=new Uint8Array([1]),a=0;a<n;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}}(cX)),cX}var fX,vX={},pX={},gX={};function yX(){return fX||(fX=1,gX.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),gX}var bX,wX,kX,SX={};function EX(){if(bX)return SX;bX=1;var e="[0-9]+",t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",n="(?:(?![A-Z0-9 $%*+\\-./:]|"+(t=t.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";SX.KANJI=new RegExp(t,"g"),SX.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),SX.BYTE=new RegExp(n,"g"),SX.NUMERIC=new RegExp(e,"g"),SX.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var i=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return SX.testKanji=function(e){return i.test(e)},SX.testNumeric=function(e){return a.test(e)},SX.testAlphanumeric=function(e){return r.test(e)},SX}function PX(){return wX||(wX=1,function(e){var t=yX(),n=EX();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}(pX)),pX}function TX(){return kX||(kX=1,function(e){var t=HK(),n=oX(),i=JK(),a=PX(),r=yX(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){var n=0;return e.forEach(function(e){var i=s(e.mode,t);n+=i+e.getBitsLength()}),n}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,i,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);var u=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,i));if(o===a.MIXED)return u;var l=u-s(o,e);switch(o){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){var r,o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(var i=1;i<=40;i++)if(u(t,i)<=e.getCapacity(i,n,a.MIXED))return i}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,i){for(var a=1;a<=40;a++)if(n<=e.getCapacity(a,i,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var n=e<<12;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(vX)),vX}var MX,_X={};var AX,DX,xX,CX,IX,LX,RX,FX,OX={};var NX,$X,WX,jX={exports:{}};function BX(){return NX||(NX=1,function(e){var t={single_source_shortest_paths:function(e,n,i){var a={},r={};r[n]=0;var o,s,u,l,d,c,h,m=t.PriorityQueue.make();for(m.push(n,0);!m.empty();)for(u in s=(o=m.pop()).value,l=o.cost,d=e[s]||{})d.hasOwnProperty(u)&&(c=l+d[u],h=r[u],(void 0===r[u]||h>c)&&(r[u]=c,m.push(u,c),a[u]=s));if(void 0!==i&&void 0===r[i]){var f=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],i=t;i;)n.push(i),e[i],i=e[i];return n.reverse(),n},find_path:function(e,n,i){var a=t.single_source_shortest_paths(e,n,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(e){var n,i=t.PriorityQueue,a={};for(n in e=e||{},i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a.queue=[],a.sorter=e.sorter||i.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(jX)),jX.exports}function zX(){return $X||($X=1,function(e){var t=PX(),n=function(){if(DX)return AX;DX=1;var e=PX();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){var t,n,i;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),i=parseInt(n,10),e.put(i,10);var a=this.data.length-t;a>0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,3*a+1))},AX=t}(),i=function(){if(CX)return xX;CX=1;var e=PX(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var n;for(n=0;n+2<=this.data.length;n+=2){var i=45*t.indexOf(this.data[n]);i+=t.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},xX=n}(),a=function(){if(LX)return IX;LX=1;var e=PX();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(var t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},IX=t}(),r=function(){if(FX)return RX;FX=1;var e=PX(),t=HK();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var n;for(n=0;n<this.data.length;n++){var i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}},RX=n}(),o=EX(),s=HK(),u=BX();function l(e){return unescape(encodeURIComponent(e)).length}function d(e,t,n){for(var i,a=[];null!==(i=e.exec(n));)a.push({data:i[0],index:i.index,mode:t,length:i[0].length});return a}function c(e){var n,i,a=d(o.NUMERIC,t.NUMERIC,e),r=d(o.ALPHANUMERIC,t.ALPHANUMERIC,e);return s.isKanjiModeEnabled()?(n=d(o.BYTE,t.BYTE,e),i=d(o.KANJI,t.KANJI,e)):(n=d(o.BYTE_KANJI,t.BYTE,e),i=[]),a.concat(r,n,i).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function h(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return i.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){var u,l=t.getBestModeForData(e);if((u=t.from(o,l))!==t.BYTE&&u.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(u)+".\n Suggested mode is: "+t.toString(l));switch(u!==t.KANJI||s.isKanjiModeEnabled()||(u=t.BYTE),u){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new i(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},e.fromString=function(n,i){for(var a=function(e){for(var n=[],i=0;i<e.length;i++){var a=e[i];switch(a.mode){case t.NUMERIC:n.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:n.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:n.push([a,{data:a.data,mode:t.BYTE,length:l(a.data)}]);break;case t.BYTE:n.push([{data:a.data,mode:t.BYTE,length:l(a.data)}])}}return n}(c(n,s.isKanjiModeEnabled())),r=function(e,n){for(var i={},a={start:{}},r=["start"],o=0;o<e.length;o++){for(var s=e[o],u=[],l=0;l<s.length;l++){var d=s[l],c=""+o+l;u.push(c),i[c]={node:d,lastCount:0},a[c]={};for(var m=0;m<r.length;m++){var f=r[m];i[f]&&i[f].node.mode===d.mode?(a[f][c]=h(i[f].lastCount+d.length,d.mode)-h(i[f].lastCount,d.mode),i[f].lastCount+=d.length):(i[f]&&(i[f].lastCount=d.length),a[f][c]=h(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,n))}}r=u}for(var v=0;v<r.length;v++)a[r[v]].end=0;return{map:a,table:i}}(a,i),o=u.find_path(r.map,"start","end"),d=[],m=1;m<o.length-1;m++)d.push(r.table[o[m]].node);return e.fromArray(function(e){return e.reduce(function(e,t){var n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(d))},e.rawSplit=function(t){return e.fromArray(c(t,s.isKanjiModeEnabled()))}}(OX)),OX}function UX(){if(WX)return zK;WX=1;var e=HK(),t=JK(),n=function(){if(KK)return VK;function e(){this.buffer=[],this.length=0}return KK=1,e.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},VK=e}(),i=function(){if(YK)return XK;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return YK=1,e.prototype.set=function(e,t,n,i){var a=e*this.size+t;this.data[a]=n,i&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},XK=e}(),a=(QK||(QK=1,function(e){var t=HK().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];for(var n=Math.floor(e/7)+2,i=t(e),a=145===i?26:2*Math.ceil((i-13)/(2*n-2)),r=[i-7],o=1;o<n-1;o++)r[o]=r[o-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){for(var n=[],i=e.getRowColCoords(t),a=i.length,r=0;r<a;r++)for(var o=0;o<a;o++)0===r&&0===o||0===r&&o===a-1||r===a-1&&0===o||n.push([i[r],i[o]]);return n}}(ZK)),ZK),r=function(){if(eX)return tX;eX=1;var e=HK().getSymbolSize;return tX.getPositions=function(t){var n=e(t);return[[0,0],[n-7,0],[0,n-7]]},tX}(),o=(nX||(nX=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t=3,n=3,i=40,a=10;function r(t,n,i){switch(t){case e.Patterns.PATTERN000:return(n+i)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return i%3==0;case e.Patterns.PATTERN011:return(n+i)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2==0;case e.Patterns.PATTERN101:return n*i%2+n*i%3==0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2==0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){for(var n=e.size,i=0,a=0,r=0,o=null,s=null,u=0;u<n;u++){a=r=0,o=s=null;for(var l=0;l<n;l++){var d=e.get(u,l);d===o?a++:(a>=5&&(i+=t+(a-5)),o=d,a=1),(d=e.get(l,u))===s?r++:(r>=5&&(i+=t+(r-5)),s=d,r=1)}a>=5&&(i+=t+(a-5)),r>=5&&(i+=t+(r-5))}return i},e.getPenaltyN2=function(e){for(var t=e.size,i=0,a=0;a<t-1;a++)for(var r=0;r<t-1;r++){var o=e.get(a,r)+e.get(a,r+1)+e.get(a+1,r)+e.get(a+1,r+1);4!==o&&0!==o||i++}return i*n},e.getPenaltyN3=function(e){for(var t=e.size,n=0,a=0,r=0,o=0;o<t;o++){a=r=0;for(var s=0;s<t;s++)a=a<<1&2047|e.get(o,s),s>=10&&(1488===a||93===a)&&n++,r=r<<1&2047|e.get(s,o),s>=10&&(1488===r||93===r)&&n++}return n*i},e.getPenaltyN4=function(e){for(var t=0,n=e.data.length,i=0;i<n;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/n/5)-10)*a},e.applyMask=function(e,t){for(var n=t.size,i=0;i<n;i++)for(var a=0;a<n;a++)t.isReserved(a,i)||t.xor(a,i,r(e,a,i))},e.getBestMask=function(t,n){for(var i=Object.keys(e.Patterns).length,a=0,r=1/0,o=0;o<i;o++){n(o),e.applyMask(o,t);var s=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),s<r&&(r=s,a=o)}return a}}(iX)),iX),s=oX(),u=function(){if(dX)return lX;dX=1;var e=mX();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=new Uint8Array(t.length+this.degree);n.set(t);var i=e.mod(n,this.genPoly),a=this.degree-i.length;if(a>0){var r=new Uint8Array(this.degree);return r.set(i,a),r}return i},lX=t}(),l=TX(),d=function(){if(MX)return _X;MX=1;var e=HK(),t=e.getBCHDigit(1335);return _X.getEncodedBits=function(n,i){for(var a=n.bit<<3|i,r=a<<10;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},_X}(),c=PX(),h=zX();function m(e,t,n){var i,a,r=e.size,o=d.getEncodedBits(t,n);for(i=0;i<15;i++)a=1==(o>>i&1),i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(r-15+i,8,a,!0),i<8?e.set(8,r-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(r-8,8,1,!0)}function f(t,i,a){var r=new n;a.forEach(function(e){r.put(e.mode.bit,4),r.put(e.getLength(),c.getCharCountIndicator(e.mode,t)),e.write(r)});var o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,i));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);for(var l=(o-r.getLengthInBits())/8,d=0;d<l;d++)r.put(d%2?17:236,8);return function(t,n,i){for(var a=e.getSymbolTotalCodewords(n),r=s.getTotalCodewordsCount(n,i),o=a-r,l=s.getBlocksCount(n,i),d=l-a%l,c=Math.floor(a/l),h=Math.floor(o/l),m=h+1,f=c-h,v=new u(f),p=0,g=new Array(l),y=new Array(l),b=0,w=new Uint8Array(t.buffer),k=0;k<l;k++){var S=k<d?h:m;g[k]=w.slice(p,p+S),y[k]=v.encode(g[k]),p+=S,b=Math.max(b,S)}var E,P,T=new Uint8Array(a),M=0;for(E=0;E<b;E++)for(P=0;P<l;P++)E<g[P].length&&(T[M++]=g[P][E]);for(E=0;E<f;E++)for(P=0;P<l;P++)T[M++]=y[P][E];return T}(r,t,i)}function v(t,n,s,u){var d;if(Array.isArray(t))d=h.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var c=n;if(!c){var v=h.rawSplit(t);c=l.getBestVersionForData(v,s)}d=h.fromString(t,c||40)}var p=l.getBestVersionForData(d,s);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else n=p;var g=f(n,s,d),y=e.getSymbolSize(n),b=new i(y);return function(e,t){for(var n=e.size,i=r.getPositions(t),a=0;a<i.length;a++)for(var o=i[a][0],s=i[a][1],u=-1;u<=7;u++)if(!(o+u<=-1||n<=o+u))for(var l=-1;l<=7;l++)s+l<=-1||n<=s+l||(u>=0&&u<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===u||6===u)||u>=2&&u<=4&&l>=2&&l<=4?e.set(o+u,s+l,!0,!0):e.set(o+u,s+l,!1,!0))}(b,n),function(e){for(var t=e.size,n=8;n<t-8;n++){var i=n%2==0;e.set(n,6,i,!0),e.set(6,n,i,!0)}}(b),function(e,t){for(var n=a.getPositions(t),i=0;i<n.length;i++)for(var r=n[i][0],o=n[i][1],s=-2;s<=2;s++)for(var u=-2;u<=2;u++)-2===s||2===s||-2===u||2===u||0===s&&0===u?e.set(r+s,o+u,!0,!0):e.set(r+s,o+u,!1,!0)}(b,n),m(b,s,0),n>=7&&function(e,t){for(var n,i,a,r=e.size,o=l.getEncodedBits(t),s=0;s<18;s++)n=Math.floor(s/3),i=s%3+r-8-3,a=1==(o>>s&1),e.set(n,i,a,!0),e.set(i,n,a,!0)}(b,n),function(e,t){for(var n=e.size,i=-1,a=n-1,r=7,o=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!e.isReserved(a,s-u)){var l=!1;o<t.length&&(l=1==(t[o]>>>r&1)),e.set(a,s-u,l),-1===--r&&(o++,r=7)}if((a+=i)<0||n<=a){a-=i,i=-i;break}}}(b,g),isNaN(u)&&(u=o.getBestMask(b,m.bind(null,b,s))),o.applyMask(u,b),m(b,s,u),{modules:b,version:n,errorCorrectionLevel:s,maskPattern:u,segments:d}}return zK.create=function(n,i){if(void 0===n||""===n)throw new Error("No input text");var a,r,s=t.M;return void 0!==i&&(s=t.from(i.errorCorrectionLevel,t.M),a=l.from(i.version),r=o.from(i.maskPattern),i.toSJISFunc&&e.setToSJISFunction(i.toSJISFunc)),v(n,a,s,r)},zK}var HX,GX,VX={},KX={};function XX(){return HX||(HX=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});var n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){var i=e.getScale(t,n);return Math.floor((t+2*n.margin)*i)},e.qrToImageData=function(t,n,i){for(var a=n.modules.size,r=n.modules.data,o=e.getScale(a,i),s=Math.floor((a+2*i.margin)*o),u=i.margin*o,l=[i.color.light,i.color.dark],d=0;d<s;d++)for(var c=0;c<s;c++){var h=4*(d*s+c),m=i.color.light;if(d>=u&&c>=u&&d<s-u&&c<s-u)m=l[r[Math.floor((d-u)/o)*a+Math.floor((c-u)/o)]?1:0];t[h++]=m.r,t[h++]=m.g,t[h++]=m.b,t[h]=m.a}}}(KX)),KX}function YX(){return GX||(GX=1,function(e){var t=XX();e.render=function(e,n,i){var a=i,r=n;void 0!==a||n&&n.getContext||(a=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);var o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),u=s.createImageData(o,o);return t.qrToImageData(u.data,e,a),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,r,o),s.putImageData(u,0,0),r},e.renderToDataURL=function(t,n,i){var a=i;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});var r=e.render(t,n,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(VX)),VX}var qX,JX,QX={};function ZX(){if(qX)return QX;qX=1;var e=XX();function t(e,t){var n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function n(e,t,n){var i=e+t;return void 0!==n&&(i+=" "+n),i}return QX.render=function(i,a,r){var o=e.getOptions(a),s=i.modules.size,u=i.modules.data,l=s+2*o.margin,d=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,i){for(var a="",r=0,o=!1,s=0,u=0;u<e.length;u++){var l=Math.floor(u%t),d=Math.floor(u/t);l||o||(o=!0),e[u]?(s++,u>0&&l>0&&e[u-1]||(a+=o?n("M",l+i,.5+d+i):n("m",r,0),r=0,o=!1),l+1<t&&e[u+1]||(a+=n("h",s),s=0)):r++}return a}(u,s,o.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+d+c+"</svg>\n";return"function"==typeof r&&r(null,m),m},QX}var eY,tY,nY=function(){if(JX)return WK;JX=1;var e=jK(),t=UX(),n=YX(),i=ZX();function a(n,i,a,r,o){var s=[].slice.call(arguments,1),u=s.length,l="function"==typeof s[u-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(u<1)throw new Error("Too few arguments provided");return 1===u?(a=i,i=r=void 0):2!==u||i.getContext||(r=a,a=i,i=void 0),new Promise(function(e,o){try{var s=t.create(a,r);e(n(s,i,r))}catch(e){o(e)}})}if(u<2)throw new Error("Too few arguments provided");2===u?(o=a,a=i,i=r=void 0):3===u&&(i.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=i,i=void 0));try{var d=t.create(a,r);o(null,n(d,i,r))}catch(e){o(e)}}return WK.create=t.create,WK.toCanvas=a.bind(null,n.render),WK.toDataURL=a.bind(null,n.renderToDataURL),WK.toString=a.bind(null,function(e,t,n){return i.render(e,n)}),WK}(),iY=vh(nY),aY=e=>e,rY=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).scaleFactor=1,e}return p(t,e),c(t,[{key:"styles",value:function(){var e;return this.component?Ih(`\n :host {\n box-sizing: border-box;\n ${Bw(this.component,this.scaleFactor)}\n ${$w(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${null!==(e=this.component.borderWidth)&&void 0!==e?e:0}px;\n ${Cw(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):Ih(":host { box-sizing: border-box; display: inline-block; }")}},{key:"renderQr",value:function(){var e,t,n,i,r,o,s,u;return k(function(l){for(;;)switch(l.p=l.n){case 0:if((i=this.renderRoot.querySelector("canvas"))&&null!==(e=this.component)&&void 0!==e&&e.url){l.n=1;break}return l.a(2);case 1:return r=this.computedSize,i.width=r,i.height=r,i.style.width=`${r}px`,i.style.height=`${r}px`,o=null!==(t=ng(this.component.color))&&void 0!==t?t:"#000000",s=null!==(n=ng(this.component.fillColor))&&void 0!==n?n:"#ffffff",l.p=2,l.n=3,a(iY.toCanvas(i,this.component.url,{width:r,color:{dark:o,light:s},margin:0}));case 3:l.n=5;break;case 4:l.p=4,u=l.v,ui.error(`QR render failed for URL "${this.component.url}":`,u);case 5:return l.a(2)}},null,this,[[2,4]],Promise)}},{key:"firstUpdated",value:function(){this.renderQr()}},{key:"updated",value:function(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then(()=>this.renderQr())}},{key:"computedSize",get:function(){var e,t=Number(null!==(e=this.component.borderWidth)&&void 0!==e?e:0),n=Number(this.component.width)*this.scaleFactor,i=Math.floor(this.component.width?n-2*t:360);return Math.max(1,i)}},{key:"render",value:function(){if(this.component){var e=this.computedSize;return ym(eY||(eY=aY`<canvas width="${0}" height="${0}" style="width:${0}px;height:${0}px;"></canvas>`),e,e,e,e)}return ym(tY||(tY=aY`<canvas></canvas>`))}}])}(yw);Eh([Xm({type:Object})],rY.prototype,"component",void 0),Eh([Xm({type:Number})],rY.prototype,"scaleFactor",void 0),rY=Eh([Gm("nami-qr-code")],rY);var oY,sY=e=>e,uY=function(e){function t(){var e;return o(this,t),(e=r(this,t)).inFocusedState=!1,e.scaleFactor=1,e.isActive=!1,e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key&&142!==t.keyCode&&195!==t.keyCode||e._handleClick()},e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}},{key:"_handleClick",value:function(){var e=this.component,t=e.onTap,n=e.disabled,i=e.formId;if(!0!==n){this.component.checked=!this.component.checked,this.isActive=this.component.checked;var a=void 0;a=i?{function:(null==t?void 0:t.function)||"",parameters:m({},null==t?void 0:t.parameters,{formId:i||""})}:t,!this.contextProvider.flow||i?Mb({onTap:a,contextProvider:this.contextProvider}):this.component.id?(ui.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):ui.warn("Cannot trigger button hoisting without an id")}}},{key:"styles",value:function(){return Ih(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}},{key:"applyPlateStyles",value:function(){var e=this.component,t=this.scaleFactor,n=this.isActive||e.checked||!1,i=n?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",a=n?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Bw(e,t)};\n ${Cw(a)}\n border-width: ${n?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${xw(i)}\n `}},{key:"applyHandleStyles",value:function(){var e=this.component,t=e.checked||!1,n=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",i=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${Cw(i)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Uw(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${xw(n)}\n `}},{key:"render",value:function(){return this.tabIndex=0,this.role="switch",ym(oY||(oY=sY`
|
|
536
547
|
<div class="toggle-plate">
|
|
537
548
|
<div class="toggle-handle"></div>
|
|
538
549
|
</div>
|
|
539
|
-
`))}}])}(yw);Eh([Xm({type:Object})],
|
|
550
|
+
`))}}])}(yw);Eh([Xm({type:Object})],uY.prototype,"component",void 0),Eh([Xm({type:Boolean})],uY.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],uY.prototype,"scaleFactor",void 0),Eh([Xm({type:Boolean})],uY.prototype,"isActive",void 0),uY=Eh([Gm("nami-toggle-switch")],uY);var lY,dY=e=>e,cY=function(e){function t(){var e;return o(this,t),(e=r(this,t)).inFocusedState=!1,e.scaleFactor=1,e.tabIndex=0,e}return p(t,e),c(t,[{key:"styles",value:function(){var e=this.component;return Ih(`\n :host {\n box-sizing: border-box;\n }\n :host .radio-button-wrapper {\n display: flex;\n transition: all 0.3s;\n ${Bw(e,this.scaleFactor)}\n ${Cw(e.inactiveBorderColor||"transparent")}\n border-width: ${e.inactiveBorderWidth||0}px !important;\n border-style: solid;\n border-radius: 100%;\n padding: ${e.innerPadding||0}px !important;\n }\n :host .radio-button-wrapper.active {\n ${Cw(e.activeBorderColor||"transparent")}\n border-width: ${e.activeBorderWidth||0}px !important;\n ${Uw(e.dropShadow)}\n }\n :host .radio-button-inner {\n ${xw(e.inactiveFillColor||"transparent")}\n width: 100%;\n height: 100%;\n border-radius: 100%;\n }\n :host .radio-button-wrapper.active .radio-button-inner {\n ${xw(e.activeFillColor||"transparent")}\n }\n `)}},{key:"isActive",get:function(){var e,t,n=null!==(e=null===(t=this.component.sku)||void 0===t?void 0:t.id)&&void 0!==e?e:"";return Object.values(this.contextProvider.selectedProducts()).includes(n)}},{key:"render",value:function(){var e=this.isActive?"active":"";return ym(lY||(lY=dY`
|
|
540
551
|
<div class="radio-button-wrapper ${0}">
|
|
541
552
|
<div class="radio-button-inner"></div>
|
|
542
553
|
</div>
|
|
543
|
-
`),e)}}])}(yw);Eh([Xm({type:Object})],
|
|
554
|
+
`),e)}}])}(yw);Eh([Xm({type:Object})],cY.prototype,"component",void 0),Eh([Xm({type:Boolean})],cY.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],cY.prototype,"scaleFactor",void 0),cY=Eh([Gm("nami-radio-button")],cY);var hY,mY=e=>e,fY=mh.NamiFlowManager,vY=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).scaleFactor=1,e.inFocusedState=!1,e.currentWidth=0,e.hasInitialized=!1,e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),ah(this.minSDKVersion,"ProgressIndicator")}},{key:"firstUpdated",value:function(e){var n;T(t,"firstUpdated",this,3)([e]),this.currentWidth=100*fY.getLastAnimatedFlowProgress((null===(n=this.component)||void 0===n?void 0:n.id)||"default"),this.hasInitialized=!0,this.animateProgress(!0)}},{key:"updated",value:function(e){T(t,"updated",this,3)([e]),this.hasInitialized&&this.animateProgress(!1)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,n=this.inFocusedState,i=e.inactiveFillColor,a=e.inactiveFillColorFallback,r=e.inactiveBorderRadius,o=e.activeFillColor,s=e.activeFillColorFallback,u=e.activeBorderRadius,l=e.innerPadding,d=void 0===l?0:l,c=e.activeDropShadow,h=e.inactiveDropShadow;return Ih(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${Vw(e,t,n)}\n }\n \n .progress-container {\n ${Bw(e,t)} \n background: ${i||a};\n border-radius: ${r||0}px;\n overflow: hidden;\n position: relative;\n padding: ${d*t}px;\n box-sizing: border-box;\n ${Uw(h)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${o||s};\n border-radius: ${u||0}px;\n box-sizing: border-box;\n transition: width 0.8s ease-in-out;\n ${Uw(c)}\n }\n `)}},{key:"getProgressPercentage",value:function(){var e,t=null!==(e=this.component.percentage)&&void 0!==e?e:0;return"auto"===t&&(t=fY.getCurrentFlowProgress(this.component.id)),Math.min(100,Math.max(0,100*Number(t)))}},{key:"animateProgress",value:function(e){var t=this.component,n=t.id,i=t.percentage,a=this.getProgressPercentage();if(this.currentWidth!==a){var r=()=>{this.currentWidth=a,"auto"===i&&fY.setLastAnimatedFlowProgress(n||"default",a/100)};e?requestAnimationFrame(()=>requestAnimationFrame(r)):requestAnimationFrame(r)}}},{key:"render",value:function(){return ym(hY||(hY=mY`
|
|
544
555
|
<div class="progress-container">
|
|
545
556
|
<div
|
|
546
557
|
class="progress-bar"
|
|
@@ -551,20 +562,20 @@
|
|
|
551
562
|
aria-valuemax="100"
|
|
552
563
|
></div>
|
|
553
564
|
</div>
|
|
554
|
-
`),this.currentWidth,Math.round(this.currentWidth))}}])}(yw);Eh([Xm({type:Object})],hY.prototype,"component",void 0),Eh([Xm({type:Number})],hY.prototype,"scaleFactor",void 0),Eh([Xm({type:Boolean})],hY.prototype,"inFocusedState",void 0),Eh([Xm({type:Object})],hY.prototype,"minSDKVersion",void 0),Eh([Xm({type:Number})],hY.prototype,"currentWidth",void 0),hY=Eh([Gm("nami-progress-indicator")],hY);var mY=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e.isActive=!1,e._handleFocus=()=>{e.inFocusedState=!0},e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key&&142!==t.keyCode&&195!==t.keyCode||e._handleClick()},e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_handleClick",value:function(){var e,t,n=null===(e=this.component.onTap)||void 0===e?void 0:e.function;if(n){var i={function:n,parameters:m({},null===(t=this.component.onTap)||void 0===t?void 0:t.parameters,{formId:this.component.formId||"",value:"radio"===this.component.mode?this.component.value:void 0})};Mb({onTap:i,contextProvider:this.contextProvider})}}},{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.contextProvider.getCurrentFormId(e.formId||""),n=!0===t||t===e.value;this.inFocusedState=n;var i=n?e.activeFillColor||e.activeFillColorFallback||"transparent":e.inactiveFillColor||e.inactiveFillColorFallback||"transparent",a=n?e.activeBorderColor||"transparent":e.inactiveBorderColor||"transparent";return Ih(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius}px !important;\n ${Vw(e,this.scaleFactor,this.inFocusedState)}\n ${Cw(a)}\n border-width: ${n?e.activeBorderWidth||0:e.inactiveBorderWidth||0}px !important;\n ${Uw(n?e.activeDropShadow:e.inactiveDropShadow)};\n border-style: solid;\n ${xw(i)}\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.component.components.map(e=>xk(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}(yw);Eh([Xm({type:Object})],mY.prototype,"component",void 0),Eh([Xm({type:Boolean})],mY.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],mY.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],mY.prototype,"minSDKVersion",void 0),Eh([Xm({type:Boolean})],mY.prototype,"isActive",void 0),mY=Eh([Gm("nami-toggle-button")],mY);var fY,vY,pY,gY,yY,bY,wY,kY,SY,EY=e=>e,PY=SY=function(t){function n(){var e;return o(this,n),(e=r(this,n,arguments)).inFocusedState=!1,e.scaleFactor=1,e.timer=null,e.startTime=0,e.initialDuration=0,e.hasEmittedCompletion=!1,e}return p(n,t),c(n,[{key:"firstUpdated",value:function(){this.loadTimerState(),this.startTimer()}},{key:"disconnectedCallback",value:function(){T(n,"disconnectedCallback",this,3)([]),this.saveTimerState(),this.clearTimer()}},{key:"getTimerId",value:function(){var e,t;return null!==(e=null===(t=this.component)||void 0===t?void 0:t.id)&&void 0!==e?e:""}},{key:"loadTimerState",value:function(){var e;null!==(e=this.contextProvider)&&void 0!==e&&e.flow&&(this.timerState=this.contextProvider.flow.timerStates[this.getTimerId()])}},{key:"saveTimerState",value:function(){var e;if(null!==(e=this.contextProvider)&&void 0!==e&&e.flow){var t=this.component,n=t.mode,i=t.durationSeconds;if("duration"===n&&void 0!==i){var a=this.calculateCurrentRemainingSeconds();this.contextProvider.flow.timerStates[this.getTimerId()]={remainingSeconds:a,savedAt:Date.now(),hasEmittedCompletion:this.hasEmittedCompletion}}}}},{key:"getSavedTimerState",value:function(){var e;return null===(e=this.contextProvider)||void 0===e||null===(e=e.flow)||void 0===e?void 0:e.timerStates[this.getTimerId()]}},{key:"startTimer",value:function(){this.initializeTimerState(),this.clearTimer(),this.timer=setInterval(()=>this.onTimerTick(),SY.TIMER_INTERVAL_MS)}},{key:"initializeTimerState",value:function(){var e=this.component,t=e.mode,n=e.durationSeconds,i=e.resetOnRemount;"duration"===t&&void 0!==n&&(this.timerState&&!i?this.restoreTimerFromState(this.timerState,n):this.resetTimerState(n))}},{key:"restoreTimerFromState",value:function(e,t){var n=(Date.now()-e.savedAt)/1e3,i=Math.max(0,e.remainingSeconds-n);this.initialDuration=t,this.startTime=Date.now()-1e3*(this.initialDuration-i),this.hasEmittedCompletion=e.hasEmittedCompletion}},{key:"resetTimerState",value:function(e){this.initialDuration=e,this.startTime=Date.now(),this.hasEmittedCompletion=!1}},{key:"onTimerTick",value:function(){var e=this.calculateTimeValues().isCompleted;this.requestUpdate(),e&&this.clearTimer()}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"calculateTimeValues",value:function(){var e=this.calculateTotalRemainingSeconds(),t=e<=0,n=this.component.units||SY.DEFAULT_UNITS,i=n.days,a=n.hours,r=n.minutes,o=n.seconds;return m({},this.convertSecondsToTimeUnits(e,{days:i,hours:a,minutes:r,seconds:o}),{isCompleted:t})}},{key:"calculateTotalRemainingSeconds",value:function(){var e=this.component,t=e.mode,n=e.durationSeconds,i=e.targetDateTime;return"duration"===t?this.calculateDurationRemainingSeconds(n):"targetDateTime"===t&&i?this.calculateTargetDateTimeRemainingSeconds(i):0}},{key:"calculateDurationRemainingSeconds",value:function(e){var t=this.getSavedTimerState();if(t){var n=(Date.now()-t.savedAt)/1e3;return Math.max(0,t.remainingSeconds-n)}if(this.initialDuration>0&&this.startTime>0){var i=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-i)}return void 0!==e?Math.max(0,e):0}},{key:"calculateTargetDateTimeRemainingSeconds",value:function(e){var t=new Date(e).getTime(),n=Date.now();return Math.max(0,(t-n)/1e3)}},{key:"calculateCurrentRemainingSeconds",value:function(){var e=this.component.durationSeconds;if(this.initialDuration>0&&this.startTime>0){var t=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-t)}return null!=e?e:0}},{key:"convertSecondsToTimeUnits",value:function(e,t){var n=t.days?Math.floor(e/SY.SECONDS_PER_DAY):0,i=e-n*SY.SECONDS_PER_DAY,a=t.hours?Math.floor(i/SY.SECONDS_PER_HOUR):0,r=i-a*SY.SECONDS_PER_HOUR,o=t.minutes?Math.floor(r/SY.SECONDS_PER_MINUTE):0,s=r-o*SY.SECONDS_PER_MINUTE;return{days:n,hours:a,minutes:o,seconds:t.seconds?Math.floor(s):0}}},{key:"formatValue",value:function(e,t){return t?e.toString().padStart(2,"0"):e.toString()}},{key:"emitCompletionEvent",value:function(){!this.hasEmittedCompletion&&this.contextProvider&&(this.hasEmittedCompletion=!0,Ou.getInstance().emit(Vn,m({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.COUNTDOWN_TIMER_COMPLETED,componentChange:{id:this.component.id,name:this.component.title}})))}},{key:"updated",value:function(e){this.updateAccessibilityAttributes(),e.has("component")&&this.handleComponentChange(e.get("component"))}},{key:"updateAccessibilityAttributes",value:function(){this.ariaLabel=this.component.screenreaderText||"",this.ariaDescription=this.component.screenreaderHint||""}},{key:"handleComponentChange",value:function(e){if(e){var t=this.component,n=t.mode,i=t.durationSeconds,a=t.targetDateTime;(n!==e.mode||i!==e.durationSeconds||a!==e.targetDateTime)&&this.startTimer()}}},{key:"styles",value:function(){var e=this.component,t=e.labels,n=e.separator,i=e.labelPosition,a=void 0===i?"none":i,r=e.direction,o=void 0===r?"horizontal":r,s=e.labelFontSize,u=e.labelFontColor,l=e.labelFontName,d=e.labelSpacing,c=e.spacing,h=e.fontSize,m=e.fontColor,f=e.fontName,v=e.alignment,p="below"===a?"bottom":"above"===a?"top":a,g="vertical"===o,y=t&&(t.days||t.hours||t.minutes||t.seconds)||"none"!==p;return Ih(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius||0}px !important;\n flex-direction: ${g?"column":"row"};\n align-items: center;\n justify-content: flex-start;\n ${Lw(e,this.inFocusedState)}\n ${$w(e,this.scaleFactor)}\n ${jw(e,this.scaleFactor,this.inFocusedState)}\n ${Fw(e)}\n ${Bw(e,this.scaleFactor)}\n }\n .timer-text {\n display: flex;\n flex-direction: ${g?"column":"row"};\n align-items: center;\n gap: ${g?c?c*this.scaleFactor:4:0}px;\n }\n .timer-unit {\n display: flex;\n flex-direction: ${"top"===p||"bottom"===p?"column":"row"};\n align-items: center;\n ${g?`margin-top: ${c?c*this.scaleFactor:4}px;`:`margin-right: ${c?c*this.scaleFactor:4}px;`} \n }\n .timer-text-value-days,\n .timer-text-value-hours,\n .timer-text-value-minutes,\n .timer-text-value-seconds {\n ${h?`font-size: ${h*this.scaleFactor}px;`:""}\n ${m?Iw(m):""}\n ${Gw(f)}\n ${v?`text-align: ${v};`:""}\n ${Uw(e.dropShadow,!0)}\n line-height: 1;\n }\n .timer-text-value-label {\n font-size: ${s?s*this.scaleFactor:12*this.scaleFactor}px;\n color: ${u||"inherit"};\n ${Gw(l)}\n ${"top"===p?`margin-bottom: ${d?d*this.scaleFactor:2}px;`:""}\n ${"bottom"===p?`margin-top: ${d?d*this.scaleFactor:2}px;`:""}\n ${y?"":"display: none;"}\n }\n .timer-text-value-separator {\n ${n?`\n display: flex;\n align-items: center;\n ${h?`font-size: ${h*this.scaleFactor}px;`:""}\n ${m?Iw(m):""}\n ${Gw(f)}\n line-height: 1;\n ${g?`margin-top: ${c?c*this.scaleFactor:4}px;`:`margin-right: ${c?c*this.scaleFactor:4}px;`} \n ${"bottom"===p||"top"===p?"align-self: flex-start;":""}\n `:"display: none;"}\n }\n `)}},{key:"render",value:function(){this.tabIndex=0;var e=this.component.showWhenCompleted,t=void 0===e?"zero":e,n=this.calculateTimeValues();if(n.isCompleted&&(this.emitCompletionEvent(),"hidden"===t))return ym(fY||(fY=EY``));var i=this.buildUnitsToRender(n);return 0===i.length?ym(vY||(vY=EY`<div class="timer-text"></div>`)):this.renderTimerUnits(i)}},{key:"buildUnitsToRender",value:function(e){var t=this.component,n=t.labels,i=t.units,a=t.labelPosition,r=void 0===a?"none":a,o=i||{},s=o.days,u=o.hours,l=o.minutes,d=o.seconds,c=this.normalizeLabelPosition(r),h=this.shouldDisplayLabels(n,c);return[{enabled:s,value:e.days,label:this.getLabel("days",n,h),class:"timer-text-value-days"},{enabled:u,value:e.hours,label:this.getLabel("hours",n,h),class:"timer-text-value-hours"},{enabled:l,value:e.minutes,label:this.getLabel("minutes",n,h),class:"timer-text-value-minutes"},{enabled:d,value:e.seconds,label:this.getLabel("seconds",n,h),class:"timer-text-value-seconds"}].filter(e=>e.enabled).map(e=>({value:e.value,label:e.label,unitClass:e.class,showUnit:!0}))}},{key:"normalizeLabelPosition",value:function(e){return"below"===e?"bottom":"above"===e?"top":e}},{key:"shouldDisplayLabels",value:function(e,t){return Boolean(e&&(e.days||e.hours||e.minutes||e.seconds))||"none"!==t&&void 0!==t}},{key:"getLabel",value:function(e,t,n){var i;return null!==(i=null==t?void 0:t[e])&&void 0!==i?i:n?SY.DEFAULT_LABELS[e]:""}},{key:"renderTimerUnits",value:function(e){var t=this.component,n=t.separator,i=t.zeroPad,a=void 0===i||i,r=t.labelPosition,o=void 0===r?"none":r,s=this.component.labels,u=this.normalizeLabelPosition(o),l=s&&(s.days||s.hours||s.minutes||s.seconds),d=Boolean(l||"none"!==u),c=null!=n?n:":";return ym(pY||(pY=EY`
|
|
565
|
+
`),this.currentWidth,Math.round(this.currentWidth))}}])}(yw);Eh([Xm({type:Object})],vY.prototype,"component",void 0),Eh([Xm({type:Number})],vY.prototype,"scaleFactor",void 0),Eh([Xm({type:Boolean})],vY.prototype,"inFocusedState",void 0),Eh([Xm({type:Object})],vY.prototype,"minSDKVersion",void 0),Eh([Xm({type:Number})],vY.prototype,"currentWidth",void 0),vY=Eh([Gm("nami-progress-indicator")],vY);var pY=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e.isActive=!1,e._handleFocus=()=>{e.inFocusedState=!0},e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key&&142!==t.keyCode&&195!==t.keyCode||e._handleClick()},e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_handleClick",value:function(){var e,t,n=null===(e=this.component.onTap)||void 0===e?void 0:e.function;if(n){var i={function:n,parameters:m({},null===(t=this.component.onTap)||void 0===t?void 0:t.parameters,{formId:this.component.formId||"",value:"radio"===this.component.mode?this.component.value:void 0})};Mb({onTap:i,contextProvider:this.contextProvider})}}},{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,t=this.contextProvider.getCurrentFormId(e.formId||""),n=!0===t||t===e.value;this.inFocusedState=n;var i=n?e.activeFillColor||e.activeFillColorFallback||"transparent":e.inactiveFillColor||e.inactiveFillColorFallback||"transparent",a=n?e.activeBorderColor||"transparent":e.inactiveBorderColor||"transparent";return Ih(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius}px !important;\n ${Vw(e,this.scaleFactor,this.inFocusedState)}\n ${Cw(a)}\n border-width: ${n?e.activeBorderWidth||0:e.inactiveBorderWidth||0}px !important;\n ${Uw(n?e.activeDropShadow:e.inactiveDropShadow)};\n border-style: solid;\n ${xw(i)}\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.component.components.map(e=>xk(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}(yw);Eh([Xm({type:Object})],pY.prototype,"component",void 0),Eh([Xm({type:Boolean})],pY.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],pY.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],pY.prototype,"minSDKVersion",void 0),Eh([Xm({type:Boolean})],pY.prototype,"isActive",void 0),pY=Eh([Gm("nami-toggle-button")],pY);var gY,yY,bY,wY,kY,SY,EY,PY,TY,MY=e=>e,_Y=TY=function(t){function n(){var e;return o(this,n),(e=r(this,n,arguments)).inFocusedState=!1,e.scaleFactor=1,e.timer=null,e.startTime=0,e.initialDuration=0,e.hasEmittedCompletion=!1,e}return p(n,t),c(n,[{key:"firstUpdated",value:function(){this.loadTimerState(),this.startTimer()}},{key:"disconnectedCallback",value:function(){T(n,"disconnectedCallback",this,3)([]),this.saveTimerState(),this.clearTimer()}},{key:"getTimerId",value:function(){var e,t;return null!==(e=null===(t=this.component)||void 0===t?void 0:t.id)&&void 0!==e?e:""}},{key:"loadTimerState",value:function(){var e;null!==(e=this.contextProvider)&&void 0!==e&&e.flow&&(this.timerState=this.contextProvider.flow.timerStates[this.getTimerId()])}},{key:"saveTimerState",value:function(){var e;if(null!==(e=this.contextProvider)&&void 0!==e&&e.flow){var t=this.component,n=t.mode,i=t.durationSeconds;if("duration"===n&&void 0!==i){var a=this.calculateCurrentRemainingSeconds();this.contextProvider.flow.timerStates[this.getTimerId()]={remainingSeconds:a,savedAt:Date.now(),hasEmittedCompletion:this.hasEmittedCompletion}}}}},{key:"getSavedTimerState",value:function(){var e;return null===(e=this.contextProvider)||void 0===e||null===(e=e.flow)||void 0===e?void 0:e.timerStates[this.getTimerId()]}},{key:"startTimer",value:function(){this.initializeTimerState(),this.clearTimer(),this.timer=setInterval(()=>this.onTimerTick(),TY.TIMER_INTERVAL_MS)}},{key:"initializeTimerState",value:function(){var e=this.component,t=e.mode,n=e.durationSeconds,i=e.resetOnRemount;"duration"===t&&void 0!==n&&(this.timerState&&!i?this.restoreTimerFromState(this.timerState,n):this.resetTimerState(n))}},{key:"restoreTimerFromState",value:function(e,t){var n=(Date.now()-e.savedAt)/1e3,i=Math.max(0,e.remainingSeconds-n);this.initialDuration=t,this.startTime=Date.now()-1e3*(this.initialDuration-i),this.hasEmittedCompletion=e.hasEmittedCompletion}},{key:"resetTimerState",value:function(e){this.initialDuration=e,this.startTime=Date.now(),this.hasEmittedCompletion=!1}},{key:"onTimerTick",value:function(){var e=this.calculateTimeValues().isCompleted;this.requestUpdate(),e&&this.clearTimer()}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"calculateTimeValues",value:function(){var e=this.calculateTotalRemainingSeconds(),t=e<=0,n=this.component.units||TY.DEFAULT_UNITS,i=n.days,a=n.hours,r=n.minutes,o=n.seconds;return m({},this.convertSecondsToTimeUnits(e,{days:i,hours:a,minutes:r,seconds:o}),{isCompleted:t})}},{key:"calculateTotalRemainingSeconds",value:function(){var e=this.component,t=e.mode,n=e.durationSeconds,i=e.targetDateTime;return"duration"===t?this.calculateDurationRemainingSeconds(n):"targetDateTime"===t&&i?this.calculateTargetDateTimeRemainingSeconds(i):0}},{key:"calculateDurationRemainingSeconds",value:function(e){var t=this.getSavedTimerState();if(t){var n=(Date.now()-t.savedAt)/1e3;return Math.max(0,t.remainingSeconds-n)}if(this.initialDuration>0&&this.startTime>0){var i=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-i)}return void 0!==e?Math.max(0,e):0}},{key:"calculateTargetDateTimeRemainingSeconds",value:function(e){var t=new Date(e).getTime(),n=Date.now();return Math.max(0,(t-n)/1e3)}},{key:"calculateCurrentRemainingSeconds",value:function(){var e=this.component.durationSeconds;if(this.initialDuration>0&&this.startTime>0){var t=(Date.now()-this.startTime)/1e3;return Math.max(0,this.initialDuration-t)}return null!=e?e:0}},{key:"convertSecondsToTimeUnits",value:function(e,t){var n=t.days?Math.floor(e/TY.SECONDS_PER_DAY):0,i=e-n*TY.SECONDS_PER_DAY,a=t.hours?Math.floor(i/TY.SECONDS_PER_HOUR):0,r=i-a*TY.SECONDS_PER_HOUR,o=t.minutes?Math.floor(r/TY.SECONDS_PER_MINUTE):0,s=r-o*TY.SECONDS_PER_MINUTE;return{days:n,hours:a,minutes:o,seconds:t.seconds?Math.floor(s):0}}},{key:"formatValue",value:function(e,t){return t?e.toString().padStart(2,"0"):e.toString()}},{key:"emitCompletionEvent",value:function(){!this.hasEmittedCompletion&&this.contextProvider&&(this.hasEmittedCompletion=!0,Ou.getInstance().emit(Vn,m({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.COUNTDOWN_TIMER_COMPLETED,componentChange:{id:this.component.id,name:this.component.title}})))}},{key:"updated",value:function(e){this.updateAccessibilityAttributes(),e.has("component")&&this.handleComponentChange(e.get("component"))}},{key:"updateAccessibilityAttributes",value:function(){this.ariaLabel=this.component.screenreaderText||"",this.ariaDescription=this.component.screenreaderHint||""}},{key:"handleComponentChange",value:function(e){if(e){var t=this.component,n=t.mode,i=t.durationSeconds,a=t.targetDateTime;(n!==e.mode||i!==e.durationSeconds||a!==e.targetDateTime)&&this.startTimer()}}},{key:"styles",value:function(){var e=this.component,t=e.labels,n=e.separator,i=e.labelPosition,a=void 0===i?"none":i,r=e.direction,o=void 0===r?"horizontal":r,s=e.labelFontSize,u=e.labelFontColor,l=e.labelFontName,d=e.labelSpacing,c=e.spacing,h=e.fontSize,m=e.fontColor,f=e.fontName,v=e.alignment,p="below"===a?"bottom":"above"===a?"top":a,g="vertical"===o,y=t&&(t.days||t.hours||t.minutes||t.seconds)||"none"!==p;return Ih(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n position: relative;\n cursor: pointer;\n height: 100%;\n border-radius: ${e.borderRadius||0}px !important;\n flex-direction: ${g?"column":"row"};\n align-items: center;\n justify-content: flex-start;\n ${Lw(e,this.inFocusedState)}\n ${$w(e,this.scaleFactor)}\n ${jw(e,this.scaleFactor,this.inFocusedState)}\n ${Fw(e)}\n ${Bw(e,this.scaleFactor)}\n }\n .timer-text {\n display: flex;\n flex-direction: ${g?"column":"row"};\n align-items: center;\n gap: ${g?c?c*this.scaleFactor:4:0}px;\n }\n .timer-unit {\n display: flex;\n flex-direction: ${"top"===p||"bottom"===p?"column":"row"};\n align-items: center;\n ${g?`margin-top: ${c?c*this.scaleFactor:4}px;`:`margin-right: ${c?c*this.scaleFactor:4}px;`} \n }\n .timer-text-value-days,\n .timer-text-value-hours,\n .timer-text-value-minutes,\n .timer-text-value-seconds {\n ${h?`font-size: ${h*this.scaleFactor}px;`:""}\n ${m?Iw(m):""}\n ${Gw(f)}\n ${v?`text-align: ${v};`:""}\n ${Uw(e.dropShadow,!0)}\n line-height: 1;\n }\n .timer-text-value-label {\n font-size: ${s?s*this.scaleFactor:12*this.scaleFactor}px;\n color: ${u||"inherit"};\n ${Gw(l)}\n ${"top"===p?`margin-bottom: ${d?d*this.scaleFactor:2}px;`:""}\n ${"bottom"===p?`margin-top: ${d?d*this.scaleFactor:2}px;`:""}\n ${y?"":"display: none;"}\n }\n .timer-text-value-separator {\n ${n?`\n display: flex;\n align-items: center;\n ${h?`font-size: ${h*this.scaleFactor}px;`:""}\n ${m?Iw(m):""}\n ${Gw(f)}\n line-height: 1;\n ${g?`margin-top: ${c?c*this.scaleFactor:4}px;`:`margin-right: ${c?c*this.scaleFactor:4}px;`} \n ${"bottom"===p||"top"===p?"align-self: flex-start;":""}\n `:"display: none;"}\n }\n `)}},{key:"render",value:function(){this.tabIndex=0;var e=this.component.showWhenCompleted,t=void 0===e?"zero":e,n=this.calculateTimeValues();if(n.isCompleted&&(this.emitCompletionEvent(),"hidden"===t))return ym(gY||(gY=MY``));var i=this.buildUnitsToRender(n);return 0===i.length?ym(yY||(yY=MY`<div class="timer-text"></div>`)):this.renderTimerUnits(i)}},{key:"buildUnitsToRender",value:function(e){var t=this.component,n=t.labels,i=t.units,a=t.labelPosition,r=void 0===a?"none":a,o=i||{},s=o.days,u=o.hours,l=o.minutes,d=o.seconds,c=this.normalizeLabelPosition(r),h=this.shouldDisplayLabels(n,c);return[{enabled:s,value:e.days,label:this.getLabel("days",n,h),class:"timer-text-value-days"},{enabled:u,value:e.hours,label:this.getLabel("hours",n,h),class:"timer-text-value-hours"},{enabled:l,value:e.minutes,label:this.getLabel("minutes",n,h),class:"timer-text-value-minutes"},{enabled:d,value:e.seconds,label:this.getLabel("seconds",n,h),class:"timer-text-value-seconds"}].filter(e=>e.enabled).map(e=>({value:e.value,label:e.label,unitClass:e.class,showUnit:!0}))}},{key:"normalizeLabelPosition",value:function(e){return"below"===e?"bottom":"above"===e?"top":e}},{key:"shouldDisplayLabels",value:function(e,t){return Boolean(e&&(e.days||e.hours||e.minutes||e.seconds))||"none"!==t&&void 0!==t}},{key:"getLabel",value:function(e,t,n){var i;return null!==(i=null==t?void 0:t[e])&&void 0!==i?i:n?TY.DEFAULT_LABELS[e]:""}},{key:"renderTimerUnits",value:function(e){var t=this.component,n=t.separator,i=t.zeroPad,a=void 0===i||i,r=t.labelPosition,o=void 0===r?"none":r,s=this.component.labels,u=this.normalizeLabelPosition(o),l=s&&(s.days||s.hours||s.minutes||s.seconds),d=Boolean(l||"none"!==u),c=null!=n?n:":";return ym(bY||(bY=MY`
|
|
555
566
|
<div class="timer-text">
|
|
556
567
|
${0}
|
|
557
568
|
</div>
|
|
558
|
-
`),e.map((t,n)=>ym(
|
|
569
|
+
`),e.map((t,n)=>ym(wY||(wY=MY`
|
|
559
570
|
${0}
|
|
560
571
|
${0}
|
|
561
|
-
`),this.renderUnit(t.value,t.label,t.unitClass,t.showUnit,a,u,d),n<e.length-1&&c?ym(
|
|
572
|
+
`),this.renderUnit(t.value,t.label,t.unitClass,t.showUnit,a,u,d),n<e.length-1&&c?ym(kY||(kY=MY`<span class="timer-text-value-separator">${0}</span>`),c):"")))}},{key:"renderUnit",value:function(e,t,n,i,a,r,o){if(!i)return null;var s=Boolean(t&&o);return ym(SY||(SY=MY`
|
|
562
573
|
<div class="timer-unit">
|
|
563
574
|
${0}
|
|
564
575
|
<span class="${0}">${0}</span>
|
|
565
576
|
${0}
|
|
566
577
|
</div>
|
|
567
|
-
`),s&&"top"===r?ym(
|
|
578
|
+
`),s&&"top"===r?ym(EY||(EY=MY`<span class="timer-text-value-label">${0}</span>`),t):"",n,this.formatValue(e,a),s&&"bottom"===r?ym(PY||(PY=MY`<span class="timer-text-value-label">${0}</span>`),t):"")}}])}(yw);_Y.DEFAULT_LABELS={days:"days",hours:"hours",minutes:"minutes",seconds:"seconds"},_Y.DEFAULT_UNITS={days:!1,hours:!0,minutes:!0,seconds:!0},_Y.SECONDS_PER_DAY=86400,_Y.SECONDS_PER_HOUR=3600,_Y.SECONDS_PER_MINUTE=60,_Y.TIMER_INTERVAL_MS=1e3,Eh([Xm({type:Object})],_Y.prototype,"component",void 0),Eh([Xm({type:Boolean})],_Y.prototype,"inFocusedState",void 0),Eh([Xm({type:Number})],_Y.prototype,"scaleFactor",void 0),Eh([Xm({type:Object})],_Y.prototype,"minSDKVersion",void 0),_Y=TY=Eh([Gm("nami-countdown-timer-text")],_Y);var AY,DY=e=>e,xY=mh.NamiFlowManager,CY=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).scaleFactor=1,e.inFocusedState=!1,e.currentProgress=0,e.isAnimating=!1,e.screenreaderAnnouncement="",e.hasInitialized=!1,e.delayTimeoutId=null,e.animationFrameId=null,e.animationStartTime=null,e.startPercentage=0,e}return p(t,e),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this,3)([]),ah(this.minSDKVersion,"ProgressBar")}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this,3)([]),this.cleanup()}},{key:"firstUpdated",value:function(e){T(t,"firstUpdated",this,3)([e]),this.hasInitialized=!0,this.startAnimation()}},{key:"updated",value:function(e){T(t,"updated",this,3)([e]),this.hasInitialized&&e.has("component")&&(this.cleanup(),this.startAnimation())}},{key:"cleanup",value:function(){null!==this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationStartTime=null,this.isAnimating=!1}},{key:"getResolvedDuration",value:function(){var e=this.component,t=e.duration,n=e.mode;if("auto"===t&&"determinate"===n){var i=xY.getCurrentFlowStepAutoAdvanceDelay();return null!=i?i:3}return"number"==typeof t&&t>0?t:"determinate"===n?3:2}},{key:"startAnimation",value:function(){var e=this.component,t=e.mode,n=e.delay,i=e.percentage,a=void 0===i?0:i,r="number"==typeof a&&!Number.isInteger(a);this.startPercentage="number"==typeof a?r?100*a:a:0,this.currentProgress=this.startPercentage;var o="number"==typeof n&&n>0?1e3*n:0;o>0?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.beginAnimation(t)},o):this.beginAnimation(t)}},{key:"beginAnimation",value:function(e){this.isAnimating=!0;var t=this.component.screenreaderText||"Loading";this.screenreaderAnnouncement=t,setTimeout(()=>{this.screenreaderAnnouncement=""},1e3),"determinate"===e&&this.animateDeterminate()}},{key:"animateDeterminate",value:function(){if(!this.isAnimating||null===this.animationFrameId){var e=1e3*this.getResolvedDuration(),t=this.startPercentage;this.animationStartTime=null;var n=i=>{null===this.animationStartTime&&(this.animationStartTime=i);var a=i-this.animationStartTime,r=Math.min(1,a/e);this.currentProgress=t+(100-t)*r,r<1?this.animationFrameId=requestAnimationFrame(n):(this.currentProgress=100,this.isAnimating=!1,this.animationFrameId=null,this.animationStartTime=null)};this.animationFrameId=requestAnimationFrame(n)}}},{key:"getActiveWidthCss",value:function(){var e=this.component.activeWidth;return null==e?"30%":"number"==typeof e?`${e}px`:String(e).trim()}},{key:"isActiveWidthPercent",value:function(){var e=this.component.activeWidth;return null==e||"number"!=typeof e&&String(e).endsWith("%")}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,n=this.inFocusedState,i=e.mode,a=e.inactiveFillColor,r=e.inactiveFillColorFallback,o=e.inactiveBorderRadius,s=e.activeFillColor,u=e.activeFillColorFallback,l=e.activeBorderRadius,d=e.innerPadding,c=void 0===d?0:d,h=e.activeDropShadow,m=e.inactiveDropShadow,f=this.getActiveWidthCss(),v=this.getResolvedDuration(),p=this.isActiveWidthPercent(),g=p&&parseFloat(f)||30,y=(100-g)/g*100,b=p?0:parseFloat(f)||0;return Ih(`\n :host {\n display: ${e.hidden?"none":"block"};\n ${Vw(e,t,n)}\n }\n \n .progress-container {\n ${Bw(e,t)} \n background: ${a||r};\n border-radius: ${o||0}px;\n overflow: hidden;\n position: relative;\n padding: ${c*t}px;\n box-sizing: border-box;\n ${Uw(m)}\n }\n \n .progress-bar {\n height: 100%;\n background: ${s||u};\n border-radius: ${l||0}px;\n box-sizing: border-box;\n ${Uw(h)}\n ${"indeterminate"===i?`\n position: absolute;\n left: 0;\n top: ${c*t}px;\n bottom: ${c*t}px;\n width: ${f};\n animation: slide ${v}s linear infinite;\n `:""}\n }\n\n ${"indeterminate"===i?p?`\n @keyframes slide {\n 0% {\n transform: translateX(-${y}%);\n }\n 100% {\n transform: translateX(${y+100}%);\n }\n }\n `:`\n @keyframes slide {\n 0% {\n left: -${b}px;\n }\n 100% {\n left: 100%;\n }\n }\n `:""}\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `)}},{key:"render",value:function(){var e=this.component.mode;return ym(AY||(AY=DY`
|
|
568
579
|
<div class="progress-container">
|
|
569
580
|
<div
|
|
570
581
|
class="progress-bar"
|
|
@@ -581,4 +592,4 @@
|
|
|
581
592
|
aria-live="polite"
|
|
582
593
|
aria-atomic="true"
|
|
583
594
|
>${0}</span>
|
|
584
|
-
`),"indeterminate"===e?"":`width: ${this.currentProgress}%`,"indeterminate"===e?void 0:Math.round(this.currentProgress),"indeterminate"===e?void 0:0,"indeterminate"===e?void 0:100,this.isAnimating,this.screenreaderAnnouncement)}}])}(yw);Eh([Xm({type:Object})],
|
|
595
|
+
`),"indeterminate"===e?"":`width: ${this.currentProgress}%`,"indeterminate"===e?void 0:Math.round(this.currentProgress),"indeterminate"===e?void 0:0,"indeterminate"===e?void 0:100,this.isAnimating,this.screenreaderAnnouncement)}}])}(yw);Eh([Xm({type:Object})],CY.prototype,"component",void 0),Eh([Xm({type:Number})],CY.prototype,"scaleFactor",void 0),Eh([Xm({type:Boolean})],CY.prototype,"inFocusedState",void 0),Eh([Xm({type:Object})],CY.prototype,"minSDKVersion",void 0),Eh([Ym()],CY.prototype,"currentProgress",void 0),Eh([Ym()],CY.prototype,"isAnimating",void 0),Eh([Ym()],CY.prototype,"screenreaderAnnouncement",void 0),CY=Eh([Gm("nami-progress-bar")],CY),e.Nami=zd,e.NamiCampaignManager=Bc,e.NamiCustomerManager=zc,e.NamiEntitlementManager=Hc,e.NamiFlowManager=Gc,e.NamiPaywallManager=qc,e.NamiPurchaseManager=Jc,e._internal=mh,e.isNamiFlowCampaign=Bs});
|