@namiml/web-sdk 3.4.0-dev.202604170506 → 3.4.0-dev.202604182042

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.
@@ -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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function n(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,i){return t=v(t),b(e,g()?Reflect.construct(t,i||[],v(e).constructor):t.apply(e,i))}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),i=0;i<e.length;i+=1)t[i]=e[i].name;return t});var u=0;function l(e){return"__private_"+u+++"_"+e}function d(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M(n.key),n)}}function h(e,t,i){return t&&d(e.prototype,t),i&&d(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t){n&&(e=n);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 i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:i):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 i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}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 n(e)}function w(){var e,t,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",a=i.toStringTag||"@@toStringTag";function r(i,n,a,r){var u=n&&n.prototype instanceof s?n:s,l=Object.create(u.prototype);return E(l,"_invoke",function(i,n,a){var r,s,u,l=0,d=a||[],h=!1,c={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,i){return r=t,s=0,u=e,c.n=i,o}};function m(i,n){for(s=i,u=n,t=0;!h&&l&&!a&&t<d.length;t++){var a,r=d[t],m=c.p,f=r[2];i>3?(a=f===n)&&(u=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((a=i<2&&m<r[1])?(s=0,c.v=n,c.n=r[1]):m<f&&(a=i<3||r[0]>n||n>f)&&(r[4]=i,r[5]=n,c.n=f,s=0))}if(a||i>1)return o;throw h=!0,n}return function(a,d,f){if(l>1)throw TypeError("Generator is already running");for(h&&1===d&&m(d,f),s=d,u=f;(t=s<2?e:u)||!h;){r||(s?s<3?(s>1&&(c.n=-1),m(s,u)):c.n=u:c.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=(h=c.n<0)?u:i.call(n,c))!==o)break}catch(t){r=e,s=1,u=t}finally{l=1}}return{value:t,done:h}}}(i,a,r),!0),l}var o={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(E(t={},n,function(){return this}),t),h=l.prototype=s.prototype=Object.create(d);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,E(e,a,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=l,E(h,"constructor",l),E(l,"constructor",u),u.displayName="GeneratorFunction",E(l,a,"GeneratorFunction"),E(h),E(h,a,"Generator"),E(h,n,function(){return this}),E(h,"toString",function(){return"[object Generator]"}),(w=function(){return{w:r,m:c}})()}function k(e,t,i,n,a){var r=function(e,t,i,n,a){return new S(w().w(e,t,i,n),a||Promise)}(e,t,i,n,a);return r.next().then(function(e){return e.done?e.value:r.next()})}function S(e,i){function n(a,r,o,s){try{var u=e[a](r),l=u.value;return l instanceof t?i.resolve(l.v).then(function(e){n("next",e,o,s)},function(e){n("throw",e,o,s)}):i.resolve(l).then(function(e){u.value=e,o(u)},function(e){return n("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 i(function(t,i){n(e,r,t,i)})}return a=a?a.then(o,o):o()},!0)}function E(e,t,i,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}E=function(e,t,i,n){function r(t,i){E(e,t,function(e){return this._invoke(t,i,e)})}t?a?a(e,t,{value:i,enumerable:!n,configurable:!n,writable:!n}):e[t]=i:(r("next",0),r("throw",1),r("return",2))},E(e,t,i,n)}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,i,n){var a=f(v(e.prototype),t,i);return 2&n&&"function"==typeof a?function(e){return a.apply(i,e)}:a}function M(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=typeof n)return n;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,i)}function i(){return function(e,t,i){if(g())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return i&&P(a,i.prototype),a}(e,arguments,v(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),P(i,e)},_(e)}var A,D,x,C,I,L,R,F,O,N,$,W,j=function(){return h(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,i,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!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"===n?a.call(e,i):a?a.value=i:t.set(e,i),i},z=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},U=e=>{var t;return"boolean"==typeof e?e:null!==(t=null==e?void 0:e.capture)&&void 0!==t&&t},H=function(){return h(function e(){o(this,e),this.__eventListeners=new Map,this.__captureEventListeners=new Map},[{key:"addEventListener",value:function(e,t,i){var n;if(null!=t){var a=U(i)?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 i&&i?i:{};null===(n=o.signal)||void 0===n||n.addEventListener("abort",()=>this.removeEventListener(e,t,i)),r.set(t,null!=o?o:{})}}},{key:"removeEventListener",value:function(e,t,i){if(null!=t){var n=U(i)?this.__captureEventListeners:this.__eventListeners,a=n.get(e);void 0!==a&&(a.delete(t),a.size||n.delete(e))}}},{key:"dispatchEvent",value:function(e){var t=[this],i=this.__eventTargetParent;if(e.composed)for(;i;)t.push(i),i=i.__eventTargetParent;else for(;i&&i!==this.__host;)t.push(i),i=i.__eventTargetParent;var n=!1,a=!1,r=0,o=null,s=null,u=null,l=e.stopPropagation,d=e.stopImmediatePropagation;Object.defineProperties(e,{target:m({get:()=>null!=o?o:s},V),srcElement:m({get:()=>e.target},V),currentTarget:m({get:()=>u},V),eventPhase:m({get:()=>r},V),composedPath:m({value:()=>t},V),stopPropagation:m({value:()=>{n=!0,l.call(e)}},V),stopImmediatePropagation:m({value:()=>{a=!0,d.call(e)}},V)});var h=(t,i,n)=>{"function"==typeof t?t(e):"function"==typeof(null==t?void 0:t.handleEvent)&&t.handleEvent(e),i.once&&n.delete(t)},f=()=>(u=null,r=0,!e.defaultPrevented),v=t.slice().reverse();o=this.__host&&e.composed?null:this;for(var p,g=e=>{for(s=this;s.__host&&e.includes(s.__host);)s=s.__host},y=c(v);!(p=y()).done;){var b=p.value;o||s&&s!==b.__host||g(v.slice(v.indexOf(b))),u=b,r=b===e.target?2:1;var w=b.__captureEventListeners.get(e.type);if(w)for(var k,S=c(w);!(k=S()).done;){var E=k.value;if(h(E[0],E[1],w),a)return f()}if(n)return f()}var P=e.bubbles?t:[this];s=null;for(var T,M=c(P);!(T=M()).done;){var _=T.value;o||s&&_!==s.__host||g(P.slice(0,P.indexOf(_)+1)),u=_,r=_===e.target?2:3;var A=_.__eventListeners.get(e.type);if(A)for(var D,x=c(A);!(D=x()).done;){var C=D.value;if(h(C[0],C[1],A),a)return f()}if(n)return f()}return f()}}])}(),G=H,V={__proto__:null,enumerable:!0};Object.freeze(V);var K=(N=function(){return h(function e(t,i={}){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 i||!i)throw new Error('The "options" argument must be an object');var n=i.bubbles,a=i.cancelable,r=i.composed;B(this,A,!!a,"f"),B(this,D,!!n,"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,i){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(K.prototype,{initEvent:V,stopImmediatePropagation:V,preventDefault:V,target:V,currentTarget:V,srcElement:V,type:V,cancelable:V,defaultPrevented:V,timeStamp:V,composedPath:V,returnValue:V,bubbles:V,composed:V,eventPhase:V,cancelBubble:V,stopPropagation:V,isTrusted:V});var X=(W=function(e){function t(e,i={}){var n,a;return o(this,t),a=r(this,t,[e,i]),$.set(a,void 0),B(a,$,null!==(n=null==i?void 0:i.detail)&&void 0!==n?n:null,"f"),a}return p(t,e),h(t,[{key:"initCustomEvent",value:function(e,t,i,n){throw new Error("Method not implemented.")}},{key:"detail",get:function(){return z(this,$,"f")}}])}(K),$=new WeakMap,W);Object.defineProperties(X.prototype,{detail:V});var Y,q,J,Q,Z=K,ee=X;(Y=function(){return h(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.__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,Y.CHARSET_RULE=2,Y.IMPORT_RULE=3,Y.MEDIA_RULE=4,Y.FONT_FACE_RULE=5,Y.PAGE_RULE=6,Y.NAMESPACE_RULE=10,Y.KEYFRAMES_RULE=7,Y.KEYFRAME_RULE=8,Y.SUPPORTS_RULE=12,Y.COUNTER_STYLE_RULE=11,Y.FONT_FEATURE_VALUES_RULE=14,null!==(q=globalThis.Event)&&void 0!==q||(globalThis.Event=Z),null!==(J=globalThis.CustomEvent)&&void 0!==J||(globalThis.CustomEvent=ee);var te=new WeakMap,ie=e=>{var t=te.get(e);return void 0===t&&te.set(e,t=new Map),t},ne=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),h(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){var t={host:this};return this.__shadowRootMode=e.mode,e&&"open"===e.mode&&(this.__shadowRoot=t),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}}])}(G),ae=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),h(t)}(ne),re=ae;function oe(){var e,t;return{promise:new Promise((i,n)=>{e=i,t=n}),resolve:e,reject:t}}null!==(Q=globalThis.litServerRoot)&&void 0!==Q||(globalThis.litServerRoot=Object.defineProperty(new re,"localName",{get:()=>"lit-server-root"})),new(function(){return h(function e(){o(this,e),this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map},[{key:"define",value:function(e,t){var i,n;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!==(i=t.observedAttributes)&&void 0!==i?i:[]}),this.__reverseDefinitions.set(t,e),null===(n=this.__pendingWhenDefineds.get(e))||void 0===n||n.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:"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,i;return k(function(n){for(;;)switch(n.n){case 0:if(!(t=this.__definitions.get(e))){n.n=1;break}return n.a(2,t.ctor);case 1:return(i=this.__pendingWhenDefineds.get(e))||(i=oe(),this.__pendingWhenDefineds.set(e,i)),n.a(2,i.promise)}},null,this,null,Promise)}}])}()),"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=re);var se=["action"],ue=null;var le={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 de(){return null!=ue?ue:le}function he(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o}function ce(e,t,i,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function me(e,t,i,n,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,i),i}"function"==typeof SuppressedError&&SuppressedError;var fe;!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"}(fe||(fe={}));var ve,pe={},ge=pe.NAMI_SDK_VERSION,ye=void 0===ge?"3.4.0":ge,be=pe.NAMI_SDK_PACKAGE_VERSION,we=void 0===be?"3.4.0-dev.202604170506":be,ke=pe.PLATFORM_ID_REQUIRED,Se=void 0===ke?"Platform ID is required":ke,Ee=pe.DEVICE_ID_REQUIRED,Pe=void 0===Ee?"Device ID is required":Ee,Te=pe.EXTERNAL_ID_REQUIRED,Me=void 0===Te?"External ID is required":Te,_e=pe.SDK_NOT_INITIALIZED,Ae=void 0===_e?"SDK has not been initialized. Make sure to call Nami.configure() first!":_e,De=pe.CAMPAIGN_NOT_AVAILABLE,xe=void 0===De?"Campaign is not available":De,Ce=pe.FLOW_SCREENS_NOT_AVAILABLE,Ie=void 0===Ce?"Flow screens not available":Ce,Le=pe.UNABLE_TO_UPDATE_CDP_ID,Re=void 0===Le?"Unable to update CDP id in anonymous mode":Le,Fe=pe.ANONYMOUS_MODE_ALREADY_ON,Oe=void 0===Fe?"Anonymous mode is already turned on.":Fe,Ne=pe.ANONYMOUS_MODE_ALREADY_OFF,$e=void 0===Ne?"Anonymous mode is already turned off.":Ne,We=pe.DEVICE_ID_NOT_SET,je=void 0===We?"Nami Device ID is not set":We,Be=pe.AUTH_DEVICE,ze=void 0===Be?"nami_auth_device":Be,Ue=pe.NAMI_CONFIGURATION,He=void 0===Ue?"nami_configuration":Ue,Ge=pe.NAMI_PROFILE,Ve=void 0===Ge?"nami_profile":Ge,Ke=pe.API_CONFIG,Xe=void 0===Ke?"api_config":Ke,Ye=pe.API_CAMPAIGN_RULES,qe=void 0===Ye?"api_campaign_rules":Ye,Je=pe.API_PAYWALLS,Qe=void 0===Je?"api_paywalls":Je,Ze=pe.API_CAMPAIGN_SESSION_TIMESTAMP,et=void 0===Ze?"api_campaign_session_timestamp":Ze,tt=pe.API_PRODUCTS,it=void 0===tt?"api_products":tt,nt=pe.API_ACTIVE_ENTITLEMENTS,at=void 0===nt?"api_active_entitlements":nt,rt=pe.SERVER_NAMI_ENTITLEMENTS,ot=void 0===rt?"server_active_entitlements":rt,st=pe.INITIAL_APP_CONFIG,ut=void 0===st?"initial_app_config":st,lt=pe.INITIAL_CAMPAIGN_RULES,dt=void 0===lt?"initial_campaign_rules":lt,ht=pe.INITIAL_PAYWALLS,ct=void 0===ht?"initial_paywalls":ht,mt=pe.INITIAL_PRODUCTS,ft=void 0===mt?"initial_products":mt,vt=pe.LOCAL_NAMI_ENTITLEMENTS,pt=void 0===vt?"local_active_entitlements":vt,gt=pe.CUSTOMER_ATTRIBUTES_KEY_PREFIX,yt=void 0===gt?"nami_cmr_attributes_":gt,bt=pe.NAMI_CUSTOMER_JOURNEY_STATE,wt=void 0===bt?"nami_customer_journey_state":bt,kt=pe.ANONYMOUS_MODE,St=void 0===kt?"nami_anonymous_mode_v2":kt,Et=pe.ANONYMOUS_UUID,Pt=void 0===Et?"nami_anonymous_uuid":Et,Tt=pe.KEY_SESSION_COUNTER,Mt=void 0===Tt?"nami_session_counter":Tt,_t=pe.INITIAL_SESSION_COUNTER_VALUE,At=void 0===_t?1:_t,Dt=pe.NAMI_LAST_IMPRESSION_ID,xt=void 0===Dt?"nami_last_impression_id":Dt,Ct=pe.NAMI_PURCHASE_IMPRESSION_ID,It=void 0===Ct?"nami_purchase_impression_id":Ct,Lt=pe.NAMI_LAUNCH_ID,Rt=void 0===Lt?"nami_launch_id":Lt,Ft=pe.NAMI_SESSION_ID,Ot=void 0===Ft?"nami_session_id":Ft,Nt=pe.NAMI_LANGUAGE_CODE,$t=void 0===Nt?"nami_language_code":Nt,Wt=pe.NAMI_PURCHASE_CHANNEL,jt=void 0===Wt?"nami_purchase_channel":Wt,Bt=pe.API_VERSION,zt=pe.BASE_URL_PATH,Ut=void 0===zt?`sdk/${void 0===Bt?"v3":Bt}/platform`:zt,Ht=pe.BASE_URL,Gt=void 0===Ht?"https://app.namiml.com":Ht,Vt=pe.BASE_STAGING_URL,Kt=void 0===Vt?"https://app-staging.namiml.com":Vt,Xt=pe.CUSTOM_HOST_PREFIX,Yt=void 0===Xt?"namiAPIHost=":Xt,qt=pe.USE_STAGING_API,Jt=void 0===qt?"useStagingAPI":qt,Qt=pe.EXTENDED_CLIENT_INFO_PREFIX,Zt=void 0===Qt?"extendedClientInfo":Qt,ei=pe.EXTENDED_CLIENT_INFO_DELIMITER,ti=void 0===ei?":":ei,ii=pe.VALIDATE_PRODUCT_GROUPS,ni=void 0===ii?"validateProductGroups":ii,ai=pe.LOG_HTTP_REQUESTS,ri=void 0===ai?"logHTTPRequests":ai,oi=pe.LOG_HTTP_TRAFFIC,si=void 0===oi?"logHTTPTraffic":oi,ui=pe.API_MAX_CALLS_LIMIT,li=void 0===ui?2:ui,di=pe.API_RETRY_DELAY_SEC,hi=void 0===di?2:di,ci=pe.API_TIMEOUT_LIMIT,mi=void 0===ci?2e4:ci,fi=pe.DEVICE_API_TIMEOUT_LIMIT,vi=void 0===fi?2e3:fi,pi=pe.STATUS_BAD_REQUEST,gi=void 0===pi?400:pi,yi=pe.STATUS_NOT_FOUND,bi=void 0===yi?404:yi,wi=pe.STATUS_CONFLICT,ki=void 0===wi?409:wi,Si=pe.STATUS_INTERNAL_SERVER_ERROR,Ei=void 0===Si?500:Si,Pi=pe.INITIAL_SUCCESS,Ti=void 0===Pi?"Initial success":Pi,Mi=pe.RECONFIG_SUCCESS,_i=void 0===Mi?"Reconfig success":Mi,Ai=pe.ALREADY_CONFIGURED,Di=void 0===Ai?"Already configured":Ai,xi=pe.AVAILABLE_CAMPAIGNS_CHANGED,Ci=void 0===xi?"AvailableCampaignsChanged":xi,Ii=pe.PAYWALL_ACTION_EVENT,Li=void 0===Ii?"PaywallActionEvent":Ii,Ri=pe.AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED,Fi=void 0===Ri?"AvailableActiveEntitlementsChanged":Ri,Oi=pe.CUSTOMER_JOURNEY_STATE_CHANGED,Ni=void 0===Oi?"CustomerJourneyStateChanged":Oi,$i=pe.SKU_TEXT_REGEX,Wi=void 0===$i?/\$\{sku\.(\w+)(:\d+)?\}/g:$i,ji=pe.VAR_REGEX,Bi=void 0===ji?/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g:ji,zi=pe.SMART_TEXT_PATTERN,Ui=void 0===zi?"${":zi,Hi=pe.LIQUID_VARIABLE_REGEX,Gi=void 0===Hi?/\${[A-Za-z0-9.]+}/g:Hi,Vi=[ze,He,Ve,Xe,qe,Qe,et,it,at,ot,ut,dt,ct,ft,pt,wt,St,Pt,Mt,xt,It,Rt,Ot,$t,jt];e.LogLevel=void 0,(ve=e.LogLevel||(e.LogLevel={}))[ve.DEBUG=1]="DEBUG",ve[ve.INFO=2]="INFO",ve[ve.WARN=3]="WARN",ve[ve.ERROR=4]="ERROR";var Ki={debug:e.LogLevel.DEBUG,info:e.LogLevel.INFO,warn:e.LogLevel.WARN,error:e.LogLevel.ERROR},Xi=function(){return h(function t(){o(this,t),this.currentLogLevel=e.LogLevel.DEBUG,this.setLogger=t=>{this.currentLogLevel=t?Ki[t]:e.LogLevel.WARN}},[{key:"debug",value:function(t,...i){this.shouldLog(e.LogLevel.DEBUG)&&console.debug(this.formatMessage(e.LogLevel.DEBUG,t,...i))}},{key:"info",value:function(t,...i){this.shouldLog(e.LogLevel.INFO)&&console.info(this.formatMessage(e.LogLevel.INFO,t,...i))}},{key:"warn",value:function(t,...i){this.shouldLog(e.LogLevel.WARN)&&console.warn(this.formatMessage(e.LogLevel.WARN,t,...i))}},{key:"error",value:function(t,...i){this.shouldLog(e.LogLevel.ERROR)&&console.error(this.formatMessage(e.LogLevel.ERROR,t,...i))}},{key:"shouldLog",value:function(e){return e>=this.currentLogLevel}},{key:"formatMessage",value:function(t,i,...n){var a=e.LogLevel[t];return`[${(new Date).toISOString()}] [${a}] ${i} ${n=n.map(e=>"object"==typeof e?JSON.stringify(e):e)}`}}])}(),Yi=new Xi;function qi(e){for(var t=-1,i=null==e?0:e.length,n=0,a=[];++t<i;){var r=e[t];r&&(a[n++]=r)}return a}function Ji(e,t){return e===t||e!=e&&t!=t}function Qi(e,t){for(var i=e.length;i--;)if(Ji(e[i][0],t))return i;return-1}var Zi=Array.prototype.splice;function en(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}en.prototype.clear=function(){this.__data__=[],this.size=0},en.prototype.delete=function(e){var t=this.__data__,i=Qi(t,e);return!(i<0)&&(i==t.length-1?t.pop():Zi.call(t,i,1),--this.size,!0)},en.prototype.get=function(e){var t=this.__data__,i=Qi(t,e);return i<0?void 0:t[i][1]},en.prototype.has=function(e){return Qi(this.__data__,e)>-1},en.prototype.set=function(e,t){var i=this.__data__,n=Qi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};var tn="object"==typeof global&&global&&global.Object===Object&&global,nn="object"==typeof self&&self&&self.Object===Object&&self,an=tn||nn||Function("return this")(),rn=an.Symbol,on=Object.prototype,sn=on.hasOwnProperty,un=on.toString,ln=rn?rn.toStringTag:void 0;var dn=Object.prototype.toString;var hn=rn?rn.toStringTag:void 0;function cn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":hn&&hn in Object(e)?function(e){var t=sn.call(e,ln),i=e[ln];try{e[ln]=void 0;var n=!0}catch(e){}var a=un.call(e);return n&&(t?e[ln]=i:delete e[ln]),a}(e):function(e){return dn.call(e)}(e)}function mn(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function fn(e){if(!mn(e))return!1;var t=cn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var vn,pn=an["__core-js_shared__"],gn=(vn=/[^.]+$/.exec(pn&&pn.keys&&pn.keys.IE_PROTO||""))?"Symbol(src)_1."+vn:"";var yn=Function.prototype.toString;function bn(e){if(null!=e){try{return yn.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var wn=/^\[object .+?Constructor\]$/,kn=Function.prototype,Sn=Object.prototype,En=kn.toString,Pn=Sn.hasOwnProperty,Tn=RegExp("^"+En.call(Pn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mn(e){return!(!mn(e)||(t=e,gn&&gn in t))&&(fn(e)?Tn:wn).test(bn(e));var t}function _n(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return Mn(i)?i:void 0}var An=_n(an,"Map"),Dn=_n(Object,"create");var xn=Object.prototype.hasOwnProperty;var Cn=Object.prototype.hasOwnProperty;function In(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Ln(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function Rn(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}In.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},In.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},In.prototype.get=function(e){var t=this.__data__;if(Dn){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return xn.call(t,e)?t[e]:void 0},In.prototype.has=function(e){var t=this.__data__;return Dn?void 0!==t[e]:Cn.call(t,e)},In.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Dn&&void 0===t?"__lodash_hash_undefined__":t,this},Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(An||en),string:new In}},Rn.prototype.delete=function(e){var t=Ln(this,e).delete(e);return this.size-=t?1:0,t},Rn.prototype.get=function(e){return Ln(this,e).get(e)},Rn.prototype.has=function(e){return Ln(this,e).has(e)},Rn.prototype.set=function(e,t){var i=Ln(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function Fn(e){var t=this.__data__=new en(e);this.size=t.size}Fn.prototype.clear=function(){this.__data__=new en,this.size=0},Fn.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Fn.prototype.get=function(e){return this.__data__.get(e)},Fn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.set=function(e,t){var i=this.__data__;if(i instanceof en){var n=i.__data__;if(!An||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Rn(n)}return i.set(e,t),this.size=i.size,this};function On(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Rn;++t<i;)this.add(e[t])}function Nn(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}function $n(e,t){return e.has(t)}On.prototype.add=On.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},On.prototype.has=function(e){return this.__data__.has(e)};function Wn(e,t,i,n,a,r){var o=1&i,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 h=-1,c=!0,m=2&i?new On:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!Nn(t,function(e,t){if(!$n(m,t)&&(f===e||a(f,e,i,n,r)))return m.push(t)})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var jn=an.Uint8Array;function Bn(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function zn(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var Un=rn?rn.prototype:void 0,Hn=Un?Un.valueOf:void 0;var Gn=Array.isArray;var Vn=Object.prototype.propertyIsEnumerable,Kn=Object.getOwnPropertySymbols,Xn=Kn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(Kn(e),function(t){return Vn.call(e,t)}))}:function(){return[]};function Yn(e){return null!=e&&"object"==typeof e}function qn(e){return Yn(e)&&"[object Arguments]"==cn(e)}var Jn=Object.prototype,Qn=Jn.hasOwnProperty,Zn=Jn.propertyIsEnumerable,ea=qn(function(){return arguments}())?qn:function(e){return Yn(e)&&Qn.call(e,"callee")&&!Zn.call(e,"callee")};var ta="object"==typeof e&&e&&!e.nodeType&&e,ia=ta&&"object"==typeof module&&module&&!module.nodeType&&module,na=ia&&ia.exports===ta?an.Buffer:void 0,aa=(na?na.isBuffer:void 0)||function(){return!1},ra=/^(?:0|[1-9]\d*)$/;function oa(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&ra.test(e))&&e>-1&&e%1==0&&e<t}function sa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ua={};function la(e){return function(t){return e(t)}}ua["[object Float32Array]"]=ua["[object Float64Array]"]=ua["[object Int8Array]"]=ua["[object Int16Array]"]=ua["[object Int32Array]"]=ua["[object Uint8Array]"]=ua["[object Uint8ClampedArray]"]=ua["[object Uint16Array]"]=ua["[object Uint32Array]"]=!0,ua["[object Arguments]"]=ua["[object Array]"]=ua["[object ArrayBuffer]"]=ua["[object Boolean]"]=ua["[object DataView]"]=ua["[object Date]"]=ua["[object Error]"]=ua["[object Function]"]=ua["[object Map]"]=ua["[object Number]"]=ua["[object Object]"]=ua["[object RegExp]"]=ua["[object Set]"]=ua["[object String]"]=ua["[object WeakMap]"]=!1;var da="object"==typeof e&&e&&!e.nodeType&&e,ha=da&&"object"==typeof module&&module&&!module.nodeType&&module,ca=ha&&ha.exports===da&&tn.process,ma=function(){try{var e=ha&&ha.require&&ha.require("util").types;return e||ca&&ca.binding&&ca.binding("util")}catch(e){}}(),fa=ma&&ma.isTypedArray,va=fa?la(fa):function(e){return Yn(e)&&sa(e.length)&&!!ua[cn(e)]},pa=Object.prototype.hasOwnProperty;function ga(e,t){var i=Gn(e),n=!i&&ea(e),a=!i&&!n&&aa(e),r=!i&&!n&&!a&&va(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!pa.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||oa(l,u))||s.push(l);return s}var ya=Object.prototype;function ba(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ya)}function wa(e,t){return function(i){return e(t(i))}}var ka=wa(Object.keys,Object),Sa=Object.prototype.hasOwnProperty;function Ea(e){return null!=(t=e)&&sa(t.length)&&!fn(t)?ga(e):function(e){if(!ba(e))return ka(e);var t=[];for(var i in Object(e))Sa.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e);var t}function Pa(e){return function(e,t,i){var n=t(e);return Gn(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,Ea,Xn)}var Ta=Object.prototype.hasOwnProperty;var Ma=_n(an,"DataView"),_a=_n(an,"Promise"),Aa=_n(an,"Set"),Da=_n(an,"WeakMap"),xa="[object Map]",Ca="[object Promise]",Ia="[object Set]",La="[object WeakMap]",Ra="[object DataView]",Fa=bn(Ma),Oa=bn(An),Na=bn(_a),$a=bn(Aa),Wa=bn(Da),ja=cn;(Ma&&ja(new Ma(new ArrayBuffer(1)))!=Ra||An&&ja(new An)!=xa||_a&&ja(_a.resolve())!=Ca||Aa&&ja(new Aa)!=Ia||Da&&ja(new Da)!=La)&&(ja=function(e){var t=cn(e),i="[object Object]"==t?e.constructor:void 0,n=i?bn(i):"";if(n)switch(n){case Fa:return Ra;case Oa:return xa;case Na:return Ca;case $a:return Ia;case Wa:return La}return t});var Ba="[object Arguments]",za="[object Array]",Ua="[object Object]",Ha=Object.prototype.hasOwnProperty;function Ga(e,t,i,n,a,r){var o=Gn(e),s=Gn(t),u=o?za:ja(e),l=s?za:ja(t),d=(u=u==Ba?Ua:u)==Ua,h=(l=l==Ba?Ua:l)==Ua,c=u==l;if(c&&aa(e)){if(!aa(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new Fn),o||va(e)?Wn(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){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 jn(e),new jn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ji(+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=Bn;case"[object Set]":var u=1&n;if(s||(s=zn),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=Wn(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(Hn)return Hn.call(e)==Hn.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&Ha.call(e,"__wrapped__"),f=h&&Ha.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new Fn),a(v,p,i,n,r)}}return!!c&&(r||(r=new Fn),function(e,t,i,n,a,r){var o=1&i,s=Pa(e),u=s.length;if(u!=Pa(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:Ta.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==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(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,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,i,n,a,r))}function Va(e,t,i,n,a){return e===t||(null==e||null==t||!Yn(e)&&!Yn(t)?e!=e&&t!=t:Ga(e,t,i,n,Va,a))}function Ka(e){return e==e&&!mn(e)}function Xa(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}}function Ya(e){var t=function(e){for(var t=Ea(e),i=t.length;i--;){var n=t[i],a=e[n];t[i]=[n,a,Ka(a)]}return t}(e);return 1==t.length&&t[0][2]?Xa(t[0][0],t[0][1]):function(i){return i===e||function(e,t,i,n){var a=i.length,r=a;if(null==e)return!r;for(e=Object(e);a--;){var o=i[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<r;){var s=(o=i[a])[0],u=e[s],l=o[1];if(o[2]){if(void 0===u&&!(s in e))return!1}else if(!Va(l,u,3,n,new Fn))return!1}return!0}(i,0,t)}}function qa(e){return"symbol"==typeof e||Yn(e)&&"[object Symbol]"==cn(e)}var Ja=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qa=/^\w*$/;function Za(e,t){if(Gn(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!qa(e))||(Qa.test(e)||!Ja.test(e)||null!=t&&e in Object(t))}function er(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,a=t?t.apply(this,n):n[0],r=i.cache;if(r.has(a))return r.get(a);var o=e.apply(this,n);return i.cache=r.set(a,o)||r,o};return i.cache=new(er.Cache||Rn),i}er.Cache=Rn;var tr,ir,nr,ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rr=/\\(\\)?/g,or=(tr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ar,function(e,i,n,a){t.push(n?a.replace(rr,"$1"):i||e)}),t},ir=er(tr,function(e){return 500===nr.size&&nr.clear(),e}),nr=ir.cache,ir);var sr=rn?rn.prototype:void 0,ur=sr?sr.toString:void 0;function lr(e){if("string"==typeof e)return e;if(Gn(e))return function(e,t){for(var i=-1,n=null==e?0:e.length,a=Array(n);++i<n;)a[i]=t(e[i],i,e);return a}(e,lr)+"";if(qa(e))return ur?ur.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function dr(e,t){return Gn(e)?e:Za(e,t)?[e]:or(function(e){return null==e?"":lr(e)}(e))}function hr(e){if("string"==typeof e||qa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function cr(e,t){for(var i=0,n=(t=dr(t,e)).length;null!=e&&i<n;)e=e[hr(t[i++])];return i&&i==n?e:void 0}function mr(e,t){return null!=e&&t in Object(e)}function fr(e,t){return null!=e&&function(e,t,i){for(var n=-1,a=(t=dr(t,e)).length,r=!1;++n<a;){var o=hr(t[n]);if(!(r=null!=e&&i(e,o)))break;e=e[o]}return r||++n!=a?r:!!(a=null==e?0:e.length)&&sa(a)&&oa(o,a)&&(Gn(e)||ea(e))}(e,t,mr)}function vr(e,t){return Za(e)&&Ka(t)?Xa(hr(e),t):function(i){var n=function(e,t,i){var n=null==e?void 0:cr(e,t);return void 0===n?i:n}(i,e);return void 0===n&&n===t?fr(i,e):Va(t,n,3)}}function pr(e){return e}function gr(e){return Za(e)?(t=hr(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return cr(t,e)}}(e);var t}function yr(e){return e!=e}function br(e,t){return!!(null==e?0:e.length)&&function(e,t,i){return t==t?function(e,t,i){for(var n=i-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}(e,t,i):function(e,t,i){for(var n=e.length,a=i+-1;++a<n;)if(t(e[a],a,e))return a;return-1}(e,yr,i)}(e,t,0)>-1}var wr=Aa&&1/zn(new Aa([,-0]))[1]==1/0?function(e){return new Aa(e)}:function(){};function kr(e,t){return e&&e.length?function(e,t,i){var n=-1,a=br,r=e.length,o=!0,s=[],u=s;if(r>=200){var l=t?null:wr(e);if(l)return zn(l);o=!1,a=$n,u=new On}else u=t?[]:s;e:for(;++n<r;){var d=e[n],h=t?t(d):d;if(d=0!==d?d:0,o&&h==h){for(var c=u.length;c--;)if(u[c]===h)continue e;t&&u.push(h),s.push(d)}else a(u,h,i)||(u!==s&&u.push(h),s.push(d))}return s}(e,"function"==typeof(i=t)?i:null==i?pr:"object"==typeof i?Gn(i)?vr(i[0],i[1]):Ya(i):gr(i)):[];var i}var Sr=function(){return h(function e(){o(this,e),this.memoryStore={}},[{key:"storage",get:function(){return de().storage}},{key:"setDevice",value:function(e){this.setItem(ze,e)}},{key:"getDevice",value:function(){return this.getItem(ze)}},{key:"resetDevice",value:function(){this.resetItem(ze)}},{key:"getAnonymousMode",value:function(){return this.getItem(St)||!1}},{key:"setAnonymousMode",value:function(e){this.setItem(St,e)}},{key:"clearAnonymousMode",value:function(){this.resetItem(St)}},{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($t,e||"en")}},{key:"getLanguageCode",value:function(){return this.getItem($t)||"en"}},{key:"setCampaignRules",value:function(e,t){e!==dt?e!==qe||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[qe]=JSON.stringify(t):this.memoryStore[dt]=JSON.stringify(t)}},{key:"getCampaignRules",value:function(e){if(e===dt)return this.memoryStore[dt]?JSON.parse(this.memoryStore[dt]):null;if(e===qe){var t=this.memoryStore[qe];if(null!=t)return JSON.parse(t);var i=this.getItem(qe);if(null===i)return null;if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return i}return this.isLegacyTimestampedCache(i)?i.data:i}return this.getItem(e)}},{key:"setPaywalls",value:function(e,t){e!==ct?e!==Qe||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[Qe]=JSON.stringify(t):this.memoryStore[ct]=JSON.stringify(t)}},{key:"getPaywalls",value:function(e){if(e===ct)return this.memoryStore[ct]?JSON.parse(this.memoryStore[ct]):null;if(e===Qe){var t=this.memoryStore[Qe];if(null!=t)return JSON.parse(t);var i=this.getItem(Qe);if(null===i)return null;if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return i}return this.isLegacyTimestampedCache(i)?i.data:i}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,i=null!==(e=this.getItem(it))&&void 0!==e?e:[];return kr(qi([...null!==(t=this.getItem(ft))&&void 0!==t?t:[],...i]),"sku_ref_id")}},{key:"setNamiConfig",value:function(e){this.setItem(He,e)}},{key:"getNamiConfig",value:function(){return this.getItem(He)}},{key:"setCustomerAttribute",value:function(e,t){this.setItem(yt+e,t)}},{key:"getCustomerAttribute",value:function(e){return this.getItem(yt+e)}},{key:"getAllCustomerAttributes",value:function(){return this.storage.getAllKeys().map(e=>[e,this.storage.getItem(e)]).filter(([e])=>e.includes(yt)).map(([e,t])=>e.replace(yt,"")+":"+t)}},{key:"getAllCustomerAttributesKeys",value:function(){return this.storage.getAllKeys().filter(e=>e.includes(yt)).map(e=>e.replace(yt,""))}},{key:"clearCustomerAttribute",value:function(e){var t=yt+e,i=this.getItem(t);return i&&this.resetItem(t),!!i}},{key:"clearAllCustomerAttributes",value:function(){this.storage.getAllKeys().filter(e=>e.includes(yt)).map(e=>this.resetItem(e))}},{key:"setNamiProfile",value:function(e){this.setItem(Ve,e)}},{key:"getNamiProfile",value:function(){return this.getItem(Ve)}},{key:"removeNamiProfile",value:function(){this.resetItem(Ve)}},{key:"setCustomerJourneyState",value:function(e){this.setItem(wt,e)}},{key:"getCustomerJourneyState",value:function(){return this.getItem(wt)}},{key:"setSessionCounter",value:function(){var e=this.getItem(Mt),t=e?parseInt(e):At||At;this.setItem(Mt,t+1)}},{key:"getSessionCounter",value:function(){var e=this.getItem(Mt);return e?parseInt(e):At}},{key:"setLastImpressionId",value:function(e){this.setItem(xt,e)}},{key:"getLastImpressionId",value:function(){var e;return null!==(e=this.getItem(xt))&&void 0!==e?e:""}},{key:"setPurchaseImpression",value:function(){var e,t=null!==(e=this.getLastImpressionId())&&void 0!==e?e:"";this.setItem(It,t)}},{key:"getPurchaseImpression",value:function(){var e;return null!==(e=this.getItem(It))&&void 0!==e?e:""}},{key:"setSessionId",value:function(e){e&&this.setItem(Ot,e)}},{key:"getSessionId",value:function(){var e;return null!==(e=this.getItem(Ot))&&void 0!==e?e:""}},{key:"clearSessionId",value:function(){this.resetItem(Ot)}},{key:"setLaunchId",value:function(e){e&&this.setItem(Rt,e)}},{key:"getLaunchId",value:function(){var e;return null!==(e=this.getItem(Rt))&&void 0!==e?e:""}},{key:"clearLaunchId",value:function(){this.resetItem(Rt)}},{key:"setPurchaseChannel",value:function(e){e&&this.setItem(jt,e)}},{key:"getPurchaseChannel",value:function(){return this.getItem(jt)}},{key:"getAnonymousUUID",value:function(){return this.getItem(Pt)}},{key:"setAnonymousUUID",value:function(e){this.setItem(Pt,e)}},{key:"clearAnonymousUUID",value:function(){this.resetItem(Pt)}},{key:"setApiCampaignSessionTimestamp",value:function(){this.setItem(et,Date.now())}},{key:"getApiCampaignSessionTimestamp",value:function(){return this.getItem(et)}},{key:"purgeApiCampaignCache",value:function(){this.resetItem(Qe),this.resetItem(qe),this.resetItem(et)}},{key:"getCampaignCacheTtl",value:function(){var e,t=this.getAppConfig(Xe)||this.getAppConfig(ut);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 i;try{i=JSON.stringify(t)}catch(t){return void Yi.error(`Serialization failed for ${e}`,t)}try{this.storage.setItem(e,i)}catch(t){Yi.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=i}}},{key:"getItem",value:function(e){try{var t=this.storage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){Yi.error("Error getting item from localStorage:",e,": ",t)}var i=this.memoryStore[e];return null!=i?JSON.parse(i):null}},{key:"resetItem",value:function(e){try{this.storage.removeItem(e)}catch(t){Yi.error("Error removing item from localStorage:",e,": ",t)}delete this.memoryStore[e]}},{key:"clearAll",value:function(){Vi.forEach(e=>this.resetItem(e)),this.clearAllCustomerAttributes(),this.memoryStore={}}},{key:"clear",value:function(){try{this.storage.clear()}catch(e){Yi.error("Error clearing localStorage:",e)}this.memoryStore={}}}])}(),Er=new Sr,Pr=function(e){function t(e,i){var n;return o(this,t),(n=r(this,t,[i])).statusCode=e,n.status=e,n.message=`RetryLimitExceededError: ${n.message}`,n}return p(t,e),h(t)}(_(Error)),Tr=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),h(t)}(_(Error)),Mr=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),h(t)}(Tr),_r=function(e){function t(){return o(this,t),r(this,t,[Ae])}return p(t,e),h(t)}(_(Error)),Ar=function(e){function t(){return o(this,t),r(this,t,[Se])}return p(t,e),h(t)}(_(Error)),Dr=function(e){function t(){return o(this,t),r(this,t,[Pe])}return p(t,e),h(t)}(_(Error)),xr=function(e){function t(){return o(this,t),r(this,t,[Me])}return p(t,e),h(t)}(_(Error)),Cr=function(e){function t(){return o(this,t),r(this,t,[xe])}return p(t,e),h(t)}(_(Error)),Ir=function(e){function t(){return o(this,t),r(this,t,[Ie])}return p(t,e),h(t)}(_(Error)),Lr=function(e){function t(){return o(this,t),r(this,t,[Oe])}return p(t,e),h(t)}(_(Error)),Rr=function(e){function t(){return o(this,t),r(this,t,[$e])}return p(t,e),h(t)}(_(Error)),Fr=function(e){function t(){return o(this,t),r(this,t,[$e])}return p(t,e),h(t)}(_(Error)),Or=function(e){function t(){return o(this,t),r(this,t,[Re])}return p(t,e),h(t)}(_(Error)),Nr=function(e){function t(e){var i;return o(this,t),(i=r(this,t,[e])).message=`BadRequestError: ${i.message}`,i}return p(t,e),h(t)}(Tr),$r=function(e){function t(e){var i;return o(this,t),(i=r(this,t,[e])).message=`NotFoundError: ${i.message}`,i}return p(t,e),h(t)}(Tr),Wr=function(e){function t(e,i){var n;return o(this,t),(n=r(this,t,[i])).statusCode=e,n.message=`ClientError: ${n.message}`,n}return p(t,e),h(t)}(Tr),jr=function(e){function t(e){var i;return o(this,t),(i=r(this,t,[e])).message=`ServerError: ${i.message}`,i}return p(t,e),h(t)}(Tr),Br=(e,t)=>{if(e==gi)throw new Nr(t);if(e==bi)throw new $r(t);if(e==ki)throw new Mr;if(e>gi&&e<Ei)throw new Wr(e,t);if(e>=Ei)throw new jr(t)};function zr(e){for(var t=e.length;--t>=0;)e[t]=0}zr(new Array(576)),zr(new Array(60)),zr(new Array(512)),zr(new Array(256)),zr(new Array(29)),zr(new Array(30));var Ur=(e,t,i,n)=>{for(var a=65535&e,r=e>>>16&65535,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{r=r+(a=a+t[n++]|0)|0}while(--o);a%=65521,r%=65521}return a|r<<16},Hr=new Uint32Array((()=>{for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})()),Gr=(e,t,i,n)=>{var a=Hr,r=n+i;e^=-1;for(var o=n;o<r;o++)e=e>>>8^a[255&(e^t[o])];return-1^e},Vr={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"},Kr=0,Xr=4,Yr=5,qr=6,Jr=0,Qr=1,Zr=2,eo=-2,to=-3,io=-4,no=-5,ao=8,ro=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),oo=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)ro(i,n)&&(e[n]=i[n])}}return e},so=e=>{for(var t=0,i=0,n=e.length;i<n;i++)t+=e[i].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},uo=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){uo=!1}for(var lo=new Uint8Array(256),ho=0;ho<256;ho++)lo[ho]=ho>=252?6:ho>=248?5:ho>=240?4:ho>=224?3:ho>=192?2:1;lo[254]=lo[254]=1;var co=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,i,n,a,r,o=e.length,s=0;for(a=0;a<o;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),r=0,a=0;r<s;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),i<128?t[r++]=i:i<2048?(t[r++]=192|i>>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t},mo=(e,t)=>{var i,n,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(n=0,i=0;i<a;){var o=e[i++];if(o<128)r[n++]=o;else{var s=lo[o];if(s>4)r[n++]=65533,i+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&i<a;)o=o<<6|63&e[i++],s--;s>1?r[n++]=65533:o<65536?r[n++]=o:(o-=65536,r[n++]=55296|o>>10&1023,r[n++]=56320|1023&o)}}}return((e,t)=>{if(t<65534&&e.subarray&&uo)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var i="",n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i})(r,n)},fo=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);for(var i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+lo[e[i]]>t?i:t};var vo=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},po=16209,go=function(e,t){var i,n,a,r,o,s,u,l,d,h,c,m,f,v,p,g,y,b,w,k,S,E,P,T,M=e.state;i=e.next_in,P=e.input,n=i+(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,h=M.window,c=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&&(c+=P[i++]<<m,m+=8,c+=P[i++]<<m,m+=8),y=f[c&p];t:for(;;){if(c>>>=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=po;break e}y=f[(65535&y)+(c&(1<<b)-1)];continue t}for(w=65535&y,(b&=15)&&(m<b&&(c+=P[i++]<<m,m+=8),w+=c&(1<<b)-1,c>>>=b,m-=b),m<15&&(c+=P[i++]<<m,m+=8,c+=P[i++]<<m,m+=8),y=v[c&g];;){if(c>>>=b=y>>>24,m-=b,16&(b=y>>>16&255)){if(k=65535&y,m<(b&=15)&&(c+=P[i++]<<m,(m+=8)<b&&(c+=P[i++]<<m,m+=8)),(k+=c&(1<<b)-1)>s){e.msg="invalid distance too far back",M.mode=po;break e}if(c>>>=b,m-=b,k>(b=a-r)){if((b=k-b)>l&&M.sane){e.msg="invalid distance too far back",M.mode=po;break e}if(S=0,E=h,0===d){if(S+=u-b,b<w){w-=b;do{T[a++]=h[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++]=h[S++]}while(--b);if(S=0,d<w){w-=b=d;do{T[a++]=h[S++]}while(--b);S=a-k,E=T}}}else if(S+=d-b,b<w){w-=b;do{T[a++]=h[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=po;break e}y=v[(65535&y)+(c&(1<<b)-1)]}}break}}while(i<n&&a<o);i-=w=m>>3,c&=(1<<(m-=w<<3))-1,e.next_in=i,e.next_out=a,e.avail_in=i<n?n-i+5:5-(i-n),e.avail_out=a<o?o-a+257:257-(a-o),M.hold=c,M.bits=m},yo=15,bo=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]),wo=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]),ko=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]),So=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]),Eo=(e,t,i,n,a,r,o,s)=>{var u,l,d,h,c,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<=yo;y++)D[y]=0;for(b=0;b<n;b++)D[t[i+b]]++;for(S=g,k=yo;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<=yo;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<yo;y++)x[y+1]=x[y]+D[y];for(b=0;b<n;b++)0!==t[i+b]&&(o[x[t[i+b]]++]=b);if(0===e?(A=C=o,m=20):1===e?(A=bo,C=wo,m=257):(A=ko,C=So,m=0),_=0,b=0,y=w,c=r,E=S,P=0,d=-1,h=(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[c+(_>>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[i+o[b]]}if(y>S&&(_&h)!==d){for(0===P&&(P=S),c+=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=_&h]=S<<24|E<<16|c-r}}return 0!==_&&(a[c+_]=y-P<<24|64<<16),s.bits=S,0},Po=Xr,To=Yr,Mo=qr,_o=Jr,Ao=Qr,Do=Zr,xo=eo,Co=to,Io=io,Lo=no,Ro=ao,Fo=16180,Oo=16190,No=16191,$o=16192,Wo=16194,jo=16199,Bo=16200,zo=16206,Uo=16209,Ho=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Go(){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 Vo,Ko,Xo=e=>{if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<Fo||t.mode>16211?1:0},Yo=e=>{if(Xo(e))return xo;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=Fo,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,_o},qo=e=>{if(Xo(e))return xo;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Yo(e)},Jo=(e,t)=>{var i;if(Xo(e))return xo;var n=e.state;return t<0?(i=0,t=-t):(i=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?xo:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,qo(e))},Qo=(e,t)=>{if(!e)return xo;var i=new Go;e.state=i,i.strm=e,i.window=null,i.mode=Fo;var n=Jo(e,t);return n!==_o&&(e.state=null),n},Zo=!0,es=e=>{if(Zo){Vo=new Int32Array(512),Ko=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(Eo(1,e.lens,0,288,Vo,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Eo(2,e.lens,0,32,Ko,0,e.work,{bits:5}),Zo=!1}e.lencode=Vo,e.lenbits=9,e.distcode=Ko,e.distbits=5},ts=(e,t,i,n)=>{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)),n>=r.wsize?(r.window.set(t.subarray(i-r.wsize,i),0),r.wnext=0,r.whave=r.wsize):((a=r.wsize-r.wnext)>n&&(a=n),r.window.set(t.subarray(i-n,i-n+a),r.wnext),(n-=a)?(r.window.set(t.subarray(i-n,i),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0},is=(e,t)=>{var i,n,a,r,o,s,u,l,d,h,c,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(Xo(e)||!e.output||!e.input&&0!==e.avail_in)return xo;(i=e.state).mode===No&&(i.mode=$o),o=e.next_out,a=e.output,u=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,h=s,c=u,E=_o;e:for(;;)switch(i.mode){case Fo:if(0===i.wrap){i.mode=$o;break}for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(2&i.wrap&&35615===l){0===i.wbits&&(i.wbits=15),i.check=0,_[0]=255&l,_[1]=l>>>8&255,i.check=Gr(i.check,_,2,0),l=0,d=0,i.mode=16181;break}if(i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=Uo;break}if((15&l)!==Ro){e.msg="unknown compression method",i.mode=Uo;break}if(d-=4,S=8+(15&(l>>>=4)),0===i.wbits&&(i.wbits=S),S>15||S>i.wbits){e.msg="invalid window size",i.mode=Uo;break}i.dmax=1<<i.wbits,i.flags=0,e.adler=i.check=1,i.mode=512&l?16189:No,l=0,d=0;break;case 16181:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(i.flags=l,(255&i.flags)!==Ro){e.msg="unknown compression method",i.mode=Uo;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=Uo;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&4&i.wrap&&(_[0]=255&l,_[1]=l>>>8&255,i.check=Gr(i.check,_,2,0)),l=0,d=0,i.mode=16182;case 16182:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.head&&(i.head.time=l),512&i.flags&&4&i.wrap&&(_[0]=255&l,_[1]=l>>>8&255,_[2]=l>>>16&255,_[3]=l>>>24&255,i.check=Gr(i.check,_,4,0)),l=0,d=0,i.mode=16183;case 16183:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&4&i.wrap&&(_[0]=255&l,_[1]=l>>>8&255,i.check=Gr(i.check,_,2,0)),l=0,d=0,i.mode=16184;case 16184:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&4&i.wrap&&(_[0]=255&l,_[1]=l>>>8&255,i.check=Gr(i.check,_,2,0)),l=0,d=0}else i.head&&(i.head.extra=null);i.mode=16185;case 16185:if(1024&i.flags&&((m=i.length)>s&&(m=s),m&&(i.head&&(S=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(n.subarray(r,r+m),S)),512&i.flags&&4&i.wrap&&(i.check=Gr(i.check,n,m,r)),s-=m,r+=m,i.length-=m),i.length))break e;i.length=0,i.mode=16186;case 16186:if(2048&i.flags){if(0===s)break e;m=0;do{S=n[r+m++],i.head&&S&&i.length<65536&&(i.head.name+=String.fromCharCode(S))}while(S&&m<s);if(512&i.flags&&4&i.wrap&&(i.check=Gr(i.check,n,m,r)),s-=m,r+=m,S)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=16187;case 16187:if(4096&i.flags){if(0===s)break e;m=0;do{S=n[r+m++],i.head&&S&&i.length<65536&&(i.head.comment+=String.fromCharCode(S))}while(S&&m<s);if(512&i.flags&&4&i.wrap&&(i.check=Gr(i.check,n,m,r)),s-=m,r+=m,S)break e}else i.head&&(i.head.comment=null);i.mode=16188;case 16188:if(512&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(4&i.wrap&&l!==(65535&i.check)){e.msg="header crc mismatch",i.mode=Uo;break}l=0,d=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=No;break;case 16189:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}e.adler=i.check=Ho(l),l=0,d=0,i.mode=Oo;case Oo:if(0===i.havedict)return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,Do;e.adler=i.check=1,i.mode=No;case No:if(t===To||t===Mo)break e;case $o:if(i.last){l>>>=7&d,d-=7&d,i.mode=zo;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}switch(i.last=1&l,d-=1,3&(l>>>=1)){case 0:i.mode=16193;break;case 1:if(es(i),i.mode=jo,t===Mo){l>>>=2,d-=2;break e}break;case 2:i.mode=16196;break;case 3:e.msg="invalid block type",i.mode=Uo}l>>>=2,d-=2;break;case 16193:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",i.mode=Uo;break}if(i.length=65535&l,l=0,d=0,i.mode=Wo,t===Mo)break e;case Wo:i.mode=16195;case 16195:if(m=i.length){if(m>s&&(m=s),m>u&&(m=u),0===m)break e;a.set(n.subarray(r,r+m),o),s-=m,r+=m,u-=m,o+=m,i.length-=m;break}i.mode=No;break;case 16196:for(;d<14;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(i.nlen=257+(31&l),l>>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Uo;break}i.have=0,i.mode=16197;case 16197:for(;i.have<i.ncode;){for(;d<3;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.lens[A[i.have++]]=7&l,l>>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,P={bits:i.lenbits},E=Eo(0,i.lens,0,19,i.lencode,0,i.work,P),i.lenbits=P.bits,E){e.msg="invalid code lengths set",i.mode=Uo;break}i.have=0,i.mode=16198;case 16198:for(;i.have<i.nlen+i.ndist;){for(;g=(M=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(y<16)l>>>=p,d-=p,i.lens[i.have++]=y;else{if(16===y){for(T=p+2;d<T;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(l>>>=p,d-=p,0===i.have){e.msg="invalid bit length repeat",i.mode=Uo;break}S=i.lens[i.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+=n[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+=n[r++]<<d,d+=8}d-=p,S=0,m=11+(127&(l>>>=p)),l>>>=7,d-=7}if(i.have+m>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Uo;break}for(;m--;)i.lens[i.have++]=S}}if(i.mode===Uo)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Uo;break}if(i.lenbits=9,P={bits:i.lenbits},E=Eo(1,i.lens,0,i.nlen,i.lencode,0,i.work,P),i.lenbits=P.bits,E){e.msg="invalid literal/lengths set",i.mode=Uo;break}if(i.distbits=6,i.distcode=i.distdyn,P={bits:i.distbits},E=Eo(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,P),i.distbits=P.bits,E){e.msg="invalid distances set",i.mode=Uo;break}if(i.mode=jo,t===Mo)break e;case jo:i.mode=Bo;case Bo:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,go(e,c),o=e.next_out,a=e.output,u=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,i.mode===No&&(i.back=-1);break}for(i.back=0;g=(M=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(g&&!(240&g)){for(b=p,w=g,k=y;g=(M=i.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+=n[r++]<<d,d+=8}l>>>=b,d-=b,i.back+=b}if(l>>>=p,d-=p,i.back+=p,i.length=y,0===g){i.mode=16205;break}if(32&g){i.back=-1,i.mode=No;break}if(64&g){e.msg="invalid literal/length code",i.mode=Uo;break}i.extra=15&g,i.mode=16201;case 16201:if(i.extra){for(T=i.extra;d<T;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=16202;case 16202:for(;g=(M=i.distcode[l&(1<<i.distbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(!(240&g)){for(b=p,w=g,k=y;g=(M=i.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+=n[r++]<<d,d+=8}l>>>=b,d-=b,i.back+=b}if(l>>>=p,d-=p,i.back+=p,64&g){e.msg="invalid distance code",i.mode=Uo;break}i.offset=y,i.extra=15&g,i.mode=16203;case 16203:if(i.extra){for(T=i.extra;d<T;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Uo;break}i.mode=16204;case 16204:if(0===u)break e;if(m=c-u,i.offset>m){if((m=i.offset-m)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Uo;break}m>i.wnext?(m-=i.wnext,f=i.wsize-m):f=i.wnext-m,m>i.length&&(m=i.length),v=i.window}else v=a,f=o-i.offset,m=i.length;m>u&&(m=u),u-=m,i.length-=m;do{a[o++]=v[f++]}while(--m);0===i.length&&(i.mode=Bo);break;case 16205:if(0===u)break e;a[o++]=i.length,u--,i.mode=Bo;break;case zo:if(i.wrap){for(;d<32;){if(0===s)break e;s--,l|=n[r++]<<d,d+=8}if(c-=u,e.total_out+=c,i.total+=c,4&i.wrap&&c&&(e.adler=i.check=i.flags?Gr(i.check,a,c,o-c):Ur(i.check,a,c,o-c)),c=u,4&i.wrap&&(i.flags?l:Ho(l))!==i.check){e.msg="incorrect data check",i.mode=Uo;break}l=0,d=0}i.mode=16207;case 16207:if(i.wrap&&i.flags){for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(4&i.wrap&&l!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=Uo;break}l=0,d=0}i.mode=16208;case 16208:E=Ao;break e;case Uo:E=Co;break e;case 16210:return Io;default:return xo}return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,(i.wsize||c!==e.avail_out&&i.mode<Uo&&(i.mode<zo||t!==Po))&&ts(e,e.output,e.next_out,c-e.avail_out),h-=e.avail_in,c-=e.avail_out,e.total_in+=h,e.total_out+=c,i.total+=c,4&i.wrap&&c&&(e.adler=i.check=i.flags?Gr(i.check,a,c,e.next_out-c):Ur(i.check,a,c,e.next_out-c)),e.data_type=i.bits+(i.last?64:0)+(i.mode===No?128:0)+(i.mode===jo||i.mode===Wo?256:0),(0===h&&0===c||t===Po)&&E===_o&&(E=Lo),E},ns={inflateReset:qo,inflateReset2:Jo,inflateResetKeep:Yo,inflateInit:e=>Qo(e,15),inflateInit2:Qo,inflate:is,inflateEnd:e=>{if(Xo(e))return xo;var t=e.state;return t.window&&(t.window=null),e.state=null,_o},inflateGetHeader:(e,t)=>{if(Xo(e))return xo;var i=e.state;return 2&i.wrap?(i.head=t,t.done=!1,_o):xo},inflateSetDictionary:(e,t)=>{var i,n=t.length;return Xo(e)||0!==(i=e.state).wrap&&i.mode!==Oo?xo:i.mode===Oo&&Ur(1,t,n,0)!==i.check?Co:ts(e,t,n,n)?(i.mode=16210,Io):(i.havedict=1,_o)},inflateInfo:"pako inflate (from Nodeca project)"};var as=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},rs=Object.prototype.toString,os=Kr,ss=Xr,us=Jr,ls=Qr,ds=Zr,hs=eo,cs=to,ms=io;function fs(e){this.options=oo({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 vo,this.strm.avail_out=0;var i=ns.inflateInit2(this.strm,t.windowBits);if(i!==us)throw new Error(Vr[i]);if(this.header=new as,ns.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=co(t.dictionary):"[object ArrayBuffer]"===rs.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=ns.inflateSetDictionary(this.strm,t.dictionary))!==us))throw new Error(Vr[i])}fs.prototype.push=function(e,t){var i,n,a,r=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(n=t===~~t?t:!0===t?ss:os,"[object ArrayBuffer]"===rs.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),(i=ns.inflate(r,n))===ds&&s&&((i=ns.inflateSetDictionary(r,s))===us?i=ns.inflate(r,n):i===cs&&(i=ds));r.avail_in>0&&i===ls&&r.state.wrap>0&&0!==e[r.next_in];)ns.inflateReset(r),i=ns.inflate(r,n);switch(i){case hs:case cs:case ds:case ms:return this.onEnd(i),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||i===ls))if("string"===this.options.to){var u=fo(r.output,r.next_out),l=r.next_out-u,d=mo(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(i!==us||0!==a){if(i===ls)return i=ns.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},fs.prototype.onData=function(e){this.chunks.push(e)},fs.prototype.onEnd=function(e){e===us&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=so(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var vs={ungzip:function(e,t){var i=new fs(t);if(i.push(e),i.err)throw i.msg||Vr[i.err];return i.result}}.ungzip,ps=e=>{var t;if(null!=e&&e.includes(Jt))t=Kt;else{var i=null==e?void 0:e.find(e=>e.includes(Yt));t=i?i.split("=")[1]:Gt}return(t=t.replace(/\/$/,""))+"/"+Ut},gs=e=>{var t,i,n=Er.getAppConfig(Xe)||Er.getAppConfig(ut);return null!==(t=null==n||null===(i=n.capabilities)||void 0===i?void 0:i.includes(e))&&void 0!==t&&t},ys=()=>{var e,t,i=(t=Er.getAppConfig(Xe)||Er.getAppConfig(ut),null!==(e=null==t?void 0:t.campaign_cache_ttl)&&void 0!==e?e:null);if(null!==i)if(0!==i){var n=Er.getApiCampaignSessionTimestamp();if(null!==n)(Date.now()-n)/1e3>=i&&Er.purgeApiCampaignCache()}else Er.purgeApiCampaignCache()},bs=e=>{var t=!gs(fe.THIRD_PARTY_TRANSACTIONS);return e&&!t&&Yi.info(`[${e}] Your plan does not have purchase management features.`),t},ws=()=>{var e,t,i=null===(e=Er.getNamiConfig())||void 0===e?void 0:e.namiCommands;return null!==(t=null==i?void 0:i.includes(ri))&&void 0!==t&&t},ks=()=>{var e,t,i=null===(e=Er.getNamiConfig())||void 0===e?void 0:e.namiCommands;return null!==(t=null==i?void 0:i.includes(si))&&void 0!==t&&t};function Ss(e){try{var t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));for(var t=atob(e),i=t.length,n=new Uint8Array(i),a=0;a<i;a++)n[a]=t.charCodeAt(a);return n}(e.trim()),i=vs(t),n=(new TextDecoder).decode(i);return JSON.parse(n)}catch(e){return}}function Es(e,t,i=mi,n=li){var r,o,s,u,l,d,h;return k(function(c){for(;;)switch(c.n){case 0:return o=0,s=ws(),u=ks(),l=null!==(r=null==t?void 0:t.method)&&void 0!==r?r:"GET",d=()=>{var r,h,c,m;return k(function(f){for(;;)switch(f.n){case 0:return(s||u)&&Yi.debug(`[HTTP] ${l} ${e}`),u&&null!=t&&t.body&&Yi.debug(`[HTTP] Request body: ${t.body}`),f.n=1,a(Ps(e,t,i));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:h=f.v,Yi.debug(`[HTTP] Response ${r.status}: ${h}`);case 3:if(r.status!=ki){f.n=4;break}throw new Mr;case 4:if(!(++o<=n)){f.n=6;break}return c=1e3*(o+hi),f.n=5,a(new Promise(e=>setTimeout(e,c)));case 5:return f.a(2,d());case 6:throw new Pr(r.status,`Request failed after ${n} retries`);case 7:if(!u){f.n=9;break}return f.n=8,a(r.clone().text());case 8:m=f.v,Yi.debug(`[HTTP] Response ${r.status}: ${m}`);case 9:return f.a(2,r)}},null,null,null,Promise)},c.n=1,a(d());case 1:return h=c.v,c.a(2,h.json())}},null,null,null,Promise)}function Ps(e,t={},i){var n,r,o;return k(function(s){for(;;)switch(s.n){case 0:return n=new AbortController,r=setTimeout(()=>n.abort(),i),t.signal=n.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 Ts(e,t,i){var n=i.value;return i.value=function(...e){if(!this.platformID)throw new Ar;return n.apply(this,e)},i}function Ms(e,t,i){var n=i.value;return i.value=function(...e){var t=Er.getDevice();if(null==t||!t.id)throw new Dr;return n.apply(this,e)},i}var _s,As=function(){return h(function e(){o(this,e);var t=Er.getNamiConfig();!this.platformID&&t&&this.configure(t)},[{key:"deviceID",get:function(){var e;return null===(e=Er.getDevice())||void 0===e?void 0:e.id}},{key:"configure",value:function(e){this.baseURL=ps(e.namiCommands),this.platformID=e.appPlatformID}},{key:"login",value:function(e){var t,i;return k(function(n){for(;;)switch(n.n){case 0:if(e){n.n=1;break}throw new xr;case 1:return t=`device/${this.deviceID}/login/`,i={external_id:e},n.n=2,a(this.requestBodyAPI(t,i,"PUT"));case 2:return n.a(2,n.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,i;return k(function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/session/`,n.n=1,a(this.requestBodyAPI(t,{start_time:e,app_env:"production"}));case 1:i=n.v,Er.setSessionCounter(),i.id&&Er.setSessionId(i.id);case 2:return n.a(2)}},null,this,null,Promise)}},{key:"postImpression",value:function(e){var t,i;return k(function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/impression/`,n.n=1,a(this.requestBodyAPI(t,e,"POST",!0));case 1:(i=n.v).id&&Er.setLastImpressionId(i.id);case 2:return n.a(2)}},null,this,null,Promise)}},{key:"postConversion",value:function(e){var t;return k(function(i){for(;;)switch(i.n){case 0:return t=`device/${this.deviceID}/transaction/`,i.n=1,a(this.requestBodyAPI(t,e,"POST",!0));case 1:return i.a(2)}},null,this,null,Promise)}},{key:"purchaseValidation",value:function(e){var t;return k(function(i){for(;;)switch(i.n){case 0:return t=`device/${this.deviceID}/purchase_event/`,i.n=1,a(this.requestBodyAPI(t,e,"PUT"));case 1:return i.a(2)}},null,this,null,Promise)}},{key:"fetchAPI",value:function(e,t,i){var n;return k(function(r){for(;;)switch(r.n){case 0:return n=`${this.baseURL}/${this.platformID}/`+e,r.n=1,a(Es(n,void 0,t,i));case 1:return r.a(2,r.v)}},null,this,null,Promise)}},{key:"requestBodyAPI",value:function(e,t,i="POST",n=!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:i,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:n},l.n=1,a(Es(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)}}])}();function Ds(e){return null!=(null==e?void 0:e.flow)}As.instance=new As,he([Ms],As.prototype,"login",null),he([Ms],As.prototype,"logout",null),he([Ms],As.prototype,"startSession",null),he([Ms],As.prototype,"postImpression",null),he([Ms],As.prototype,"postConversion",null),he([Ms],As.prototype,"purchaseValidation",null),he([Ts],As.prototype,"fetchAPI",null),he([Ts],As.prototype,"requestBodyAPI",null),e.NamiCampaignRuleType=void 0,(_s=e.NamiCampaignRuleType||(e.NamiCampaignRuleType={})).DEFAULT="default",_s.LABEL="label",_s.UNKNOWN="unknown",_s.URL="url";var xs=()=>{var e;return null!==(e=Er.getPaywalls(ct))&&void 0!==e?e:[]},Cs=()=>{var e;return null!==(e=Er.getPaywalls(Qe))&&void 0!==e?e:[]},Is=()=>kr(qi([...Cs(),...xs()]),"id"),Ls=e=>Is().find(t=>t.id===e),Rs=e=>{var t=Is(),i=new Set(t.map(e=>e.id));return e.every(e=>i.has(e))},Fs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{},Os="function"==typeof Fs.BigInt,Ns=Os?Fs.BigInt.bind(Fs):void 0,$s=Os?Ns("0xffffffffffffffffffffffffffffffff"):null,Ws=Os?Ns("0x100000000000000000000000000000000"):null,js=Os?Ns(0):null,Bs=Os?Ns(1):null,zs=Os?Ns(8):null,Us=Os?Ns(1e4):null,Hs=Fs.crypto,Gs="function"==typeof(null==Hs?void 0:Hs.getRandomValues),Vs=1/16,Ks=e=>de().device.getDeviceData(e),Xs=()=>{var e=Er.getNamiConfig();return e&&e.formFactor?e.formFactor:de().device.getDeviceFormFactor()};function Ys(){return de().device.generateUUID()}function qs(e){if(!Os||!$s)return Zs(e);try{var t=$s,i=function(e){if(!Ns)throw new Error("BigInt is not supported in this environment");var t=e.replace(/-/g,"");return Ns("0x"+t)}(e);return Number(i)/Number(t)*100}catch(t){throw Yi.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}function Js(e){if(!Ns)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 i=3&parseInt(t[16],16)|8;return(t=t.substring(0,16)+i.toString(16)+t.substring(17)).slice(0,8)+"-"+t.slice(8,12)+"-"+t.slice(12,16)+"-"+t.slice(16,20)+"-"+t.slice(20)}function Qs(e,t=.5){if(!Number.isFinite(e))throw new Error("Invalid target");if(!Number.isFinite(t))throw new Error("Invalid tolerance");var i=Math.max(0,Math.min(100,e)),n=Math.max(0,Math.min(50,t)),a=e=>Math.round(100*e),r=Math.max(0,a(i-n)),o=Math.min(1e4,a(i+n));if(!(Os&&$s&&Ns&&Us))return function(e,t){for(var i=Math.max(0,Math.min(100,e-t)),n=Math.min(100,Math.max(0,e+t)),a=Ys(),r=Number.POSITIVE_INFINITY,o=50,s=0;s<o;s++){var u=Ys(),l=Zs(u);if(l>=i&&l<=n)return u;var d=eu(l,i,n);d<r&&(r=d,a=u)}return a}(i,n);var s=$s,u=Ns,l=Us,d=e=>s*u(e)/l,h=d(r),m=d(o);if(m<=h)return Js(h);var f=h+function(e){if(!Ns||null===Ws||null===Bs||null===js||null===zs)throw new Error("BigInt is not supported in this environment");var t=Ns,i=js,n=Bs,a=zs,r=Ws;if(e<i)throw new Error("n must be non-negative");if(e===i)return i;for(var o=new Uint8Array(16),s=e+n,u=r/s*s-n,l=0,d=!1;l<10;){if(Gs)Hs.getRandomValues(o);else{d||(d=!0,Yi.warn("randomBigInt: crypto.getRandomValues unavailable, using Math.random fallback"));for(var h=0;h<o.length;h++)o[h]=Math.floor(256*Math.random())}for(var m,f=i,v=c(o);!(m=v()).done;)f=f<<a|t(m.value);if(f<=u)return f%s;l++}if(Gs)try{Hs.getRandomValues(o);for(var p,g=i,y=c(o);!(p=y()).done;)g=g<<a|t(p.value);var b=g%s;return Yi.warn("randomBigInt: reached max rejection attempts, using modulo fallback",{n:e.toString(),attempts:l}),b}catch(e){throw Yi.error("randomBigInt: failed to generate random values",e),new Error("randomBigInt: unable to generate random value")}for(var w,k=i,S=c(o);!(w=S()).done;)k=k<<a|t(w.value);return Yi.warn("randomBigInt: reached max rejection attempts without crypto, using modulo fallback",{n:e.toString(),attempts:l}),k%s}(m-h);return Js(f)}function Zs(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 i=0,n=t.length-1;n>=0;n--){i=(i+parseInt(t[n],16))*Vs}return i}(e);return 100*t}function eu(e,t,i){return e<t?t-e:e>i?e-i:0}var tu,iu=e=>{try{return Boolean(new URL(e))}catch(e){return!1}},nu=e=>{try{var t=new URL(e),i=t.origin+t.pathname,n=new Set;return t.searchParams.forEach((e,t)=>{n.add(`${t}=${e}`)}),{basePath:i,params:n}}catch(e){return}},au=(e,t,i)=>e?e.flatMap(e=>{var n;if(n="string"==typeof i?e.segments.filter(e=>e.form_factors.some(e=>e.form_factor===i)):e.segments,0===n.length)return[];var a=((e,t)=>{for(var i,n=[...e].sort((e,t)=>e.split-t.split),a=c(n);!(i=a()).done;){var r=i.value;if(t<=r.split)return r}return n[n.length-1]})(n,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}}):[],ru=()=>{var e,t,i=null!==(e=Er.getCampaignRules(qe))&&void 0!==e?e:[],n=null!==(t=Er.getCampaignRules(dt))&&void 0!==t?t:[],a=Xs(),r=qi([...i,...n]).filter(e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===a)});return kr(r,"rule")},ou=e=>{var t,i=null!==(t=Er.getCampaignRules(e))&&void 0!==t?t:[],n=Xs();return qi(i).filter(e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===n)})},su=()=>ou(dt),uu=()=>ou(qe),lu=(t,i,n,a)=>{var r=(()=>{if(!a)return t().find(t=>t.type==e.NamiCampaignRuleType.DEFAULT);if(a===e.NamiCampaignRuleType.URL){var i=t().filter(t=>t.type==e.NamiCampaignRuleType.URL);return((e,t)=>{var i,n,a,r=nu(e);if(r){for(var o,s,u,l=c(t);!(u=l()).done;){var d=u.value,h=d.value;if(h){var m=nu(h);if(m&&m.basePath===r.basePath){var f=m.params.size;if(0!==f){for(var v,p=0,g=c(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!==(i=null===(n=o)||void 0===n?void 0:n.campaign)&&void 0!==i?i:null===(a=s)||void 0===a?void 0:a.campaign}})(n,i)}return t().find(e=>e.type==a&&e.value==n)})();if(!r)return{};var o=i().find(e=>(null==r?void 0:r.paywall)===e.id);return{campaign:r,paywall:o}},du=(e,t)=>{var i=lu(uu,Cs,e,t);if(i.campaign&&i.paywall)return{campaign:i.campaign,paywall:i.paywall};var n=lu(su,xs,e,t);return n.campaign&&n.paywall?{campaign:n.campaign,paywall:n.paywall}:i.campaign||i.paywall?{campaign:i.campaign,paywall:i.paywall}:{campaign:n.campaign,paywall:n.paywall}},hu="object"==typeof Reflect?Reflect:null,cu=hu&&"function"==typeof hu.apply?hu.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};tu=hu&&"function"==typeof hu.ownKeys?hu.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var mu=Number.isNaN||function(e){return e!=e};function fu(){fu.init.call(this)}fu.EventEmitter=fu,fu.prototype._events=void 0,fu.prototype._eventsCount=0,fu.prototype._maxListeners=void 0;var vu=10;function pu(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function gu(e){return void 0===e._maxListeners?fu.defaultMaxListeners:e._maxListeners}function yu(e,t,i,n){var a,r,o,s;if(pu(i),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),r=e._events),o=r[t]),void 0===o)o=r[t]=i,++e._eventsCount;else if("function"==typeof o?o=r[t]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),(a=gu(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 bu(){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 wu(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},a=bu.bind(n);return a.listener=i,n.wrapFn=a,a}function ku(e,t,i){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?i?[a.listener||a]:[a]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(a):Eu(a,a.length)}function Su(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function Eu(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}Object.defineProperty(fu,"defaultMaxListeners",{enumerable:!0,get:function(){return vu},set:function(e){if("number"!=typeof e||e<0||mu(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");vu=e}}),fu.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},fu.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||mu(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},fu.prototype.getMaxListeners=function(){return gu(this)},fu.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,a=this._events;if(void 0!==a)n=n&&void 0===a.error;else if(!n)return!1;if(n){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)cu(s,this,t);else for(var u=s.length,l=Eu(s,u),d=0;d<u;++d)cu(l[d],this,t);return!0},fu.prototype.addListener=function(e,t){return yu(this,e,t,!1)},fu.prototype.on=fu.prototype.addListener,fu.prototype.prependListener=function(e,t){return yu(this,e,t,!0)},fu.prototype.once=function(e,t){return pu(t),this.on(e,wu(this,e,t)),this},fu.prototype.prependOnceListener=function(e,t){return pu(t),this.prependListener(e,wu(this,e,t)),this},fu.prototype.removeListener=function(e,t){var i,n,a,r,o;if(pu(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(a=-1,r=i.length-1;r>=0;r--)if(i[r]===t||i[r].listener===t){o=i[r].listener,a=r;break}if(a<0)return this;0===a?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,a),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},fu.prototype.off=fu.prototype.removeListener,fu.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var a,r=Object.keys(i);for(n=0;n<r.length;++n)"removeListener"!==(a=r[n])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},fu.prototype.listeners=function(e){return ku(this,e,!0)},fu.prototype.rawListeners=function(e){return ku(this,e,!1)},fu.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Su.call(e,t)},fu.prototype.listenerCount=Su,fu.prototype.eventNames=function(){return this._eventsCount>0?tu(this._events):[]};var Pu=function(){function e(){o(this,e),this.emitter=new fu}return h(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}}])}(),Tu=function(){return h(function e(){o(this,e),this.disableCampaignUpdates=!1,this.useLegacyPaywallFetch=!1,this.currentFormFactor=Xs()},[{key:"configure",value:function(e,t,i=[]){this.currentFormFactor=e,this.splitPosition=t,this.disableCampaignUpdates=i.includes("disableCampaignUpdates"),this.useLegacyPaywallFetch=i.includes("useLegacyPaywallFetch")}},{key:"fetchCampaignRules",value:function(e){var t,i,n,r;return k(function(o){for(;;)switch(o.n){case 0:if(n=Er.getDevice(),!this.disableCampaignUpdates){o.n=1;break}return Yi.info("Campaign updates disabled by configuration. Skipping fetch."),o.a(2,[]);case 1:if(null!=n&&n.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(n.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===(i=r)||void 0===i?void 0:i.filter(t=>{if(t.paywall){var i=e.find(e=>e.id==t.paywall);if(i)return t}else if(t.flow)return t}),Er.setCampaignRules(qe,r),Er.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),o.a(2,r)}},null,this,null,Promise)}},{key:"fetchCampaignRulesRaw",value:function(){var e,t,i;return k(function(n){for(;;)switch(n.n){case 0:if(t=Er.getDevice(),!this.disableCampaignUpdates){n.n=1;break}return Yi.info("Campaign updates disabled by configuration. Skipping fetch."),n.a(2,[]);case 1:if(null!=t&&t.id){n.n=3;break}return n.n=2,a(this.getAnonymousCampaigns());case 2:i=n.v,n.n=5;break;case 3:return n.n=4,a(this.getCampaigns(t.id));case 4:i=n.v;case 5:return i=null===(e=i)||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))}),n.a(2,i)}},null,this,null,Promise)}},{key:"finalizeCampaignRules",value:function(e,t){var i=null==e?void 0:e.filter(e=>e.paywall?t.find(t=>t.id==e.paywall):!!e.flow);return Er.setCampaignRules(qe,i),Er.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),i}},{key:"invokeAvailableCampaignsResponseHandler",value:function(){var e=Pu.getInstance().listeners(Ci),t=ru();e.forEach(e=>e(t))}},{key:"getAnonymousCampaigns",value:function(e=ye){var t,i,n,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(As.instance.fetchAPI(t));case 2:return n=s.v,s.a(2,au(null!==(i=n.results)&&void 0!==i?i:[],this.splitPosition,this.currentFormFactor));case 3:if(s.p=3,o=s.v,r=this.fallbackData()){s.n=4;break}throw Yi.error(Br(o.status,t)),o;case 4:return s.a(2,r.results)}},null,this,[[1,3]],Promise)}},{key:"getCampaigns",value:function(e){var t,i,n,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return i=`device/${e}/campaign_rules/`,o.p=1,o.n=2,a(As.instance.fetchAPI(i));case 2:n=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,n=this.fallbackData()){o.n=4;break}throw Yi.error(Br(r.status,i)),r;case 4:return o.a(2,(null===(t=n)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Er.getCampaignRules(qe)||Er.getCampaignRules(dt);return e?{count:e.length,results:e}:null}}],[{key:"extractPaywallUrls",value:function(e){for(var t,i=[],n=c(e);!(t=n()).done;){var a,r=t.value;r.paywall_url&&i.push(r.paywall_url),r.page_urls&&i.push(...Object.values(r.page_urls)),null!==(a=r.flow)&&void 0!==a&&a.page_urls&&i.push(...Object.values(r.flow.page_urls))}return i}},{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 Mu(e,t){return Va(e,t)}Tu.instance=new Tu;var _u=function(){return h(function e(){o(this,e)},[{key:"createOrUpdateDevice",value:function(e,t,i){var n=Er.getDevice();if(null==n||!n.id){var a,r=m({},e,{id:null!==(a=null!=t?t:this.getAnonymousUUID())&&void 0!==a?a:Ys()});return{id:r.id,device:this.createDevice(r,i)}}return this.isEqualDevices(n,e)?{id:n.id,device:Promise.resolve(n)}:(this.updateDevice(n.id,e),{id:n.id,device:null})}},{key:"createDevice",value:function(e,t){var i,n;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(!(i=r.v)){r.n=2;break}Er.setDevice(i),r.n=3;break;case 2:return Yi.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,i);case 4:if(r.p=4,n=r.v,console.error("Error creating device:",n),!(n instanceof Pr)){r.n=5;break}return Yi.info("Retry limit exceeded, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),r.a(2,null);case 5:throw n;case 6:return r.a(2)}},null,this,[[0,4]],Promise)}},{key:"updateDevice",value:function(e,t){var i;return k(function(n){for(;;)switch(n.n){case 0:return n.n=1,a(this.requestAPIData(`device/${e}/`,t,"PUT"));case 1:return(i=n.v)&&Er.setDevice(i),n.a(2,i)}},null,this,null,Promise)}},{key:"updateDeviceField",value:function(e,t){var i,n,r;return k(function(o){for(;;)switch(o.n){case 0:if(i={[e]:t},null!=(n=Er.getDevice())&&n.id){o.n=1;break}throw new Dr;case 1:return o.n=2,a(this.requestAPIData(`device/${n.id}/`,i,"PATCH"));case 2:return(r=o.v)&&Er.setDevice(r),o.a(2,r)}},null,this,null,Promise)}},{key:"requestAPIData",value:function(e,t,i="POST",n=vi,r){var o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:return u.p=0,u.n=1,a(As.instance.requestBodyAPI(e,t,i,!1,n,r));case 1:o=u.v,u.n=5;break;case 2:if(u.p=2,!((s=u.v)instanceof Ar)){u.n=3;break}throw s;case 3:if(!("device/"===e&&s instanceof Pr)){u.n=4;break}throw s;case 4:if(o=Er.getDevice()){u.n=5;break}return Yi.error(Br(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 i=m({},e,t),n=Object.keys(e).reduce((e,t)=>(e[t]=i[t],e),{});return Mu(n,e)}},{key:"getOrCreateAnonymousUUID",value:function(){var e=Er.getAnonymousUUID();return e||(e=Ys(),Er.setAnonymousUUID(e)),e}},{key:"getAnonymousUUID",value:function(){var e=Er.getAnonymousUUID();return e?(Er.clearAnonymousUUID(),e):null}}])}();_u.instance=new _u;var Au=function(){return h(function e(){o(this,e)},[{key:"fetchProducts",value:function(){var e,t,i,n;return k(function(r){for(;;)switch(r.p=r.n){case 0:if(!gs(fe.THIRD_PARTY_TRANSACTIONS)){r.n=1;break}return r.a(2,[]);case 1:return r.p=1,r.n=2,a(As.instance.fetchAPI("products/"));case 2:i=r.v,r.n=4;break;case 3:if(r.p=3,n=r.v,i=this.fallbackData()){r.n=4;break}throw Yi.error(Br(n.status,"products/")),n;case 4:return null!==(e=i)&&void 0!==e&&e.results&&Er.setProducts(it,i.results),r.a(2,(null===(t=i)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Er.getProducts(it)||Er.getProducts(ft);return e?{count:e.length,results:e}:null}}])}();Au.instance=new Au;var Du=function(){return h(function e(){o(this,e)},[{key:"fetchPaywalls",value:function(){var e,t,i;return k(function(n){for(;;)switch(n.n){case 0:if(null!=(e=Er.getDevice())&&e.id){n.n=2;break}return n.n=1,a(this.getAnonymousPaywalls());case 1:t=n.v,n.n=4;break;case 2:return n.n=3,a(this.getPaywalls(e.id));case 3:t=n.v;case 4:if(!t){n.n=5;break}return(i=this.validatePaywalls(t)).length>0&&Er.setPaywalls(Qe,i),n.a(2,i);case 5:return n.a(2,t)}},null,this,null,Promise)}},{key:"getAnonymousPaywalls",value:function(e=ye){var t,i,n,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return i=`paywalls/?sdk_version=${e}`,n=null,o.p=1,o.n=2,a(As.instance.fetchAPI(i));case 2:n=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,n=this.fallbackData()){o.n=4;break}throw Yi.error(Br(r.status,i)),r;case 4:return o.a(2,(null===(t=n)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"getPaywalls",value:function(e){var t,i,n,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return i=`device/${e}/paywalls/`,o.p=1,o.n=2,a(As.instance.fetchAPI(i));case 2:n=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,n=this.fallbackData()){o.n=4;break}throw Yi.error(Br(r.status,i)),r;case 4:return o.a(2,(null===(t=n)||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,Es(e))},null,null,null,Promise)}},{key:"fetchPaywallsByUrls",value:function(e){var t,i,n,r,o,s,u;return k(function(l){for(;;)switch(l.n){case 0:return t=[...new Set(e)],l.n=1,a(Promise.allSettled(t.map(e=>this.fetchPaywallByUrl(e))));case 1:for(i=l.v,n=[],r=c(i);!(o=r()).done;)"fulfilled"===(s=o.value).status?n.push(s.value):Yi.error(`Failed to fetch individual paywall: ${s.reason}`);if(!(n.length>0)){l.n=2;break}return(u=this.validatePaywalls(n)).length>0&&Er.setPaywalls(Qe,u),l.a(2,u);case 2:return l.a(2,n)}},null,this,null,Promise)}},{key:"validatePaywalls",value:function(e){return e.filter(e=>{var t,i=null===(t=e.template)||void 0===t?void 0:t.pages;return!(!Array.isArray(i)||0===i.length)||(Yi.warn(`Dropping paywall "${e.id}" from cache: template.pages is missing or empty`),!1)})}},{key:"fallbackData",value:function(){var e=Er.getPaywalls(Qe)||Er.getPaywalls(ct);return e?{count:e.length,results:e}:null}}])}();Du.instance=new Du;var xu=function(){return h(function e(){o(this,e)},[{key:"fetchConfig",value:function(){var e,t;return k(function(i){for(;;)switch(i.p=i.n){case 0:return i.p=0,i.n=1,a(As.instance.fetchAPI("config/"));case 1:e=i.v,i.n=3;break;case 2:if(i.p=2,t=i.v,e=Er.getAppConfig(Xe)||Er.getAppConfig(ut)){i.n=3;break}throw Yi.error(Br(t.status,"config/")),t;case 3:return e&&Er.setAppConfig(Xe,e),i.a(2,e)}},null,null,[[0,2]],Promise)}}])}();xu.instance=new xu;var Cu=null;function Iu(){Cu&&Cu.setInMemoryAnonymousMode(!1)}function Lu(){return!!Er.getAnonymousMode()||!!Cu&&Cu.isInMemoryAnonymousMode()}var Ru=function(){return h(function e(){o(this,e)},[{key:"startSession",value:function(){var e;return k(function(t){for(;;)switch(t.p=t.n){case 0:if(!Lu()){t.n=1;break}return Yi.debug("Skipping session start call - anonymous mode"),t.a(2);case 1:return t.p=1,t.n=2,a(As.instance.startSession(new Date));case 2:t.n=4;break;case 3:t.p=3,e=t.v,Yi.error("error on start session: ",e);case 4:return t.a(2)}},null,null,[[1,3]],Promise)}}])}();Ru.instance=new Ru;var Fu=function(){return h(function e(){o(this,e)},null,[{key:"allPurchases",value:function(){return[]}}])}();Fu.instance=new Fu;var Ou={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"}},Nu="en";function $u(e){var t,i,n=function(e){if(!e)return Nu;var t=e.trim();if(Ou[t])return t;var i=t.toLowerCase(),n=i.split("-")[0];return Ou[n]?n:"zh"===n?i.includes("tw")||i.includes("hk")?"zh-TW":"zh-CN":Nu}(Er.getLanguageCode()),a=null!==(t=Ou[n])&&void 0!==t?t:Ou[Nu];return null!==(i=null==a?void 0:a[e])&&void 0!==i?i:e}function Wu(e){if("subscription"===(null==e?void 0:e.product_type)){var t=Bu(e);if(t.length>0)return t[0].billingPeriod}return null}function ju(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return zu(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Bu(e){return e?zu(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function zu(e,t){return e.map(e=>Uu(e,t))}function Uu(e,t){var i,n,a,r,o,s,u,l;if(!e)return{};var d=null!==(i=null===(n=e.promo_period)||void 0===n?void 0:n.count)&&void 0!==i?i:null==t?void 0:t.count,h=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,c=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*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:Vu(m).format(c)}}function Hu(e,t=!1,i=!1,n=!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],h=(e,t,i,n,r)=>{var o=(e=>a?`${e}_abbrev`:e)(r),s=(e=>a?`${e}_abbrev_plural`:`${e}_plural`)(r),u=$u(o),l=$u(s);return a||u!==o||(u=$u(`${r}_abbrev`)),a||l!==s||(l=$u(`${r}_abbrev_plural`)),n?e.toString():i?1===e||t?u:l:1===e||t?`${e} ${u}`:`${e} ${l}`};switch(e.at(-1)){case"D":return h(d,t,i,n,"nami_day");case"W":return h(l,t,i,n,"nami_week");case"M":return h(u,t,i,n,"nami_month");case"Y":return h(s,t,i,n,"nami_year")}return null}function Gu(e){var t;if(!e||e.length<2)return!1;var i=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===i||"Y"===i}function Vu(e){var t={maximumFractionDigits:2,minimumFractionDigits:0},i=de().device.getLanguage();try{return new Intl.NumberFormat(i,m({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(i,m({},t,{style:"currency",currency:"USD"}))}}var Ku=(e,t,i)=>e&&t&&i?i.format(e-t):null,Xu=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Yu=(e,t)=>{if(""!=t){var i=parseInt(t)-1;return i>=0&&i<(null==e?void 0:e.length)?e[i]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},qu=e=>Qu(e.priceAmountMicros)/Ju(e.billingPeriod),Ju=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Qu=e=>e/1e6;function Zu(e){return parseFloat((Math.round(e)/100).toFixed(2))}var el=(e,t,i=[])=>({price:()=>il(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>nl(e),durationSingular:()=>nl(e,!0),period:()=>nl(e,!1,!0),periodNumber:()=>nl(e,!1,!1,!0),freeTrialDuration:()=>al(e),freeTrialDurationSingular:()=>al(e,!0),freeTrialPeriod:()=>al(e,!1,!0),freeTrialPeriodNumber:()=>al(e,!1,!1,!0),pricePerMonth:()=>rl(e),pricePerMonthRounded:()=>rl(e,!0),periodInMonths:()=>ol(e),durationInMonths:()=>sl(e),durationInMonthsSingular:()=>sl(e,!0),periodNumberInMonths:()=>ul(e),percentagePriceDifferenceFromSku:()=>ll(e,t,i),priceDifferenceFromSku:()=>dl(e,t,i),promoEligible:()=>null===hl(e)&&null!==cl(e,t),freeTrialEligible:()=>null!==hl(e),promo:()=>{var i;return null===(i=cl(e,t))||void 0===i?void 0:i.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var i;return null===(i=ml(e,t))||void 0===i?void 0:i.formattedPrice},promoPeriod:()=>fl(e,t,!1,!0),promoPeriodNumber:()=>fl(e,t,!1,!1,!0),promoDuration:()=>fl(e,t),promoDurationSingular:()=>fl(e,t,!0),introEligible:()=>!1,pricePerDay:()=>vl(e),pricePerWeek:()=>pl(e),pricePerWeekRounded:()=>pl(e,!0),introductoryPrice:()=>gl(e,t),introductoryPeriod:()=>yl(e,t,!1,!0),introductoryPeriodNumber:()=>yl(e,t,!1,!1,!0),introductoryDuration:()=>yl(e,t),introductoryDurationSingular:()=>yl(e,t,!0),introductoryPricePerMonth:()=>bl(e,t),introductoryPricePerMonthRounded:()=>bl(e,t,!0),durationAbbrev:()=>nl(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>al(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>yl(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>fl(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>fl(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>sl(e,!1,!1,!1,!0),durationSingularAbbrev:()=>nl(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>al(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>yl(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>fl(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>fl(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>sl(e,!0,!1,!1,!0),periodAbbrev:()=>nl(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>al(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>yl(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>fl(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>fl(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>sl(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 i=t[1],n=t[2],a=t[3],r=t[4],o=void 0!==i?parseInt(i,10):0,s=void 0!==n?parseInt(n,10):0,u=void 0!==a?parseInt(a,10):0;return(void 0!==r?parseInt(r,10):0)>0?null:u>0?1===u?$u("nami_weekly"):2===u?$u("nami_biweekly"):null:s>0?$u(1===s?"nami_monthly":2===s?"nami_bimonthly":3===s?"nami_quarterly":6===s?"nami_biannually":12===s?"nami_yearly":"nami_monthly"):o>0?$u("nami_yearly"):null}(Wu(e)),iso_subscription_duration:()=>kl(e),invalid:()=>!1,unavailable:()=>!1}),tl=(e,t,i,n=[])=>{if(!t)return null;var a=el(t,i,n);return a[e]?a[e]():null},il=e=>{var t=Bu(e);return t&&t.length?t[0].formattedPrice:null},nl=(e,t,i,n,a)=>Hu(Wu(e),t,i,n,a),al=(e,t,i,n,a)=>Hu(ju(e),t,i,n,a),rl=(e,t)=>{var i=Bu(e);if(!i||0===i.length)return null;var n=qu(i[0]);return n?Vu(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},ol=(e,t)=>{var i=Bu(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Gu(n)?Hu("P1Y"===n?"P12M":n,!1,!1,!1,t):null},sl=(e,t,i,n,a)=>{var r=Bu(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Gu(o)?Hu("P1Y"===o?"P12M":o,t,i,n,a):null},ul=e=>{if(!e)return 0;var t=Bu(e);return t&&t.length?Ju(t[0].billingPeriod):0},ll=(e,t,i=[])=>{var n,a=Bu(e);if(!a||0===a.length)return null;var r=null===(n=Yu(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Xu(Zu(a[0].priceAmountMicros),ul(e));var o=Bu(r);return Xu(Zu(a[0].priceAmountMicros),ul(e),(null==o?void 0:o.length)>0?Zu(o[0].priceAmountMicros):0,ul(r))},dl=(e,t,i=[])=>{var n,a=Bu(e);if(!a||0===a.length)return null;var r=null===(n=Yu(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Ku(qu(a[0]));var o=Bu(r);return Ku(qu(a[0]),qu(o[0]),Vu(o[0].priceCurrencyCode))},hl=e=>ju(e),cl=(e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null},ml=(e,t)=>e?Uu(cl(e,t),e.subscription_period):null,fl=(e,t,i,n,a,r)=>{var o=ml(e,t);return Hu((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},vl=(e,t)=>{var i=Bu(e);if(!i||0===i.length)return null;var n,a,r=Qu(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=Ju(n))?30.437*a:1);return r?Vu(i[0].priceCurrencyCode).format(r):null},pl=(e,t)=>{var i=Bu(e);if(!i||0===i.length)return null;var n,a,r=Qu(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=Ju(n))?52*a/12:1);return r?Vu(i[0].priceCurrencyCode).format(t?Math.round(r):r):null},gl=(e,t)=>{var i=wl(e,t);return(null==i?void 0:i.formattedPrice)||null},yl=(e,t,i,n,a,r)=>{var o=wl(e,t);return Hu((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},bl=(e,t,i)=>{var n=wl(e,t);if(n){var a=Qu(n.priceAmountMicros),r=Ju(n.billingPeriod),o=i?Math.round(a/r):a/r;return Vu(n.priceCurrencyCode).format(o)}},wl=(e,t)=>{return e?(t?(i=e.offers[parseInt(t)])||(i=e.offers.find(e=>e.offer_ref_id===t)||null):i=e.offers[0],Uu(i,e.subscription_period)):null;var i},kl=e=>{var t=Wu(e);return t?"P7D"===t?"P1W":t:null};function Sl(e,t,i,n){var a=i.flatMap(e=>e.products).find(e=>e.id===t.selectedProducts[t.currentGroupId]);return Pl(_l(e,null==a?void 0:a.sku_ref_id),a,n)}function El(e,t,i){var n,a,r=null!==(n=null===(a=t.find(e=>e.id===i))||void 0===a?void 0:a.products)&&void 0!==n?n:[];return r.forEach(t=>{t.product_details=_l(e,t.sku_ref_id||""),t.variables=Pl(t.product_details,t,r)}),r}function Pl(e,t,i){if(!t)return{};var n=t.variables;if(!n)return m({},t);Object.keys(n).forEach(t=>{if("string"==typeof(r=n[t])&&r.includes(Ui)){var a=Tl(n[t],e,i);n[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(el({})).forEach(t=>{if(void 0===n[t]){var r=tl(t,e,void 0,i);null!==r&&(a[t]=r)}}),m({},t,a,n)}var Tl=(e,t,i)=>e.replace(Wi,(n,a)=>{var r,o,s,u,l=(null===(r=Wi.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,i)});function Ml(e,t){return t.flatMap(e=>e.products).some(t=>1==tl("freeTrialEligible",_l(e,t.sku_ref_id)))}function _l(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Al=function(){try{var e=_n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Dl=Object.prototype.hasOwnProperty;function xl(e,t,i){var n=e[t];Dl.call(e,t)&&Ji(n,i)&&(void 0!==i||t in e)||function(e,t,i){"__proto__"==t&&Al?Al(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}(e,t,i)}var Cl="object"==typeof e&&e&&!e.nodeType&&e,Il=Cl&&"object"==typeof module&&module&&!module.nodeType&&module,Ll=Il&&Il.exports===Cl?an.Buffer:void 0;Ll&&Ll.allocUnsafe;var Rl=wa(Object.getPrototypeOf,Object),Fl=Object.prototype.hasOwnProperty;function Ol(e){var t=new e.constructor(e.byteLength);return new jn(t).set(new jn(e)),t}var Nl=/\w*$/;var $l=rn?rn.prototype:void 0,Wl=$l?$l.valueOf:void 0;function jl(e,t,i){var n,a,r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return Ol(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return r=Ol((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=Ol(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,Nl.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return n=e,Wl?Object(Wl.call(n)):{}}}var Bl=Object.create,zl=function(){function e(){}return function(t){if(!mn(t))return{};if(Bl)return Bl(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();var Ul=ma&&ma.isMap,Hl=Ul?la(Ul):function(e){return Yn(e)&&"[object Map]"==ja(e)};var Gl=ma&&ma.isSet,Vl=Gl?la(Gl):function(e){return Yn(e)&&"[object Set]"==ja(e)},Kl="[object Arguments]",Xl="[object Function]",Yl="[object Object]",ql={};function Jl(e,t,i,n,a,r){var o;if(void 0!==o)return o;if(!mn(e))return e;var s=Gn(e);if(s)o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Fl.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e);else{var u=ja(e),l=u==Xl||"[object GeneratorFunction]"==u;if(aa(e))return e.slice();if(u==Yl||u==Kl||l&&!a)o=l?{}:function(e){return"function"!=typeof e.constructor||ba(e)?{}:zl(Rl(e))}(e);else{if(!ql[u])return a?e:{};o=jl(e,u)}}r||(r=new Fn);var d=r.get(e);if(d)return d;r.set(e,o),Vl(e)?e.forEach(function(n){o.add(Jl(n,t,i,n,e,r))}):Hl(e)&&e.forEach(function(n,a){o.set(a,Jl(n,t,i,a,e,r))});var h=s?void 0:Pa(e);return function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););}(h||e,function(n,a){h&&(n=e[a=n]),xl(o,a,Jl(n,t,i,a,e,r))}),o}ql[Kl]=ql["[object Array]"]=ql["[object ArrayBuffer]"]=ql["[object DataView]"]=ql["[object Boolean]"]=ql["[object Date]"]=ql["[object Float32Array]"]=ql["[object Float64Array]"]=ql["[object Int8Array]"]=ql["[object Int16Array]"]=ql["[object Int32Array]"]=ql["[object Map]"]=ql["[object Number]"]=ql[Yl]=ql["[object RegExp]"]=ql["[object Set]"]=ql["[object String]"]=ql["[object Symbol]"]=ql["[object Uint8Array]"]=ql["[object Uint8ClampedArray]"]=ql["[object Uint16Array]"]=ql["[object Uint32Array]"]=!0,ql["[object Error]"]=ql[Xl]=ql["[object WeakMap]"]=!1;var Ql=e=>"object"==typeof e&&null!==e&&"handleEvent"in e,Zl=(e,t,i)=>{var n=Object.getOwnPropertyDescriptor(e,t);if(!n||n.configurable)try{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:i,writable:!1})}catch(n){try{e[t]=i}catch(e){}}},ed=function(){return h(function e(){o(this,e),this.listeners=new Map},[{key:"addEventListener",value:function(e,t,i){var n;if(t){var a=(e=>"boolean"==typeof e?{capture:e}:null!=e?e:{})(i),r=null!==(n=this.listeners.get(e))&&void 0!==n?n:[];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 i=this.listeners.get(e);if(i&&0!==i.length){for(var n=i.length-1;n>=0;n-=1){var a=i[n];a.listener===t&&(a.signal&&a.abortHandler&&a.signal.removeEventListener("abort",a.abortHandler),i.splice(n,1))}0===i.length&&this.listeners.delete(e)}}}},{key:"dispatchEvent",value:function(e){var t,i;if(!e||"string"!=typeof e.type)throw new TypeError('Failed to execute "dispatchEvent": event type must be a string.');var n=this.listeners.get(e.type);if(!n||0===n.length)return!0;Zl(e,"target",this);var a=!1,r=null===(t=e.stopImmediatePropagation)||void 0===t?void 0:t.bind(e),o=null===(i=e.stopPropagation)||void 0===i?void 0:i.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=c(n.slice());!(l=d()).done;){var h=l.value;if(a)break;Zl(e,"currentTarget",this),"function"==typeof h.listener?h.listener.call(this,e):Ql(h.listener)&&h.listener.handleEvent.call(h.listener,e),h.once&&this.removeEventListener(e.type,h.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 Zl(e,"currentTarget",null),!e.defaultPrevented}}])}(),td=[],id={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",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},nd=function(t){function i(e,t,n){var a;o(this,i),(a=r(this,i)).subscribers=new Set,a.productDetails=td,a.filteredSkuMenus=[],a.state=Jl(id,5);var s=Er.getNamiProfile();return a.state.isLoggedIn=!(null==s||!s.externalId),a.setPaywall(e,t,n),a.subscribers=new Set,a}return p(i,t),h(i,[{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(new CustomEvent(e,{detail:t}))}},{key:"onEvent",value:function(e,t){var i=e=>t(e.detail);return this.addEventListener(e,i),()=>this.removeEventListener(e,i)}},{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 i=Sl(this.productDetails,this.state,this.filteredSkuMenus,El(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(m({},this.state,{currentGroupId:e,currentGroupName:t,sku:i}))}},{key:"setFormState",value:function(e,t){this.setState(m({},this.state,{formStates:m({},this.state.formStates,{[e]:t})}))}},{key:"setTimerState",value:function(e,t,i,n){this.setState(m({},this.state,{timerStates:m({},this.state.timerStates,{[e]:{remainingSeconds:t,savedAt:i,hasEmittedCompletion:n}})}))}},{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 i=this.state.formStates||{},n=m({},i,{[e]:t||!i[e]});this.setState(m({},this.state,{formStates:n}))}},{key:"getCurrentFormId",value:function(e){return this.state.formStates[e]}},{key:"setSelectedProducts",value:function(e){var t=Sl(this.productDetails,this.state,this.filteredSkuMenus,El(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,i){var n,a,r,o,s,u=m({},this.state,{formFactor:Xs(),selectedPaywall:e,selectedCampaign:i}),l=function(e,t,i=[]){var n,a,r=null!==(n=t.productGroups)&&void 0!==n&&n.length?t.productGroups:i.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===(n=e.template)||void 0===n?void 0:n.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,h=u.groups.find(e=>e.ref==this.filteredSkuMenus[0].ref);u.currentGroupId=null!==(d=null==h?void 0:h.id)&&void 0!==d?d:u.currentGroupId}var c=El(this.productDetails,this.filteredSkuMenus,u.currentGroupId);u.skuItems=c,u.launch=l,u.anySkuHasTrialOffer=Ml(this.productDetails,this.filteredSkuMenus),u.anySkuHasPromoOffer=function(e,t){return!Ml(e,t)&&t.flatMap(e=>e.products).some(t=>1==tl("promoEligible",_l(e,t.sku_ref_id)))}(this.productDetails,this.filteredSkuMenus),u.paywallId=e.id,u.sku=Sl(this.productDetails,u,this.filteredSkuMenus,c),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,i,n,a,r,o,s,u,l,d=this.state.selectedCampaign,h=this.state.selectedPaywall;return{paywallId:null!==(t=null==h?void 0:h.id)&&void 0!==t?t:"",paywallName:null!==(i=null==h?void 0:h.name)&&void 0!==i?i:"",campaignId:null!==(n=null==d?void 0:d.rule)&&void 0!==n?n:"",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){this.setState(m({},this.state,{currentPage:e}))}},{key:"setCustomerAttribute",value:function(e){this.setState(m({},this.state,{customer:m({},this.state.customer,e)}))}},{key:"removeCustomerAttribute",value:function(e){delete this.state.customer[e],this.setState(this.state)}},{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(){delete this.state.appSuppliedVideoUrl,delete this.state.appSuppliedVideoName,this.setState(this.state)}},{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 i=[...this.state.openHeaderIds],n=i.indexOf(e);-1!==n?i.splice(n,1):i.push(e),this.setState(m({},this.state,{openHeaderIds:i,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.state.currentSlideIndex=e}}],[{key:"create",value:function(e,t,n){var a=new i(e,t,n);return this.providers.push(a),a}},{key:"remove",value:function(e){this.providers=this.providers.filter(t=>t!==e)}},{key:"currentProvider",get:function(){return i.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(i=>{i.setPurchase(e,t)})}},{key:"getSelectedSlideIndex",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.state.currentSlideIndex}}])}(ed);nd.providers=[];var ad=h(function e(){o(this,e),this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}});ad.instance=new ad;var rd=()=>kr(qi([...Er.getNamiEntitlements(ot),...Er.getNamiEntitlements(pt)]),"referenceId"),od=()=>{Pu.getInstance().emit(Fi,rd())};function sd(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 ud=function(){return h(function e(){o(this,e)},[{key:"fetchActiveEntitlements",value:function(){var e,t,i;return k(function(n){for(;;)switch(n.n){case 0:if(e=null,Lu()||gs(fe.THIRD_PARTY_TRANSACTIONS)||!gs(fe.ENTITLEMENT_MANAGEMENT)){n.n=3;break}if(null==(t=Er.getDevice())||!t.id){n.n=2;break}return n.n=1,a(this.getAPIEntitlements(t.id));case 1:i=n.v,(e=null==i?void 0:i.results)&&(Er.setActiveEntitlements(at,e),this.invokeActiveEntitlementsHandler(e));case 2:n.n=4;break;case 3:Lu()&&Yi.debug("Skipping active entitlements update - anonymous mode"),gs(fe.THIRD_PARTY_TRANSACTIONS)&&Yi.debug("Skipping active entitlements update - paywalls-only mode"),gs(fe.ENTITLEMENT_MANAGEMENT)||Yi.debug("Skipping active entitlements update - no entitlement_management capability");case 4:return n.a(2,e)}},null,this,null,Promise)}},{key:"getAPIEntitlements",value:function(e){var t,i,n;return k(function(r){for(;;)switch(r.p=r.n){case 0:return t=`device/${e}/active_entitlements/`,i={},r.p=1,r.n=2,a(As.instance.fetchAPI(t));case 2:i=r.v,r.n=4;break;case 3:throw r.p=3,n=r.v,Yi.error(Br(n.status,t)),n;case 4:return r.a(2,i)}},null,null,[[1,3]],Promise)}},{key:"invokeActiveEntitlementsHandler",value:function(e){bs()&&(e=>{Er.setNamiEntitlements(ot,e);var t=Er.getNamiEntitlements(pt),i=new Set(e.map(e=>e.referenceId)),n=t.filter(e=>{var t=i.has(e.referenceId);return t&&Yi.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t});n.length!==t.length&&Er.setNamiEntitlements(pt,n),od()})(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)))}}])}();ud.instance=new ud;var ld=function(){return h(function e(){o(this,e)},[{key:"fetchCustomerJourneyState",value:function(){var e,t,i,n;return k(function(r){for(;;)switch(r.p=r.n){case 0:if(!Lu()){r.n=1;break}return Yi.debug("Skipping customer journey state update - anonymous mode"),r.a(2,null);case 1:if(null!=(e=Er.getDevice())&&e.id){r.n=2;break}return r.a(2,null);case 2:return t=`device/${e.id}/profile/`,i=null,r.p=3,r.n=4,a(As.instance.fetchAPI(t,void 0,0));case 4:i=r.v,r.n=6;break;case 5:throw r.p=5,n=r.v,Yi.error(Br(n.status,t)),n;case 6:if(!i){r.n=7;break}return Er.setCustomerJourneyState(i.customer_journey_state),r.a(2,i.customer_journey_state);case 7:return r.a(2,null)}},null,null,[[3,5]],Promise)}}])}();ld.instance=new ld;var dd,hd=function(){return h(function e(){o(this,e),this.inMemoryAnonymousMode=!1,Cu=this},[{key:"setInMemoryAnonymousMode",value:function(e){this.inMemoryAnonymousMode=e,Yi.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 Er.getAnonymousMode()||this.inMemoryAnonymousMode}},{key:"init",value:function(e){return k(function(t){for(;;)switch(t.n){case 0:return this.setInitialValues(e),xu.instance.fetchConfig(),t.n=1,a(this.initAndFetchRequiredData(e));case 1:Ru.instance.startSession();case 2:return t.a(2)}},null,this,null,Promise)}},{key:"setInitialValues",value:function(e){var t=m({},e);delete t.initialConfig,Er.clearSessionId(),Er.setNamiConfig(t),Er.setLanguageCode(e.namiLanguageCode),Er.setPurchaseChannel(e.purchaseChannel);var i=e.initialConfig;if(i.appConfig||i.platform_config){var n=(null==i?void 0:i.appConfig)||(null==i?void 0:i.platform_config);n&&Er.setAppConfig(ut,n)}null!=i&&i.paywalls&&Er.setPaywalls(ct,i.paywalls),null!=i&&i.products&&Er.setProducts(ft,i.products)}},{key:"initAnonymousDevice",value:function(){return{deviceId:_u.instance.getOrCreateAnonymousUUID(),deviceTask:null}}},{key:"initIdentifiedDevice",value:function(e){var t=m({},Ks(e.namiCommands),e.formFactor?{form_factor:e.formFactor}:{}),i=function(e){if(e){var t=e.find(e=>e.startsWith("splitPosition="));if(t){var i=t.split("=")[1],n=Number(i);return i&&!isNaN(n)?Qs(n):void 0}}}(e.namiCommands),n=_u.instance.createOrUpdateDevice(t,i,this);return{deviceId:n.id,deviceTask:n.device}}},{key:"initAndFetchRequiredData",value:function(e,t=0,i=1){var n,r,o,s,u,l,d,h,c,m,f;return k(function(v){for(;;)switch(v.n){case 0:if(s=e.initialConfig,u=null!==(n=e.formFactor)&&void 0!==n?n:Xs(),l=this.isAnonymousMode(),d=l?this.initAnonymousDevice():this.initIdentifiedDevice(e),h=d.deviceId,c=d.deviceTask,m=qs(h),s.campaign_rules&&Er.setCampaignRules(dt,au(s.campaign_rules,m,u)),!c){v.n=1;break}return v.n=1,a(c);case 1:if(Tu.instance.configure(u,m,e.namiCommands),ys(),f=Promise.all([Au.instance.fetchProducts(),ld.instance.fetchCustomerJourneyState(),ud.instance.fetchActiveEntitlements(),this.fetchCampaignsAndPaywalls()]).catch(n=>{var r;return k(function(o){for(;;)switch(o.n){case 0:if(!(n instanceof Mr)){o.n=3;break}if(Er.resetDevice(),!(t<i)){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,i));case 2:if(l){o.n=3;break}return Yi.warn(`Max retries reached for ConflictError. ${n.message}`),this.setInMemoryAnonymousMode(!0),o.a(2,this.initAndFetchRequiredData(e,0,i));case 3:throw n;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){v.n=2;break}return v.n=2,a(f);case 2:f.then(()=>this.reRenderPaywall());case 3:return v.a(2)}},null,this,null,Promise)}},{key:"fetchCampaignsAndPaywalls",value:function(){var e,t,i,n,r,o,s,u,l,d,h,c;return k(function(m){for(;;)switch(m.n){case 0:return e=Tu.instance,t=Du.instance,i=Date.now(),n=Date.now(),m.n=1,a(e.fetchCampaignRulesRaw());case 1:return r=m.v,o=Date.now()-n,m.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,i;return k(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,a(fetch(e.flow.url,{cache:"no-cache"}));case 1:if(!(t=n.v).ok){n.n=3;break}return n.n=2,a(t.json());case 2:e.flow.object=n.v,n.n=4;break;case 3:Yi.warn(`Failed to fetch flow object from ${e.flow.url}: ${t.status}`);case 4:n.n=6;break;case 5:n.p=5,i=n.v,Yi.warn(`Error fetching flow object from ${e.flow.url}: ${i}`);case 6:return n.a(2)}},null,null,[[0,5]],Promise)})));case 2:if(s=!e.useLegacyPaywallFetch&&Tu.hasPaywallUrls(r),l=Date.now(),!s){m.n=4;break}return d=Tu.extractPaywallUrls(r),m.n=3,a(t.fetchPaywallsByUrls(d));case 3:u=m.v,m.n=6;break;case 4:return m.n=5,a(t.fetchPaywalls());case 5:u=m.v;case 6:return h=Date.now()-l,c=Date.now()-i,Yi.info(`Paywall fetch telemetry: strategy=${s?"individual":"bulk"}, count=${u.length}, total=${c}ms, campaigns=${o}ms, paywalls=${h}ms`),m.a(2,e.finalizeCampaignRules(r,u))}},null,null,null,Promise)}},{key:"reRenderPaywall",value:function(){de().ui.reRenderPaywall()}}])}();function cd(e){return Array.isArray(e)?e.map(cd):e&&"object"==typeof e?Object.entries(e).reduce((e,[t,i])=>(void 0!==i&&(e[t]=cd(i)),e),{}):e}function md(e,t){return Mu(cd(e),cd(t))}hd.instance=new hd;var fd,vd=function(){function e(){o(this,e),dd.set(this,!1),this.maxLogging=!1}return h(e,[{key:"isInitialized",get:function(){return ce(this,dd,"f")||null!=Er.getNamiConfig()}},{key:"initializeSDK",value:function(t){var i,n,r,o,s,u,l,d,h,c;return k(function(f){for(;;)switch(f.n){case 0:if(o=!1,s=!1,u=ce(this,dd,"f")?Er.getNamiConfig():null,Yi.setLogger(t.logLevel),e.instance.maxLogging=null!==(i=t.maxLogging)&&void 0!==i&&i,null===u){f.n=3;break}if(delete(l=m({},t)).initialConfig,!md(l,u)){f.n=1;break}return Yi.warn("Nami SDK is already configured, ignoring this configure call."),f.a(2,{sdkInitialized:!0,configureState:Di});case 1:s=!0;case 2:d=ps(t.namiCommands),h=ps(u.namiCommands),t.appPlatformID==u.appPlatformID&&d==h||(o=!0),t.namiLanguageCode===u.namiLanguageCode&&t.logLevel==u.logLevel||(s=!0);case 3:return o&&(Yi.info("SDK full reconfigure called"),Er.resetDevice()),me(this,dd,!0),As.configure(t),f.n=4,a(hd.instance.init(t));case 4:return Yi.info("SDK successfully initialized!"),c=s||o?_i:Ti,null===(n=(r=de().ui).postConfigure)||void 0===n||n.call(r),f.a(2,{sdkInitialized:!0,configureState:c})}},null,this,null,Promise)}}],[{key:"sdkVersion",value:function(){return ye}},{key:"sdkPackageVersion",value:function(){return we}},{key:"reset",value:function(){return k(function(t){for(;;)switch(t.n){case 0:Er.clearAll(),Iu(),me(e.instance,dd,!1);case 1:return t.a(2)}},null,null,null,Promise)}},{key:"configure",value:function(t){return k(function(i){for(;;)switch(i.n){case 0:if(t.appPlatformID){i.n=1;break}throw new Ar;case 1:return this.setInitialConfig(t),i.n=2,a(e.instance.initializeSDK(t));case 2:return i.a(2,i.v)}},null,this,null,Promise)}},{key:"setInitialConfig",value:function(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){Yi.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 Yi.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 i=Ss(e.initialConfig.initial_config);i?e.initialConfig=i:(e.initialConfig={},Yi.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}}])}();dd=new WeakMap,vd.instance=new vd,e.LaunchCampaignError=void 0,(fd=e.LaunchCampaignError||(e.LaunchCampaignError={})).DEFAULT_CAMPAIGN_NOT_FOUND="Default campaign not found",fd.LABELED_CAMPAIGN_NOT_FOUND="Labeled campaign not found",fd.CAMPAIGN_DATA_NOT_FOUND="Campaign data not found",fd.PAYWALL_ALREADY_DISPLAYED="Paywall is already being displayed",fd.SDK_NOT_INITIALIZED="SDK has not been initialized",fd.PAYWALL_COULD_NOT_DISPLAY="Failed to display paywall",fd.URL_CAMPAIGN_NOT_FOUND="URL campaign not found",fd.PRODUCT_DATA_NOT_FOUND="Product data not found",fd.PRODUCT_GROUPS_NOT_FOUND="Product groups not found",fd.FLOW_SCREEN_DATA_UNAVILABLE="Flow unavailable due to missing screen data";var pd,gd,yd=new Set(["fullscreen","sheet","compact_sheet","modal"]);e.NamiPaywallManagerEvents=void 0,(pd=e.NamiPaywallManagerEvents||(e.NamiPaywallManagerEvents={})).BuySku="RegisterBuySKU",pd.Close="PaywallCloseRequested",pd.SignIn="PaywallSignInRequested",pd.Restore="PaywallRestoreRequested",pd.DeeplinkAction="PaywallDeeplinkAction",e.NamiPaywallAction=void 0,(gd=e.NamiPaywallAction||(e.NamiPaywallAction={})).BUY_SKU="BUY_SKU",gd.SELECT_SKU="SELECT_SKU",gd.RESTORE_PURCHASES="RESTORE_PURCHASES",gd.SIGN_IN="SIGN_IN",gd.CLOSE_PAYWALL="CLOSE_PAYWALL",gd.SHOW_PAYWALL="SHOW_PAYWALL",gd.PURCHASE_SELECTED_SKU="PURCHASE_SELECTED_SKU",gd.PURCHASE_SUCCESS="PURCHASE_SUCCESS",gd.PURCHASE_FAILED="PURCHASE_FAILED",gd.PURCHASE_CANCELLED="PURCHASE_CANCELLED",gd.PURCHASE_PENDING="PURCHASE_PENDING",gd.PURCHASE_UNKNOWN="PURCHASE_UNKNOWN",gd.PURCHASE_DEFERRED="PURCHASE_DEFERRED",gd.DEEPLINK="DEEPLINK",gd.TOGGLE_CHANGE="TOGGLE_CHANGE",gd.PAGE_CHANGE="PAGE_CHANGE",gd.SLIDE_CHANGE="SLIDE_CHANGE",gd.COLLAPSIBLE_DRAWER_OPEN="COLLAPSIBLE_DRAWER_OPEN",gd.COLLAPSIBLE_DRAWER_CLOSE="COLLAPSIBLE_DRAWER_CLOSE",gd.VIDEO_STARTED="VIDEO_STARTED",gd.VIDEO_PAUSED="VIDEO_PAUSED",gd.VIDEO_RESUMED="VIDEO_RESUMED",gd.VIDEO_ENDED="VIDEO_ENDED",gd.VIDEO_CHANGED="VIDEO_CHANGED",gd.VIDEO_MUTED="VIDEO_MUTED",gd.VIDEO_UNMUTED="VIDEO_UNMUTED",gd.COUNTDOWN_TIMER_COMPLETED="COUNTDOWN_TIMER_COMPLETED",gd.UNKNOWN="UNKNOWN";var bd,wd="entry",kd="screen",Sd="branch",Ed="exit",Pd="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"}(bd||(bd={}));var Td="__handoff_sequence__",Md="__buy_sku__",_d="__default__",Ad="__appear__",Dd="__disappear__",xd="__login_success__",Cd="__login_failure__",Id="__logout_success__",Ld="__logout_failure__",Rd="__purchase_success__",Fd="__remoteback__",Od="__tag_update__",Nd="and",$d="or",Wd="i_contains",jd="equals",Bd="i_equals",zd="not_equals",Ud="not_i_equals",Hd="not_contains",Gd="set",Vd="notSet",Kd=function(){function e(){o(this,e),this.resolvers=new Map,this.namespaceResolvers=new Map}return h(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,i=null!==(t=e.filter)&&void 0!==t?t:[];if(0===i.length)return!0;var n=i.map(e=>this.evaluateFilter(e));switch(e.operator){case Nd:return n.every(e=>e);case $d:return n.some(e=>e);default:return n.every(e=>e)}}},{key:"evaluateOrdered",value:function(e){var t;if(!e)return!0;var i=null!==(t=e.filter)&&void 0!==t?t:[];if(0===i.length)return!0;switch(e.operator){case Nd:for(var n,a=c(i);!(n=a()).done;){var r=n.value;if(!this.evaluateFilter(r))return!1}return!0;case $d:for(var o,s=c(i);!(o=s()).done;){var u=o.value;if(this.evaluateFilter(u))return!0}return!1;default:for(var l,d=c(i);!(l=d()).done;){var h=l.value;if(!this.evaluateFilter(h))return!1}return!0}}},{key:"evaluateFilter",value:function(e){var t=this.resolve(e.identifier);if(vd.instance.maxLogging&&Yi.debug(`[NamiConditionEvaluator] resolve(${e.identifier}) → ${JSON.stringify(t)} (type: ${typeof t})`),e.operator===Gd)return null!=t;if(e.operator===Vd)return null==t;if(null==t)return vd.instance.maxLogging&&Yi.debug(`[NamiConditionEvaluator] ${e.identifier} resolved to null — registeredNamespaces: [${[...this.namespaceResolvers.keys()].join(", ")}]`),!![zd,Ud,Hd].includes(e.operator);switch(e.operator){case Wd: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 jd:return e.values.some(e=>{if("string"==typeof t)return t===e;if("boolean"==typeof t){var i="true"===e.toLowerCase();return t===i}return this.log("Unsupported type for equals comparison: "+typeof t),!1});case Bd:return e.values.some(e=>{if("string"==typeof t)return 0===t.localeCompare(e,void 0,{sensitivity:"accent"});if("boolean"==typeof t){var i="true"===e.toLowerCase();return t===i}return this.log("Unsupported type for i_equals comparison: "+typeof t),!1});case zd:return e.values.every(e=>"string"!=typeof t||t!==e);case Ud:return e.values.every(e=>"string"!=typeof t||0!==t.localeCompare(e,void 0,{sensitivity:"accent"}));case Hd: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 vd.instance.maxLogging&&Yi.debug(`[NamiConditionEvaluator] resolve(${e}) — exact hit: ${JSON.stringify(t)}`),t;var i=e.lastIndexOf(".");if(-1===i);else{var n=e.slice(0,i),a=e.slice(i+1),r=this.resolveRaw(n);if(void 0!==r){var o=this.extractProperty(a,r);return vd.instance.maxLogging&&Yi.debug(`[NamiConditionEvaluator] resolve(${e}) — fallback: base=${n} → ${typeof r}, extract(.${a}) → ${JSON.stringify(o)}`),o}this.log(`Could not resolve base identifier: ${n}`)}}},{key:"resolveRaw",value:function(e){for(var t,i=[...this.namespaceResolvers.keys()].sort((e,t)=>t.length-e.length),n=c(i);!(t=n()).done;){var a=t.value;if(e.startsWith(a)){var r=this.namespaceResolvers.get(a);if(r){var o=r(e);return vd.instance.maxLogging&&Yi.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){Yi.debug(`[NamiConditionEvaluator] ${e}`)}}],[{key:"shared",get:function(){return e.instance||(e.instance=new e),e.instance}}])}(),Xd=function(){return h(function e(){o(this,e)},[{key:"register",value:function(){Kd.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 i,n=t,a=c(e.replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean));!(i=a()).done;){var r=i.value;if(null==n||"object"!=typeof n)return;n=n[r]}return n}}])}(),Yd=function(e){function t(e){var i;return o(this,t),(i=r(this,t)).namespace="LaunchContext",i.context=e,i.register(),i}return p(t,e),h(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 i=e.substring(13);return this.resolveKeyPath(i,this.context.customObject)}return this.resolveKeyPath(e,{customAttributes:this.context.customAttributes,customObject:this.context.customObject,productGroups:this.context.productGroups})}}])}(Xd),qd=function(e){function t(){var e,i,n,a;o(this,t),(a=r(this,t)).namespace="Device";var s=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[1]||"",u=Intl.DateTimeFormat().resolvedOptions().timeZone,l=Ks(),d=de().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!==(i=l.form_factor)&&void 0!==i?i:"desktop",d),screenSize:a.screenSizeTier(null!==(n=l.form_factor)&&void 0!==n?n:"desktop",d),language:l.language,country:s,timezone:u},a.register(),a}return p(t,e),h(t,[{key:"screenSizeTier",value:function(e,t){var i=Math.round(t.width*t.scale),n=Math.round(t.height*t.scale),a=Math.max(i,n);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 i=Math.round(t.width*t.scale),n=Math.round(t.height*t.scale),a=Math.max(i,n),r=Math.min(i,n);return a>=3840||r>=2160?"4K":a>=1920||r>=1080?"1080p":"720p"}},{key:"tvResolution",value:function(e,t){if("television"!==e)return"";var i=Math.round(t.width*t.scale),n=Math.round(t.height*t.scale),a=Math.max(i,n),r=Math.min(i,n);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)}}])}(Xd),Jd=[/(^|_)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],Qd=function(){function e(){o(this,e),this.params={},"undefined"!=typeof window&&this.setSearchParams()}return h(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={},i=new Set;try{for(var n,a=new URLSearchParams(e.search),r=(e,n)=>{var a=(e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[-\s]/g,"_").toLowerCase())(e);if(!(i.size>=10||(e=>Jd.some(t=>t.test(e)))(a))){var r=this.safeValue(n);r&&(t[a]=r,i.add(a))}},o=c(a.entries());!(n=o()).done;){var s=n.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()}}])}();Qd._instance=null;var Zd,eh=()=>Qd.instance.params,th=/\{\{\s*([^}]+?)\s*\}\}/g,ih=function(){return h(function e(t){o(this,e),this.flowManager=t,this.urlParams=eh()},[{key:"resolve",value:function(e){var t,i,n,a,r,o,s,u,l,d,h,c,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 Yd(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===(i=f.campaign)||void 0===i?void 0:i.name;case"campaignLabel":case"campaignPlacement":return null!==(n=null==f||null===(a=f.campaign)||void 0===a?void 0:a.value)&&void 0!==n?n: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===(h=m.currentFlowStep)||void 0===h?void 0:h.name;case"buttonText":return null==m||null===(c=m.currentButton)||void 0===c?void 0:c.firstTextValue();case"slideNumber":var b=null==f?void 0:f.getSelectedSlideIndexForCurrentCarousel();return null!=b?`${b+1}`:void 0;default:return}}},{key:"interpolateLiquidVariables",value:function(e){return e.replace(th,(e,t)=>{var i,n=null!==(i=this.resolve(t))&&void 0!==i?i:this.urlParams[t];return null!=n?n:""})}},{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,i])=>m({},e,{[t]:this.interpolateDeep(i)}),{}):e}}])}(),nh=function(e){function t(){var e;return o(this,t),(e=r(this,t)).namespace="urlParams",e.context=eh(),e.register(),e}return p(t,e),h(t,[{key:"resolveValue",value:function(e){return Yi.debug("[URLParamsResolver]","Resolving keyPath",e),this.resolveKeyPath(e,this.context)}}])}(Xd),ah=function(e){function t(){var e;return o(this,t),(e=r(this,t)).namespace="state",e.register(),e}return p(t,e),h(t,[{key:"getContextProvider",value:function(){var e=nd.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 i=e.substring(11);return t.getCurrentFormId(i)}return this.resolveKeyPath(e,t.state)}}}])}(Xd),rh=function(e){function t(e){var i;return o(this,t),(i=r(this,t)).namespace="Placement",i.campaign=e,i.register(),i}return p(t,e),h(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 i=nd.providers;if(0!==i.length){var n=i.find(e=>e.flow);return n?n.getCurrentPlacementLabel():null===(t=i[i.length-1])||void 0===t?void 0:t.getCurrentPlacementLabel()}}}}])}(Xd),oh=function(){return h(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?Er.setNamiProfile({externalId:this.externalId}):Er.removeNamiProfile(),this}},{key:"load",value:function(){var e=Er.getNamiProfile();e&&(this.externalId=e.externalId),nd.setIsLoggedIn(!!this.externalId)}},{key:"login",value:function(e){var t;return k(function(i){for(;;)switch(i.n){case 0:return i.n=1,a(As.instance.login(e));case 1:(t=i.v).external_id&&nd.setIsLoggedIn(!0),this.setExternalId(t.external_id).save();case 2:return i.a(2)}},null,this,null,Promise)}},{key:"logout",value:function(){return k(function(e){for(;;)switch(e.n){case 0:return e.n=1,a(As.instance.logout());case 1:nd.setIsLoggedIn(!1),this.setExternalId(void 0).save();case 2:return e.a(2)}},null,this,null,Promise)}}])}();oh.instance=new oh,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"}(Zd||(Zd={}));var sh=function(){function e(){o(this,e),this.flowOpen=!1,this.lastAnimatedFlowProgress=new Map,this.navGraphCache=new WeakMap}return h(e,[{key:"resume",value:function(){e.resume()}},{key:"presentFlow",value:function(e,t,i){var n=new dh(e,t,this,i);return this.flowOpen=!0,this.currentFlow=n,n}},{key:"finishFlow",value:function(){vd.instance.maxLogging&&Yi.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===kd);if(0===t.length)return 0;var i=this.currentFlow.stepcrumbs.filter(e=>e.type===kd);if(0===i.length)return 0;var n=this.buildNavGraph(this.currentFlow),a=this.currentFlow.currentFlowStep,r=this.findBranchPoint(t,n),o=0;if(r)o=this.calculateBranchingProgress(i,t,a,r,n);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 i,n=c(e);!(i=n()).done;){var a=i.value;if(this.hasBranching(a,e,t))return a}return null}},{key:"calculateBranchingProgress",value:function(e,t,i,n,a){var r=e.length,o=t.findIndex(e=>e.id===n.id),s=e.findIndex(e=>e.id===n.id),u=t.findIndex(e=>e.id===i.id);if(-1===s||i.id===n.id)return(u+1)/(o+2);var l=this.countForwardScreens(i,t,a),d=r+l;return Yi.debug(`Branching progress: visited=${r}, remaining=${l}, total=${d}, step=${i.id}`),r/d}},{key:"countForwardScreens",value:function(e,t,i){var n=t.findIndex(t=>t.id===e.id);if(-1===n)return 0;var a=new Set,r=0,o=(e,s)=>{if(!a.has(e)){a.add(e);var u=(i.get(e)||[]).filter(e=>{var i=t.findIndex(t=>t.id===e);return i>n});if(0!==u.length)for(var l,d=c(u);!(l=d()).done;){var h=l.value;o(h,s+1)}else r=Math.max(r,s)}};return o(e.id,0),r}},{key:"hasBranching",value:function(e,t,i){var n=t.findIndex(t=>t.id===e.id);if(-1===n)return!1;var a=(i.get(e.id)||[]).filter(e=>{var i=t.findIndex(t=>t.id===e);return i>n});return a.length>1}},{key:"buildNavGraph",value:function(e){var t=this.navGraphCache.get(e);if(t)return t;var i=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 n,a=null===(n=t.parameters)||void 0===n?void 0:n.step;a&&(i.has(e.id)||i.set(e.id,new Set),i.get(e.id).add(a))}})})})});var n=new Map;return i.forEach((e,t)=>{n.set(t,Array.from(e))}),this.navGraphCache.set(e,n),n}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){var e,t,i=null===(e=this.currentFlow)||void 0===e?void 0:e.currentFlowStep;if(!i)return null;var n=null===(t=i.actions)||void 0===t?void 0:t[Ad];if(!n)return null;for(var a,r=c(n);!(a=r()).done;)for(var o,s,u=c(null!==(o=a.value.action)&&void 0!==o?o:[]);!(s=u()).done;){var l,d=s.value;if((d.function===bd.NAVIGATE||d.function===bd.NEXT)&&null!=(null===(l=d.parameters)||void 0===l?void 0:l.delay)){var h=d.parameters.delay,m=Number(h);if(!isNaN(m)&&m>0)return m/1e3}}return null}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"registerStepHandoff",value:function(e){this.instance.handoffStepHandler=e}},{key:"registerEventHandler",value:function(e){this.instance.eventHandler=e}},{key:"resume",value:function(){var t,i,n,a=e.instance,r=a.flowOpen,o=a.currentFlow;vd.instance.maxLogging&&Yi.debug(`[NamiFlowManager] resume() — flowOpen=${r}, hasFlow=${!!o}, currentStep=${null!==(t=null==o||null===(i=o.currentFlowStep)||void 0===i?void 0:i.id)&&void 0!==t?t:"none"}, isPaused=${null!==(n=null==o?void 0:o.isPaused)&&void 0!==n?n:"N/A"}`);if(r&&o&&o.currentFlowStep){if(o.activeHandoffSequence)return Yi.debug(`Resuming flow at handoff sequence ${o.currentFlowStep.id}`),void o.resumeNextHandoff();Yi.debug(`Resuming flow at step ${o.currentFlowStep.id}`),o.executeLifecycle(o.currentFlowStep,"__resume__")}else Yi.warn("Cannot resume: no active flow or current step")}},{key:"finish",value:function(){var t=e.instance,i=t.flowOpen,n=t.currentFlow;i&&n&&n.currentFlowStep?(Yi.debug(`Finishing flow programmatically at step ${n.currentFlowStep.id}`),n.finished()):Yi.debug("Cannot finish: no active flow or current step")}},{key:"pause",value:function(){var t=e.instance,i=t.flowOpen,n=t.currentFlow;i&&n&&n.currentFlowStep?!0===n.resumeFromBookmark?n.pause():Yi.warn("This flow cannot be paused"):Yi.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()}}])}(),uh=function(){return h(function e(){o(this,e),this.emitter=Pu.getInstance(),Kd.shared.registerNamespaceResolver("UserTags",t=>{var i=t.replace("UserTags.",""),n=e.getCustomerAttribute(i);if(null!=n){var a=n.toLowerCase();return"true"===a||"false"===a?"true"===a:isNaN(Number(n))?n:parseInt(n,10)}return null})},[{key:"isSDKInitialized",get:function(){return vd.instance.isInitialized}}],[{key:"isLoggedIn",value:function(){return oh.instance.isLoggedIn()}},{key:"loggedInId",value:function(){return this.instance.isSDKInitialized||Yi.debug(Ae),oh.instance.getExternalId()}},{key:"login",value:function(e){var t,i,n,r,o,s,u;return k(function(l){for(;;)switch(l.p=l.n){case 0:if(this.instance.isSDKInitialized){l.n=1;break}throw t=new _r,this.invokeStateHandler(Zd.LOGIN,!1,t),t;case 1:if(!this.inAnonymousMode()){l.n=2;break}throw i=new Fr,this.invokeStateHandler(Zd.LOGIN,!1,i),i;case 2:return l.p=2,l.n=3,a(oh.instance.login(e));case 3:return l.n=4,a(ud.instance.fetchActiveEntitlements());case 4:this.invokeStateHandler(Zd.LOGIN,!0),sh.instance.flowOpen&&(n=sh.instance.currentFlow,(r=null==n?void 0:n.currentFlowStep)&&(vd.instance.maxLogging&&Yi.debug(`[NamiCustomerManager] login success — triggering __login_success__ on step ${r.id}`),n.executeLifecycle(r,xd))),l.n=6;break;case 5:throw l.p=5,u=l.v,this.invokeStateHandler(Zd.LOGIN,!1,u),sh.instance.flowOpen&&(o=sh.instance.currentFlow,(s=null==o?void 0:o.currentFlowStep)&&(vd.instance.maxLogging&&Yi.debug(`[NamiCustomerManager] login failure — triggering __login_failure__ on step ${s.id}`),o.executeLifecycle(s,Cd))),u;case 6:return l.a(2)}},null,this,[[2,5]],Promise)}},{key:"logout",value:function(){var e,t,i,n,r,o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:if(this.instance.isSDKInitialized){u.n=1;break}throw e=new _r,this.invokeStateHandler(Zd.LOGOUT,!1,e),e;case 1:if(!this.inAnonymousMode()){u.n=2;break}throw t=new Fr,this.invokeStateHandler(Zd.LOGOUT,!1,t),t;case 2:return u.p=2,u.n=3,a(oh.instance.logout());case 3:return u.n=4,a(ud.instance.fetchActiveEntitlements());case 4:this.invokeStateHandler(Zd.LOGOUT,!0),sh.instance.flowOpen&&(i=sh.instance.currentFlow,(n=null==i?void 0:i.currentFlowStep)&&i.executeLifecycle(n,Id)),u.n=6;break;case 5:throw u.p=5,s=u.v,this.invokeStateHandler(Zd.LOGOUT,!1,s),sh.instance.flowOpen&&(r=sh.instance.currentFlow,(o=null==r?void 0:r.currentFlowStep)&&r.executeLifecycle(o,Ld)),s;case 6:return u.a(2)}},null,this,[[2,5]],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,i,n,r,o;return k(function(s){for(;;)switch(s.n){case 0:if(t=e?Zd.ANONYMOUS_MODE_ON:Zd.ANONYMOUS_MODE_OFF,this.instance.isSDKInitialized){s.n=1;break}throw i=new _r,this.invokeStateHandler(t,!1,i),i;case 1:if(this.anonymousModeCapability()){s.n=2;break}return Yi.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 n=e?new Lr:new Rr,this.invokeStateHandler(t,!1,n),s.a(2);case 3:if(!e){s.n=4;break}Er.setAnonymousMode(e),Er.resetDevice(),this.refetchConfig(),this.invokeStateHandler(Zd.ANONYMOUS_MODE_ON,!0),s.n=6;break;case 4:return Er.clearAnonymousMode(),Iu(),o=null===(r=Er.getNamiConfig())||void 0===r?void 0:r.namiCommands,s.n=5,a(_u.instance.createOrUpdateDevice(Ks(o)));case 5:Er.clearAnonymousUUID(),this.refetchConfig(),this.invokeStateHandler(Zd.ANONYMOUS_MODE_OFF,!0);case 6:return s.a(2)}},null,this,null,Promise)}},{key:"inAnonymousMode",value:function(){return!!this.instance.isSDKInitialized&&Lu()}},{key:"setCustomerAttribute",value:function(e,t){if(!this.instance.isSDKInitialized)throw new _r;if(Er.setCustomerAttribute(e,t),gs(fe.PAYWALL_PERSONALIZATION)?(nd.setCustomerAttribute({[e]:t}),Yi.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):Yi.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.`),sh.instance.flowOpen){var i=sh.instance.currentFlow;if(i){var n=i.currentFlowStep;n&&i.executeLifecycle(n,Od)}}}},{key:"getCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new _r;var t=Er.getCustomerAttribute(e);return null!=t?gs(fe.PAYWALL_PERSONALIZATION)?Yi.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):Yi.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.`):Yi.warn(`No ${e} customer attribute found.`),t}},{key:"getAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new _r;return Er.getAllCustomerAttributes()}},{key:"clearCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new _r;Er.clearCustomerAttribute(e)?(nd.removeCustomerAttribute(e),Yi.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.`)):Yi.warn(`No value to clear for attribute ${e}.`)}},{key:"clearAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new _r;Er.getAllCustomerAttributesKeys().forEach(e=>{nd.removeCustomerAttribute(e)}),Er.clearAllCustomerAttributes(),Yi.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 _r;return Er.getCustomerJourneyState()}},{key:"deviceId",value:function(){var e,t;return this.instance.isSDKInitialized&&null!==(e=null===(t=Er.getDevice())||void 0===t?void 0:t.id)&&void 0!==e?e:je}},{key:"registerJourneyStateHandler",value:function(e){if(bs("NamiCustomerManager.registerJourneyStateHandler"))return this.instance.emitter.addListener(Ni,e),()=>{this.instance.emitter.removeListener(Ni,e)}}},{key:"invokeStateHandler",value:function(e,t,i){this.instance.emitter.emit("accountStateChange",e,t,i)}},{key:"updateCustomerDataPlatformId",value:function(e){var t,i,n,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:if(this.instance.isSDKInitialized){o.n=1;break}throw t=new _r,this.invokeStateHandler(Zd.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(_u.instance.updateDeviceField("customer_data_platform_id",e));case 3:this.invokeStateHandler(Zd.CUSTOMER_DATA_PLATFORM_ID_SET,!0),o.n=5;break;case 4:o.p=4,r=o.v,this.invokeStateHandler(Zd.CUSTOMER_DATA_PLATFORM_ID_SET,!1,r);case 5:o.n=7;break;case 6:return Yi.info("Unable to set CDP ID in anonymous mode",{deviceId:null===(i=Er.getDevice())||void 0===i?void 0:i.id,anonymousMode:!0}),n=new Or,this.invokeStateHandler(Zd.CUSTOMER_DATA_PLATFORM_ID_SET,!1,n),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=gs(fe.ANONYMOUS_MODE_CAPABILITY),t=gs(fe.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([Au.instance.fetchProducts(),Du.instance.fetchPaywalls().then(e=>Tu.instance.fetchCampaignRules(e))]));case 1:return e.a(2)}},null,this,null,Promise)}}])}();uh.instance=new uh;var lh=function(){return h(function e(t={}){var i,n,a,r,s;o(this,e),this.id=null!==(i=t.id)&&void 0!==i?i:"",this.name=null!==(n=t.name)&&void 0!==n?n:"",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&&Rs(this.screens)}}])}(),dh=function(e){function t(e,i,n,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=i,u.context=a,u.manager=n,u.branchcrumbs=[],u.stepcrumbs=[],u.registerResolvers(a);var l=u.findStepByType(wd);return l&&u.forward(l.id),u}return p(t,e),h(t,[{key:"registerResolvers",value:function(e){e&&new Yd(e),new qd,new nh,new ah,new rh(this.campaign),Kd.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,i=!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to),n=this.stepcrumbs.slice(0,-1).some(e=>"screen"===e.type);return t&&i&&n}},{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){vd.instance.maxLogging&&Yi.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(){this.previousStepAvailable?this.backToPreviousScreenStep():Yi.debug("No previous step available")}},{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 i=this.stepcrumbs[t];if(this.stepcrumbs.pop(),"branch"===i.type&&this.branchcrumbs.length>0&&this.branchcrumbs.pop(),"screen"===i.type&&i.screen){var n,a,r=Ls(i.screen);return r&&de().ui.flowNavigateToScreen(r,{transition:this.transition,direction:"backward"}),void(this.currentScreenState=null!==(n=null===(a=nd.currentProvider)||void 0===a?void 0:a.state)&&void 0!==n?n:null)}}Yi.warn("No previous screen step found to return to")}else Yi.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 wd:case Ed:return this.stepcrumbs.push(t),void this.executeLifecycle(t,_d);case Sd:return void this.handleBranchStep(t);case kd:return void this.handleScreenStep(t);case Pd:return}else this.flowLog(`forward(${e}) — step not active (branch_tags=${JSON.stringify(t.branch_tags)}, branchcrumbs=${JSON.stringify(this.branchcrumbs)})`);else Yi.error(`No step found with id: ${e}`)}},{key:"pause",value:function(){var e;this.isPaused?Yi.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}`),Yi.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}`),Yi.info(`Flow resumed from step ${e}`),this.forward(e)}else Yi.warn("No step to resume from");else Yi.info("Flow is not paused")}},{key:"executeLifecycle",value:function(e,t,i){var n=e.actions[t];n?(this.flowLog(`executeLifecycle(${t}) — step=${e.id}, isPaused=${this.isPaused}, ${n.length} lifecycle(s)`),this.executeFullLifecycles(n,i)):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;Yi.info(`No actions found for button ${e} on step ${this.currentFlowStep.id}`)}}},{key:"triggerActions",value:function(e,t,i){var n,a=this.lifecycles(e);a&&(this.flowLog(`triggerActions(${e}) — step=${null===(n=this.currentFlowStep)||void 0===n?void 0:n.id}, isPaused=${this.isPaused}`),this.currentButton=t,this.executeFullLifecycles(a,i))}},{key:"executeFullLifecycles",value:function(e,t){for(var i,n=this,a=function(){var e=i.value,a=["before","action","after"];[e.before,e.action,e.after].forEach((e,i)=>null==e?void 0:e.forEach(e=>{var r=n.shouldRun(e);n.flowLog(` ${a[i]}: ${e.function}${e.id?` (${e.id})`:""} — shouldRun=${r}`),r&&n.performAction(e,t)}))},r=c(e);!(i=r()).done;)a()}},{key:"triggerBeforeActions",value:function(e,t,i){var n=this.lifecycles(e);if(n){this.currentButton=t;for(var a,r=c(n);!(a=r()).done;){var o;null===(o=a.value.before)||void 0===o||o.forEach(e=>this.shouldRun(e)&&this.performAction(e,i))}}}},{key:"triggerAfterActions",value:function(e,t,i){var n=this.lifecycles(e);if(n){this.currentButton=t;for(var a,r=c(n);!(a=r()).done;){var o;null===(o=a.value.after)||void 0===o||o.forEach(e=>this.shouldRun(e)&&this.performAction(e,i))}}}},{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=Kd.shared.evaluate(e);if(vd.instance.maxLogging){var i,n,a,r=null!==(i=null===(n=e.filter)||void 0===n?void 0:n.map(e=>`${e.identifier} ${e.operator} ${JSON.stringify(e.values)}`).join(", "))&&void 0!==i?i:"none";Yi.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 i,n;if(this.currentFlowStep){var a=(null!==(i=e.parameters)&&void 0!==i&&i.delay?+e.parameters.delay:0)||0;this.flowLog(`performAction(${e.function}) — step=${this.currentFlowStep.id}, delay=${a}, params=${JSON.stringify(null!==(n=e.parameters)&&void 0!==n?n:{})}`);var r=i=>{var n,a,r,o,s,u,l,d;if((null===(n=this.currentFlowStep)||void 0===n?void 0:n.id)===i)switch(e.function){case bd.BACK:this.back();break;case bd.NEXT:null!==(a=e.parameters)&&void 0!==a&&a.step?this.forward(e.parameters.step):this.next();break;case bd.NAVIGATE:var h;if(null!==(r=e.parameters)&&void 0!==r&&r.step)(null===(h=this.previousFlowStep)||void 0===h?void 0:h.id)===e.parameters.step?this.back():this.forward(e.parameters.step);else this.next();break;case bd.FINISHED:case bd.DISMISS:this.finished();break;case bd.EXIT:var c=this.steps.find(e=>e.type===Ed);c&&this.forward(c.id);break;case bd.PAUSE:this.pause();break;case bd.RESUME:this.resumeFromPause();break;case bd.HANDOFF:if(null!==(o=e.parameters)&&void 0!==o&&o.handoffTag)if(this.manager.handoffStepHandler)if(e.parameters.handoffData)Yi.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(e.parameters.handoffData)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,e.parameters.handoffData);else if(t)Yi.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(t)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,t);else if(e.parameters.handoffFormId){var m=this.getFormData();e.parameters.handoffTag===Td?this.flowHandoffFormSequence():this.manager.handoffStepHandler(e.parameters.handoffTag,m)}else Yi.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} and no data`),this.manager.handoffStepHandler(e.parameters.handoffTag);else Yi.debug("No handoffStepHandler found",e);break;case bd.LOG:var f;if(null!==(s=e.parameters)&&void 0!==s&&s.eventName)Yi.info(`logEvent → ${e.parameters.eventName}`);else Yi.warn(`Missing 'eventName' in logEvent action ${null!==(f=e.id)&&void 0!==f?f:"unknown"}`);break;case bd.TRACK:var v;if(null!==(u=e.parameters)&&void 0!==u&&u.eventName)Yi.info(`trackEvent → ${e.parameters.eventName}`);else Yi.warn(`Missing 'eventName' in logEvent action ${null!==(v=e.id)&&void 0!==v?v:"unknown"}`);break;case bd.SET_VIDEO:null!==(l=e.parameters)&&void 0!==l&&l.name&&e.parameters.url?nd.setAppSuppliedVideoDetails({name:e.parameters.name,url:e.parameters.url}):Yi.warn("Missing name, url for setting video details");break;case bd.BLOCK_BACK:var p,g=null===(p=e.parameters)||void 0===p?void 0:p.step,y=g?this.getStep(g):void 0;y?y.allow_back_to=!1:this.currentFlowStep?this.currentFlowStep.allow_back_to=!1:Yi.warn("Missing step for blocking back");break;case bd.FLOW_EVENT:var b,w=new ih(this.manager),k=Object.fromEntries(Object.entries(null!==(b=e.parameters)&&void 0!==b?b:{}).map(([e,t])=>[e,w.interpolateDeep(t)]));this.manager.eventHandler?this.manager.eventHandler(k):Yi.warn("Missing event handler",k);break;case bd.FLOW_ENABLED:nd.setUserInteractionEnabled(!0);break;case bd.FLOW_DISABLED:nd.setUserInteractionEnabled(!1);break;case bd.SET_TAGS:e.parameters&&(nd.setUserTags(e.parameters),Object.entries(e.parameters).forEach(([e,t])=>{uh.setCustomerAttribute(e,t)}));break;default:Yi.warn(`Missing action handler for ${e.function}`,e)}else this.flowLog(`performAction(${e.function}) — SKIPPED stale step ${i}, current=${null===(d=this.currentFlowStep)||void 0===d?void 0:d.id}`)};a?setTimeout(r.bind(this,this.currentFlowStep.id),a):r(this.currentFlowStep.id)}else Yi.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 i,n=c(this.steps.slice(t+1));!(i=n()).done;){var a=i.value;if(this.isStepActive(a))return a}Yi.debug(`No active next step found after ${e.id}`)}else Yi.error(`Could not find next step for step ${e.id}`)}else Yi.error("Next step not found")}},{key:"handleScreenStep",value:function(e){var t,i=Ls(null!==(t=e.screen)&&void 0!==t?t:"");e.screen&&i&&this.campaign?(this.stepcrumbs.push(e),de().ui.flowNavigateToScreen(i,{transition:this.transition,direction:"forward"})):Yi.error("No paywall or campaign found for next step")}},{key:"handleBranchStep",value:function(e){this.stepcrumbs.push(e);for(var t=0,i=Object.entries(e.actions);t<i.length;t++){var n=i[t],a=n[0],r=n[1];if(r)for(var o,s=c(r);!(o=s()).done;){var u=o.value;if(u.action)for(var l,d=c(u.action);!(l=d()).done;){var h,m,f=l.value;if(this.shouldRun(f))return this.branchcrumbs.push(a),null===(h=u.before)||void 0===h||h.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 Yi.warn(`No actions defined for branch tag ${a}`)}}Yi.warn(`No matching branch condition matched for step ${e.id}`)}},{key:"getFormData",value:function(){var e,t;return m({},null!==(e=null===(t=nd.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 i=Object.keys(t).sort();if(0!==i.length){var n=i.filter(e=>!0===t[e]);if(0===n.length)return Yi.info("No eligible handoff keys after filtering"),void this.manager.resume();this.activeHandoffSequence={formStates:m({},t),remainingKeys:[...n]},this.resumeNextHandoff()}else Yi.warn("formStates is empty, no handoffs to perform")}else Yi.warn("No formStates available for handoff sequence")}},{key:"resumeNextHandoff",value:function(){var e,t,i=this.activeHandoffSequence;if(!i)return Yi.warn("No active handoff sequence to resume"),void this.manager.resume();if(0===i.remainingKeys.length)return Yi.info("All handoffs in the sequence are complete"),this.activeHandoffSequence=null,void this.manager.resume();var n=i.remainingKeys.shift(),a=i.formStates[n];Yi.debug(`Starting handoff for ${n} → ${String(a)}`),this.activeHandoffSequence=i;var r=`${n}`;null===(e=(t=this.manager).handoffStepHandler)||void 0===e||e.call(t,r,void 0)}}])}(lh),hh=function(){return h(function e(){o(this,e),this.emitter=Pu.getInstance()},[{key:"sdkInitialized",get:function(){return vd.instance.isInitialized}},{key:"campaignTypeAndLabel",value:function(t,i){var n,a="";return t&&!i&&iu(t)?(a=t,n=e.NamiCampaignRuleType.URL):t?(a=t,n=e.NamiCampaignRuleType.LABEL):i&&(a=i,n=e.NamiCampaignRuleType.URL),{type:n,value:a}}}],[{key:"allCampaigns",value:function(){if(!this.instance.sdkInitialized)throw new _r;return ru()}},{key:"isCampaignAvailable",value:function(e){if(!this.instance.sdkInitialized)throw new _r;var t=this.instance.campaignTypeAndLabel(e),i=t.type,n=t.value,a=du(n,i),r=a.campaign,o=a.paywall;return null!=r&&r.flow?new lh(r.flow.object).allScreensAvailable:Boolean(r&&o)}},{key:"isFlow",value:function(e,t){if(!this.instance.sdkInitialized)throw new _r;var i=this.instance.campaignTypeAndLabel(e,t),n=i.type,a=i.value;return Ds(du(a,n).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 _r;case 1:return ys(),e.n=2,a(hd.instance.fetchCampaignsAndPaywalls());case 2:return e.a(2,ru())}},null,this,null,Promise)}},{key:"registerAvailableCampaignsHandler",value:function(e){return this.instance.emitter.addListener(Ci,e),()=>{this.instance.emitter.removeListener(Ci,e)}}},{key:"launch",value:function(t,i,n,a,r){var o,s,u,l,d,h,c,f,v,p;a=null!=a?a:()=>{},n=null!=n?n:{customAttributes:{}};var g=this.instance.campaignTypeAndLabel(t,i),b=g.type,w=g.value;if(!this.instance.sdkInitialized)throw a(!1,e.LaunchCampaignError.SDK_NOT_INITIALIZED),new _r;var k,S=du(w,b),E=S.paywall,P=S.campaign;P&&(E||P.flow)||(k=t||i?t?e.LaunchCampaignError.LABELED_CAMPAIGN_NOT_FOUND:i?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:i?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!==(h=null==P?void 0:P.external_segment)&&void 0!==h?h:null,action:e.NamiPaywallAction.UNKNOWN},M=Er.getPurchaseChannel();M&&(T=m({},T,{purchaseChannel:M}));var _,A,D,x=null===(c=n)||void 0===c?void 0:c.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===(_=Er.getNamiConfig())||void 0===_?void 0:_.namiCommands,null!==(A=null==D?void 0:D.includes(ni))&&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 Cr;if(null!=P&&P.flow&&!Rs(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 Ir;var I=de().ui.createPaywall(b,w,n),L=Ys();return Er.setLaunchId(L),r&&this.instance.emitter.addListener(Li,t=>{var i=t.action,n=y(t,se);r(m({},T,n,{action:null!=i?i:e.NamiPaywallAction.UNKNOWN}))}),setTimeout(()=>a(!0),0),I}},{key:"getProductGroups",value:function(e,t){var i,n,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value;return null!==(i=null===(n=du(o,r).paywall)||void 0===n||null===(n=n.sku_menus)||void 0===n?void 0:n.map(e=>e.ref))&&void 0!==i?i:[]}},{key:"getAllProducts",value:function(e,t){var i,n,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value;return null!==(i=null===(n=du(o,r).paywall)||void 0===n||null===(n=n.sku_menus)||void 0===n?void 0:n.flatMap(e=>{var t,i;return null!==(t=null===(i=e.products)||void 0===i?void 0:i.map(e=>e.sku_ref_id))&&void 0!==t?t:[]}))&&void 0!==i?i:[]}},{key:"getCurrentProducts",value:function(e,t){var i,n,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value,s=du(o,r),u=nd.currentProvider,l=null==u?void 0:u.getCurrentGroupId();return l&&null!==(i=null===(n=s.paywall)||void 0===n||null===(n=n.sku_menus)||void 0===n?void 0:n.filter(e=>e.id===l).flatMap(e=>{var t,i;return null!==(t=null===(i=e.products)||void 0===i?void 0:i.map(e=>e.sku_ref_id))&&void 0!==t?t:[]}))&&void 0!==i?i:[]}}])}();hh.instance=new hh;var ch=e=>{var t;return k(function(i){for(;;)switch(i.p=i.n){case 0:if(!Lu()){i.n=1;break}return Yi.info("Skipping transaction post - anonymous mode"),i.a(2);case 1:return i.p=1,i.n=2,a(As.instance.postConversion(e));case 2:i.n=4;break;case 3:i.p=3,t=i.v,Yi.error("Error posting conversion",t);case 4:return i.a(2)}},null,null,[[1,3]],Promise)},mh=function(){return h(function e(){o(this,e),this.emitter=Pu.getInstance()},[{key:"sdkInitialized",get:function(){return vd.instance.isInitialized}}],[{key:"allPaywalls",value:function(){if(!this.instance.sdkInitialized)throw new _r;return Is()}},{key:"setProductDetails",value:function(e){this.instance.productDetails=e,nd.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 bs()&&Yi.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,i,n,r,o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:if(nd.setPurchaseInProgress(!1),sh.instance.flowOpen&&(t=sh.instance.currentFlow,i=null==t?void 0:t.currentFlowStep,t&&i&&t.executeLifecycle(i,Rd)),!uh.inAnonymousMode()){u.n=1;break}return Yi.debug("Skipping purchase validation - anonymous mode"),u.a(2);case 1:if(n=Er.getSessionId(),r=Er.getPurchaseImpression()){u.n=2;break}return Yi.debug("Not sending paywall conversion call complete due to unknown impression"),u.a(2);case 2:return u.p=2,u.n=3,a(ch({purchase_env:"production",app_env:"production",impression:r,session:n,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,Yi.error("Error posting conversion",o);case 5:if(gs(fe.THIRD_PARTY_TRANSACTIONS)){u.n=9;break}return u.p=6,u.n=7,a(As.instance.purchaseValidation({app_env:"production",payload:"",sku:e.skuId}));case 7:u.n=9;break;case 8:u.p=8,s=u.v,Yi.error("Error validating purchase",s);case 9:return u.a(2)}},null,null,[[6,8],[2,4]],Promise)}},{key:"buySkuCancel",value:function(){gs(fe.THIRD_PARTY_TRANSACTIONS)?nd.setPurchase(!1):Yi.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){iu(e)?(Yi.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received valid url ${e}`),nd.setAppSuppliedVideoDetails({url:e,name:t})):Yi.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received invalid url ${e}`)}},{key:"allowUserInteraction",value:function(e){Yi.debug(`NamiPaywallManager: allowUserInteraction called with ${e}`),nd.setUserInteractionEnabled(e)}}])}();mh.instance=new mh,mh.emitter=Pu.getInstance();var fh=function(){return h(function e(){o(this,e),this.emitter=Pu.getInstance()},[{key:"sdkInitialized",get:function(){return vd.instance.isInitialized}}],[{key:"active",value:function(){return bs(),rd()}},{key:"isEntitlementActive",value:function(e){return!!bs("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 _r;case 1:if(bs("NamiEntitlementManager.refresh")){e.n=2;break}return e.a(2,[]);case 2:return e.n=3,a(ud.instance.fetchActiveEntitlements());case 3:return e.a(2,rd())}},null,this,null,Promise)}},{key:"registerActiveEntitlementsHandler",value:function(e){if(bs("NamiEntitlementManager.registerActiveEntitlementsHandler"))return this.instance.emitter.addListener(Fi,e),()=>{this.instance.emitter.removeListener(Fi,e)}}},{key:"clearProvisionalEntitlementGrants",value:function(){var e=rd();e=e.filter(e=>e.expires&&e.expires>(new Date).valueOf()),Er.setNamiEntitlements(pt,e),this.instance.emitter.emit(Fi)}}])}();fh.instance=new fh,sh.registerStepHandoff.bind(sh),sh.registerEventHandler.bind(sh),sh.resume.bind(sh),sh.finish.bind(sh),sh.pause.bind(sh),sh.isFlowOpen.bind(sh);var vh,ph,gh={upperLeft:"border-top-left-radius",upperRight:"border-top-right-radius",lowerLeft:"border-bottom-left-radius",lowerRight:"border-bottom-right-radius"},yh={left:"border-left-style",right:"border-right-style",top:"border-top-style",bottom:"border-bottom-style"},bh="wave",wh="pulse",kh="none";function Sh(e){var t,i=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:[],n=i[0],a=i[1],r=i[2],o=i[3],s=i[4],u=i[5];return{semver:n,major:Number.parseInt(a)||3,minor:Number.parseInt(r)||0,patch:Number.parseInt(o)||0,prerelease:s,buildmetadata:u}}function Eh(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}(Sh(ye),e)>=0||Yi.warn(`Component ${t} requires SDK version ${e.semver} or higher, but current SDK version is ${ye}`))}function Ph(e){return!e||"object"==typeof e&&0==Object.keys(e).length}!function(e){e.DEFAULT="default",e.LABEL="label",e.URL="url"}(vh||(vh={})),function(e){e.DEEPLINK="deeplink",e.IN_APP="in_app"}(ph||(ph={})),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 Th=function(){return h(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 Mh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _h,Ah={exports:{}};var Dh=(_h||(_h=1,function(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=i(18),a=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},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 i=t[0],n=t[1];if(10===i)switch(n){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(i){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,i,n){void 0===n&&(n=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(i),o=Math.max(a,r),s=0,u=e.map([t,i],function(t){var i=o-e.getVersionPrecision(t),n=t+new Array(i+1).join(".0");return e.map(n.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(n&&(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 i,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n},e.find=function(e,t){var i,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,n=e.length;i<n;i+=1){var a=e[i];if(t(a,i))return a}},e.assign=function(e){for(var t,i,n=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){n[t]=e[t]})};for(t=0,i=r.length;t<i;t+=1)s();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=a,e.exports=t.default},18:function(e,t,i){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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(91))&&n.__esModule?n:{default:n},r=i(18);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){}var t,i,n;return e.getParser=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new a.default(e,t,i)},e.parse=function(e,t){return void 0===t&&(t=null),new a.default(e,t).getResult()},t=e,n=[{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}}],(i=null)&&o(t.prototype,i),n&&o(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=u(i(92)),a=u(i(93)),r=u(i(94)),o=u(i(95)),s=u(i(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var n=!1;"boolean"==typeof t?(n=t,this._hints=i):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==n&&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(),i=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return i?i.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(n.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,i={},n=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&&(i[t]=o,n+=1)}),n>0){var o=Object.keys(i),u=s.default.find(o,function(e){return t.isOS(e)});if(u){var l=this.satisfies(i[u]);if(void 0!==l)return l}var d=s.default.find(o,function(e){return t.isPlatform(e)});if(d){var h=this.satisfies(i[d]);if(void 0!==h)return h}}if(r>0){var c=Object.keys(a),m=s.default.find(c,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 i=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(n);return t&&a&&(n=a.toLowerCase()),n===i},t.compareVersion=function(e){var t=[0],i=e,n=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(n=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(n=!0,i=e.substr(1)),t.indexOf(s.default.compareVersions(a,i,n))>-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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},i=a.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},i=a.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},i=a.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},i=a.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},i=a.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},i=a.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},i=a.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},i=a.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},i=a.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},i=a.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},i=a.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},i=a.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},i=a.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},i=a.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},i=a.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},i=a.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},i=a.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},i=a.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},i=a.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},i=a.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),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"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=a.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=a.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=a.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=a.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=a.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},i=a.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=a.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},i=a.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),n=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),r=a.default.getFirstMatch(/se ([\d.]+)x/i,e),o=i||n||r;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=a.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var i={name:"DuckDuckGo"};if(t){var n=t.getBrandVersion("DuckDuckGo");if(n)return i.version=n,i}var r=a.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(i.version=r),i}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var i={name:"Brave"};if(t){var n=t.getBrandVersion("Brave");if(n)return i.version=n,i}return i}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=a.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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),i=a.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},i=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=a.default.getMacOSVersionName(t),n={name:r.OS_MAP.MacOS,version:t};return i&&(n.versionName=i),n}},{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),i=e.test(/android/i);return t&&i},describe:function(e){var t=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=a.default.getAndroidVersionName(t),n={name:r.OS_MAP.Android,version:t};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:r.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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",i={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{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),i=e.test(/like (ipod|iphone)/i);return t&&!i},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),i={type:r.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(i.model=t),i}},{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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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},i=a.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},i=a.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},i=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),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},i=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})}(Ah)),Ah.exports),xh=Mh(Dh),Ch={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},Ih={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4},Lh=function(){return h(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:ye,language:"en"};var t=xh.getParser(window.navigator.userAgent),i=t.getPlatform(),n={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:ye,language:window.navigator.language};if(i.type&&(n.form_factor=Ch[i.type]),i.model&&(n.device_model=i.model),e&&e.length>0){var a=(e=>{var t=e.find(e=>e.includes(Zt)),i={platform:"",version:""};if(t){var n=t.split(ti);i.platform=n[1],i.version=n[2]}return i})(e);n.extended_platform=a.platform,n.extended_platform_version=a.version}return n}},{key:"getDeviceFormFactor",value:function(){if("undefined"==typeof window)return"desktop";var e=xh.getParser(window.navigator.userAgent).getPlatform();return e.type&&Ch[e.type]||"desktop"}},{key:"getDeviceScaleFactor",value:function(e){var t;if(e||(e=this.getDeviceFormFactor()),"television"!==e)return 1;var i=window,n=i.innerWidth,a=i.innerHeight,r=n.toString()+"x"+a.toString();return null!==(t=Ih[r])&&void 0!==t?t:Math.min(n/1920,a/1080)||1}},{key:"getScreenInfo",value:function(){var e,t,i,n;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!==(i=null===(n=window.screen)||void 0===n?void 0:n.height)&&void 0!==i?i: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 Rh(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o}"function"==typeof SuppressedError&&SuppressedError;var Fh,Oh,Nh,$h=globalThis,Wh=$h.ShadowRoot&&(void 0===$h.ShadyCSS||$h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,jh=Symbol(),Bh=new WeakMap,zh=function(){return h(function e(t,i,n){if(o(this,e),this._$cssResult$=!0,n!==jh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Wh&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Bh.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Bh.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Uh=e=>new zh("string"==typeof e?e:e+"",void 0,jh),Hh=(e,...t)=>{var i=1===e.length?e[0]:t.reduce((t,i,n)=>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.")})(i)+e[n+1],e[0]);return new zh(i,e,jh)},Gh=Wh?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=c(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return Uh(i)})(e):e,Vh=Object.is,Kh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,Yh=Object.getOwnPropertyNames,qh=Object.getOwnPropertySymbols,Jh=Object.getPrototypeOf,Qh=globalThis,Zh=Qh.trustedTypes,ec=Zh?Zh.emptyScript:"",tc=Qh.reactiveElementPolyfillSupport,ic=(e,t)=>e,nc={toAttribute(e,t){switch(t){case Boolean:e=e?ec:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},ac=(e,t)=>!Vh(e,t),rc={attribute:!0,type:String,converter:nc,reflect:!1,useDefault:!1,hasChanged:ac};null!==(Fh=Symbol.metadata)&&void 0!==Fh||(Symbol.metadata=Symbol("metadata")),null!==(Oh=Qh.litPropertyMetadata)&&void 0!==Oh||(Qh.litPropertyMetadata=new WeakMap);var oc,sc=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),h(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,i;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.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,i=c(this.constructor.elementProperties.keys());!(e=i()).done;){var n=e.value;this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n])}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(Wh)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=c(t);!(i=n()).done;){var a=i.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,i){this._$AK(e,i)}},{key:"_$ET",value:function(e,t){var i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(void 0!==n&&!0===i.reflect){var a,r=(void 0!==(null===(a=i.converter)||void 0===a?void 0:a.toAttribute)?i.converter:nc).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var i=this.constructor,n=i._$Eh.get(e);if(void 0!==n&&this._$Em!==n){var a,r,o,s=i.getPropertyOptions(n),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:nc;this._$Em=n;var l=u.fromAttribute(t,s.type);this[n]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(n))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,i,n=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===n&&(a=this[e]),null!=i||(i=s.getPropertyOptions(e)),!((null!==(r=i.hasChanged)&&void 0!==r?r:ac)(a,t)||i.useDefault&&i.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:i,reflect:n,wrapped:a},r){var o,s,u;i&&!(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||i||(t=void 0),this._$AL.set(e,t)),!0===n&&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(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,a(this._$ES);case 2:i.n=4;break;case 3:i.p=3,t=i.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){i.n=5;break}return i.n=5,a(e);case 5:return i.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,i=c(this._$Ep);!(t=i()).done;){var n=t.value,a=n[0],r=n[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=c(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],m=h.wrapped,f=this[d];!0!==m||this._$AL.has(d)||void 0===f||this.C(d,void 0,h,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=rc){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 i=Symbol(),n=this.getPropertyDescriptor(e,i,t);void 0!==n&&Kh(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Xh(this.prototype,e))&&void 0!==n?n:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var n=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:rc}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(ic("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(ic("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ic("properties")))for(var e=this.properties,t=0,i=[...Yh(e),...qh(e)];t<i.length;t++){var n=i[t];this.createProperty(n,e[n])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=c(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 h,m=c(this.elementProperties);!(h=m()).done;){var f=h.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 i,n=c(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(Gh(a))}else void 0!==e&&t.push(Gh(e));return t}},{key:"_$Eu",value:function(e,t){var i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}}])}(_(HTMLElement));sc.elementStyles=[],sc.shadowRootOptions={mode:"open"},sc[ic("elementProperties")]=new Map,sc[ic("finalized")]=new Map,null!=tc&&tc({ReactiveElement:sc}),(null!==(Nh=Qh.reactiveElementVersions)&&void 0!==Nh?Nh:Qh.reactiveElementVersions=[]).push("2.1.2");var uc=globalThis,lc=e=>e,dc=uc.trustedTypes,hc=dc?dc.createPolicy("lit-html",{createHTML:e=>e}):void 0,cc="$lit$",mc=`lit$${Math.random().toFixed(9).slice(2)}$`,fc="?"+mc,vc=`<${fc}>`,pc=document,gc=()=>pc.createComment(""),yc=e=>null===e||"object"!=typeof e&&"function"!=typeof e,bc=Array.isArray,wc="[ \t\n\f\r]",kc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Sc=/-->/g,Ec=/>/g,Pc=RegExp(`>|${wc}(?:([^\\s"'>=/]+)(${wc}*=${wc}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Tc=/'/g,Mc=/"/g,_c=/^(?:script|style|textarea|title)$/i,Ac=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),Dc=Ac(1),xc=Ac(2),Cc=Symbol.for("lit-noChange"),Ic=Symbol.for("lit-nothing"),Lc=new WeakMap,Rc=pc.createTreeWalker(pc,129);function Fc(e,t){if(!bc(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==hc?hc.createHTML(t):t}var Oc=function(){return h(function e({strings:t,_$litType$:i},n){var a;o(this,e),this.parts=[];var r=0,s=0,u=t.length-1,l=this.parts,d=((e,t)=>{for(var i,n=e.length-1,a=[],r=2===t?"<svg>":3===t?"<math>":"",o=kc,s=0;s<n;s++){for(var u=e[s],l=void 0,d=void 0,h=-1,c=0;c<u.length&&(o.lastIndex=c,null!==(d=o.exec(u)));)c=o.lastIndex,o===kc?"!--"===d[1]?o=Sc:void 0!==d[1]?o=Ec:void 0!==d[2]?(_c.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=Pc):void 0!==d[3]&&(o=Pc):o===Pc?">"===d[0]?(o=null!=i?i:kc,h=-1):void 0===d[1]?h=-2:(h=o.lastIndex-d[2].length,l=d[1],o=void 0===d[3]?Pc:'"'===d[3]?Mc:Tc):o===Mc||o===Tc?o=Pc:o===Sc||o===Ec?o=kc:(o=Pc,i=void 0);var m=o===Pc&&e[s+1].startsWith("/>")?" ":"";r+=o===kc?u+vc:h>=0?(a.push(l),u.slice(0,h)+cc+u.slice(h)+mc+m):u+mc+(-2===h?s:m)}return[Fc(e,r+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),a]})(t,i),h=d[0],m=d[1];if(this.el=e.createElement(h,n),Rc.currentNode=this.el.content,2===i||3===i){var f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;null!==(a=Rc.nextNode())&&l.length<u;){if(1===a.nodeType){if(a.hasAttributes())for(var v,p=c(a.getAttributeNames());!(v=p()).done;){var g=v.value;if(g.endsWith(cc)){var y=m[s++],b=a.getAttribute(g).split(mc),w=/([.?@])?(.*)/.exec(y);l.push({type:1,index:r,name:w[2],strings:b,ctor:"."===w[1]?Bc:"?"===w[1]?zc:"@"===w[1]?Uc:jc}),a.removeAttribute(g)}else g.startsWith(mc)&&(l.push({type:6,index:r}),a.removeAttribute(g))}if(_c.test(a.tagName)){var k=a.textContent.split(mc),S=k.length-1;if(S>0){a.textContent=dc?dc.emptyScript:"";for(var E=0;E<S;E++)a.append(k[E],gc()),Rc.nextNode(),l.push({type:2,index:++r});a.append(k[S],gc())}}}else if(8===a.nodeType)if(a.data===fc)l.push({type:2,index:r});else for(var P=-1;-1!==(P=a.data.indexOf(mc,P+1));)l.push({type:7,index:r}),P+=mc.length-1;r++}},null,[{key:"createElement",value:function(e,t){var i=pc.createElement("template");return i.innerHTML=e,i}}])}();function Nc(e,t,i=e,n){var a,r,o,s,u;if(t===Cc)return t;var l=void 0!==n?null===(a=i._$Co)||void 0===a?void 0:a[n]:i._$Cl,d=yc(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,i,n),void 0!==n?(null!==(u=i._$Co)&&void 0!==u?u:i._$Co=[])[n]=l:i._$Cl=l),void 0!==l&&(t=Nc(e,l._$AS(e,t.values),l,n)),t}var $c=function(){return h(function e(t,i){o(this,e),this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i},[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(e){var t,i=this._$AD,n=i.el.content,a=i.parts,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:pc).importNode(n,!0);Rc.currentNode=r;for(var o=Rc.nextNode(),s=0,u=0,l=a[0];void 0!==l;){var d;if(s===l.index){var h=void 0;2===l.type?h=new Wc(o,o.nextSibling,this,e):1===l.type?h=new l.ctor(o,l.name,l.strings,this,e):6===l.type&&(h=new Hc(o,this,e)),this._$AV.push(h),l=a[++u]}s!==(null===(d=l)||void 0===d?void 0:d.index)&&(o=Rc.nextNode(),s++)}return Rc.currentNode=pc,r}},{key:"p",value:function(e){for(var t,i=0,n=c(this._$AV);!(t=n()).done;){var a=t.value;void 0!==a&&(void 0!==a.strings?(a._$AI(e,a,i),i+=a.strings.length-2):a._$AI(e[i])),i++}}}])}(),Wc=function(){return h(function e(t,i,n,a){var r;o(this,e),this.type=2,this._$AH=Ic,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=n,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,i=this._$AM;return void 0!==i&&11===(null===(e=t)||void 0===e?void 0:e.nodeType)&&(t=i.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(e,t=this){e=Nc(this,e,t),yc(e)?e===Ic||null==e||""===e?(this._$AH!==Ic&&this._$AR(),this._$AH=Ic):e!==this._$AH&&e!==Cc&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>bc(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!==Ic&&yc(this._$AH)?this._$AA.nextSibling.data=e:this.T(pc.createTextNode(e)),this._$AH=e}},{key:"$",value:function(e){var t,i=e.values,n=e._$litType$,a="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=Oc.createElement(Fc(n.h,n.h[0]),this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===a)this._$AH.p(i);else{var r=new $c(a,this),o=r.u(this.options);r.p(i),this.T(o),this._$AH=r}}},{key:"_$AC",value:function(e){var t=Lc.get(e.strings);return void 0===t&&Lc.set(e.strings,t=new Oc(e)),t}},{key:"k",value:function(e){bc(this._$AH)||(this._$AH=[],this._$AR());for(var t,i,n=this._$AH,a=0,r=c(e);!(i=r()).done;){var o=i.value;a===n.length?n.push(t=new _k(this.O(gc()),this.O(gc()),this,this.options)):t=n[a],t._$AI(o),a++}a<n.length&&(this._$AR(t&&t._$AB.nextSibling,a),n.length=a)}},{key:"_$AR",value:function(e=this._$AA.nextSibling,t){for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,t);e!==this._$AB;){var i,n=lc(e).nextSibling;lc(e).remove(),e=n}}},{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))}}])}(),jc=function(){return h(function e(t,i,n,a,r){o(this,e),this.type=1,this._$AH=Ic,this._$AN=void 0,this.element=t,this.name=i,this._$AM=a,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Ic},[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e,t=this,i,n){var a=this.strings,r=!1;if(void 0===a)e=Nc(this,e,t,0),(r=!yc(e)||e!==this._$AH&&e!==Cc)&&(this._$AH=e);else{var o,s,u=e;for(e=a[0],o=0;o<a.length-1;o++)(s=Nc(this,u[i+o],t,o))===Cc&&(s=this._$AH[o]),r||(r=!yc(s)||s!==this._$AH[o]),s===Ic?e=Ic:e!==Ic&&(e+=(null!=s?s:"")+a[o+1]),this._$AH[o]=s}r&&!n&&this.j(e)}},{key:"j",value:function(e){e===Ic?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}])}(),Bc=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).type=3,e}return p(t,e),h(t,[{key:"j",value:function(e){this.element[this.name]=e===Ic?void 0:e}}])}(jc),zc=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).type=4,e}return p(t,e),h(t,[{key:"j",value:function(e){this.element.toggleAttribute(this.name,!!e&&e!==Ic)}}])}(jc),Uc=function(e){function t(e,i,n,a,s){var u;return o(this,t),(u=r(this,t,[e,i,n,a,s])).type=5,u}return p(t,e),h(t,[{key:"_$AI",value:function(e,t=this){var i;if((e=null!==(i=Nc(this,e,t,0))&&void 0!==i?i:Ic)!==Cc){var n=this._$AH,a=e===Ic&&n!==Ic||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==Ic&&(n===Ic||a);a&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}}},{key:"handleEvent",value:function(e){var t,i;"function"==typeof this._$AH?this._$AH.call(null!==(t=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==t?t:this.element,e):this._$AH.handleEvent(e)}}])}(jc),Hc=function(){return h(function e(t,i,n){o(this,e),this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n},[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){Nc(this,e)}}])}(),Gc={I:Wc},Vc=uc.litHtmlPolyfillSupport;null!=Vc&&Vc(Oc,Wc),(null!==(oc=uc.litHtmlVersions)&&void 0!==oc?oc:uc.litHtmlVersions=[]).push("3.3.2");var Kc,Xc,Yc=globalThis,qc=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).renderOptions={host:n(e)},e._$Do=void 0,e}return p(t,e),h(t,[{key:"createRenderRoot",value:function(){var e,i,n=T(t,"createRenderRoot",this,3)([]);return null!==(i=(e=this.renderOptions).renderBefore)&&void 0!==i||(e.renderBefore=n.firstChild),n}},{key:"update",value:function(e){var i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),T(t,"update",this,3)([e]),this._$Do=((e,t,i)=>{var n,a=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:t,r=a._$litPart$;if(void 0===r){var o,s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;a._$litPart$=r=new Wc(t.insertBefore(gc(),s),s,void 0,null!=i?i:{})}return r._$AI(e),r})(i,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 Cc}}])}(sc);qc._$litElement$=!0,qc.finalized=!0,null===(Kc=Yc.litElementHydrateSupport)||void 0===Kc||Kc.call(Yc,{LitElement:qc});var Jc=Yc.litElementPolyfillSupport;null==Jc||Jc({LitElement:qc}),(null!==(Xc=Yc.litElementVersions)&&void 0!==Xc?Xc:Yc.litElementVersions=[]).push("4.2.2");var Qc,Zc=Hh(Qc||(Qc=(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function n(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,i){return t=v(t),b(e,g()?Reflect.construct(t,i||[],v(e).constructor):t.apply(e,i))}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),i=0;i<e.length;i+=1)t[i]=e[i].name;return t});var u=0;function l(e){return"__private_"+u+++"_"+e}function d(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M(n.key),n)}}function h(e,t,i){return t&&d(e.prototype,t),i&&d(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t){n&&(e=n);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 i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:i):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 i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}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 n(e)}function w(){var e,t,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",a=i.toStringTag||"@@toStringTag";function r(i,n,a,r){var u=n&&n.prototype instanceof s?n:s,l=Object.create(u.prototype);return E(l,"_invoke",function(i,n,a){var r,s,u,l=0,d=a||[],h=!1,c={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,i){return r=t,s=0,u=e,c.n=i,o}};function m(i,n){for(s=i,u=n,t=0;!h&&l&&!a&&t<d.length;t++){var a,r=d[t],m=c.p,f=r[2];i>3?(a=f===n)&&(u=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((a=i<2&&m<r[1])?(s=0,c.v=n,c.n=r[1]):m<f&&(a=i<3||r[0]>n||n>f)&&(r[4]=i,r[5]=n,c.n=f,s=0))}if(a||i>1)return o;throw h=!0,n}return function(a,d,f){if(l>1)throw TypeError("Generator is already running");for(h&&1===d&&m(d,f),s=d,u=f;(t=s<2?e:u)||!h;){r||(s?s<3?(s>1&&(c.n=-1),m(s,u)):c.n=u:c.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=(h=c.n<0)?u:i.call(n,c))!==o)break}catch(t){r=e,s=1,u=t}finally{l=1}}return{value:t,done:h}}}(i,a,r),!0),l}var o={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(E(t={},n,function(){return this}),t),h=l.prototype=s.prototype=Object.create(d);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,E(e,a,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=l,E(h,"constructor",l),E(l,"constructor",u),u.displayName="GeneratorFunction",E(l,a,"GeneratorFunction"),E(h),E(h,a,"Generator"),E(h,n,function(){return this}),E(h,"toString",function(){return"[object Generator]"}),(w=function(){return{w:r,m:c}})()}function k(e,t,i,n,a){var r=function(e,t,i,n,a){return new S(w().w(e,t,i,n),a||Promise)}(e,t,i,n,a);return r.next().then(function(e){return e.done?e.value:r.next()})}function S(e,i){function n(a,r,o,s){try{var u=e[a](r),l=u.value;return l instanceof t?i.resolve(l.v).then(function(e){n("next",e,o,s)},function(e){n("throw",e,o,s)}):i.resolve(l).then(function(e){u.value=e,o(u)},function(e){return n("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 i(function(t,i){n(e,r,t,i)})}return a=a?a.then(o,o):o()},!0)}function E(e,t,i,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}E=function(e,t,i,n){function r(t,i){E(e,t,function(e){return this._invoke(t,i,e)})}t?a?a(e,t,{value:i,enumerable:!n,configurable:!n,writable:!n}):e[t]=i:(r("next",0),r("throw",1),r("return",2))},E(e,t,i,n)}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,i,n){var a=f(v(e.prototype),t,i);return 2&n&&"function"==typeof a?function(e){return a.apply(i,e)}:a}function M(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=typeof n)return n;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,i)}function i(){return function(e,t,i){if(g())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return i&&P(a,i.prototype),a}(e,arguments,v(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),P(i,e)},_(e)}var A,D,x,C,I,L,R,F,O,N,$,W,j=function(){return h(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,i,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!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"===n?a.call(e,i):a?a.value=i:t.set(e,i),i},z=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},U=e=>{var t;return"boolean"==typeof e?e:null!==(t=null==e?void 0:e.capture)&&void 0!==t&&t},H=function(){return h(function e(){o(this,e),this.__eventListeners=new Map,this.__captureEventListeners=new Map},[{key:"addEventListener",value:function(e,t,i){var n;if(null!=t){var a=U(i)?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 i&&i?i:{};null===(n=o.signal)||void 0===n||n.addEventListener("abort",()=>this.removeEventListener(e,t,i)),r.set(t,null!=o?o:{})}}},{key:"removeEventListener",value:function(e,t,i){if(null!=t){var n=U(i)?this.__captureEventListeners:this.__eventListeners,a=n.get(e);void 0!==a&&(a.delete(t),a.size||n.delete(e))}}},{key:"dispatchEvent",value:function(e){var t=[this],i=this.__eventTargetParent;if(e.composed)for(;i;)t.push(i),i=i.__eventTargetParent;else for(;i&&i!==this.__host;)t.push(i),i=i.__eventTargetParent;var n=!1,a=!1,r=0,o=null,s=null,u=null,l=e.stopPropagation,d=e.stopImmediatePropagation;Object.defineProperties(e,{target:m({get:()=>null!=o?o:s},V),srcElement:m({get:()=>e.target},V),currentTarget:m({get:()=>u},V),eventPhase:m({get:()=>r},V),composedPath:m({value:()=>t},V),stopPropagation:m({value:()=>{n=!0,l.call(e)}},V),stopImmediatePropagation:m({value:()=>{a=!0,d.call(e)}},V)});var h=(t,i,n)=>{"function"==typeof t?t(e):"function"==typeof(null==t?void 0:t.handleEvent)&&t.handleEvent(e),i.once&&n.delete(t)},f=()=>(u=null,r=0,!e.defaultPrevented),v=t.slice().reverse();o=this.__host&&e.composed?null:this;for(var p,g=e=>{for(s=this;s.__host&&e.includes(s.__host);)s=s.__host},y=c(v);!(p=y()).done;){var b=p.value;o||s&&s!==b.__host||g(v.slice(v.indexOf(b))),u=b,r=b===e.target?2:1;var w=b.__captureEventListeners.get(e.type);if(w)for(var k,S=c(w);!(k=S()).done;){var E=k.value;if(h(E[0],E[1],w),a)return f()}if(n)return f()}var P=e.bubbles?t:[this];s=null;for(var T,M=c(P);!(T=M()).done;){var _=T.value;o||s&&_!==s.__host||g(P.slice(0,P.indexOf(_)+1)),u=_,r=_===e.target?2:3;var A=_.__eventListeners.get(e.type);if(A)for(var D,x=c(A);!(D=x()).done;){var C=D.value;if(h(C[0],C[1],A),a)return f()}if(n)return f()}return f()}}])}(),G=H,V={__proto__:null,enumerable:!0};Object.freeze(V);var K=(N=function(){return h(function e(t,i={}){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 i||!i)throw new Error('The "options" argument must be an object');var n=i.bubbles,a=i.cancelable,r=i.composed;B(this,A,!!a,"f"),B(this,D,!!n,"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,i){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(K.prototype,{initEvent:V,stopImmediatePropagation:V,preventDefault:V,target:V,currentTarget:V,srcElement:V,type:V,cancelable:V,defaultPrevented:V,timeStamp:V,composedPath:V,returnValue:V,bubbles:V,composed:V,eventPhase:V,cancelBubble:V,stopPropagation:V,isTrusted:V});var X=(W=function(e){function t(e,i={}){var n,a;return o(this,t),a=r(this,t,[e,i]),$.set(a,void 0),B(a,$,null!==(n=null==i?void 0:i.detail)&&void 0!==n?n:null,"f"),a}return p(t,e),h(t,[{key:"initCustomEvent",value:function(e,t,i,n){throw new Error("Method not implemented.")}},{key:"detail",get:function(){return z(this,$,"f")}}])}(K),$=new WeakMap,W);Object.defineProperties(X.prototype,{detail:V});var Y,q,J,Q,Z=K,ee=X;(Y=function(){return h(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.__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,Y.CHARSET_RULE=2,Y.IMPORT_RULE=3,Y.MEDIA_RULE=4,Y.FONT_FACE_RULE=5,Y.PAGE_RULE=6,Y.NAMESPACE_RULE=10,Y.KEYFRAMES_RULE=7,Y.KEYFRAME_RULE=8,Y.SUPPORTS_RULE=12,Y.COUNTER_STYLE_RULE=11,Y.FONT_FEATURE_VALUES_RULE=14,null!==(q=globalThis.Event)&&void 0!==q||(globalThis.Event=Z),null!==(J=globalThis.CustomEvent)&&void 0!==J||(globalThis.CustomEvent=ee);var te=new WeakMap,ie=e=>{var t=te.get(e);return void 0===t&&te.set(e,t=new Map),t},ne=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),h(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){var t={host:this};return this.__shadowRootMode=e.mode,e&&"open"===e.mode&&(this.__shadowRoot=t),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}}])}(G),ae=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),h(t)}(ne),re=ae;function oe(){var e,t;return{promise:new Promise((i,n)=>{e=i,t=n}),resolve:e,reject:t}}null!==(Q=globalThis.litServerRoot)&&void 0!==Q||(globalThis.litServerRoot=Object.defineProperty(new re,"localName",{get:()=>"lit-server-root"})),new(function(){return h(function e(){o(this,e),this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map},[{key:"define",value:function(e,t){var i,n;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!==(i=t.observedAttributes)&&void 0!==i?i:[]}),this.__reverseDefinitions.set(t,e),null===(n=this.__pendingWhenDefineds.get(e))||void 0===n||n.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:"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,i;return k(function(n){for(;;)switch(n.n){case 0:if(!(t=this.__definitions.get(e))){n.n=1;break}return n.a(2,t.ctor);case 1:return(i=this.__pendingWhenDefineds.get(e))||(i=oe(),this.__pendingWhenDefineds.set(e,i)),n.a(2,i.promise)}},null,this,null,Promise)}}])}()),"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=re);var se=["action"],ue=null;var le={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 de(){return null!=ue?ue:le}function he(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o}function ce(e,t,i,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function me(e,t,i,n,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,i),i}"function"==typeof SuppressedError&&SuppressedError;var fe;!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"}(fe||(fe={}));var ve,pe={},ge=pe.NAMI_SDK_VERSION,ye=void 0===ge?"3.4.0":ge,be=pe.NAMI_SDK_PACKAGE_VERSION,we=void 0===be?"3.4.0-dev.202604182042":be,ke=pe.PLATFORM_ID_REQUIRED,Se=void 0===ke?"Platform ID is required":ke,Ee=pe.DEVICE_ID_REQUIRED,Pe=void 0===Ee?"Device ID is required":Ee,Te=pe.EXTERNAL_ID_REQUIRED,Me=void 0===Te?"External ID is required":Te,_e=pe.SDK_NOT_INITIALIZED,Ae=void 0===_e?"SDK has not been initialized. Make sure to call Nami.configure() first!":_e,De=pe.CAMPAIGN_NOT_AVAILABLE,xe=void 0===De?"Campaign is not available":De,Ce=pe.FLOW_SCREENS_NOT_AVAILABLE,Ie=void 0===Ce?"Flow screens not available":Ce,Le=pe.UNABLE_TO_UPDATE_CDP_ID,Re=void 0===Le?"Unable to update CDP id in anonymous mode":Le,Fe=pe.ANONYMOUS_MODE_ALREADY_ON,Oe=void 0===Fe?"Anonymous mode is already turned on.":Fe,Ne=pe.ANONYMOUS_MODE_ALREADY_OFF,$e=void 0===Ne?"Anonymous mode is already turned off.":Ne,We=pe.DEVICE_ID_NOT_SET,je=void 0===We?"Nami Device ID is not set":We,Be=pe.AUTH_DEVICE,ze=void 0===Be?"nami_auth_device":Be,Ue=pe.NAMI_CONFIGURATION,He=void 0===Ue?"nami_configuration":Ue,Ge=pe.NAMI_PROFILE,Ve=void 0===Ge?"nami_profile":Ge,Ke=pe.API_CONFIG,Xe=void 0===Ke?"api_config":Ke,Ye=pe.API_CAMPAIGN_RULES,qe=void 0===Ye?"api_campaign_rules":Ye,Je=pe.API_PAYWALLS,Qe=void 0===Je?"api_paywalls":Je,Ze=pe.API_CAMPAIGN_SESSION_TIMESTAMP,et=void 0===Ze?"api_campaign_session_timestamp":Ze,tt=pe.API_PRODUCTS,it=void 0===tt?"api_products":tt,nt=pe.API_ACTIVE_ENTITLEMENTS,at=void 0===nt?"api_active_entitlements":nt,rt=pe.SERVER_NAMI_ENTITLEMENTS,ot=void 0===rt?"server_active_entitlements":rt,st=pe.INITIAL_APP_CONFIG,ut=void 0===st?"initial_app_config":st,lt=pe.INITIAL_CAMPAIGN_RULES,dt=void 0===lt?"initial_campaign_rules":lt,ht=pe.INITIAL_PAYWALLS,ct=void 0===ht?"initial_paywalls":ht,mt=pe.INITIAL_PRODUCTS,ft=void 0===mt?"initial_products":mt,vt=pe.LOCAL_NAMI_ENTITLEMENTS,pt=void 0===vt?"local_active_entitlements":vt,gt=pe.CUSTOMER_ATTRIBUTES_KEY_PREFIX,yt=void 0===gt?"nami_cmr_attributes_":gt,bt=pe.NAMI_CUSTOMER_JOURNEY_STATE,wt=void 0===bt?"nami_customer_journey_state":bt,kt=pe.ANONYMOUS_MODE,St=void 0===kt?"nami_anonymous_mode_v2":kt,Et=pe.ANONYMOUS_UUID,Pt=void 0===Et?"nami_anonymous_uuid":Et,Tt=pe.KEY_SESSION_COUNTER,Mt=void 0===Tt?"nami_session_counter":Tt,_t=pe.INITIAL_SESSION_COUNTER_VALUE,At=void 0===_t?1:_t,Dt=pe.NAMI_LAST_IMPRESSION_ID,xt=void 0===Dt?"nami_last_impression_id":Dt,Ct=pe.NAMI_PURCHASE_IMPRESSION_ID,It=void 0===Ct?"nami_purchase_impression_id":Ct,Lt=pe.NAMI_LAUNCH_ID,Rt=void 0===Lt?"nami_launch_id":Lt,Ft=pe.NAMI_SESSION_ID,Ot=void 0===Ft?"nami_session_id":Ft,Nt=pe.NAMI_LANGUAGE_CODE,$t=void 0===Nt?"nami_language_code":Nt,Wt=pe.NAMI_PURCHASE_CHANNEL,jt=void 0===Wt?"nami_purchase_channel":Wt,Bt=pe.API_VERSION,zt=pe.BASE_URL_PATH,Ut=void 0===zt?`sdk/${void 0===Bt?"v3":Bt}/platform`:zt,Ht=pe.BASE_URL,Gt=void 0===Ht?"https://app.namiml.com":Ht,Vt=pe.BASE_STAGING_URL,Kt=void 0===Vt?"https://app-staging.namiml.com":Vt,Xt=pe.CUSTOM_HOST_PREFIX,Yt=void 0===Xt?"namiAPIHost=":Xt,qt=pe.USE_STAGING_API,Jt=void 0===qt?"useStagingAPI":qt,Qt=pe.EXTENDED_CLIENT_INFO_PREFIX,Zt=void 0===Qt?"extendedClientInfo":Qt,ei=pe.EXTENDED_CLIENT_INFO_DELIMITER,ti=void 0===ei?":":ei,ii=pe.VALIDATE_PRODUCT_GROUPS,ni=void 0===ii?"validateProductGroups":ii,ai=pe.LOG_HTTP_REQUESTS,ri=void 0===ai?"logHTTPRequests":ai,oi=pe.LOG_HTTP_TRAFFIC,si=void 0===oi?"logHTTPTraffic":oi,ui=pe.API_MAX_CALLS_LIMIT,li=void 0===ui?2:ui,di=pe.API_RETRY_DELAY_SEC,hi=void 0===di?2:di,ci=pe.API_TIMEOUT_LIMIT,mi=void 0===ci?2e4:ci,fi=pe.DEVICE_API_TIMEOUT_LIMIT,vi=void 0===fi?2e3:fi,pi=pe.STATUS_BAD_REQUEST,gi=void 0===pi?400:pi,yi=pe.STATUS_NOT_FOUND,bi=void 0===yi?404:yi,wi=pe.STATUS_CONFLICT,ki=void 0===wi?409:wi,Si=pe.STATUS_INTERNAL_SERVER_ERROR,Ei=void 0===Si?500:Si,Pi=pe.INITIAL_SUCCESS,Ti=void 0===Pi?"Initial success":Pi,Mi=pe.RECONFIG_SUCCESS,_i=void 0===Mi?"Reconfig success":Mi,Ai=pe.ALREADY_CONFIGURED,Di=void 0===Ai?"Already configured":Ai,xi=pe.AVAILABLE_CAMPAIGNS_CHANGED,Ci=void 0===xi?"AvailableCampaignsChanged":xi,Ii=pe.PAYWALL_ACTION_EVENT,Li=void 0===Ii?"PaywallActionEvent":Ii,Ri=pe.AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED,Fi=void 0===Ri?"AvailableActiveEntitlementsChanged":Ri,Oi=pe.CUSTOMER_JOURNEY_STATE_CHANGED,Ni=void 0===Oi?"CustomerJourneyStateChanged":Oi,$i=pe.SKU_TEXT_REGEX,Wi=void 0===$i?/\$\{sku\.(\w+)(:\d+)?\}/g:$i,ji=pe.VAR_REGEX,Bi=void 0===ji?/\$\{\s*(\w+(\.[a-zA-Z\d_:${}-]{0,99})*?)\s*}/g:ji,zi=pe.SMART_TEXT_PATTERN,Ui=void 0===zi?"${":zi,Hi=pe.LIQUID_VARIABLE_REGEX,Gi=void 0===Hi?/\${[A-Za-z0-9.]+}/g:Hi,Vi=[ze,He,Ve,Xe,qe,Qe,et,it,at,ot,ut,dt,ct,ft,pt,wt,St,Pt,Mt,xt,It,Rt,Ot,$t,jt];e.LogLevel=void 0,(ve=e.LogLevel||(e.LogLevel={}))[ve.DEBUG=1]="DEBUG",ve[ve.INFO=2]="INFO",ve[ve.WARN=3]="WARN",ve[ve.ERROR=4]="ERROR";var Ki={debug:e.LogLevel.DEBUG,info:e.LogLevel.INFO,warn:e.LogLevel.WARN,error:e.LogLevel.ERROR},Xi=function(){return h(function t(){o(this,t),this.currentLogLevel=e.LogLevel.DEBUG,this.setLogger=t=>{this.currentLogLevel=t?Ki[t]:e.LogLevel.WARN}},[{key:"debug",value:function(t,...i){this.shouldLog(e.LogLevel.DEBUG)&&console.debug(this.formatMessage(e.LogLevel.DEBUG,t,...i))}},{key:"info",value:function(t,...i){this.shouldLog(e.LogLevel.INFO)&&console.info(this.formatMessage(e.LogLevel.INFO,t,...i))}},{key:"warn",value:function(t,...i){this.shouldLog(e.LogLevel.WARN)&&console.warn(this.formatMessage(e.LogLevel.WARN,t,...i))}},{key:"error",value:function(t,...i){this.shouldLog(e.LogLevel.ERROR)&&console.error(this.formatMessage(e.LogLevel.ERROR,t,...i))}},{key:"shouldLog",value:function(e){return e>=this.currentLogLevel}},{key:"formatMessage",value:function(t,i,...n){var a=e.LogLevel[t];return`[${(new Date).toISOString()}] [${a}] ${i} ${n=n.map(e=>"object"==typeof e?JSON.stringify(e):e)}`}}])}(),Yi=new Xi;function qi(e){for(var t=-1,i=null==e?0:e.length,n=0,a=[];++t<i;){var r=e[t];r&&(a[n++]=r)}return a}function Ji(e,t){return e===t||e!=e&&t!=t}function Qi(e,t){for(var i=e.length;i--;)if(Ji(e[i][0],t))return i;return-1}var Zi=Array.prototype.splice;function en(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}en.prototype.clear=function(){this.__data__=[],this.size=0},en.prototype.delete=function(e){var t=this.__data__,i=Qi(t,e);return!(i<0)&&(i==t.length-1?t.pop():Zi.call(t,i,1),--this.size,!0)},en.prototype.get=function(e){var t=this.__data__,i=Qi(t,e);return i<0?void 0:t[i][1]},en.prototype.has=function(e){return Qi(this.__data__,e)>-1},en.prototype.set=function(e,t){var i=this.__data__,n=Qi(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};var tn="object"==typeof global&&global&&global.Object===Object&&global,nn="object"==typeof self&&self&&self.Object===Object&&self,an=tn||nn||Function("return this")(),rn=an.Symbol,on=Object.prototype,sn=on.hasOwnProperty,un=on.toString,ln=rn?rn.toStringTag:void 0;var dn=Object.prototype.toString;var hn=rn?rn.toStringTag:void 0;function cn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":hn&&hn in Object(e)?function(e){var t=sn.call(e,ln),i=e[ln];try{e[ln]=void 0;var n=!0}catch(e){}var a=un.call(e);return n&&(t?e[ln]=i:delete e[ln]),a}(e):function(e){return dn.call(e)}(e)}function mn(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function fn(e){if(!mn(e))return!1;var t=cn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var vn,pn=an["__core-js_shared__"],gn=(vn=/[^.]+$/.exec(pn&&pn.keys&&pn.keys.IE_PROTO||""))?"Symbol(src)_1."+vn:"";var yn=Function.prototype.toString;function bn(e){if(null!=e){try{return yn.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var wn=/^\[object .+?Constructor\]$/,kn=Function.prototype,Sn=Object.prototype,En=kn.toString,Pn=Sn.hasOwnProperty,Tn=RegExp("^"+En.call(Pn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mn(e){return!(!mn(e)||(t=e,gn&&gn in t))&&(fn(e)?Tn:wn).test(bn(e));var t}function _n(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return Mn(i)?i:void 0}var An=_n(an,"Map"),Dn=_n(Object,"create");var xn=Object.prototype.hasOwnProperty;var Cn=Object.prototype.hasOwnProperty;function In(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Ln(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function Rn(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}In.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},In.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},In.prototype.get=function(e){var t=this.__data__;if(Dn){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return xn.call(t,e)?t[e]:void 0},In.prototype.has=function(e){var t=this.__data__;return Dn?void 0!==t[e]:Cn.call(t,e)},In.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Dn&&void 0===t?"__lodash_hash_undefined__":t,this},Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(An||en),string:new In}},Rn.prototype.delete=function(e){var t=Ln(this,e).delete(e);return this.size-=t?1:0,t},Rn.prototype.get=function(e){return Ln(this,e).get(e)},Rn.prototype.has=function(e){return Ln(this,e).has(e)},Rn.prototype.set=function(e,t){var i=Ln(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function Fn(e){var t=this.__data__=new en(e);this.size=t.size}Fn.prototype.clear=function(){this.__data__=new en,this.size=0},Fn.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Fn.prototype.get=function(e){return this.__data__.get(e)},Fn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.set=function(e,t){var i=this.__data__;if(i instanceof en){var n=i.__data__;if(!An||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Rn(n)}return i.set(e,t),this.size=i.size,this};function On(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Rn;++t<i;)this.add(e[t])}function Nn(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}function $n(e,t){return e.has(t)}On.prototype.add=On.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},On.prototype.has=function(e){return this.__data__.has(e)};function Wn(e,t,i,n,a,r){var o=1&i,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 h=-1,c=!0,m=2&i?new On:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!Nn(t,function(e,t){if(!$n(m,t)&&(f===e||a(f,e,i,n,r)))return m.push(t)})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var jn=an.Uint8Array;function Bn(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function zn(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var Un=rn?rn.prototype:void 0,Hn=Un?Un.valueOf:void 0;var Gn=Array.isArray;var Vn=Object.prototype.propertyIsEnumerable,Kn=Object.getOwnPropertySymbols,Xn=Kn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(Kn(e),function(t){return Vn.call(e,t)}))}:function(){return[]};function Yn(e){return null!=e&&"object"==typeof e}function qn(e){return Yn(e)&&"[object Arguments]"==cn(e)}var Jn=Object.prototype,Qn=Jn.hasOwnProperty,Zn=Jn.propertyIsEnumerable,ea=qn(function(){return arguments}())?qn:function(e){return Yn(e)&&Qn.call(e,"callee")&&!Zn.call(e,"callee")};var ta="object"==typeof e&&e&&!e.nodeType&&e,ia=ta&&"object"==typeof module&&module&&!module.nodeType&&module,na=ia&&ia.exports===ta?an.Buffer:void 0,aa=(na?na.isBuffer:void 0)||function(){return!1},ra=/^(?:0|[1-9]\d*)$/;function oa(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&ra.test(e))&&e>-1&&e%1==0&&e<t}function sa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ua={};function la(e){return function(t){return e(t)}}ua["[object Float32Array]"]=ua["[object Float64Array]"]=ua["[object Int8Array]"]=ua["[object Int16Array]"]=ua["[object Int32Array]"]=ua["[object Uint8Array]"]=ua["[object Uint8ClampedArray]"]=ua["[object Uint16Array]"]=ua["[object Uint32Array]"]=!0,ua["[object Arguments]"]=ua["[object Array]"]=ua["[object ArrayBuffer]"]=ua["[object Boolean]"]=ua["[object DataView]"]=ua["[object Date]"]=ua["[object Error]"]=ua["[object Function]"]=ua["[object Map]"]=ua["[object Number]"]=ua["[object Object]"]=ua["[object RegExp]"]=ua["[object Set]"]=ua["[object String]"]=ua["[object WeakMap]"]=!1;var da="object"==typeof e&&e&&!e.nodeType&&e,ha=da&&"object"==typeof module&&module&&!module.nodeType&&module,ca=ha&&ha.exports===da&&tn.process,ma=function(){try{var e=ha&&ha.require&&ha.require("util").types;return e||ca&&ca.binding&&ca.binding("util")}catch(e){}}(),fa=ma&&ma.isTypedArray,va=fa?la(fa):function(e){return Yn(e)&&sa(e.length)&&!!ua[cn(e)]},pa=Object.prototype.hasOwnProperty;function ga(e,t){var i=Gn(e),n=!i&&ea(e),a=!i&&!n&&aa(e),r=!i&&!n&&!a&&va(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!pa.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||oa(l,u))||s.push(l);return s}var ya=Object.prototype;function ba(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ya)}function wa(e,t){return function(i){return e(t(i))}}var ka=wa(Object.keys,Object),Sa=Object.prototype.hasOwnProperty;function Ea(e){return null!=(t=e)&&sa(t.length)&&!fn(t)?ga(e):function(e){if(!ba(e))return ka(e);var t=[];for(var i in Object(e))Sa.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e);var t}function Pa(e){return function(e,t,i){var n=t(e);return Gn(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,Ea,Xn)}var Ta=Object.prototype.hasOwnProperty;var Ma=_n(an,"DataView"),_a=_n(an,"Promise"),Aa=_n(an,"Set"),Da=_n(an,"WeakMap"),xa="[object Map]",Ca="[object Promise]",Ia="[object Set]",La="[object WeakMap]",Ra="[object DataView]",Fa=bn(Ma),Oa=bn(An),Na=bn(_a),$a=bn(Aa),Wa=bn(Da),ja=cn;(Ma&&ja(new Ma(new ArrayBuffer(1)))!=Ra||An&&ja(new An)!=xa||_a&&ja(_a.resolve())!=Ca||Aa&&ja(new Aa)!=Ia||Da&&ja(new Da)!=La)&&(ja=function(e){var t=cn(e),i="[object Object]"==t?e.constructor:void 0,n=i?bn(i):"";if(n)switch(n){case Fa:return Ra;case Oa:return xa;case Na:return Ca;case $a:return Ia;case Wa:return La}return t});var Ba="[object Arguments]",za="[object Array]",Ua="[object Object]",Ha=Object.prototype.hasOwnProperty;function Ga(e,t,i,n,a,r){var o=Gn(e),s=Gn(t),u=o?za:ja(e),l=s?za:ja(t),d=(u=u==Ba?Ua:u)==Ua,h=(l=l==Ba?Ua:l)==Ua,c=u==l;if(c&&aa(e)){if(!aa(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new Fn),o||va(e)?Wn(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){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 jn(e),new jn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ji(+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=Bn;case"[object Set]":var u=1&n;if(s||(s=zn),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=Wn(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(Hn)return Hn.call(e)==Hn.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&Ha.call(e,"__wrapped__"),f=h&&Ha.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new Fn),a(v,p,i,n,r)}}return!!c&&(r||(r=new Fn),function(e,t,i,n,a,r){var o=1&i,s=Pa(e),u=s.length;if(u!=Pa(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:Ta.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==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(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,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,i,n,a,r))}function Va(e,t,i,n,a){return e===t||(null==e||null==t||!Yn(e)&&!Yn(t)?e!=e&&t!=t:Ga(e,t,i,n,Va,a))}function Ka(e){return e==e&&!mn(e)}function Xa(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}}function Ya(e){var t=function(e){for(var t=Ea(e),i=t.length;i--;){var n=t[i],a=e[n];t[i]=[n,a,Ka(a)]}return t}(e);return 1==t.length&&t[0][2]?Xa(t[0][0],t[0][1]):function(i){return i===e||function(e,t,i,n){var a=i.length,r=a;if(null==e)return!r;for(e=Object(e);a--;){var o=i[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<r;){var s=(o=i[a])[0],u=e[s],l=o[1];if(o[2]){if(void 0===u&&!(s in e))return!1}else if(!Va(l,u,3,n,new Fn))return!1}return!0}(i,0,t)}}function qa(e){return"symbol"==typeof e||Yn(e)&&"[object Symbol]"==cn(e)}var Ja=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qa=/^\w*$/;function Za(e,t){if(Gn(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!qa(e))||(Qa.test(e)||!Ja.test(e)||null!=t&&e in Object(t))}function er(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,a=t?t.apply(this,n):n[0],r=i.cache;if(r.has(a))return r.get(a);var o=e.apply(this,n);return i.cache=r.set(a,o)||r,o};return i.cache=new(er.Cache||Rn),i}er.Cache=Rn;var tr,ir,nr,ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rr=/\\(\\)?/g,or=(tr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ar,function(e,i,n,a){t.push(n?a.replace(rr,"$1"):i||e)}),t},ir=er(tr,function(e){return 500===nr.size&&nr.clear(),e}),nr=ir.cache,ir);var sr=rn?rn.prototype:void 0,ur=sr?sr.toString:void 0;function lr(e){if("string"==typeof e)return e;if(Gn(e))return function(e,t){for(var i=-1,n=null==e?0:e.length,a=Array(n);++i<n;)a[i]=t(e[i],i,e);return a}(e,lr)+"";if(qa(e))return ur?ur.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function dr(e,t){return Gn(e)?e:Za(e,t)?[e]:or(function(e){return null==e?"":lr(e)}(e))}function hr(e){if("string"==typeof e||qa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function cr(e,t){for(var i=0,n=(t=dr(t,e)).length;null!=e&&i<n;)e=e[hr(t[i++])];return i&&i==n?e:void 0}function mr(e,t){return null!=e&&t in Object(e)}function fr(e,t){return null!=e&&function(e,t,i){for(var n=-1,a=(t=dr(t,e)).length,r=!1;++n<a;){var o=hr(t[n]);if(!(r=null!=e&&i(e,o)))break;e=e[o]}return r||++n!=a?r:!!(a=null==e?0:e.length)&&sa(a)&&oa(o,a)&&(Gn(e)||ea(e))}(e,t,mr)}function vr(e,t){return Za(e)&&Ka(t)?Xa(hr(e),t):function(i){var n=function(e,t,i){var n=null==e?void 0:cr(e,t);return void 0===n?i:n}(i,e);return void 0===n&&n===t?fr(i,e):Va(t,n,3)}}function pr(e){return e}function gr(e){return Za(e)?(t=hr(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return cr(t,e)}}(e);var t}function yr(e){return e!=e}function br(e,t){return!!(null==e?0:e.length)&&function(e,t,i){return t==t?function(e,t,i){for(var n=i-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}(e,t,i):function(e,t,i){for(var n=e.length,a=i+-1;++a<n;)if(t(e[a],a,e))return a;return-1}(e,yr,i)}(e,t,0)>-1}var wr=Aa&&1/zn(new Aa([,-0]))[1]==1/0?function(e){return new Aa(e)}:function(){};function kr(e,t){return e&&e.length?function(e,t,i){var n=-1,a=br,r=e.length,o=!0,s=[],u=s;if(r>=200){var l=t?null:wr(e);if(l)return zn(l);o=!1,a=$n,u=new On}else u=t?[]:s;e:for(;++n<r;){var d=e[n],h=t?t(d):d;if(d=0!==d?d:0,o&&h==h){for(var c=u.length;c--;)if(u[c]===h)continue e;t&&u.push(h),s.push(d)}else a(u,h,i)||(u!==s&&u.push(h),s.push(d))}return s}(e,"function"==typeof(i=t)?i:null==i?pr:"object"==typeof i?Gn(i)?vr(i[0],i[1]):Ya(i):gr(i)):[];var i}var Sr=function(){return h(function e(){o(this,e),this.memoryStore={}},[{key:"storage",get:function(){return de().storage}},{key:"setDevice",value:function(e){this.setItem(ze,e)}},{key:"getDevice",value:function(){return this.getItem(ze)}},{key:"resetDevice",value:function(){this.resetItem(ze)}},{key:"getAnonymousMode",value:function(){return this.getItem(St)||!1}},{key:"setAnonymousMode",value:function(e){this.setItem(St,e)}},{key:"clearAnonymousMode",value:function(){this.resetItem(St)}},{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($t,e||"en")}},{key:"getLanguageCode",value:function(){return this.getItem($t)||"en"}},{key:"setCampaignRules",value:function(e,t){e!==dt?e!==qe||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[qe]=JSON.stringify(t):this.memoryStore[dt]=JSON.stringify(t)}},{key:"getCampaignRules",value:function(e){if(e===dt)return this.memoryStore[dt]?JSON.parse(this.memoryStore[dt]):null;if(e===qe){var t=this.memoryStore[qe];if(null!=t)return JSON.parse(t);var i=this.getItem(qe);if(null===i)return null;if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return i}return this.isLegacyTimestampedCache(i)?i.data:i}return this.getItem(e)}},{key:"setPaywalls",value:function(e,t){e!==ct?e!==Qe||0!==this.getCampaignCacheTtl()?this.setItem(e,t):this.memoryStore[Qe]=JSON.stringify(t):this.memoryStore[ct]=JSON.stringify(t)}},{key:"getPaywalls",value:function(e){if(e===ct)return this.memoryStore[ct]?JSON.parse(this.memoryStore[ct]):null;if(e===Qe){var t=this.memoryStore[Qe];if(null!=t)return JSON.parse(t);var i=this.getItem(Qe);if(null===i)return null;if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return i}return this.isLegacyTimestampedCache(i)?i.data:i}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,i=null!==(e=this.getItem(it))&&void 0!==e?e:[];return kr(qi([...null!==(t=this.getItem(ft))&&void 0!==t?t:[],...i]),"sku_ref_id")}},{key:"setNamiConfig",value:function(e){this.setItem(He,e)}},{key:"getNamiConfig",value:function(){return this.getItem(He)}},{key:"setCustomerAttribute",value:function(e,t){this.setItem(yt+e,t)}},{key:"getCustomerAttribute",value:function(e){return this.getItem(yt+e)}},{key:"getAllCustomerAttributes",value:function(){return this.storage.getAllKeys().map(e=>[e,this.storage.getItem(e)]).filter(([e])=>e.includes(yt)).map(([e,t])=>e.replace(yt,"")+":"+t)}},{key:"getAllCustomerAttributesKeys",value:function(){return this.storage.getAllKeys().filter(e=>e.includes(yt)).map(e=>e.replace(yt,""))}},{key:"clearCustomerAttribute",value:function(e){var t=yt+e,i=this.getItem(t);return i&&this.resetItem(t),!!i}},{key:"clearAllCustomerAttributes",value:function(){this.storage.getAllKeys().filter(e=>e.includes(yt)).map(e=>this.resetItem(e))}},{key:"setNamiProfile",value:function(e){this.setItem(Ve,e)}},{key:"getNamiProfile",value:function(){return this.getItem(Ve)}},{key:"removeNamiProfile",value:function(){this.resetItem(Ve)}},{key:"setCustomerJourneyState",value:function(e){this.setItem(wt,e)}},{key:"getCustomerJourneyState",value:function(){return this.getItem(wt)}},{key:"setSessionCounter",value:function(){var e=this.getItem(Mt),t=e?parseInt(e):At||At;this.setItem(Mt,t+1)}},{key:"getSessionCounter",value:function(){var e=this.getItem(Mt);return e?parseInt(e):At}},{key:"setLastImpressionId",value:function(e){this.setItem(xt,e)}},{key:"getLastImpressionId",value:function(){var e;return null!==(e=this.getItem(xt))&&void 0!==e?e:""}},{key:"setPurchaseImpression",value:function(){var e,t=null!==(e=this.getLastImpressionId())&&void 0!==e?e:"";this.setItem(It,t)}},{key:"getPurchaseImpression",value:function(){var e;return null!==(e=this.getItem(It))&&void 0!==e?e:""}},{key:"setSessionId",value:function(e){e&&this.setItem(Ot,e)}},{key:"getSessionId",value:function(){var e;return null!==(e=this.getItem(Ot))&&void 0!==e?e:""}},{key:"clearSessionId",value:function(){this.resetItem(Ot)}},{key:"setLaunchId",value:function(e){e&&this.setItem(Rt,e)}},{key:"getLaunchId",value:function(){var e;return null!==(e=this.getItem(Rt))&&void 0!==e?e:""}},{key:"clearLaunchId",value:function(){this.resetItem(Rt)}},{key:"setPurchaseChannel",value:function(e){e&&this.setItem(jt,e)}},{key:"getPurchaseChannel",value:function(){return this.getItem(jt)}},{key:"getAnonymousUUID",value:function(){return this.getItem(Pt)}},{key:"setAnonymousUUID",value:function(e){this.setItem(Pt,e)}},{key:"clearAnonymousUUID",value:function(){this.resetItem(Pt)}},{key:"setApiCampaignSessionTimestamp",value:function(){this.setItem(et,Date.now())}},{key:"getApiCampaignSessionTimestamp",value:function(){return this.getItem(et)}},{key:"purgeApiCampaignCache",value:function(){this.resetItem(Qe),this.resetItem(qe),this.resetItem(et)}},{key:"getCampaignCacheTtl",value:function(){var e,t=this.getAppConfig(Xe)||this.getAppConfig(ut);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 i;try{i=JSON.stringify(t)}catch(t){return void Yi.error(`Serialization failed for ${e}`,t)}try{this.storage.setItem(e,i)}catch(t){Yi.error("Error setting item in localStorage:",t),this.resetItem(e),this.memoryStore[e]=i}}},{key:"getItem",value:function(e){try{var t=this.storage.getItem(e);if(null!==t)return JSON.parse(t)}catch(t){Yi.error("Error getting item from localStorage:",e,": ",t)}var i=this.memoryStore[e];return null!=i?JSON.parse(i):null}},{key:"resetItem",value:function(e){try{this.storage.removeItem(e)}catch(t){Yi.error("Error removing item from localStorage:",e,": ",t)}delete this.memoryStore[e]}},{key:"clearAll",value:function(){Vi.forEach(e=>this.resetItem(e)),this.clearAllCustomerAttributes(),this.memoryStore={}}},{key:"clear",value:function(){try{this.storage.clear()}catch(e){Yi.error("Error clearing localStorage:",e)}this.memoryStore={}}}])}(),Er=new Sr,Pr=function(e){function t(e,i){var n;return o(this,t),(n=r(this,t,[i])).statusCode=e,n.status=e,n.message=`RetryLimitExceededError: ${n.message}`,n}return p(t,e),h(t)}(_(Error)),Tr=function(e){function t(){return o(this,t),r(this,t,arguments)}return p(t,e),h(t)}(_(Error)),Mr=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),h(t)}(Tr),_r=function(e){function t(){return o(this,t),r(this,t,[Ae])}return p(t,e),h(t)}(_(Error)),Ar=function(e){function t(){return o(this,t),r(this,t,[Se])}return p(t,e),h(t)}(_(Error)),Dr=function(e){function t(){return o(this,t),r(this,t,[Pe])}return p(t,e),h(t)}(_(Error)),xr=function(e){function t(){return o(this,t),r(this,t,[Me])}return p(t,e),h(t)}(_(Error)),Cr=function(e){function t(){return o(this,t),r(this,t,[xe])}return p(t,e),h(t)}(_(Error)),Ir=function(e){function t(){return o(this,t),r(this,t,[Ie])}return p(t,e),h(t)}(_(Error)),Lr=function(e){function t(){return o(this,t),r(this,t,[Oe])}return p(t,e),h(t)}(_(Error)),Rr=function(e){function t(){return o(this,t),r(this,t,[$e])}return p(t,e),h(t)}(_(Error)),Fr=function(e){function t(){return o(this,t),r(this,t,[$e])}return p(t,e),h(t)}(_(Error)),Or=function(e){function t(){return o(this,t),r(this,t,[Re])}return p(t,e),h(t)}(_(Error)),Nr=function(e){function t(e){var i;return o(this,t),(i=r(this,t,[e])).message=`BadRequestError: ${i.message}`,i}return p(t,e),h(t)}(Tr),$r=function(e){function t(e){var i;return o(this,t),(i=r(this,t,[e])).message=`NotFoundError: ${i.message}`,i}return p(t,e),h(t)}(Tr),Wr=function(e){function t(e,i){var n;return o(this,t),(n=r(this,t,[i])).statusCode=e,n.message=`ClientError: ${n.message}`,n}return p(t,e),h(t)}(Tr),jr=function(e){function t(e){var i;return o(this,t),(i=r(this,t,[e])).message=`ServerError: ${i.message}`,i}return p(t,e),h(t)}(Tr),Br=(e,t)=>{if(e==gi)throw new Nr(t);if(e==bi)throw new $r(t);if(e==ki)throw new Mr;if(e>gi&&e<Ei)throw new Wr(e,t);if(e>=Ei)throw new jr(t)};function zr(e){for(var t=e.length;--t>=0;)e[t]=0}zr(new Array(576)),zr(new Array(60)),zr(new Array(512)),zr(new Array(256)),zr(new Array(29)),zr(new Array(30));var Ur=(e,t,i,n)=>{for(var a=65535&e,r=e>>>16&65535,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{r=r+(a=a+t[n++]|0)|0}while(--o);a%=65521,r%=65521}return a|r<<16},Hr=new Uint32Array((()=>{for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})()),Gr=(e,t,i,n)=>{var a=Hr,r=n+i;e^=-1;for(var o=n;o<r;o++)e=e>>>8^a[255&(e^t[o])];return-1^e},Vr={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"},Kr=0,Xr=4,Yr=5,qr=6,Jr=0,Qr=1,Zr=2,eo=-2,to=-3,io=-4,no=-5,ao=8,ro=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),oo=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)ro(i,n)&&(e[n]=i[n])}}return e},so=e=>{for(var t=0,i=0,n=e.length;i<n;i++)t+=e[i].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},uo=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){uo=!1}for(var lo=new Uint8Array(256),ho=0;ho<256;ho++)lo[ho]=ho>=252?6:ho>=248?5:ho>=240?4:ho>=224?3:ho>=192?2:1;lo[254]=lo[254]=1;var co=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,i,n,a,r,o=e.length,s=0;for(a=0;a<o;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),r=0,a=0;r<s;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),i<128?t[r++]=i:i<2048?(t[r++]=192|i>>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t},mo=(e,t)=>{var i,n,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(n=0,i=0;i<a;){var o=e[i++];if(o<128)r[n++]=o;else{var s=lo[o];if(s>4)r[n++]=65533,i+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&i<a;)o=o<<6|63&e[i++],s--;s>1?r[n++]=65533:o<65536?r[n++]=o:(o-=65536,r[n++]=55296|o>>10&1023,r[n++]=56320|1023&o)}}}return((e,t)=>{if(t<65534&&e.subarray&&uo)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var i="",n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i})(r,n)},fo=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);for(var i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+lo[e[i]]>t?i:t};var vo=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},po=16209,go=function(e,t){var i,n,a,r,o,s,u,l,d,h,c,m,f,v,p,g,y,b,w,k,S,E,P,T,M=e.state;i=e.next_in,P=e.input,n=i+(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,h=M.window,c=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&&(c+=P[i++]<<m,m+=8,c+=P[i++]<<m,m+=8),y=f[c&p];t:for(;;){if(c>>>=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=po;break e}y=f[(65535&y)+(c&(1<<b)-1)];continue t}for(w=65535&y,(b&=15)&&(m<b&&(c+=P[i++]<<m,m+=8),w+=c&(1<<b)-1,c>>>=b,m-=b),m<15&&(c+=P[i++]<<m,m+=8,c+=P[i++]<<m,m+=8),y=v[c&g];;){if(c>>>=b=y>>>24,m-=b,16&(b=y>>>16&255)){if(k=65535&y,m<(b&=15)&&(c+=P[i++]<<m,(m+=8)<b&&(c+=P[i++]<<m,m+=8)),(k+=c&(1<<b)-1)>s){e.msg="invalid distance too far back",M.mode=po;break e}if(c>>>=b,m-=b,k>(b=a-r)){if((b=k-b)>l&&M.sane){e.msg="invalid distance too far back",M.mode=po;break e}if(S=0,E=h,0===d){if(S+=u-b,b<w){w-=b;do{T[a++]=h[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++]=h[S++]}while(--b);if(S=0,d<w){w-=b=d;do{T[a++]=h[S++]}while(--b);S=a-k,E=T}}}else if(S+=d-b,b<w){w-=b;do{T[a++]=h[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=po;break e}y=v[(65535&y)+(c&(1<<b)-1)]}}break}}while(i<n&&a<o);i-=w=m>>3,c&=(1<<(m-=w<<3))-1,e.next_in=i,e.next_out=a,e.avail_in=i<n?n-i+5:5-(i-n),e.avail_out=a<o?o-a+257:257-(a-o),M.hold=c,M.bits=m},yo=15,bo=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]),wo=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]),ko=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]),So=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]),Eo=(e,t,i,n,a,r,o,s)=>{var u,l,d,h,c,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<=yo;y++)D[y]=0;for(b=0;b<n;b++)D[t[i+b]]++;for(S=g,k=yo;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<=yo;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<yo;y++)x[y+1]=x[y]+D[y];for(b=0;b<n;b++)0!==t[i+b]&&(o[x[t[i+b]]++]=b);if(0===e?(A=C=o,m=20):1===e?(A=bo,C=wo,m=257):(A=ko,C=So,m=0),_=0,b=0,y=w,c=r,E=S,P=0,d=-1,h=(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[c+(_>>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[i+o[b]]}if(y>S&&(_&h)!==d){for(0===P&&(P=S),c+=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=_&h]=S<<24|E<<16|c-r}}return 0!==_&&(a[c+_]=y-P<<24|64<<16),s.bits=S,0},Po=Xr,To=Yr,Mo=qr,_o=Jr,Ao=Qr,Do=Zr,xo=eo,Co=to,Io=io,Lo=no,Ro=ao,Fo=16180,Oo=16190,No=16191,$o=16192,Wo=16194,jo=16199,Bo=16200,zo=16206,Uo=16209,Ho=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Go(){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 Vo,Ko,Xo=e=>{if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<Fo||t.mode>16211?1:0},Yo=e=>{if(Xo(e))return xo;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=Fo,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,_o},qo=e=>{if(Xo(e))return xo;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Yo(e)},Jo=(e,t)=>{var i;if(Xo(e))return xo;var n=e.state;return t<0?(i=0,t=-t):(i=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?xo:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,qo(e))},Qo=(e,t)=>{if(!e)return xo;var i=new Go;e.state=i,i.strm=e,i.window=null,i.mode=Fo;var n=Jo(e,t);return n!==_o&&(e.state=null),n},Zo=!0,es=e=>{if(Zo){Vo=new Int32Array(512),Ko=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(Eo(1,e.lens,0,288,Vo,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Eo(2,e.lens,0,32,Ko,0,e.work,{bits:5}),Zo=!1}e.lencode=Vo,e.lenbits=9,e.distcode=Ko,e.distbits=5},ts=(e,t,i,n)=>{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)),n>=r.wsize?(r.window.set(t.subarray(i-r.wsize,i),0),r.wnext=0,r.whave=r.wsize):((a=r.wsize-r.wnext)>n&&(a=n),r.window.set(t.subarray(i-n,i-n+a),r.wnext),(n-=a)?(r.window.set(t.subarray(i-n,i),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0},is=(e,t)=>{var i,n,a,r,o,s,u,l,d,h,c,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(Xo(e)||!e.output||!e.input&&0!==e.avail_in)return xo;(i=e.state).mode===No&&(i.mode=$o),o=e.next_out,a=e.output,u=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,h=s,c=u,E=_o;e:for(;;)switch(i.mode){case Fo:if(0===i.wrap){i.mode=$o;break}for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(2&i.wrap&&35615===l){0===i.wbits&&(i.wbits=15),i.check=0,_[0]=255&l,_[1]=l>>>8&255,i.check=Gr(i.check,_,2,0),l=0,d=0,i.mode=16181;break}if(i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=Uo;break}if((15&l)!==Ro){e.msg="unknown compression method",i.mode=Uo;break}if(d-=4,S=8+(15&(l>>>=4)),0===i.wbits&&(i.wbits=S),S>15||S>i.wbits){e.msg="invalid window size",i.mode=Uo;break}i.dmax=1<<i.wbits,i.flags=0,e.adler=i.check=1,i.mode=512&l?16189:No,l=0,d=0;break;case 16181:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(i.flags=l,(255&i.flags)!==Ro){e.msg="unknown compression method",i.mode=Uo;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=Uo;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&4&i.wrap&&(_[0]=255&l,_[1]=l>>>8&255,i.check=Gr(i.check,_,2,0)),l=0,d=0,i.mode=16182;case 16182:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.head&&(i.head.time=l),512&i.flags&&4&i.wrap&&(_[0]=255&l,_[1]=l>>>8&255,_[2]=l>>>16&255,_[3]=l>>>24&255,i.check=Gr(i.check,_,4,0)),l=0,d=0,i.mode=16183;case 16183:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&4&i.wrap&&(_[0]=255&l,_[1]=l>>>8&255,i.check=Gr(i.check,_,2,0)),l=0,d=0,i.mode=16184;case 16184:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&4&i.wrap&&(_[0]=255&l,_[1]=l>>>8&255,i.check=Gr(i.check,_,2,0)),l=0,d=0}else i.head&&(i.head.extra=null);i.mode=16185;case 16185:if(1024&i.flags&&((m=i.length)>s&&(m=s),m&&(i.head&&(S=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(n.subarray(r,r+m),S)),512&i.flags&&4&i.wrap&&(i.check=Gr(i.check,n,m,r)),s-=m,r+=m,i.length-=m),i.length))break e;i.length=0,i.mode=16186;case 16186:if(2048&i.flags){if(0===s)break e;m=0;do{S=n[r+m++],i.head&&S&&i.length<65536&&(i.head.name+=String.fromCharCode(S))}while(S&&m<s);if(512&i.flags&&4&i.wrap&&(i.check=Gr(i.check,n,m,r)),s-=m,r+=m,S)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=16187;case 16187:if(4096&i.flags){if(0===s)break e;m=0;do{S=n[r+m++],i.head&&S&&i.length<65536&&(i.head.comment+=String.fromCharCode(S))}while(S&&m<s);if(512&i.flags&&4&i.wrap&&(i.check=Gr(i.check,n,m,r)),s-=m,r+=m,S)break e}else i.head&&(i.head.comment=null);i.mode=16188;case 16188:if(512&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(4&i.wrap&&l!==(65535&i.check)){e.msg="header crc mismatch",i.mode=Uo;break}l=0,d=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=No;break;case 16189:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}e.adler=i.check=Ho(l),l=0,d=0,i.mode=Oo;case Oo:if(0===i.havedict)return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,Do;e.adler=i.check=1,i.mode=No;case No:if(t===To||t===Mo)break e;case $o:if(i.last){l>>>=7&d,d-=7&d,i.mode=zo;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}switch(i.last=1&l,d-=1,3&(l>>>=1)){case 0:i.mode=16193;break;case 1:if(es(i),i.mode=jo,t===Mo){l>>>=2,d-=2;break e}break;case 2:i.mode=16196;break;case 3:e.msg="invalid block type",i.mode=Uo}l>>>=2,d-=2;break;case 16193:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",i.mode=Uo;break}if(i.length=65535&l,l=0,d=0,i.mode=Wo,t===Mo)break e;case Wo:i.mode=16195;case 16195:if(m=i.length){if(m>s&&(m=s),m>u&&(m=u),0===m)break e;a.set(n.subarray(r,r+m),o),s-=m,r+=m,u-=m,o+=m,i.length-=m;break}i.mode=No;break;case 16196:for(;d<14;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(i.nlen=257+(31&l),l>>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Uo;break}i.have=0,i.mode=16197;case 16197:for(;i.have<i.ncode;){for(;d<3;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.lens[A[i.have++]]=7&l,l>>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,P={bits:i.lenbits},E=Eo(0,i.lens,0,19,i.lencode,0,i.work,P),i.lenbits=P.bits,E){e.msg="invalid code lengths set",i.mode=Uo;break}i.have=0,i.mode=16198;case 16198:for(;i.have<i.nlen+i.ndist;){for(;g=(M=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(y<16)l>>>=p,d-=p,i.lens[i.have++]=y;else{if(16===y){for(T=p+2;d<T;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(l>>>=p,d-=p,0===i.have){e.msg="invalid bit length repeat",i.mode=Uo;break}S=i.lens[i.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+=n[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+=n[r++]<<d,d+=8}d-=p,S=0,m=11+(127&(l>>>=p)),l>>>=7,d-=7}if(i.have+m>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Uo;break}for(;m--;)i.lens[i.have++]=S}}if(i.mode===Uo)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Uo;break}if(i.lenbits=9,P={bits:i.lenbits},E=Eo(1,i.lens,0,i.nlen,i.lencode,0,i.work,P),i.lenbits=P.bits,E){e.msg="invalid literal/lengths set",i.mode=Uo;break}if(i.distbits=6,i.distcode=i.distdyn,P={bits:i.distbits},E=Eo(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,P),i.distbits=P.bits,E){e.msg="invalid distances set",i.mode=Uo;break}if(i.mode=jo,t===Mo)break e;case jo:i.mode=Bo;case Bo:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,go(e,c),o=e.next_out,a=e.output,u=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,i.mode===No&&(i.back=-1);break}for(i.back=0;g=(M=i.lencode[l&(1<<i.lenbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(g&&!(240&g)){for(b=p,w=g,k=y;g=(M=i.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+=n[r++]<<d,d+=8}l>>>=b,d-=b,i.back+=b}if(l>>>=p,d-=p,i.back+=p,i.length=y,0===g){i.mode=16205;break}if(32&g){i.back=-1,i.mode=No;break}if(64&g){e.msg="invalid literal/length code",i.mode=Uo;break}i.extra=15&g,i.mode=16201;case 16201:if(i.extra){for(T=i.extra;d<T;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=16202;case 16202:for(;g=(M=i.distcode[l&(1<<i.distbits)-1])>>>16&255,y=65535&M,!((p=M>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(!(240&g)){for(b=p,w=g,k=y;g=(M=i.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+=n[r++]<<d,d+=8}l>>>=b,d-=b,i.back+=b}if(l>>>=p,d-=p,i.back+=p,64&g){e.msg="invalid distance code",i.mode=Uo;break}i.offset=y,i.extra=15&g,i.mode=16203;case 16203:if(i.extra){for(T=i.extra;d<T;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Uo;break}i.mode=16204;case 16204:if(0===u)break e;if(m=c-u,i.offset>m){if((m=i.offset-m)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Uo;break}m>i.wnext?(m-=i.wnext,f=i.wsize-m):f=i.wnext-m,m>i.length&&(m=i.length),v=i.window}else v=a,f=o-i.offset,m=i.length;m>u&&(m=u),u-=m,i.length-=m;do{a[o++]=v[f++]}while(--m);0===i.length&&(i.mode=Bo);break;case 16205:if(0===u)break e;a[o++]=i.length,u--,i.mode=Bo;break;case zo:if(i.wrap){for(;d<32;){if(0===s)break e;s--,l|=n[r++]<<d,d+=8}if(c-=u,e.total_out+=c,i.total+=c,4&i.wrap&&c&&(e.adler=i.check=i.flags?Gr(i.check,a,c,o-c):Ur(i.check,a,c,o-c)),c=u,4&i.wrap&&(i.flags?l:Ho(l))!==i.check){e.msg="incorrect data check",i.mode=Uo;break}l=0,d=0}i.mode=16207;case 16207:if(i.wrap&&i.flags){for(;d<32;){if(0===s)break e;s--,l+=n[r++]<<d,d+=8}if(4&i.wrap&&l!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=Uo;break}l=0,d=0}i.mode=16208;case 16208:E=Ao;break e;case Uo:E=Co;break e;case 16210:return Io;default:return xo}return e.next_out=o,e.avail_out=u,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,(i.wsize||c!==e.avail_out&&i.mode<Uo&&(i.mode<zo||t!==Po))&&ts(e,e.output,e.next_out,c-e.avail_out),h-=e.avail_in,c-=e.avail_out,e.total_in+=h,e.total_out+=c,i.total+=c,4&i.wrap&&c&&(e.adler=i.check=i.flags?Gr(i.check,a,c,e.next_out-c):Ur(i.check,a,c,e.next_out-c)),e.data_type=i.bits+(i.last?64:0)+(i.mode===No?128:0)+(i.mode===jo||i.mode===Wo?256:0),(0===h&&0===c||t===Po)&&E===_o&&(E=Lo),E},ns={inflateReset:qo,inflateReset2:Jo,inflateResetKeep:Yo,inflateInit:e=>Qo(e,15),inflateInit2:Qo,inflate:is,inflateEnd:e=>{if(Xo(e))return xo;var t=e.state;return t.window&&(t.window=null),e.state=null,_o},inflateGetHeader:(e,t)=>{if(Xo(e))return xo;var i=e.state;return 2&i.wrap?(i.head=t,t.done=!1,_o):xo},inflateSetDictionary:(e,t)=>{var i,n=t.length;return Xo(e)||0!==(i=e.state).wrap&&i.mode!==Oo?xo:i.mode===Oo&&Ur(1,t,n,0)!==i.check?Co:ts(e,t,n,n)?(i.mode=16210,Io):(i.havedict=1,_o)},inflateInfo:"pako inflate (from Nodeca project)"};var as=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},rs=Object.prototype.toString,os=Kr,ss=Xr,us=Jr,ls=Qr,ds=Zr,hs=eo,cs=to,ms=io;function fs(e){this.options=oo({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 vo,this.strm.avail_out=0;var i=ns.inflateInit2(this.strm,t.windowBits);if(i!==us)throw new Error(Vr[i]);if(this.header=new as,ns.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=co(t.dictionary):"[object ArrayBuffer]"===rs.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=ns.inflateSetDictionary(this.strm,t.dictionary))!==us))throw new Error(Vr[i])}fs.prototype.push=function(e,t){var i,n,a,r=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(n=t===~~t?t:!0===t?ss:os,"[object ArrayBuffer]"===rs.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),(i=ns.inflate(r,n))===ds&&s&&((i=ns.inflateSetDictionary(r,s))===us?i=ns.inflate(r,n):i===cs&&(i=ds));r.avail_in>0&&i===ls&&r.state.wrap>0&&0!==e[r.next_in];)ns.inflateReset(r),i=ns.inflate(r,n);switch(i){case hs:case cs:case ds:case ms:return this.onEnd(i),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||i===ls))if("string"===this.options.to){var u=fo(r.output,r.next_out),l=r.next_out-u,d=mo(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(i!==us||0!==a){if(i===ls)return i=ns.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},fs.prototype.onData=function(e){this.chunks.push(e)},fs.prototype.onEnd=function(e){e===us&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=so(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var vs={ungzip:function(e,t){var i=new fs(t);if(i.push(e),i.err)throw i.msg||Vr[i.err];return i.result}}.ungzip,ps=e=>{var t;if(null!=e&&e.includes(Jt))t=Kt;else{var i=null==e?void 0:e.find(e=>e.includes(Yt));t=i?i.split("=")[1]:Gt}return(t=t.replace(/\/$/,""))+"/"+Ut},gs=e=>{var t,i,n=Er.getAppConfig(Xe)||Er.getAppConfig(ut);return null!==(t=null==n||null===(i=n.capabilities)||void 0===i?void 0:i.includes(e))&&void 0!==t&&t},ys=()=>{var e,t,i=(t=Er.getAppConfig(Xe)||Er.getAppConfig(ut),null!==(e=null==t?void 0:t.campaign_cache_ttl)&&void 0!==e?e:null);if(null!==i)if(0!==i){var n=Er.getApiCampaignSessionTimestamp();if(null!==n)(Date.now()-n)/1e3>=i&&Er.purgeApiCampaignCache()}else Er.purgeApiCampaignCache()},bs=e=>{var t=!gs(fe.THIRD_PARTY_TRANSACTIONS);return e&&!t&&Yi.info(`[${e}] Your plan does not have purchase management features.`),t},ws=()=>{var e,t,i=null===(e=Er.getNamiConfig())||void 0===e?void 0:e.namiCommands;return null!==(t=null==i?void 0:i.includes(ri))&&void 0!==t&&t},ks=()=>{var e,t,i=null===(e=Er.getNamiConfig())||void 0===e?void 0:e.namiCommands;return null!==(t=null==i?void 0:i.includes(si))&&void 0!==t&&t};function Ss(e){try{var t=function(e){if("undefined"!=typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));for(var t=atob(e),i=t.length,n=new Uint8Array(i),a=0;a<i;a++)n[a]=t.charCodeAt(a);return n}(e.trim()),i=vs(t),n=(new TextDecoder).decode(i);return JSON.parse(n)}catch(e){return}}function Es(e,t,i=mi,n=li){var r,o,s,u,l,d,h;return k(function(c){for(;;)switch(c.n){case 0:return o=0,s=ws(),u=ks(),l=null!==(r=null==t?void 0:t.method)&&void 0!==r?r:"GET",d=()=>{var r,h,c,m;return k(function(f){for(;;)switch(f.n){case 0:return(s||u)&&Yi.debug(`[HTTP] ${l} ${e}`),u&&null!=t&&t.body&&Yi.debug(`[HTTP] Request body: ${t.body}`),f.n=1,a(Ps(e,t,i));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:h=f.v,Yi.debug(`[HTTP] Response ${r.status}: ${h}`);case 3:if(r.status!=ki){f.n=4;break}throw new Mr;case 4:if(!(++o<=n)){f.n=6;break}return c=1e3*(o+hi),f.n=5,a(new Promise(e=>setTimeout(e,c)));case 5:return f.a(2,d());case 6:throw new Pr(r.status,`Request failed after ${n} retries`);case 7:if(!u){f.n=9;break}return f.n=8,a(r.clone().text());case 8:m=f.v,Yi.debug(`[HTTP] Response ${r.status}: ${m}`);case 9:return f.a(2,r)}},null,null,null,Promise)},c.n=1,a(d());case 1:return h=c.v,c.a(2,h.json())}},null,null,null,Promise)}function Ps(e,t={},i){var n,r,o;return k(function(s){for(;;)switch(s.n){case 0:return n=new AbortController,r=setTimeout(()=>n.abort(),i),t.signal=n.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 Ts(e,t,i){var n=i.value;return i.value=function(...e){if(!this.platformID)throw new Ar;return n.apply(this,e)},i}function Ms(e,t,i){var n=i.value;return i.value=function(...e){var t=Er.getDevice();if(null==t||!t.id)throw new Dr;return n.apply(this,e)},i}var _s,As=function(){return h(function e(){o(this,e);var t=Er.getNamiConfig();!this.platformID&&t&&this.configure(t)},[{key:"deviceID",get:function(){var e;return null===(e=Er.getDevice())||void 0===e?void 0:e.id}},{key:"configure",value:function(e){this.baseURL=ps(e.namiCommands),this.platformID=e.appPlatformID}},{key:"login",value:function(e){var t,i;return k(function(n){for(;;)switch(n.n){case 0:if(e){n.n=1;break}throw new xr;case 1:return t=`device/${this.deviceID}/login/`,i={external_id:e},n.n=2,a(this.requestBodyAPI(t,i,"PUT"));case 2:return n.a(2,n.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,i;return k(function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/session/`,n.n=1,a(this.requestBodyAPI(t,{start_time:e,app_env:"production"}));case 1:i=n.v,Er.setSessionCounter(),i.id&&Er.setSessionId(i.id);case 2:return n.a(2)}},null,this,null,Promise)}},{key:"postImpression",value:function(e){var t,i;return k(function(n){for(;;)switch(n.n){case 0:return t=`device/${this.deviceID}/impression/`,n.n=1,a(this.requestBodyAPI(t,e,"POST",!0));case 1:(i=n.v).id&&Er.setLastImpressionId(i.id);case 2:return n.a(2)}},null,this,null,Promise)}},{key:"postConversion",value:function(e){var t;return k(function(i){for(;;)switch(i.n){case 0:return t=`device/${this.deviceID}/transaction/`,i.n=1,a(this.requestBodyAPI(t,e,"POST",!0));case 1:return i.a(2)}},null,this,null,Promise)}},{key:"purchaseValidation",value:function(e){var t;return k(function(i){for(;;)switch(i.n){case 0:return t=`device/${this.deviceID}/purchase_event/`,i.n=1,a(this.requestBodyAPI(t,e,"PUT"));case 1:return i.a(2)}},null,this,null,Promise)}},{key:"fetchAPI",value:function(e,t,i){var n;return k(function(r){for(;;)switch(r.n){case 0:return n=`${this.baseURL}/${this.platformID}/`+e,r.n=1,a(Es(n,void 0,t,i));case 1:return r.a(2,r.v)}},null,this,null,Promise)}},{key:"requestBodyAPI",value:function(e,t,i="POST",n=!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:i,headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:n},l.n=1,a(Es(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)}}])}();function Ds(e){return null!=(null==e?void 0:e.flow)}As.instance=new As,he([Ms],As.prototype,"login",null),he([Ms],As.prototype,"logout",null),he([Ms],As.prototype,"startSession",null),he([Ms],As.prototype,"postImpression",null),he([Ms],As.prototype,"postConversion",null),he([Ms],As.prototype,"purchaseValidation",null),he([Ts],As.prototype,"fetchAPI",null),he([Ts],As.prototype,"requestBodyAPI",null),e.NamiCampaignRuleType=void 0,(_s=e.NamiCampaignRuleType||(e.NamiCampaignRuleType={})).DEFAULT="default",_s.LABEL="label",_s.UNKNOWN="unknown",_s.URL="url";var xs=()=>{var e;return null!==(e=Er.getPaywalls(ct))&&void 0!==e?e:[]},Cs=()=>{var e;return null!==(e=Er.getPaywalls(Qe))&&void 0!==e?e:[]},Is=()=>kr(qi([...Cs(),...xs()]),"id"),Ls=e=>Is().find(t=>t.id===e),Rs=e=>{var t=Is(),i=new Set(t.map(e=>e.id));return e.every(e=>i.has(e))},Fs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{},Os="function"==typeof Fs.BigInt,Ns=Os?Fs.BigInt.bind(Fs):void 0,$s=Os?Ns("0xffffffffffffffffffffffffffffffff"):null,Ws=Os?Ns("0x100000000000000000000000000000000"):null,js=Os?Ns(0):null,Bs=Os?Ns(1):null,zs=Os?Ns(8):null,Us=Os?Ns(1e4):null,Hs=Fs.crypto,Gs="function"==typeof(null==Hs?void 0:Hs.getRandomValues),Vs=1/16,Ks=e=>de().device.getDeviceData(e),Xs=()=>{var e=Er.getNamiConfig();return e&&e.formFactor?e.formFactor:de().device.getDeviceFormFactor()};function Ys(){return de().device.generateUUID()}function qs(e){if(!Os||!$s)return Zs(e);try{var t=$s,i=function(e){if(!Ns)throw new Error("BigInt is not supported in this environment");var t=e.replace(/-/g,"");return Ns("0x"+t)}(e);return Number(i)/Number(t)*100}catch(t){throw Yi.error(`Error calculating audience split position for UUID ${e}`,t),new Error(`Invalid UUID format: ${e}`)}}function Js(e){if(!Ns)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 i=3&parseInt(t[16],16)|8;return(t=t.substring(0,16)+i.toString(16)+t.substring(17)).slice(0,8)+"-"+t.slice(8,12)+"-"+t.slice(12,16)+"-"+t.slice(16,20)+"-"+t.slice(20)}function Qs(e,t=.5){if(!Number.isFinite(e))throw new Error("Invalid target");if(!Number.isFinite(t))throw new Error("Invalid tolerance");var i=Math.max(0,Math.min(100,e)),n=Math.max(0,Math.min(50,t)),a=e=>Math.round(100*e),r=Math.max(0,a(i-n)),o=Math.min(1e4,a(i+n));if(!(Os&&$s&&Ns&&Us))return function(e,t){for(var i=Math.max(0,Math.min(100,e-t)),n=Math.min(100,Math.max(0,e+t)),a=Ys(),r=Number.POSITIVE_INFINITY,o=50,s=0;s<o;s++){var u=Ys(),l=Zs(u);if(l>=i&&l<=n)return u;var d=eu(l,i,n);d<r&&(r=d,a=u)}return a}(i,n);var s=$s,u=Ns,l=Us,d=e=>s*u(e)/l,h=d(r),m=d(o);if(m<=h)return Js(h);var f=h+function(e){if(!Ns||null===Ws||null===Bs||null===js||null===zs)throw new Error("BigInt is not supported in this environment");var t=Ns,i=js,n=Bs,a=zs,r=Ws;if(e<i)throw new Error("n must be non-negative");if(e===i)return i;for(var o=new Uint8Array(16),s=e+n,u=r/s*s-n,l=0,d=!1;l<10;){if(Gs)Hs.getRandomValues(o);else{d||(d=!0,Yi.warn("randomBigInt: crypto.getRandomValues unavailable, using Math.random fallback"));for(var h=0;h<o.length;h++)o[h]=Math.floor(256*Math.random())}for(var m,f=i,v=c(o);!(m=v()).done;)f=f<<a|t(m.value);if(f<=u)return f%s;l++}if(Gs)try{Hs.getRandomValues(o);for(var p,g=i,y=c(o);!(p=y()).done;)g=g<<a|t(p.value);var b=g%s;return Yi.warn("randomBigInt: reached max rejection attempts, using modulo fallback",{n:e.toString(),attempts:l}),b}catch(e){throw Yi.error("randomBigInt: failed to generate random values",e),new Error("randomBigInt: unable to generate random value")}for(var w,k=i,S=c(o);!(w=S()).done;)k=k<<a|t(w.value);return Yi.warn("randomBigInt: reached max rejection attempts without crypto, using modulo fallback",{n:e.toString(),attempts:l}),k%s}(m-h);return Js(f)}function Zs(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 i=0,n=t.length-1;n>=0;n--){i=(i+parseInt(t[n],16))*Vs}return i}(e);return 100*t}function eu(e,t,i){return e<t?t-e:e>i?e-i:0}var tu,iu=e=>{try{var t=new URL(e);return("http:"===t.protocol||"https:"===t.protocol)&&!!t.hostname}catch(e){return!1}},nu=e=>{try{var t=new URL(e),i=t.origin+t.pathname,n=new Set;return t.searchParams.forEach((e,t)=>{n.add(`${t}=${e}`)}),{basePath:i,params:n}}catch(e){return}},au=(e,t,i)=>e?e.flatMap(e=>{var n;if(n="string"==typeof i?e.segments.filter(e=>e.form_factors.some(e=>e.form_factor===i)):e.segments,0===n.length)return[];var a=((e,t)=>{for(var i,n=[...e].sort((e,t)=>e.split-t.split),a=c(n);!(i=a()).done;){var r=i.value;if(t<=r.split)return r}return n[n.length-1]})(n,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}}):[],ru=()=>{var e,t,i=null!==(e=Er.getCampaignRules(qe))&&void 0!==e?e:[],n=null!==(t=Er.getCampaignRules(dt))&&void 0!==t?t:[],a=Xs(),r=qi([...i,...n]).filter(e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===a)});return kr(r,"rule")},ou=e=>{var t,i=null!==(t=Er.getCampaignRules(e))&&void 0!==t?t:[],n=Xs();return qi(i).filter(e=>{var t;return null===(t=e.form_factors)||void 0===t?void 0:t.some(e=>e.form_factor===n)})},su=()=>ou(dt),uu=()=>ou(qe),lu=(t,i,n,a)=>{var r=(()=>{if(!a)return t().find(t=>t.type==e.NamiCampaignRuleType.DEFAULT);if(a===e.NamiCampaignRuleType.URL){var i=t().filter(t=>t.type==e.NamiCampaignRuleType.URL);return((e,t)=>{var i,n,a,r=nu(e);if(r){for(var o,s,u,l=c(t);!(u=l()).done;){var d=u.value,h=d.value;if(h){var m=nu(h);if(m&&m.basePath===r.basePath){var f=m.params.size;if(0!==f){for(var v,p=0,g=c(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!==(i=null===(n=o)||void 0===n?void 0:n.campaign)&&void 0!==i?i:null===(a=s)||void 0===a?void 0:a.campaign}})(n,i)}return t().find(e=>e.type==a&&e.value==n)})();if(!r)return{};var o=i().find(e=>(null==r?void 0:r.paywall)===e.id);return{campaign:r,paywall:o}},du=(e,t)=>{var i=lu(uu,Cs,e,t);if(i.campaign&&i.paywall)return{campaign:i.campaign,paywall:i.paywall};var n=lu(su,xs,e,t);return n.campaign&&n.paywall?{campaign:n.campaign,paywall:n.paywall}:i.campaign||i.paywall?{campaign:i.campaign,paywall:i.paywall}:{campaign:n.campaign,paywall:n.paywall}},hu="object"==typeof Reflect?Reflect:null,cu=hu&&"function"==typeof hu.apply?hu.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};tu=hu&&"function"==typeof hu.ownKeys?hu.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var mu=Number.isNaN||function(e){return e!=e};function fu(){fu.init.call(this)}fu.EventEmitter=fu,fu.prototype._events=void 0,fu.prototype._eventsCount=0,fu.prototype._maxListeners=void 0;var vu=10;function pu(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function gu(e){return void 0===e._maxListeners?fu.defaultMaxListeners:e._maxListeners}function yu(e,t,i,n){var a,r,o,s;if(pu(i),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),r=e._events),o=r[t]),void 0===o)o=r[t]=i,++e._eventsCount;else if("function"==typeof o?o=r[t]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),(a=gu(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 bu(){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 wu(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},a=bu.bind(n);return a.listener=i,n.wrapFn=a,a}function ku(e,t,i){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?i?[a.listener||a]:[a]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(a):Eu(a,a.length)}function Su(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function Eu(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}Object.defineProperty(fu,"defaultMaxListeners",{enumerable:!0,get:function(){return vu},set:function(e){if("number"!=typeof e||e<0||mu(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");vu=e}}),fu.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},fu.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||mu(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},fu.prototype.getMaxListeners=function(){return gu(this)},fu.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,a=this._events;if(void 0!==a)n=n&&void 0===a.error;else if(!n)return!1;if(n){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)cu(s,this,t);else for(var u=s.length,l=Eu(s,u),d=0;d<u;++d)cu(l[d],this,t);return!0},fu.prototype.addListener=function(e,t){return yu(this,e,t,!1)},fu.prototype.on=fu.prototype.addListener,fu.prototype.prependListener=function(e,t){return yu(this,e,t,!0)},fu.prototype.once=function(e,t){return pu(t),this.on(e,wu(this,e,t)),this},fu.prototype.prependOnceListener=function(e,t){return pu(t),this.prependListener(e,wu(this,e,t)),this},fu.prototype.removeListener=function(e,t){var i,n,a,r,o;if(pu(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(a=-1,r=i.length-1;r>=0;r--)if(i[r]===t||i[r].listener===t){o=i[r].listener,a=r;break}if(a<0)return this;0===a?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,a),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},fu.prototype.off=fu.prototype.removeListener,fu.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var a,r=Object.keys(i);for(n=0;n<r.length;++n)"removeListener"!==(a=r[n])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},fu.prototype.listeners=function(e){return ku(this,e,!0)},fu.prototype.rawListeners=function(e){return ku(this,e,!1)},fu.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Su.call(e,t)},fu.prototype.listenerCount=Su,fu.prototype.eventNames=function(){return this._eventsCount>0?tu(this._events):[]};var Pu=function(){function e(){o(this,e),this.emitter=new fu}return h(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}}])}(),Tu=function(){return h(function e(){o(this,e),this.disableCampaignUpdates=!1,this.useLegacyPaywallFetch=!1,this.currentFormFactor=Xs()},[{key:"configure",value:function(e,t,i=[]){this.currentFormFactor=e,this.splitPosition=t,this.disableCampaignUpdates=i.includes("disableCampaignUpdates"),this.useLegacyPaywallFetch=i.includes("useLegacyPaywallFetch")}},{key:"fetchCampaignRules",value:function(e){var t,i,n,r;return k(function(o){for(;;)switch(o.n){case 0:if(n=Er.getDevice(),!this.disableCampaignUpdates){o.n=1;break}return Yi.info("Campaign updates disabled by configuration. Skipping fetch."),o.a(2,[]);case 1:if(null!=n&&n.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(n.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===(i=r)||void 0===i?void 0:i.filter(t=>{if(t.paywall){var i=e.find(e=>e.id==t.paywall);if(i)return t}else if(t.flow)return t}),Er.setCampaignRules(qe,r),Er.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),o.a(2,r)}},null,this,null,Promise)}},{key:"fetchCampaignRulesRaw",value:function(){var e,t,i;return k(function(n){for(;;)switch(n.n){case 0:if(t=Er.getDevice(),!this.disableCampaignUpdates){n.n=1;break}return Yi.info("Campaign updates disabled by configuration. Skipping fetch."),n.a(2,[]);case 1:if(null!=t&&t.id){n.n=3;break}return n.n=2,a(this.getAnonymousCampaigns());case 2:i=n.v,n.n=5;break;case 3:return n.n=4,a(this.getCampaigns(t.id));case 4:i=n.v;case 5:return i=null===(e=i)||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))}),n.a(2,i)}},null,this,null,Promise)}},{key:"finalizeCampaignRules",value:function(e,t){var i=null==e?void 0:e.filter(e=>e.paywall?t.find(t=>t.id==e.paywall):!!e.flow);return Er.setCampaignRules(qe,i),Er.setApiCampaignSessionTimestamp(),this.invokeAvailableCampaignsResponseHandler(),i}},{key:"invokeAvailableCampaignsResponseHandler",value:function(){var e=Pu.getInstance().listeners(Ci),t=ru();e.forEach(e=>e(t))}},{key:"getAnonymousCampaigns",value:function(e=ye){var t,i,n,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(As.instance.fetchAPI(t));case 2:return n=s.v,s.a(2,au(null!==(i=n.results)&&void 0!==i?i:[],this.splitPosition,this.currentFormFactor));case 3:if(s.p=3,o=s.v,r=this.fallbackData()){s.n=4;break}throw Yi.error(Br(o.status,t)),o;case 4:return s.a(2,r.results)}},null,this,[[1,3]],Promise)}},{key:"getCampaigns",value:function(e){var t,i,n,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return i=`device/${e}/campaign_rules/`,o.p=1,o.n=2,a(As.instance.fetchAPI(i));case 2:n=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,n=this.fallbackData()){o.n=4;break}throw Yi.error(Br(r.status,i)),r;case 4:return o.a(2,(null===(t=n)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Er.getCampaignRules(qe)||Er.getCampaignRules(dt);return e?{count:e.length,results:e}:null}}],[{key:"extractPaywallUrls",value:function(e){for(var t,i=[],n=c(e);!(t=n()).done;){var a,r=t.value;r.paywall_url&&i.push(r.paywall_url),r.page_urls&&i.push(...Object.values(r.page_urls)),null!==(a=r.flow)&&void 0!==a&&a.page_urls&&i.push(...Object.values(r.flow.page_urls))}return i}},{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 Mu(e,t){return Va(e,t)}Tu.instance=new Tu;var _u=function(){return h(function e(){o(this,e)},[{key:"createOrUpdateDevice",value:function(e,t,i){var n=Er.getDevice();if(null==n||!n.id){var a,r=m({},e,{id:null!==(a=null!=t?t:this.getAnonymousUUID())&&void 0!==a?a:Ys()});return{id:r.id,device:this.createDevice(r,i)}}return this.isEqualDevices(n,e)?{id:n.id,device:Promise.resolve(n)}:(this.updateDevice(n.id,e),{id:n.id,device:null})}},{key:"createDevice",value:function(e,t){var i,n;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(!(i=r.v)){r.n=2;break}Er.setDevice(i),r.n=3;break;case 2:return Yi.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,i);case 4:if(r.p=4,n=r.v,console.error("Error creating device:",n),!(n instanceof Pr)){r.n=5;break}return Yi.info("Retry limit exceeded, switching to anon mode for this session"),null==t||t.setInMemoryAnonymousMode(!0),r.a(2,null);case 5:throw n;case 6:return r.a(2)}},null,this,[[0,4]],Promise)}},{key:"updateDevice",value:function(e,t){var i;return k(function(n){for(;;)switch(n.n){case 0:return n.n=1,a(this.requestAPIData(`device/${e}/`,t,"PUT"));case 1:return(i=n.v)&&Er.setDevice(i),n.a(2,i)}},null,this,null,Promise)}},{key:"updateDeviceField",value:function(e,t){var i,n,r;return k(function(o){for(;;)switch(o.n){case 0:if(i={[e]:t},null!=(n=Er.getDevice())&&n.id){o.n=1;break}throw new Dr;case 1:return o.n=2,a(this.requestAPIData(`device/${n.id}/`,i,"PATCH"));case 2:return(r=o.v)&&Er.setDevice(r),o.a(2,r)}},null,this,null,Promise)}},{key:"requestAPIData",value:function(e,t,i="POST",n=vi,r){var o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:return u.p=0,u.n=1,a(As.instance.requestBodyAPI(e,t,i,!1,n,r));case 1:o=u.v,u.n=5;break;case 2:if(u.p=2,!((s=u.v)instanceof Ar)){u.n=3;break}throw s;case 3:if(!("device/"===e&&s instanceof Pr)){u.n=4;break}throw s;case 4:if(o=Er.getDevice()){u.n=5;break}return Yi.error(Br(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 i=m({},e,t),n=Object.keys(e).reduce((e,t)=>(e[t]=i[t],e),{});return Mu(n,e)}},{key:"getOrCreateAnonymousUUID",value:function(){var e=Er.getAnonymousUUID();return e||(e=Ys(),Er.setAnonymousUUID(e)),e}},{key:"getAnonymousUUID",value:function(){var e=Er.getAnonymousUUID();return e?(Er.clearAnonymousUUID(),e):null}}])}();_u.instance=new _u;var Au=function(){return h(function e(){o(this,e)},[{key:"fetchProducts",value:function(){var e,t,i,n;return k(function(r){for(;;)switch(r.p=r.n){case 0:if(!gs(fe.THIRD_PARTY_TRANSACTIONS)){r.n=1;break}return r.a(2,[]);case 1:return r.p=1,r.n=2,a(As.instance.fetchAPI("products/"));case 2:i=r.v,r.n=4;break;case 3:if(r.p=3,n=r.v,i=this.fallbackData()){r.n=4;break}throw Yi.error(Br(n.status,"products/")),n;case 4:return null!==(e=i)&&void 0!==e&&e.results&&Er.setProducts(it,i.results),r.a(2,(null===(t=i)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"fallbackData",value:function(){var e=Er.getProducts(it)||Er.getProducts(ft);return e?{count:e.length,results:e}:null}}])}();Au.instance=new Au;var Du=function(){return h(function e(){o(this,e)},[{key:"fetchPaywalls",value:function(){var e,t,i;return k(function(n){for(;;)switch(n.n){case 0:if(null!=(e=Er.getDevice())&&e.id){n.n=2;break}return n.n=1,a(this.getAnonymousPaywalls());case 1:t=n.v,n.n=4;break;case 2:return n.n=3,a(this.getPaywalls(e.id));case 3:t=n.v;case 4:if(!t){n.n=5;break}return(i=this.validatePaywalls(t)).length>0&&Er.setPaywalls(Qe,i),n.a(2,i);case 5:return n.a(2,t)}},null,this,null,Promise)}},{key:"getAnonymousPaywalls",value:function(e=ye){var t,i,n,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return i=`paywalls/?sdk_version=${e}`,n=null,o.p=1,o.n=2,a(As.instance.fetchAPI(i));case 2:n=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,n=this.fallbackData()){o.n=4;break}throw Yi.error(Br(r.status,i)),r;case 4:return o.a(2,(null===(t=n)||void 0===t?void 0:t.results)||[])}},null,this,[[1,3]],Promise)}},{key:"getPaywalls",value:function(e){var t,i,n,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:return i=`device/${e}/paywalls/`,o.p=1,o.n=2,a(As.instance.fetchAPI(i));case 2:n=o.v,o.n=4;break;case 3:if(o.p=3,r=o.v,n=this.fallbackData()){o.n=4;break}throw Yi.error(Br(r.status,i)),r;case 4:return o.a(2,(null===(t=n)||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,Es(e))},null,null,null,Promise)}},{key:"fetchPaywallsByUrls",value:function(e){var t,i,n,r,o,s,u;return k(function(l){for(;;)switch(l.n){case 0:return t=[...new Set(e)],l.n=1,a(Promise.allSettled(t.map(e=>this.fetchPaywallByUrl(e))));case 1:for(i=l.v,n=[],r=c(i);!(o=r()).done;)"fulfilled"===(s=o.value).status?n.push(s.value):Yi.error(`Failed to fetch individual paywall: ${s.reason}`);if(!(n.length>0)){l.n=2;break}return(u=this.validatePaywalls(n)).length>0&&Er.setPaywalls(Qe,u),l.a(2,u);case 2:return l.a(2,n)}},null,this,null,Promise)}},{key:"validatePaywalls",value:function(e){return e.filter(e=>{var t,i=null===(t=e.template)||void 0===t?void 0:t.pages;return!(!Array.isArray(i)||0===i.length)||(Yi.warn(`Dropping paywall "${e.id}" from cache: template.pages is missing or empty`),!1)})}},{key:"fallbackData",value:function(){var e=Er.getPaywalls(Qe)||Er.getPaywalls(ct);return e?{count:e.length,results:e}:null}}])}();Du.instance=new Du;var xu=function(){return h(function e(){o(this,e)},[{key:"fetchConfig",value:function(){var e,t;return k(function(i){for(;;)switch(i.p=i.n){case 0:return i.p=0,i.n=1,a(As.instance.fetchAPI("config/"));case 1:e=i.v,i.n=3;break;case 2:if(i.p=2,t=i.v,e=Er.getAppConfig(Xe)||Er.getAppConfig(ut)){i.n=3;break}throw Yi.error(Br(t.status,"config/")),t;case 3:return e&&Er.setAppConfig(Xe,e),i.a(2,e)}},null,null,[[0,2]],Promise)}}])}();xu.instance=new xu;var Cu=null;function Iu(){Cu&&Cu.setInMemoryAnonymousMode(!1)}function Lu(){return!!Er.getAnonymousMode()||!!Cu&&Cu.isInMemoryAnonymousMode()}var Ru=function(){return h(function e(){o(this,e)},[{key:"startSession",value:function(){var e;return k(function(t){for(;;)switch(t.p=t.n){case 0:if(!Lu()){t.n=1;break}return Yi.debug("Skipping session start call - anonymous mode"),t.a(2);case 1:return t.p=1,t.n=2,a(As.instance.startSession(new Date));case 2:t.n=4;break;case 3:t.p=3,e=t.v,Yi.error("error on start session: ",e);case 4:return t.a(2)}},null,null,[[1,3]],Promise)}}])}();Ru.instance=new Ru;var Fu=function(){return h(function e(){o(this,e)},null,[{key:"allPurchases",value:function(){return[]}}])}();Fu.instance=new Fu;var Ou={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"}},Nu="en";function $u(e){var t,i,n=function(e){if(!e)return Nu;var t=e.trim();if(Ou[t])return t;var i=t.toLowerCase(),n=i.split("-")[0];return Ou[n]?n:"zh"===n?i.includes("tw")||i.includes("hk")?"zh-TW":"zh-CN":Nu}(Er.getLanguageCode()),a=null!==(t=Ou[n])&&void 0!==t?t:Ou[Nu];return null!==(i=null==a?void 0:a[e])&&void 0!==i?i:e}function Wu(e){if("subscription"===(null==e?void 0:e.product_type)){var t=Bu(e);if(t.length>0)return t[0].billingPeriod}return null}function ju(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return zu(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Bu(e){return e?zu(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function zu(e,t){return e.map(e=>Uu(e,t))}function Uu(e,t){var i,n,a,r,o,s,u,l;if(!e)return{};var d=null!==(i=null===(n=e.promo_period)||void 0===n?void 0:n.count)&&void 0!==i?i:null==t?void 0:t.count,h=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,c=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*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:Vu(m).format(c)}}function Hu(e,t=!1,i=!1,n=!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],h=(e,t,i,n,r)=>{var o=(e=>a?`${e}_abbrev`:e)(r),s=(e=>a?`${e}_abbrev_plural`:`${e}_plural`)(r),u=$u(o),l=$u(s);return a||u!==o||(u=$u(`${r}_abbrev`)),a||l!==s||(l=$u(`${r}_abbrev_plural`)),n?e.toString():i?1===e||t?u:l:1===e||t?`${e} ${u}`:`${e} ${l}`};switch(e.at(-1)){case"D":return h(d,t,i,n,"nami_day");case"W":return h(l,t,i,n,"nami_week");case"M":return h(u,t,i,n,"nami_month");case"Y":return h(s,t,i,n,"nami_year")}return null}function Gu(e){var t;if(!e||e.length<2)return!1;var i=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===i||"Y"===i}function Vu(e){var t={maximumFractionDigits:2,minimumFractionDigits:0},i=de().device.getLanguage();try{return new Intl.NumberFormat(i,m({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(i,m({},t,{style:"currency",currency:"USD"}))}}var Ku=(e,t,i)=>e&&t&&i?i.format(e-t):null,Xu=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Yu=(e,t)=>{if(""!=t){var i=parseInt(t)-1;return i>=0&&i<(null==e?void 0:e.length)?e[i]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},qu=e=>Qu(e.priceAmountMicros)/Ju(e.billingPeriod),Ju=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Qu=e=>e/1e6;function Zu(e){return parseFloat((Math.round(e)/100).toFixed(2))}var el=(e,t,i=[])=>({price:()=>il(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>nl(e),durationSingular:()=>nl(e,!0),period:()=>nl(e,!1,!0),periodNumber:()=>nl(e,!1,!1,!0),freeTrialDuration:()=>al(e),freeTrialDurationSingular:()=>al(e,!0),freeTrialPeriod:()=>al(e,!1,!0),freeTrialPeriodNumber:()=>al(e,!1,!1,!0),pricePerMonth:()=>rl(e),pricePerMonthRounded:()=>rl(e,!0),periodInMonths:()=>ol(e),durationInMonths:()=>sl(e),durationInMonthsSingular:()=>sl(e,!0),periodNumberInMonths:()=>ul(e),percentagePriceDifferenceFromSku:()=>ll(e,t,i),priceDifferenceFromSku:()=>dl(e,t,i),promoEligible:()=>null===hl(e)&&null!==cl(e,t),freeTrialEligible:()=>null!==hl(e),promo:()=>{var i;return null===(i=cl(e,t))||void 0===i?void 0:i.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var i;return null===(i=ml(e,t))||void 0===i?void 0:i.formattedPrice},promoPeriod:()=>fl(e,t,!1,!0),promoPeriodNumber:()=>fl(e,t,!1,!1,!0),promoDuration:()=>fl(e,t),promoDurationSingular:()=>fl(e,t,!0),introEligible:()=>!1,pricePerDay:()=>vl(e),pricePerWeek:()=>pl(e),pricePerWeekRounded:()=>pl(e,!0),introductoryPrice:()=>gl(e,t),introductoryPeriod:()=>yl(e,t,!1,!0),introductoryPeriodNumber:()=>yl(e,t,!1,!1,!0),introductoryDuration:()=>yl(e,t),introductoryDurationSingular:()=>yl(e,t,!0),introductoryPricePerMonth:()=>bl(e,t),introductoryPricePerMonthRounded:()=>bl(e,t,!0),durationAbbrev:()=>nl(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>al(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>yl(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>fl(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>fl(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>sl(e,!1,!1,!1,!0),durationSingularAbbrev:()=>nl(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>al(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>yl(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>fl(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>fl(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>sl(e,!0,!1,!1,!0),periodAbbrev:()=>nl(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>al(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>yl(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>fl(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>fl(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>sl(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 i=t[1],n=t[2],a=t[3],r=t[4],o=void 0!==i?parseInt(i,10):0,s=void 0!==n?parseInt(n,10):0,u=void 0!==a?parseInt(a,10):0;return(void 0!==r?parseInt(r,10):0)>0?null:u>0?1===u?$u("nami_weekly"):2===u?$u("nami_biweekly"):null:s>0?$u(1===s?"nami_monthly":2===s?"nami_bimonthly":3===s?"nami_quarterly":6===s?"nami_biannually":12===s?"nami_yearly":"nami_monthly"):o>0?$u("nami_yearly"):null}(Wu(e)),iso_subscription_duration:()=>kl(e),invalid:()=>!1,unavailable:()=>!1}),tl=(e,t,i,n=[])=>{if(!t)return null;var a=el(t,i,n);return a[e]?a[e]():null},il=e=>{var t=Bu(e);return t&&t.length?t[0].formattedPrice:null},nl=(e,t,i,n,a)=>Hu(Wu(e),t,i,n,a),al=(e,t,i,n,a)=>Hu(ju(e),t,i,n,a),rl=(e,t)=>{var i=Bu(e);if(!i||0===i.length)return null;var n=qu(i[0]);return n?Vu(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},ol=(e,t)=>{var i=Bu(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Gu(n)?Hu("P1Y"===n?"P12M":n,!1,!1,!1,t):null},sl=(e,t,i,n,a)=>{var r=Bu(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Gu(o)?Hu("P1Y"===o?"P12M":o,t,i,n,a):null},ul=e=>{if(!e)return 0;var t=Bu(e);return t&&t.length?Ju(t[0].billingPeriod):0},ll=(e,t,i=[])=>{var n,a=Bu(e);if(!a||0===a.length)return null;var r=null===(n=Yu(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Xu(Zu(a[0].priceAmountMicros),ul(e));var o=Bu(r);return Xu(Zu(a[0].priceAmountMicros),ul(e),(null==o?void 0:o.length)>0?Zu(o[0].priceAmountMicros):0,ul(r))},dl=(e,t,i=[])=>{var n,a=Bu(e);if(!a||0===a.length)return null;var r=null===(n=Yu(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Ku(qu(a[0]));var o=Bu(r);return Ku(qu(a[0]),qu(o[0]),Vu(o[0].priceCurrencyCode))},hl=e=>ju(e),cl=(e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null},ml=(e,t)=>e?Uu(cl(e,t),e.subscription_period):null,fl=(e,t,i,n,a,r)=>{var o=ml(e,t);return Hu((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},vl=(e,t)=>{var i=Bu(e);if(!i||0===i.length)return null;var n,a,r=Qu(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=Ju(n))?30.437*a:1);return r?Vu(i[0].priceCurrencyCode).format(r):null},pl=(e,t)=>{var i=Bu(e);if(!i||0===i.length)return null;var n,a,r=Qu(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=Ju(n))?52*a/12:1);return r?Vu(i[0].priceCurrencyCode).format(t?Math.round(r):r):null},gl=(e,t)=>{var i=wl(e,t);return(null==i?void 0:i.formattedPrice)||null},yl=(e,t,i,n,a,r)=>{var o=wl(e,t);return Hu((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},bl=(e,t,i)=>{var n=wl(e,t);if(n){var a=Qu(n.priceAmountMicros),r=Ju(n.billingPeriod),o=i?Math.round(a/r):a/r;return Vu(n.priceCurrencyCode).format(o)}},wl=(e,t)=>{return e?(t?(i=e.offers[parseInt(t)])||(i=e.offers.find(e=>e.offer_ref_id===t)||null):i=e.offers[0],Uu(i,e.subscription_period)):null;var i},kl=e=>{var t=Wu(e);return t?"P7D"===t?"P1W":t:null};function Sl(e,t,i,n){var a=i.flatMap(e=>e.products).find(e=>e.id===t.selectedProducts[t.currentGroupId]);return Pl(_l(e,null==a?void 0:a.sku_ref_id),a,n)}function El(e,t,i){var n,a,r=null!==(n=null===(a=t.find(e=>e.id===i))||void 0===a?void 0:a.products)&&void 0!==n?n:[];return r.forEach(t=>{t.product_details=_l(e,t.sku_ref_id||""),t.variables=Pl(t.product_details,t,r)}),r}function Pl(e,t,i){if(!t)return{};var n=t.variables;if(!n)return m({},t);Object.keys(n).forEach(t=>{if("string"==typeof(r=n[t])&&r.includes(Ui)){var a=Tl(n[t],e,i);n[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(el({})).forEach(t=>{if(void 0===n[t]){var r=tl(t,e,void 0,i);null!==r&&(a[t]=r)}}),m({},t,a,n)}var Tl=(e,t,i)=>e.replace(Wi,(n,a)=>{var r,o,s,u,l=(null===(r=Wi.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,i)});function Ml(e,t){return t.flatMap(e=>e.products).some(t=>1==tl("freeTrialEligible",_l(e,t.sku_ref_id)))}function _l(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Al=function(){try{var e=_n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Dl=Object.prototype.hasOwnProperty;function xl(e,t,i){var n=e[t];Dl.call(e,t)&&Ji(n,i)&&(void 0!==i||t in e)||function(e,t,i){"__proto__"==t&&Al?Al(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}(e,t,i)}var Cl="object"==typeof e&&e&&!e.nodeType&&e,Il=Cl&&"object"==typeof module&&module&&!module.nodeType&&module,Ll=Il&&Il.exports===Cl?an.Buffer:void 0;Ll&&Ll.allocUnsafe;var Rl=wa(Object.getPrototypeOf,Object),Fl=Object.prototype.hasOwnProperty;function Ol(e){var t=new e.constructor(e.byteLength);return new jn(t).set(new jn(e)),t}var Nl=/\w*$/;var $l=rn?rn.prototype:void 0,Wl=$l?$l.valueOf:void 0;function jl(e,t,i){var n,a,r,o=e.constructor;switch(t){case"[object ArrayBuffer]":return Ol(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return r=Ol((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=Ol(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,Nl.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return n=e,Wl?Object(Wl.call(n)):{}}}var Bl=Object.create,zl=function(){function e(){}return function(t){if(!mn(t))return{};if(Bl)return Bl(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();var Ul=ma&&ma.isMap,Hl=Ul?la(Ul):function(e){return Yn(e)&&"[object Map]"==ja(e)};var Gl=ma&&ma.isSet,Vl=Gl?la(Gl):function(e){return Yn(e)&&"[object Set]"==ja(e)},Kl="[object Arguments]",Xl="[object Function]",Yl="[object Object]",ql={};function Jl(e,t,i,n,a,r){var o;if(void 0!==o)return o;if(!mn(e))return e;var s=Gn(e);if(s)o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Fl.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e);else{var u=ja(e),l=u==Xl||"[object GeneratorFunction]"==u;if(aa(e))return e.slice();if(u==Yl||u==Kl||l&&!a)o=l?{}:function(e){return"function"!=typeof e.constructor||ba(e)?{}:zl(Rl(e))}(e);else{if(!ql[u])return a?e:{};o=jl(e,u)}}r||(r=new Fn);var d=r.get(e);if(d)return d;r.set(e,o),Vl(e)?e.forEach(function(n){o.add(Jl(n,t,i,n,e,r))}):Hl(e)&&e.forEach(function(n,a){o.set(a,Jl(n,t,i,a,e,r))});var h=s?void 0:Pa(e);return function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););}(h||e,function(n,a){h&&(n=e[a=n]),xl(o,a,Jl(n,t,i,a,e,r))}),o}ql[Kl]=ql["[object Array]"]=ql["[object ArrayBuffer]"]=ql["[object DataView]"]=ql["[object Boolean]"]=ql["[object Date]"]=ql["[object Float32Array]"]=ql["[object Float64Array]"]=ql["[object Int8Array]"]=ql["[object Int16Array]"]=ql["[object Int32Array]"]=ql["[object Map]"]=ql["[object Number]"]=ql[Yl]=ql["[object RegExp]"]=ql["[object Set]"]=ql["[object String]"]=ql["[object Symbol]"]=ql["[object Uint8Array]"]=ql["[object Uint8ClampedArray]"]=ql["[object Uint16Array]"]=ql["[object Uint32Array]"]=!0,ql["[object Error]"]=ql[Xl]=ql["[object WeakMap]"]=!1;var Ql=e=>"object"==typeof e&&null!==e&&"handleEvent"in e,Zl=(e,t,i)=>{var n=Object.getOwnPropertyDescriptor(e,t);if(!n||n.configurable)try{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:i,writable:!1})}catch(n){try{e[t]=i}catch(e){}}},ed=function(){return h(function e(){o(this,e),this.listeners=new Map},[{key:"addEventListener",value:function(e,t,i){var n;if(t){var a=(e=>"boolean"==typeof e?{capture:e}:null!=e?e:{})(i),r=null!==(n=this.listeners.get(e))&&void 0!==n?n:[];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 i=this.listeners.get(e);if(i&&0!==i.length){for(var n=i.length-1;n>=0;n-=1){var a=i[n];a.listener===t&&(a.signal&&a.abortHandler&&a.signal.removeEventListener("abort",a.abortHandler),i.splice(n,1))}0===i.length&&this.listeners.delete(e)}}}},{key:"dispatchEvent",value:function(e){var t,i;if(!e||"string"!=typeof e.type)throw new TypeError('Failed to execute "dispatchEvent": event type must be a string.');var n=this.listeners.get(e.type);if(!n||0===n.length)return!0;Zl(e,"target",this);var a=!1,r=null===(t=e.stopImmediatePropagation)||void 0===t?void 0:t.bind(e),o=null===(i=e.stopPropagation)||void 0===i?void 0:i.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=c(n.slice());!(l=d()).done;){var h=l.value;if(a)break;Zl(e,"currentTarget",this),"function"==typeof h.listener?h.listener.call(this,e):Ql(h.listener)&&h.listener.handleEvent.call(h.listener,e),h.once&&this.removeEventListener(e.type,h.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 Zl(e,"currentTarget",null),!e.defaultPrevented}}])}(),td=[],id={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",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},nd=function(t){function i(e,t,n){var a;o(this,i),(a=r(this,i)).subscribers=new Set,a.productDetails=td,a.filteredSkuMenus=[],a.state=Jl(id,5);var s=Er.getNamiProfile();return a.state.isLoggedIn=!(null==s||!s.externalId),a.setPaywall(e,t,n),a.subscribers=new Set,a}return p(i,t),h(i,[{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(new CustomEvent(e,{detail:t}))}},{key:"onEvent",value:function(e,t){var i=e=>t(e.detail);return this.addEventListener(e,i),()=>this.removeEventListener(e,i)}},{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 i=Sl(this.productDetails,this.state,this.filteredSkuMenus,El(this.productDetails,this.filteredSkuMenus,this.state.currentGroupId));this.setState(m({},this.state,{currentGroupId:e,currentGroupName:t,sku:i}))}},{key:"setFormState",value:function(e,t){this.setState(m({},this.state,{formStates:m({},this.state.formStates,{[e]:t})}))}},{key:"setTimerState",value:function(e,t,i,n){this.setState(m({},this.state,{timerStates:m({},this.state.timerStates,{[e]:{remainingSeconds:t,savedAt:i,hasEmittedCompletion:n}})}))}},{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 i=this.state.formStates||{},n=m({},i,{[e]:t||!i[e]});this.setState(m({},this.state,{formStates:n}))}},{key:"getCurrentFormId",value:function(e){return this.state.formStates[e]}},{key:"setSelectedProducts",value:function(e){var t=Sl(this.productDetails,this.state,this.filteredSkuMenus,El(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,i){var n,a,r,o,s,u=m({},this.state,{formFactor:Xs(),selectedPaywall:e,selectedCampaign:i}),l=function(e,t,i=[]){var n,a,r=null!==(n=t.productGroups)&&void 0!==n&&n.length?t.productGroups:i.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===(n=e.template)||void 0===n?void 0:n.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,h=u.groups.find(e=>e.ref==this.filteredSkuMenus[0].ref);u.currentGroupId=null!==(d=null==h?void 0:h.id)&&void 0!==d?d:u.currentGroupId}var c=El(this.productDetails,this.filteredSkuMenus,u.currentGroupId);u.skuItems=c,u.launch=l,u.anySkuHasTrialOffer=Ml(this.productDetails,this.filteredSkuMenus),u.anySkuHasPromoOffer=function(e,t){return!Ml(e,t)&&t.flatMap(e=>e.products).some(t=>1==tl("promoEligible",_l(e,t.sku_ref_id)))}(this.productDetails,this.filteredSkuMenus),u.paywallId=e.id,u.sku=Sl(this.productDetails,u,this.filteredSkuMenus,c),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,i,n,a,r,o,s,u,l,d=this.state.selectedCampaign,h=this.state.selectedPaywall;return{paywallId:null!==(t=null==h?void 0:h.id)&&void 0!==t?t:"",paywallName:null!==(i=null==h?void 0:h.name)&&void 0!==i?i:"",campaignId:null!==(n=null==d?void 0:d.rule)&&void 0!==n?n:"",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){this.setState(m({},this.state,{currentPage:e}))}},{key:"setCustomerAttribute",value:function(e){this.setState(m({},this.state,{customer:m({},this.state.customer,e)}))}},{key:"removeCustomerAttribute",value:function(e){delete this.state.customer[e],this.setState(this.state)}},{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(){delete this.state.appSuppliedVideoUrl,delete this.state.appSuppliedVideoName,this.setState(this.state)}},{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 i=[...this.state.openHeaderIds],n=i.indexOf(e);-1!==n?i.splice(n,1):i.push(e),this.setState(m({},this.state,{openHeaderIds:i,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.state.currentSlideIndex=e}}],[{key:"create",value:function(e,t,n){var a=new i(e,t,n);return this.providers.push(a),a}},{key:"remove",value:function(e){this.providers=this.providers.filter(t=>t!==e)}},{key:"currentProvider",get:function(){return i.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(i=>{i.setPurchase(e,t)})}},{key:"getSelectedSlideIndex",value:function(){var e;return null===(e=this.providers[0])||void 0===e?void 0:e.state.currentSlideIndex}}])}(ed);nd.providers=[];var ad=h(function e(){o(this,e),this.refIdToPurchasedSKUs={},this.refIdToRelatedSKUs={},this.refIdToActivePurchases={}});ad.instance=new ad;var rd=()=>kr(qi([...Er.getNamiEntitlements(ot),...Er.getNamiEntitlements(pt)]),"referenceId"),od=()=>{Pu.getInstance().emit(Fi,rd())};function sd(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 ud=function(){return h(function e(){o(this,e)},[{key:"fetchActiveEntitlements",value:function(){var e,t,i;return k(function(n){for(;;)switch(n.n){case 0:if(e=null,Lu()||gs(fe.THIRD_PARTY_TRANSACTIONS)||!gs(fe.ENTITLEMENT_MANAGEMENT)){n.n=3;break}if(null==(t=Er.getDevice())||!t.id){n.n=2;break}return n.n=1,a(this.getAPIEntitlements(t.id));case 1:i=n.v,(e=null==i?void 0:i.results)&&(Er.setActiveEntitlements(at,e),this.invokeActiveEntitlementsHandler(e));case 2:n.n=4;break;case 3:Lu()&&Yi.debug("Skipping active entitlements update - anonymous mode"),gs(fe.THIRD_PARTY_TRANSACTIONS)&&Yi.debug("Skipping active entitlements update - paywalls-only mode"),gs(fe.ENTITLEMENT_MANAGEMENT)||Yi.debug("Skipping active entitlements update - no entitlement_management capability");case 4:return n.a(2,e)}},null,this,null,Promise)}},{key:"getAPIEntitlements",value:function(e){var t,i,n;return k(function(r){for(;;)switch(r.p=r.n){case 0:return t=`device/${e}/active_entitlements/`,i={},r.p=1,r.n=2,a(As.instance.fetchAPI(t));case 2:i=r.v,r.n=4;break;case 3:throw r.p=3,n=r.v,Yi.error(Br(n.status,t)),n;case 4:return r.a(2,i)}},null,null,[[1,3]],Promise)}},{key:"invokeActiveEntitlementsHandler",value:function(e){bs()&&(e=>{Er.setNamiEntitlements(ot,e);var t=Er.getNamiEntitlements(pt),i=new Set(e.map(e=>e.referenceId)),n=t.filter(e=>{var t=i.has(e.referenceId);return t&&Yi.debug(`Server granted verified entitlement for ${e.referenceId}, so replacing provisional entitlement grant.`),!t});n.length!==t.length&&Er.setNamiEntitlements(pt,n),od()})(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)))}}])}();ud.instance=new ud;var ld=function(){return h(function e(){o(this,e)},[{key:"fetchCustomerJourneyState",value:function(){var e,t,i,n;return k(function(r){for(;;)switch(r.p=r.n){case 0:if(!Lu()){r.n=1;break}return Yi.debug("Skipping customer journey state update - anonymous mode"),r.a(2,null);case 1:if(null!=(e=Er.getDevice())&&e.id){r.n=2;break}return r.a(2,null);case 2:return t=`device/${e.id}/profile/`,i=null,r.p=3,r.n=4,a(As.instance.fetchAPI(t,void 0,0));case 4:i=r.v,r.n=6;break;case 5:throw r.p=5,n=r.v,Yi.error(Br(n.status,t)),n;case 6:if(!i){r.n=7;break}return Er.setCustomerJourneyState(i.customer_journey_state),r.a(2,i.customer_journey_state);case 7:return r.a(2,null)}},null,null,[[3,5]],Promise)}}])}();ld.instance=new ld;var dd,hd=function(){return h(function e(){o(this,e),this.inMemoryAnonymousMode=!1,Cu=this},[{key:"setInMemoryAnonymousMode",value:function(e){this.inMemoryAnonymousMode=e,Yi.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 Er.getAnonymousMode()||this.inMemoryAnonymousMode}},{key:"init",value:function(e){return k(function(t){for(;;)switch(t.n){case 0:return this.setInitialValues(e),xu.instance.fetchConfig(),t.n=1,a(this.initAndFetchRequiredData(e));case 1:Ru.instance.startSession();case 2:return t.a(2)}},null,this,null,Promise)}},{key:"setInitialValues",value:function(e){var t=m({},e);delete t.initialConfig,Er.clearSessionId(),Er.setNamiConfig(t),Er.setLanguageCode(e.namiLanguageCode),Er.setPurchaseChannel(e.purchaseChannel);var i=e.initialConfig;if(i.appConfig||i.platform_config){var n=(null==i?void 0:i.appConfig)||(null==i?void 0:i.platform_config);n&&Er.setAppConfig(ut,n)}null!=i&&i.paywalls&&Er.setPaywalls(ct,i.paywalls),null!=i&&i.products&&Er.setProducts(ft,i.products)}},{key:"initAnonymousDevice",value:function(){return{deviceId:_u.instance.getOrCreateAnonymousUUID(),deviceTask:null}}},{key:"initIdentifiedDevice",value:function(e){var t=m({},Ks(e.namiCommands),e.formFactor?{form_factor:e.formFactor}:{}),i=function(e){if(e){var t=e.find(e=>e.startsWith("splitPosition="));if(t){var i=t.split("=")[1],n=Number(i);return i&&!isNaN(n)?Qs(n):void 0}}}(e.namiCommands),n=_u.instance.createOrUpdateDevice(t,i,this);return{deviceId:n.id,deviceTask:n.device}}},{key:"initAndFetchRequiredData",value:function(e,t=0,i=1){var n,r,o,s,u,l,d,h,c,m,f;return k(function(v){for(;;)switch(v.n){case 0:if(s=e.initialConfig,u=null!==(n=e.formFactor)&&void 0!==n?n:Xs(),l=this.isAnonymousMode(),d=l?this.initAnonymousDevice():this.initIdentifiedDevice(e),h=d.deviceId,c=d.deviceTask,m=qs(h),s.campaign_rules&&Er.setCampaignRules(dt,au(s.campaign_rules,m,u)),!c){v.n=1;break}return v.n=1,a(c);case 1:if(Tu.instance.configure(u,m,e.namiCommands),ys(),f=Promise.all([Au.instance.fetchProducts(),ld.instance.fetchCustomerJourneyState(),ud.instance.fetchActiveEntitlements(),this.fetchCampaignsAndPaywalls()]).catch(n=>{var r;return k(function(o){for(;;)switch(o.n){case 0:if(!(n instanceof Mr)){o.n=3;break}if(Er.resetDevice(),!(t<i)){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,i));case 2:if(l){o.n=3;break}return Yi.warn(`Max retries reached for ConflictError. ${n.message}`),this.setInMemoryAnonymousMode(!0),o.a(2,this.initAndFetchRequiredData(e,0,i));case 3:throw n;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){v.n=2;break}return v.n=2,a(f);case 2:f.then(()=>this.reRenderPaywall());case 3:return v.a(2)}},null,this,null,Promise)}},{key:"fetchCampaignsAndPaywalls",value:function(){var e,t,i,n,r,o,s,u,l,d,h,c;return k(function(m){for(;;)switch(m.n){case 0:return e=Tu.instance,t=Du.instance,i=Date.now(),n=Date.now(),m.n=1,a(e.fetchCampaignRulesRaw());case 1:return r=m.v,o=Date.now()-n,m.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,i;return k(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,a(fetch(e.flow.url,{cache:"no-cache"}));case 1:if(!(t=n.v).ok){n.n=3;break}return n.n=2,a(t.json());case 2:e.flow.object=n.v,n.n=4;break;case 3:Yi.warn(`Failed to fetch flow object from ${e.flow.url}: ${t.status}`);case 4:n.n=6;break;case 5:n.p=5,i=n.v,Yi.warn(`Error fetching flow object from ${e.flow.url}: ${i}`);case 6:return n.a(2)}},null,null,[[0,5]],Promise)})));case 2:if(s=!e.useLegacyPaywallFetch&&Tu.hasPaywallUrls(r),l=Date.now(),!s){m.n=4;break}return d=Tu.extractPaywallUrls(r),m.n=3,a(t.fetchPaywallsByUrls(d));case 3:u=m.v,m.n=6;break;case 4:return m.n=5,a(t.fetchPaywalls());case 5:u=m.v;case 6:return h=Date.now()-l,c=Date.now()-i,Yi.info(`Paywall fetch telemetry: strategy=${s?"individual":"bulk"}, count=${u.length}, total=${c}ms, campaigns=${o}ms, paywalls=${h}ms`),m.a(2,e.finalizeCampaignRules(r,u))}},null,null,null,Promise)}},{key:"reRenderPaywall",value:function(){de().ui.reRenderPaywall()}}])}();function cd(e){return Array.isArray(e)?e.map(cd):e&&"object"==typeof e?Object.entries(e).reduce((e,[t,i])=>(void 0!==i&&(e[t]=cd(i)),e),{}):e}function md(e,t){return Mu(cd(e),cd(t))}hd.instance=new hd;var fd,vd=function(){function e(){o(this,e),dd.set(this,!1),this.maxLogging=!1}return h(e,[{key:"isInitialized",get:function(){return ce(this,dd,"f")||null!=Er.getNamiConfig()}},{key:"initializeSDK",value:function(t){var i,n,r,o,s,u,l,d,h,c;return k(function(f){for(;;)switch(f.n){case 0:if(o=!1,s=!1,u=ce(this,dd,"f")?Er.getNamiConfig():null,Yi.setLogger(t.logLevel),e.instance.maxLogging=null!==(i=t.maxLogging)&&void 0!==i&&i,null===u){f.n=3;break}if(delete(l=m({},t)).initialConfig,!md(l,u)){f.n=1;break}return Yi.warn("Nami SDK is already configured, ignoring this configure call."),f.a(2,{sdkInitialized:!0,configureState:Di});case 1:s=!0;case 2:d=ps(t.namiCommands),h=ps(u.namiCommands),t.appPlatformID==u.appPlatformID&&d==h||(o=!0),t.namiLanguageCode===u.namiLanguageCode&&t.logLevel==u.logLevel||(s=!0);case 3:return o&&(Yi.info("SDK full reconfigure called"),Er.resetDevice()),me(this,dd,!0),As.configure(t),f.n=4,a(hd.instance.init(t));case 4:return Yi.info("SDK successfully initialized!"),c=s||o?_i:Ti,null===(n=(r=de().ui).postConfigure)||void 0===n||n.call(r),f.a(2,{sdkInitialized:!0,configureState:c})}},null,this,null,Promise)}}],[{key:"sdkVersion",value:function(){return ye}},{key:"sdkPackageVersion",value:function(){return we}},{key:"reset",value:function(){return k(function(t){for(;;)switch(t.n){case 0:Er.clearAll(),Iu(),me(e.instance,dd,!1);case 1:return t.a(2)}},null,null,null,Promise)}},{key:"configure",value:function(t){return k(function(i){for(;;)switch(i.n){case 0:if(t.appPlatformID){i.n=1;break}throw new Ar;case 1:return this.setInitialConfig(t),i.n=2,a(e.instance.initializeSDK(t));case 2:return i.a(2,i.v)}},null,this,null,Promise)}},{key:"setInitialConfig",value:function(e){if(null!=e.initialConfig){if("string"==typeof e.initialConfig){Yi.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 Yi.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 i=Ss(e.initialConfig.initial_config);i?e.initialConfig=i:(e.initialConfig={},Yi.error("Failed to parse NamiConfiguration.initialConfig as base64-gzipped JSON"))}}else e.initialConfig={}}}])}();dd=new WeakMap,vd.instance=new vd,e.LaunchCampaignError=void 0,(fd=e.LaunchCampaignError||(e.LaunchCampaignError={})).DEFAULT_CAMPAIGN_NOT_FOUND="Default campaign not found",fd.LABELED_CAMPAIGN_NOT_FOUND="Labeled campaign not found",fd.CAMPAIGN_DATA_NOT_FOUND="Campaign data not found",fd.PAYWALL_ALREADY_DISPLAYED="Paywall is already being displayed",fd.SDK_NOT_INITIALIZED="SDK has not been initialized",fd.PAYWALL_COULD_NOT_DISPLAY="Failed to display paywall",fd.URL_CAMPAIGN_NOT_FOUND="URL campaign not found",fd.PRODUCT_DATA_NOT_FOUND="Product data not found",fd.PRODUCT_GROUPS_NOT_FOUND="Product groups not found",fd.FLOW_SCREEN_DATA_UNAVILABLE="Flow unavailable due to missing screen data";var pd,gd,yd=new Set(["fullscreen","sheet","compact_sheet","modal"]);e.NamiPaywallManagerEvents=void 0,(pd=e.NamiPaywallManagerEvents||(e.NamiPaywallManagerEvents={})).BuySku="RegisterBuySKU",pd.Close="PaywallCloseRequested",pd.SignIn="PaywallSignInRequested",pd.Restore="PaywallRestoreRequested",pd.DeeplinkAction="PaywallDeeplinkAction",e.NamiPaywallAction=void 0,(gd=e.NamiPaywallAction||(e.NamiPaywallAction={})).BUY_SKU="BUY_SKU",gd.SELECT_SKU="SELECT_SKU",gd.RESTORE_PURCHASES="RESTORE_PURCHASES",gd.SIGN_IN="SIGN_IN",gd.CLOSE_PAYWALL="CLOSE_PAYWALL",gd.SHOW_PAYWALL="SHOW_PAYWALL",gd.PURCHASE_SELECTED_SKU="PURCHASE_SELECTED_SKU",gd.PURCHASE_SUCCESS="PURCHASE_SUCCESS",gd.PURCHASE_FAILED="PURCHASE_FAILED",gd.PURCHASE_CANCELLED="PURCHASE_CANCELLED",gd.PURCHASE_PENDING="PURCHASE_PENDING",gd.PURCHASE_UNKNOWN="PURCHASE_UNKNOWN",gd.PURCHASE_DEFERRED="PURCHASE_DEFERRED",gd.DEEPLINK="DEEPLINK",gd.TOGGLE_CHANGE="TOGGLE_CHANGE",gd.PAGE_CHANGE="PAGE_CHANGE",gd.SLIDE_CHANGE="SLIDE_CHANGE",gd.COLLAPSIBLE_DRAWER_OPEN="COLLAPSIBLE_DRAWER_OPEN",gd.COLLAPSIBLE_DRAWER_CLOSE="COLLAPSIBLE_DRAWER_CLOSE",gd.VIDEO_STARTED="VIDEO_STARTED",gd.VIDEO_PAUSED="VIDEO_PAUSED",gd.VIDEO_RESUMED="VIDEO_RESUMED",gd.VIDEO_ENDED="VIDEO_ENDED",gd.VIDEO_CHANGED="VIDEO_CHANGED",gd.VIDEO_MUTED="VIDEO_MUTED",gd.VIDEO_UNMUTED="VIDEO_UNMUTED",gd.COUNTDOWN_TIMER_COMPLETED="COUNTDOWN_TIMER_COMPLETED",gd.UNKNOWN="UNKNOWN";var bd,wd="entry",kd="screen",Sd="branch",Ed="exit",Pd="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"}(bd||(bd={}));var Td="__handoff_sequence__",Md="__buy_sku__",_d="__default__",Ad="__appear__",Dd="__disappear__",xd="__login_success__",Cd="__login_failure__",Id="__logout_success__",Ld="__logout_failure__",Rd="__purchase_success__",Fd="__remoteback__",Od="__tag_update__",Nd="and",$d="or",Wd="i_contains",jd="equals",Bd="i_equals",zd="not_equals",Ud="not_i_equals",Hd="not_contains",Gd="set",Vd="notSet",Kd=function(){function e(){o(this,e),this.resolvers=new Map,this.namespaceResolvers=new Map}return h(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,i=null!==(t=e.filter)&&void 0!==t?t:[];if(0===i.length)return!0;var n=i.map(e=>this.evaluateFilter(e));switch(e.operator){case Nd:return n.every(e=>e);case $d:return n.some(e=>e);default:return n.every(e=>e)}}},{key:"evaluateOrdered",value:function(e){var t;if(!e)return!0;var i=null!==(t=e.filter)&&void 0!==t?t:[];if(0===i.length)return!0;switch(e.operator){case Nd:for(var n,a=c(i);!(n=a()).done;){var r=n.value;if(!this.evaluateFilter(r))return!1}return!0;case $d:for(var o,s=c(i);!(o=s()).done;){var u=o.value;if(this.evaluateFilter(u))return!0}return!1;default:for(var l,d=c(i);!(l=d()).done;){var h=l.value;if(!this.evaluateFilter(h))return!1}return!0}}},{key:"evaluateFilter",value:function(e){var t=this.resolve(e.identifier);if(vd.instance.maxLogging&&Yi.debug(`[NamiConditionEvaluator] resolve(${e.identifier}) → ${JSON.stringify(t)} (type: ${typeof t})`),e.operator===Gd)return null!=t;if(e.operator===Vd)return null==t;if(null==t)return vd.instance.maxLogging&&Yi.debug(`[NamiConditionEvaluator] ${e.identifier} resolved to null — registeredNamespaces: [${[...this.namespaceResolvers.keys()].join(", ")}]`),!![zd,Ud,Hd].includes(e.operator);switch(e.operator){case Wd: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 jd:return e.values.some(e=>{if("string"==typeof t)return t===e;if("boolean"==typeof t){var i="true"===e.toLowerCase();return t===i}return this.log("Unsupported type for equals comparison: "+typeof t),!1});case Bd:return e.values.some(e=>{if("string"==typeof t)return 0===t.localeCompare(e,void 0,{sensitivity:"accent"});if("boolean"==typeof t){var i="true"===e.toLowerCase();return t===i}return this.log("Unsupported type for i_equals comparison: "+typeof t),!1});case zd:return e.values.every(e=>"string"!=typeof t||t!==e);case Ud:return e.values.every(e=>"string"!=typeof t||0!==t.localeCompare(e,void 0,{sensitivity:"accent"}));case Hd: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 vd.instance.maxLogging&&Yi.debug(`[NamiConditionEvaluator] resolve(${e}) — exact hit: ${JSON.stringify(t)}`),t;var i=e.lastIndexOf(".");if(-1===i);else{var n=e.slice(0,i),a=e.slice(i+1),r=this.resolveRaw(n);if(void 0!==r){var o=this.extractProperty(a,r);return vd.instance.maxLogging&&Yi.debug(`[NamiConditionEvaluator] resolve(${e}) — fallback: base=${n} → ${typeof r}, extract(.${a}) → ${JSON.stringify(o)}`),o}this.log(`Could not resolve base identifier: ${n}`)}}},{key:"resolveRaw",value:function(e){for(var t,i=[...this.namespaceResolvers.keys()].sort((e,t)=>t.length-e.length),n=c(i);!(t=n()).done;){var a=t.value;if(e.startsWith(a)){var r=this.namespaceResolvers.get(a);if(r){var o=r(e);return vd.instance.maxLogging&&Yi.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){Yi.debug(`[NamiConditionEvaluator] ${e}`)}}],[{key:"shared",get:function(){return e.instance||(e.instance=new e),e.instance}}])}(),Xd=function(){return h(function e(){o(this,e)},[{key:"register",value:function(){Kd.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 i,n=t,a=c(e.replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean));!(i=a()).done;){var r=i.value;if(null==n||"object"!=typeof n)return;n=n[r]}return n}}])}(),Yd=function(e){function t(e){var i;return o(this,t),(i=r(this,t)).namespace="LaunchContext",i.context=e,i.register(),i}return p(t,e),h(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 i=e.substring(13);return this.resolveKeyPath(i,this.context.customObject)}return this.resolveKeyPath(e,{customAttributes:this.context.customAttributes,customObject:this.context.customObject,productGroups:this.context.productGroups})}}])}(Xd),qd=function(e){function t(){var e,i,n,a;o(this,t),(a=r(this,t)).namespace="Device";var s=Intl.DateTimeFormat().resolvedOptions().locale.split("-")[1]||"",u=Intl.DateTimeFormat().resolvedOptions().timeZone,l=Ks(),d=de().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!==(i=l.form_factor)&&void 0!==i?i:"desktop",d),screenSize:a.screenSizeTier(null!==(n=l.form_factor)&&void 0!==n?n:"desktop",d),language:l.language,country:s,timezone:u},a.register(),a}return p(t,e),h(t,[{key:"screenSizeTier",value:function(e,t){var i=Math.round(t.width*t.scale),n=Math.round(t.height*t.scale),a=Math.max(i,n);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 i=Math.round(t.width*t.scale),n=Math.round(t.height*t.scale),a=Math.max(i,n),r=Math.min(i,n);return a>=3840||r>=2160?"4K":a>=1920||r>=1080?"1080p":"720p"}},{key:"tvResolution",value:function(e,t){if("television"!==e)return"";var i=Math.round(t.width*t.scale),n=Math.round(t.height*t.scale),a=Math.max(i,n),r=Math.min(i,n);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)}}])}(Xd),Jd=[/(^|_)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],Qd=function(){function e(){o(this,e),this.params={},"undefined"!=typeof window&&this.setSearchParams()}return h(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={},i=new Set;try{for(var n,a=new URLSearchParams(e.search),r=(e,n)=>{var a=(e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[-\s]/g,"_").toLowerCase())(e);if(!(i.size>=10||(e=>Jd.some(t=>t.test(e)))(a))){var r=this.safeValue(n);r&&(t[a]=r,i.add(a))}},o=c(a.entries());!(n=o()).done;){var s=n.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()}}])}();Qd._instance=null;var Zd,eh=()=>Qd.instance.params,th=/\{\{\s*([^}]+?)\s*\}\}/g,ih=function(){return h(function e(t){o(this,e),this.flowManager=t,this.urlParams=eh()},[{key:"resolve",value:function(e){var t,i,n,a,r,o,s,u,l,d,h,c,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 Yd(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===(i=f.campaign)||void 0===i?void 0:i.name;case"campaignLabel":case"campaignPlacement":return null!==(n=null==f||null===(a=f.campaign)||void 0===a?void 0:a.value)&&void 0!==n?n: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===(h=m.currentFlowStep)||void 0===h?void 0:h.name;case"buttonText":return null==m||null===(c=m.currentButton)||void 0===c?void 0:c.firstTextValue();case"slideNumber":var b=null==f?void 0:f.getSelectedSlideIndexForCurrentCarousel();return null!=b?`${b+1}`:void 0;default:return}}},{key:"interpolateLiquidVariables",value:function(e){return e.replace(th,(e,t)=>{var i,n=null!==(i=this.resolve(t))&&void 0!==i?i:this.urlParams[t];return null!=n?n:""})}},{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,i])=>m({},e,{[t]:this.interpolateDeep(i)}),{}):e}}])}(),nh=function(e){function t(){var e;return o(this,t),(e=r(this,t)).namespace="urlParams",e.context=eh(),e.register(),e}return p(t,e),h(t,[{key:"resolveValue",value:function(e){return Yi.debug("[URLParamsResolver]","Resolving keyPath",e),this.resolveKeyPath(e,this.context)}}])}(Xd),ah=function(e){function t(){var e;return o(this,t),(e=r(this,t)).namespace="state",e.register(),e}return p(t,e),h(t,[{key:"getContextProvider",value:function(){var e=nd.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 i=e.substring(11);return t.getCurrentFormId(i)}return this.resolveKeyPath(e,t.state)}}}])}(Xd),rh=function(e){function t(e){var i;return o(this,t),(i=r(this,t)).namespace="Placement",i.campaign=e,i.register(),i}return p(t,e),h(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 i=nd.providers;if(0!==i.length){var n=i.find(e=>e.flow);return n?n.getCurrentPlacementLabel():null===(t=i[i.length-1])||void 0===t?void 0:t.getCurrentPlacementLabel()}}}}])}(Xd),oh=function(){return h(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?Er.setNamiProfile({externalId:this.externalId}):Er.removeNamiProfile(),this}},{key:"load",value:function(){var e=Er.getNamiProfile();e&&(this.externalId=e.externalId),nd.setIsLoggedIn(!!this.externalId)}},{key:"login",value:function(e){var t;return k(function(i){for(;;)switch(i.n){case 0:return i.n=1,a(As.instance.login(e));case 1:(t=i.v).external_id&&nd.setIsLoggedIn(!0),this.setExternalId(t.external_id).save();case 2:return i.a(2)}},null,this,null,Promise)}},{key:"logout",value:function(){return k(function(e){for(;;)switch(e.n){case 0:return e.n=1,a(As.instance.logout());case 1:nd.setIsLoggedIn(!1),this.setExternalId(void 0).save();case 2:return e.a(2)}},null,this,null,Promise)}}])}();oh.instance=new oh,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"}(Zd||(Zd={}));var sh=function(){function e(){o(this,e),this.flowOpen=!1,this.lastAnimatedFlowProgress=new Map,this.navGraphCache=new WeakMap}return h(e,[{key:"resume",value:function(){e.resume()}},{key:"presentFlow",value:function(e,t,i){var n=new dh(e,t,this,i);return this.flowOpen=!0,this.currentFlow=n,n}},{key:"finishFlow",value:function(){vd.instance.maxLogging&&Yi.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===kd);if(0===t.length)return 0;var i=this.currentFlow.stepcrumbs.filter(e=>e.type===kd);if(0===i.length)return 0;var n=this.buildNavGraph(this.currentFlow),a=this.currentFlow.currentFlowStep,r=this.findBranchPoint(t,n),o=0;if(r)o=this.calculateBranchingProgress(i,t,a,r,n);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 i,n=c(e);!(i=n()).done;){var a=i.value;if(this.hasBranching(a,e,t))return a}return null}},{key:"calculateBranchingProgress",value:function(e,t,i,n,a){var r=e.length,o=t.findIndex(e=>e.id===n.id),s=e.findIndex(e=>e.id===n.id),u=t.findIndex(e=>e.id===i.id);if(-1===s||i.id===n.id)return(u+1)/(o+2);var l=this.countForwardScreens(i,t,a),d=r+l;return Yi.debug(`Branching progress: visited=${r}, remaining=${l}, total=${d}, step=${i.id}`),r/d}},{key:"countForwardScreens",value:function(e,t,i){var n=t.findIndex(t=>t.id===e.id);if(-1===n)return 0;var a=new Set,r=0,o=(e,s)=>{if(!a.has(e)){a.add(e);var u=(i.get(e)||[]).filter(e=>{var i=t.findIndex(t=>t.id===e);return i>n});if(0!==u.length)for(var l,d=c(u);!(l=d()).done;){var h=l.value;o(h,s+1)}else r=Math.max(r,s)}};return o(e.id,0),r}},{key:"hasBranching",value:function(e,t,i){var n=t.findIndex(t=>t.id===e.id);if(-1===n)return!1;var a=(i.get(e.id)||[]).filter(e=>{var i=t.findIndex(t=>t.id===e);return i>n});return a.length>1}},{key:"buildNavGraph",value:function(e){var t=this.navGraphCache.get(e);if(t)return t;var i=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 n,a=null===(n=t.parameters)||void 0===n?void 0:n.step;a&&(i.has(e.id)||i.set(e.id,new Set),i.get(e.id).add(a))}})})})});var n=new Map;return i.forEach((e,t)=>{n.set(t,Array.from(e))}),this.navGraphCache.set(e,n),n}},{key:"getCurrentFlowStepAutoAdvanceDelay",value:function(){var e,t,i=null===(e=this.currentFlow)||void 0===e?void 0:e.currentFlowStep;if(!i)return null;var n=null===(t=i.actions)||void 0===t?void 0:t[Ad];if(!n)return null;for(var a,r=c(n);!(a=r()).done;)for(var o,s,u=c(null!==(o=a.value.action)&&void 0!==o?o:[]);!(s=u()).done;){var l,d=s.value;if((d.function===bd.NAVIGATE||d.function===bd.NEXT)&&null!=(null===(l=d.parameters)||void 0===l?void 0:l.delay)){var h=d.parameters.delay,m=Number(h);if(!isNaN(m)&&m>0)return m/1e3}}return null}}],[{key:"instance",get:function(){return e._instance||(e._instance=new e),e._instance}},{key:"registerStepHandoff",value:function(e){this.instance.handoffStepHandler=e}},{key:"registerEventHandler",value:function(e){this.instance.eventHandler=e}},{key:"resume",value:function(){var t,i,n,a=e.instance,r=a.flowOpen,o=a.currentFlow;vd.instance.maxLogging&&Yi.debug(`[NamiFlowManager] resume() — flowOpen=${r}, hasFlow=${!!o}, currentStep=${null!==(t=null==o||null===(i=o.currentFlowStep)||void 0===i?void 0:i.id)&&void 0!==t?t:"none"}, isPaused=${null!==(n=null==o?void 0:o.isPaused)&&void 0!==n?n:"N/A"}`);if(r&&o&&o.currentFlowStep){if(o.activeHandoffSequence)return Yi.debug(`Resuming flow at handoff sequence ${o.currentFlowStep.id}`),void o.resumeNextHandoff();Yi.debug(`Resuming flow at step ${o.currentFlowStep.id}`),o.executeLifecycle(o.currentFlowStep,"__resume__")}else Yi.warn("Cannot resume: no active flow or current step")}},{key:"finish",value:function(){var t=e.instance,i=t.flowOpen,n=t.currentFlow;i&&n&&n.currentFlowStep?(Yi.debug(`Finishing flow programmatically at step ${n.currentFlowStep.id}`),n.finished()):Yi.debug("Cannot finish: no active flow or current step")}},{key:"pause",value:function(){var t=e.instance,i=t.flowOpen,n=t.currentFlow;i&&n&&n.currentFlowStep?!0===n.resumeFromBookmark?n.pause():Yi.warn("This flow cannot be paused"):Yi.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()}}])}(),uh=function(){return h(function e(){o(this,e),this.emitter=Pu.getInstance(),Kd.shared.registerNamespaceResolver("UserTags",t=>{var i=t.replace("UserTags.",""),n=e.getCustomerAttribute(i);if(null!=n){var a=n.toLowerCase();return"true"===a||"false"===a?"true"===a:isNaN(Number(n))?n:parseInt(n,10)}return null})},[{key:"isSDKInitialized",get:function(){return vd.instance.isInitialized}}],[{key:"isLoggedIn",value:function(){return oh.instance.isLoggedIn()}},{key:"loggedInId",value:function(){return this.instance.isSDKInitialized||Yi.debug(Ae),oh.instance.getExternalId()}},{key:"login",value:function(e){var t,i,n,r,o,s,u;return k(function(l){for(;;)switch(l.p=l.n){case 0:if(this.instance.isSDKInitialized){l.n=1;break}throw t=new _r,this.invokeStateHandler(Zd.LOGIN,!1,t),t;case 1:if(!this.inAnonymousMode()){l.n=2;break}throw i=new Fr,this.invokeStateHandler(Zd.LOGIN,!1,i),i;case 2:return l.p=2,l.n=3,a(oh.instance.login(e));case 3:return l.n=4,a(ud.instance.fetchActiveEntitlements());case 4:this.invokeStateHandler(Zd.LOGIN,!0),sh.instance.flowOpen&&(n=sh.instance.currentFlow,(r=null==n?void 0:n.currentFlowStep)&&(vd.instance.maxLogging&&Yi.debug(`[NamiCustomerManager] login success — triggering __login_success__ on step ${r.id}`),n.executeLifecycle(r,xd))),l.n=6;break;case 5:throw l.p=5,u=l.v,this.invokeStateHandler(Zd.LOGIN,!1,u),sh.instance.flowOpen&&(o=sh.instance.currentFlow,(s=null==o?void 0:o.currentFlowStep)&&(vd.instance.maxLogging&&Yi.debug(`[NamiCustomerManager] login failure — triggering __login_failure__ on step ${s.id}`),o.executeLifecycle(s,Cd))),u;case 6:return l.a(2)}},null,this,[[2,5]],Promise)}},{key:"logout",value:function(){var e,t,i,n,r,o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:if(this.instance.isSDKInitialized){u.n=1;break}throw e=new _r,this.invokeStateHandler(Zd.LOGOUT,!1,e),e;case 1:if(!this.inAnonymousMode()){u.n=2;break}throw t=new Fr,this.invokeStateHandler(Zd.LOGOUT,!1,t),t;case 2:return u.p=2,u.n=3,a(oh.instance.logout());case 3:return u.n=4,a(ud.instance.fetchActiveEntitlements());case 4:this.invokeStateHandler(Zd.LOGOUT,!0),sh.instance.flowOpen&&(i=sh.instance.currentFlow,(n=null==i?void 0:i.currentFlowStep)&&i.executeLifecycle(n,Id)),u.n=6;break;case 5:throw u.p=5,s=u.v,this.invokeStateHandler(Zd.LOGOUT,!1,s),sh.instance.flowOpen&&(r=sh.instance.currentFlow,(o=null==r?void 0:r.currentFlowStep)&&r.executeLifecycle(o,Ld)),s;case 6:return u.a(2)}},null,this,[[2,5]],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,i,n,r,o;return k(function(s){for(;;)switch(s.n){case 0:if(t=e?Zd.ANONYMOUS_MODE_ON:Zd.ANONYMOUS_MODE_OFF,this.instance.isSDKInitialized){s.n=1;break}throw i=new _r,this.invokeStateHandler(t,!1,i),i;case 1:if(this.anonymousModeCapability()){s.n=2;break}return Yi.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 n=e?new Lr:new Rr,this.invokeStateHandler(t,!1,n),s.a(2);case 3:if(!e){s.n=4;break}Er.setAnonymousMode(e),Er.resetDevice(),this.refetchConfig(),this.invokeStateHandler(Zd.ANONYMOUS_MODE_ON,!0),s.n=6;break;case 4:return Er.clearAnonymousMode(),Iu(),o=null===(r=Er.getNamiConfig())||void 0===r?void 0:r.namiCommands,s.n=5,a(_u.instance.createOrUpdateDevice(Ks(o)));case 5:Er.clearAnonymousUUID(),this.refetchConfig(),this.invokeStateHandler(Zd.ANONYMOUS_MODE_OFF,!0);case 6:return s.a(2)}},null,this,null,Promise)}},{key:"inAnonymousMode",value:function(){return!!this.instance.isSDKInitialized&&Lu()}},{key:"setCustomerAttribute",value:function(e,t){if(!this.instance.isSDKInitialized)throw new _r;if(Er.setCustomerAttribute(e,t),gs(fe.PAYWALL_PERSONALIZATION)?(nd.setCustomerAttribute({[e]:t}),Yi.debug(`This customer attribute you set is now available for paywall personalization using the smart text variable: ${e}`)):Yi.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.`),sh.instance.flowOpen){var i=sh.instance.currentFlow;if(i){var n=i.currentFlowStep;n&&i.executeLifecycle(n,Od)}}}},{key:"getCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new _r;var t=Er.getCustomerAttribute(e);return null!=t?gs(fe.PAYWALL_PERSONALIZATION)?Yi.debug(`Found customer attribute. ${e} is available for paywall personalization on this device.`):Yi.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.`):Yi.warn(`No ${e} customer attribute found.`),t}},{key:"getAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new _r;return Er.getAllCustomerAttributes()}},{key:"clearCustomerAttribute",value:function(e){if(!this.instance.isSDKInitialized)throw new _r;Er.clearCustomerAttribute(e)?(nd.removeCustomerAttribute(e),Yi.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.`)):Yi.warn(`No value to clear for attribute ${e}.`)}},{key:"clearAllCustomerAttributes",value:function(){if(!this.instance.isSDKInitialized)throw new _r;Er.getAllCustomerAttributesKeys().forEach(e=>{nd.removeCustomerAttribute(e)}),Er.clearAllCustomerAttributes(),Yi.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 _r;return Er.getCustomerJourneyState()}},{key:"deviceId",value:function(){var e,t;return this.instance.isSDKInitialized&&null!==(e=null===(t=Er.getDevice())||void 0===t?void 0:t.id)&&void 0!==e?e:je}},{key:"registerJourneyStateHandler",value:function(e){if(bs("NamiCustomerManager.registerJourneyStateHandler"))return this.instance.emitter.addListener(Ni,e),()=>{this.instance.emitter.removeListener(Ni,e)}}},{key:"invokeStateHandler",value:function(e,t,i){this.instance.emitter.emit("accountStateChange",e,t,i)}},{key:"updateCustomerDataPlatformId",value:function(e){var t,i,n,r;return k(function(o){for(;;)switch(o.p=o.n){case 0:if(this.instance.isSDKInitialized){o.n=1;break}throw t=new _r,this.invokeStateHandler(Zd.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(_u.instance.updateDeviceField("customer_data_platform_id",e));case 3:this.invokeStateHandler(Zd.CUSTOMER_DATA_PLATFORM_ID_SET,!0),o.n=5;break;case 4:o.p=4,r=o.v,this.invokeStateHandler(Zd.CUSTOMER_DATA_PLATFORM_ID_SET,!1,r);case 5:o.n=7;break;case 6:return Yi.info("Unable to set CDP ID in anonymous mode",{deviceId:null===(i=Er.getDevice())||void 0===i?void 0:i.id,anonymousMode:!0}),n=new Or,this.invokeStateHandler(Zd.CUSTOMER_DATA_PLATFORM_ID_SET,!1,n),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=gs(fe.ANONYMOUS_MODE_CAPABILITY),t=gs(fe.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([Au.instance.fetchProducts(),Du.instance.fetchPaywalls().then(e=>Tu.instance.fetchCampaignRules(e))]));case 1:return e.a(2)}},null,this,null,Promise)}}])}();uh.instance=new uh;var lh=function(){return h(function e(t={}){var i,n,a,r,s;o(this,e),this.id=null!==(i=t.id)&&void 0!==i?i:"",this.name=null!==(n=t.name)&&void 0!==n?n:"",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&&Rs(this.screens)}}])}(),dh=function(e){function t(e,i,n,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=i,u.context=a,u.manager=n,u.branchcrumbs=[],u.stepcrumbs=[],u.registerResolvers(a);var l=u.findStepByType(wd);return l&&u.forward(l.id),u}return p(t,e),h(t,[{key:"registerResolvers",value:function(e){e&&new Yd(e),new qd,new nh,new ah,new rh(this.campaign),Kd.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,i=!1!==(null===(e=this.previousFlowStep)||void 0===e?void 0:e.allow_back_to),n=this.stepcrumbs.slice(0,-1).some(e=>"screen"===e.type);return t&&i&&n}},{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){vd.instance.maxLogging&&Yi.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(){this.previousStepAvailable?this.backToPreviousScreenStep():Yi.debug("No previous step available")}},{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 i=this.stepcrumbs[t];if(this.stepcrumbs.pop(),"branch"===i.type&&this.branchcrumbs.length>0&&this.branchcrumbs.pop(),"screen"===i.type&&i.screen){var n,a,r=Ls(i.screen);return r&&de().ui.flowNavigateToScreen(r,{transition:this.transition,direction:"backward"}),void(this.currentScreenState=null!==(n=null===(a=nd.currentProvider)||void 0===a?void 0:a.state)&&void 0!==n?n:null)}}Yi.warn("No previous screen step found to return to")}else Yi.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 wd:case Ed:return this.stepcrumbs.push(t),void this.executeLifecycle(t,_d);case Sd:return void this.handleBranchStep(t);case kd:return void this.handleScreenStep(t);case Pd:return}else this.flowLog(`forward(${e}) — step not active (branch_tags=${JSON.stringify(t.branch_tags)}, branchcrumbs=${JSON.stringify(this.branchcrumbs)})`);else Yi.error(`No step found with id: ${e}`)}},{key:"pause",value:function(){var e;this.isPaused?Yi.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}`),Yi.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}`),Yi.info(`Flow resumed from step ${e}`),this.forward(e)}else Yi.warn("No step to resume from");else Yi.info("Flow is not paused")}},{key:"executeLifecycle",value:function(e,t,i){var n=e.actions[t];n?(this.flowLog(`executeLifecycle(${t}) — step=${e.id}, isPaused=${this.isPaused}, ${n.length} lifecycle(s)`),this.executeFullLifecycles(n,i)):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;Yi.info(`No actions found for button ${e} on step ${this.currentFlowStep.id}`)}}},{key:"triggerActions",value:function(e,t,i){var n,a=this.lifecycles(e);a&&(this.flowLog(`triggerActions(${e}) — step=${null===(n=this.currentFlowStep)||void 0===n?void 0:n.id}, isPaused=${this.isPaused}`),this.currentButton=t,this.executeFullLifecycles(a,i))}},{key:"executeFullLifecycles",value:function(e,t){for(var i,n=this,a=function(){var e=i.value,a=["before","action","after"];[e.before,e.action,e.after].forEach((e,i)=>null==e?void 0:e.forEach(e=>{var r=n.shouldRun(e);n.flowLog(` ${a[i]}: ${e.function}${e.id?` (${e.id})`:""} — shouldRun=${r}`),r&&n.performAction(e,t)}))},r=c(e);!(i=r()).done;)a()}},{key:"triggerBeforeActions",value:function(e,t,i){var n=this.lifecycles(e);if(n){this.currentButton=t;for(var a,r=c(n);!(a=r()).done;){var o;null===(o=a.value.before)||void 0===o||o.forEach(e=>this.shouldRun(e)&&this.performAction(e,i))}}}},{key:"triggerAfterActions",value:function(e,t,i){var n=this.lifecycles(e);if(n){this.currentButton=t;for(var a,r=c(n);!(a=r()).done;){var o;null===(o=a.value.after)||void 0===o||o.forEach(e=>this.shouldRun(e)&&this.performAction(e,i))}}}},{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=Kd.shared.evaluate(e);if(vd.instance.maxLogging){var i,n,a,r=null!==(i=null===(n=e.filter)||void 0===n?void 0:n.map(e=>`${e.identifier} ${e.operator} ${JSON.stringify(e.values)}`).join(", "))&&void 0!==i?i:"none";Yi.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 i,n;if(this.currentFlowStep){var a=(null!==(i=e.parameters)&&void 0!==i&&i.delay?+e.parameters.delay:0)||0;this.flowLog(`performAction(${e.function}) — step=${this.currentFlowStep.id}, delay=${a}, params=${JSON.stringify(null!==(n=e.parameters)&&void 0!==n?n:{})}`);var r=i=>{var n,a,r,o,s,u,l,d;if((null===(n=this.currentFlowStep)||void 0===n?void 0:n.id)===i)switch(e.function){case bd.BACK:this.back();break;case bd.NEXT:null!==(a=e.parameters)&&void 0!==a&&a.step?this.forward(e.parameters.step):this.next();break;case bd.NAVIGATE:var h;if(null!==(r=e.parameters)&&void 0!==r&&r.step)(null===(h=this.previousFlowStep)||void 0===h?void 0:h.id)===e.parameters.step?this.back():this.forward(e.parameters.step);else this.next();break;case bd.FINISHED:case bd.DISMISS:this.finished();break;case bd.EXIT:var c=this.steps.find(e=>e.type===Ed);c&&this.forward(c.id);break;case bd.PAUSE:this.pause();break;case bd.RESUME:this.resumeFromPause();break;case bd.HANDOFF:if(null!==(o=e.parameters)&&void 0!==o&&o.handoffTag)if(this.manager.handoffStepHandler)if(e.parameters.handoffData)Yi.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(e.parameters.handoffData)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,e.parameters.handoffData);else if(t)Yi.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} ${JSON.stringify(t)}`),this.manager.handoffStepHandler(e.parameters.handoffTag,t);else if(e.parameters.handoffFormId){var m=this.getFormData();e.parameters.handoffTag===Td?this.flowHandoffFormSequence():this.manager.handoffStepHandler(e.parameters.handoffTag,m)}else Yi.debug(`Invoking handoffStepHandler with ${e.parameters.handoffTag} and no data`),this.manager.handoffStepHandler(e.parameters.handoffTag);else Yi.debug("No handoffStepHandler found",e);break;case bd.LOG:var f;if(null!==(s=e.parameters)&&void 0!==s&&s.eventName)Yi.info(`logEvent → ${e.parameters.eventName}`);else Yi.warn(`Missing 'eventName' in logEvent action ${null!==(f=e.id)&&void 0!==f?f:"unknown"}`);break;case bd.TRACK:var v;if(null!==(u=e.parameters)&&void 0!==u&&u.eventName)Yi.info(`trackEvent → ${e.parameters.eventName}`);else Yi.warn(`Missing 'eventName' in logEvent action ${null!==(v=e.id)&&void 0!==v?v:"unknown"}`);break;case bd.SET_VIDEO:null!==(l=e.parameters)&&void 0!==l&&l.name&&e.parameters.url?nd.setAppSuppliedVideoDetails({name:e.parameters.name,url:e.parameters.url}):Yi.warn("Missing name, url for setting video details");break;case bd.BLOCK_BACK:var p,g=null===(p=e.parameters)||void 0===p?void 0:p.step,y=g?this.getStep(g):void 0;y?y.allow_back_to=!1:this.currentFlowStep?this.currentFlowStep.allow_back_to=!1:Yi.warn("Missing step for blocking back");break;case bd.FLOW_EVENT:var b,w=new ih(this.manager),k=Object.fromEntries(Object.entries(null!==(b=e.parameters)&&void 0!==b?b:{}).map(([e,t])=>[e,w.interpolateDeep(t)]));this.manager.eventHandler?this.manager.eventHandler(k):Yi.warn("Missing event handler",k);break;case bd.FLOW_ENABLED:nd.setUserInteractionEnabled(!0);break;case bd.FLOW_DISABLED:nd.setUserInteractionEnabled(!1);break;case bd.SET_TAGS:e.parameters&&(nd.setUserTags(e.parameters),Object.entries(e.parameters).forEach(([e,t])=>{uh.setCustomerAttribute(e,t)}));break;default:Yi.warn(`Missing action handler for ${e.function}`,e)}else this.flowLog(`performAction(${e.function}) — SKIPPED stale step ${i}, current=${null===(d=this.currentFlowStep)||void 0===d?void 0:d.id}`)};a?setTimeout(r.bind(this,this.currentFlowStep.id),a):r(this.currentFlowStep.id)}else Yi.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 i,n=c(this.steps.slice(t+1));!(i=n()).done;){var a=i.value;if(this.isStepActive(a))return a}Yi.debug(`No active next step found after ${e.id}`)}else Yi.error(`Could not find next step for step ${e.id}`)}else Yi.error("Next step not found")}},{key:"handleScreenStep",value:function(e){var t,i=Ls(null!==(t=e.screen)&&void 0!==t?t:"");e.screen&&i&&this.campaign?(this.stepcrumbs.push(e),de().ui.flowNavigateToScreen(i,{transition:this.transition,direction:"forward"})):Yi.error("No paywall or campaign found for next step")}},{key:"handleBranchStep",value:function(e){this.stepcrumbs.push(e);for(var t=0,i=Object.entries(e.actions);t<i.length;t++){var n=i[t],a=n[0],r=n[1];if(r)for(var o,s=c(r);!(o=s()).done;){var u=o.value;if(u.action)for(var l,d=c(u.action);!(l=d()).done;){var h,m,f=l.value;if(this.shouldRun(f))return this.branchcrumbs.push(a),null===(h=u.before)||void 0===h||h.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 Yi.warn(`No actions defined for branch tag ${a}`)}}Yi.warn(`No matching branch condition matched for step ${e.id}`)}},{key:"getFormData",value:function(){var e,t;return m({},null!==(e=null===(t=nd.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 i=Object.keys(t).sort();if(0!==i.length){var n=i.filter(e=>!0===t[e]);if(0===n.length)return Yi.info("No eligible handoff keys after filtering"),void this.manager.resume();this.activeHandoffSequence={formStates:m({},t),remainingKeys:[...n]},this.resumeNextHandoff()}else Yi.warn("formStates is empty, no handoffs to perform")}else Yi.warn("No formStates available for handoff sequence")}},{key:"resumeNextHandoff",value:function(){var e,t,i=this.activeHandoffSequence;if(!i)return Yi.warn("No active handoff sequence to resume"),void this.manager.resume();if(0===i.remainingKeys.length)return Yi.info("All handoffs in the sequence are complete"),this.activeHandoffSequence=null,void this.manager.resume();var n=i.remainingKeys.shift(),a=i.formStates[n];Yi.debug(`Starting handoff for ${n} → ${String(a)}`),this.activeHandoffSequence=i;var r=`${n}`;null===(e=(t=this.manager).handoffStepHandler)||void 0===e||e.call(t,r,void 0)}}])}(lh),hh=function(){return h(function e(){o(this,e),this.emitter=Pu.getInstance()},[{key:"sdkInitialized",get:function(){return vd.instance.isInitialized}},{key:"campaignTypeAndLabel",value:function(t,i){var n,a="";return t&&!i&&iu(t)?(a=t,n=e.NamiCampaignRuleType.URL):t?(a=t,n=e.NamiCampaignRuleType.LABEL):i&&(a=i,n=e.NamiCampaignRuleType.URL),{type:n,value:a}}}],[{key:"allCampaigns",value:function(){if(!this.instance.sdkInitialized)throw new _r;return ru()}},{key:"isCampaignAvailable",value:function(e){if(!this.instance.sdkInitialized)throw new _r;var t=this.instance.campaignTypeAndLabel(e),i=t.type,n=t.value,a=du(n,i),r=a.campaign,o=a.paywall;return null!=r&&r.flow?new lh(r.flow.object).allScreensAvailable:Boolean(r&&o)}},{key:"isFlow",value:function(e,t){if(!this.instance.sdkInitialized)throw new _r;var i=this.instance.campaignTypeAndLabel(e,t),n=i.type,a=i.value;return Ds(du(a,n).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 _r;case 1:return ys(),e.n=2,a(hd.instance.fetchCampaignsAndPaywalls());case 2:return e.a(2,ru())}},null,this,null,Promise)}},{key:"registerAvailableCampaignsHandler",value:function(e){return this.instance.emitter.addListener(Ci,e),()=>{this.instance.emitter.removeListener(Ci,e)}}},{key:"launch",value:function(t,i,n,a,r){var o,s,u,l,d,h,c,f,v,p;a=null!=a?a:()=>{},n=null!=n?n:{customAttributes:{}};var g=this.instance.campaignTypeAndLabel(t,i),b=g.type,w=g.value;if(!this.instance.sdkInitialized)throw a(!1,e.LaunchCampaignError.SDK_NOT_INITIALIZED),new _r;var k,S=du(w,b),E=S.paywall,P=S.campaign;P&&(E||P.flow)||(k=t||i?t?e.LaunchCampaignError.LABELED_CAMPAIGN_NOT_FOUND:i?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:i?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!==(h=null==P?void 0:P.external_segment)&&void 0!==h?h:null,action:e.NamiPaywallAction.UNKNOWN},M=Er.getPurchaseChannel();M&&(T=m({},T,{purchaseChannel:M}));var _,A,D,x=null===(c=n)||void 0===c?void 0:c.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===(_=Er.getNamiConfig())||void 0===_?void 0:_.namiCommands,null!==(A=null==D?void 0:D.includes(ni))&&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 Cr;if(null!=P&&P.flow&&!Rs(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 Ir;var I=de().ui.createPaywall(b,w,n),L=Ys();return Er.setLaunchId(L),r&&this.instance.emitter.addListener(Li,t=>{var i=t.action,n=y(t,se);r(m({},T,n,{action:null!=i?i:e.NamiPaywallAction.UNKNOWN}))}),setTimeout(()=>a(!0),0),I}},{key:"getProductGroups",value:function(e,t){var i,n,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value;return null!==(i=null===(n=du(o,r).paywall)||void 0===n||null===(n=n.sku_menus)||void 0===n?void 0:n.map(e=>e.ref))&&void 0!==i?i:[]}},{key:"getAllProducts",value:function(e,t){var i,n,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value;return null!==(i=null===(n=du(o,r).paywall)||void 0===n||null===(n=n.sku_menus)||void 0===n?void 0:n.flatMap(e=>{var t,i;return null!==(t=null===(i=e.products)||void 0===i?void 0:i.map(e=>e.sku_ref_id))&&void 0!==t?t:[]}))&&void 0!==i?i:[]}},{key:"getCurrentProducts",value:function(e,t){var i,n,a=this.instance.campaignTypeAndLabel(e,t),r=a.type,o=a.value,s=du(o,r),u=nd.currentProvider,l=null==u?void 0:u.getCurrentGroupId();return l&&null!==(i=null===(n=s.paywall)||void 0===n||null===(n=n.sku_menus)||void 0===n?void 0:n.filter(e=>e.id===l).flatMap(e=>{var t,i;return null!==(t=null===(i=e.products)||void 0===i?void 0:i.map(e=>e.sku_ref_id))&&void 0!==t?t:[]}))&&void 0!==i?i:[]}}])}();hh.instance=new hh;var ch=e=>{var t;return k(function(i){for(;;)switch(i.p=i.n){case 0:if(!Lu()){i.n=1;break}return Yi.info("Skipping transaction post - anonymous mode"),i.a(2);case 1:return i.p=1,i.n=2,a(As.instance.postConversion(e));case 2:i.n=4;break;case 3:i.p=3,t=i.v,Yi.error("Error posting conversion",t);case 4:return i.a(2)}},null,null,[[1,3]],Promise)},mh=function(){return h(function e(){o(this,e),this.emitter=Pu.getInstance()},[{key:"sdkInitialized",get:function(){return vd.instance.isInitialized}}],[{key:"allPaywalls",value:function(){if(!this.instance.sdkInitialized)throw new _r;return Is()}},{key:"setProductDetails",value:function(e){this.instance.productDetails=e,nd.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 bs()&&Yi.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,i,n,r,o,s;return k(function(u){for(;;)switch(u.p=u.n){case 0:if(nd.setPurchaseInProgress(!1),sh.instance.flowOpen&&(t=sh.instance.currentFlow,i=null==t?void 0:t.currentFlowStep,t&&i&&t.executeLifecycle(i,Rd)),!uh.inAnonymousMode()){u.n=1;break}return Yi.debug("Skipping purchase validation - anonymous mode"),u.a(2);case 1:if(n=Er.getSessionId(),r=Er.getPurchaseImpression()){u.n=2;break}return Yi.debug("Not sending paywall conversion call complete due to unknown impression"),u.a(2);case 2:return u.p=2,u.n=3,a(ch({purchase_env:"production",app_env:"production",impression:r,session:n,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,Yi.error("Error posting conversion",o);case 5:if(gs(fe.THIRD_PARTY_TRANSACTIONS)){u.n=9;break}return u.p=6,u.n=7,a(As.instance.purchaseValidation({app_env:"production",payload:"",sku:e.skuId}));case 7:u.n=9;break;case 8:u.p=8,s=u.v,Yi.error("Error validating purchase",s);case 9:return u.a(2)}},null,null,[[6,8],[2,4]],Promise)}},{key:"buySkuCancel",value:function(){gs(fe.THIRD_PARTY_TRANSACTIONS)?nd.setPurchase(!1):Yi.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){iu(e)?(Yi.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received valid url ${e}`),nd.setAppSuppliedVideoDetails({url:e,name:t})):Yi.debug(`NamiPaywallManager: setAppSuppliedVideoDetails received invalid url ${e}`)}},{key:"allowUserInteraction",value:function(e){Yi.debug(`NamiPaywallManager: allowUserInteraction called with ${e}`),nd.setUserInteractionEnabled(e)}}])}();mh.instance=new mh,mh.emitter=Pu.getInstance();var fh=function(){return h(function e(){o(this,e),this.emitter=Pu.getInstance()},[{key:"sdkInitialized",get:function(){return vd.instance.isInitialized}}],[{key:"active",value:function(){return bs(),rd()}},{key:"isEntitlementActive",value:function(e){return!!bs("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 _r;case 1:if(bs("NamiEntitlementManager.refresh")){e.n=2;break}return e.a(2,[]);case 2:return e.n=3,a(ud.instance.fetchActiveEntitlements());case 3:return e.a(2,rd())}},null,this,null,Promise)}},{key:"registerActiveEntitlementsHandler",value:function(e){if(bs("NamiEntitlementManager.registerActiveEntitlementsHandler"))return this.instance.emitter.addListener(Fi,e),()=>{this.instance.emitter.removeListener(Fi,e)}}},{key:"clearProvisionalEntitlementGrants",value:function(){var e=rd();e=e.filter(e=>e.expires&&e.expires>(new Date).valueOf()),Er.setNamiEntitlements(pt,e),this.instance.emitter.emit(Fi)}}])}();fh.instance=new fh,sh.registerStepHandoff.bind(sh),sh.registerEventHandler.bind(sh),sh.resume.bind(sh),sh.finish.bind(sh),sh.pause.bind(sh),sh.isFlowOpen.bind(sh);var vh,ph,gh={upperLeft:"border-top-left-radius",upperRight:"border-top-right-radius",lowerLeft:"border-bottom-left-radius",lowerRight:"border-bottom-right-radius"},yh={left:"border-left-style",right:"border-right-style",top:"border-top-style",bottom:"border-bottom-style"},bh="wave",wh="pulse",kh="none";function Sh(e){var t,i=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:[],n=i[0],a=i[1],r=i[2],o=i[3],s=i[4],u=i[5];return{semver:n,major:Number.parseInt(a)||3,minor:Number.parseInt(r)||0,patch:Number.parseInt(o)||0,prerelease:s,buildmetadata:u}}function Eh(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}(Sh(ye),e)>=0||Yi.warn(`Component ${t} requires SDK version ${e.semver} or higher, but current SDK version is ${ye}`))}function Ph(e){return!e||"object"==typeof e&&0==Object.keys(e).length}!function(e){e.DEFAULT="default",e.LABEL="label",e.URL="url"}(vh||(vh={})),function(e){e.DEEPLINK="deeplink",e.IN_APP="in_app"}(ph||(ph={})),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 Th=function(){return h(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 Mh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _h,Ah={exports:{}};var Dh=(_h||(_h=1,function(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=i(18),a=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},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 i=t[0],n=t[1];if(10===i)switch(n){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(i){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,i,n){void 0===n&&(n=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(i),o=Math.max(a,r),s=0,u=e.map([t,i],function(t){var i=o-e.getVersionPrecision(t),n=t+new Array(i+1).join(".0");return e.map(n.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(n&&(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 i,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n},e.find=function(e,t){var i,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,n=e.length;i<n;i+=1){var a=e[i];if(t(a,i))return a}},e.assign=function(e){for(var t,i,n=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){n[t]=e[t]})};for(t=0,i=r.length;t<i;t+=1)s();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=a,e.exports=t.default},18:function(e,t,i){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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(91))&&n.__esModule?n:{default:n},r=i(18);function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){}var t,i,n;return e.getParser=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new a.default(e,t,i)},e.parse=function(e,t){return void 0===t&&(t=null),new a.default(e,t).getResult()},t=e,n=[{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}}],(i=null)&&o(t.prototype,i),n&&o(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,i){t.__esModule=!0,t.default=void 0;var n=u(i(92)),a=u(i(93)),r=u(i(94)),o=u(i(95)),s=u(i(17));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var n=!1;"boolean"==typeof t?(n=t,this._hints=i):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==n&&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(),i=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return i?i.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(n.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,i={},n=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&&(i[t]=o,n+=1)}),n>0){var o=Object.keys(i),u=s.default.find(o,function(e){return t.isOS(e)});if(u){var l=this.satisfies(i[u]);if(void 0!==l)return l}var d=s.default.find(o,function(e){return t.isPlatform(e)});if(d){var h=this.satisfies(i[d]);if(void 0!==h)return h}}if(r>0){var c=Object.keys(a),m=s.default.find(c,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 i=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),a=s.default.getBrowserTypeByAlias(n);return t&&a&&(n=a.toLowerCase()),n===i},t.compareVersion=function(e){var t=[0],i=e,n=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(n=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(n=!0,i=e.substr(1)),t.indexOf(s.default.compareVersions(a,i,n))>-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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},i=a.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},i=a.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},i=a.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},i=a.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},i=a.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},i=a.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},i=a.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},i=a.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},i=a.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},i=a.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},i=a.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},i=a.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},i=a.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},i=a.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},i=a.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},i=a.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},i=a.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},i=a.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},i=a.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},i=a.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),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"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=a.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=a.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=a.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=a.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=a.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=a.default.getFirstMatch(r,e)||a.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},i=a.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=a.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},i=a.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),n=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),r=a.default.getFirstMatch(/se ([\d.]+)x/i,e),o=i||n||r;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=a.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var i={name:"DuckDuckGo"};if(t){var n=t.getBrandVersion("DuckDuckGo");if(n)return i.version=n,i}var r=a.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(i.version=r),i}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var i={name:"Brave"};if(t){var n=t.getBrandVersion("Brave");if(n)return i.version=n,i}return i}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=a.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=a.default.getFirstMatch(r,e);return i&&(t.version=i),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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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),i=a.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},i=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=a.default.getMacOSVersionName(t),n={name:r.OS_MAP.MacOS,version:t};return i&&(n.versionName=i),n}},{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),i=e.test(/android/i);return t&&i},describe:function(e){var t=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=a.default.getAndroidVersionName(t),n={name:r.OS_MAP.Android,version:t};return i&&(n.versionName=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:r.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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",i={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{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),i=e.test(/like (ipod|iphone)/i);return t&&!i},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),i={type:r.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(i.model=t),i}},{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,i){t.__esModule=!0,t.default=void 0;var n,a=(n=i(17))&&n.__esModule?n:{default:n},r=i(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},i=a.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:r.ENGINE_MAP.Presto},i=a.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:r.ENGINE_MAP.Gecko},i=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),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},i=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})}(Ah)),Ah.exports),xh=Mh(Dh),Ch={tablet:"tablet",mobile:"phone",tv:"television",desktop:"desktop"},Ih={"1280x720":.67,"1920x1080":1,"3840x2160":2,"7680x4320":4},Lh=function(){return h(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:ye,language:"en"};var t=xh.getParser(window.navigator.userAgent),i=t.getPlatform(),n={os_version:t.getOSVersion(),os_name:t.getOSName(),browser_name:t.getBrowserName(),browser_version:t.getBrowserVersion(),sdk_client:"web",sdk_version:ye,language:window.navigator.language};if(i.type&&(n.form_factor=Ch[i.type]),i.model&&(n.device_model=i.model),e&&e.length>0){var a=(e=>{var t=e.find(e=>e.includes(Zt)),i={platform:"",version:""};if(t){var n=t.split(ti);i.platform=n[1],i.version=n[2]}return i})(e);n.extended_platform=a.platform,n.extended_platform_version=a.version}return n}},{key:"getDeviceFormFactor",value:function(){if("undefined"==typeof window)return"desktop";var e=xh.getParser(window.navigator.userAgent).getPlatform();return e.type&&Ch[e.type]||"desktop"}},{key:"getDeviceScaleFactor",value:function(e){var t;if(e||(e=this.getDeviceFormFactor()),"television"!==e)return 1;var i=window,n=i.innerWidth,a=i.innerHeight,r=n.toString()+"x"+a.toString();return null!==(t=Ih[r])&&void 0!==t?t:Math.min(n/1920,a/1080)||1}},{key:"getScreenInfo",value:function(){var e,t,i,n;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!==(i=null===(n=window.screen)||void 0===n?void 0:n.height)&&void 0!==i?i: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 Rh(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o}"function"==typeof SuppressedError&&SuppressedError;var Fh,Oh,Nh,$h=globalThis,Wh=$h.ShadowRoot&&(void 0===$h.ShadyCSS||$h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,jh=Symbol(),Bh=new WeakMap,zh=function(){return h(function e(t,i,n){if(o(this,e),this._$cssResult$=!0,n!==jh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Wh&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Bh.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Bh.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Uh=e=>new zh("string"==typeof e?e:e+"",void 0,jh),Hh=(e,...t)=>{var i=1===e.length?e[0]:t.reduce((t,i,n)=>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.")})(i)+e[n+1],e[0]);return new zh(i,e,jh)},Gh=Wh?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=c(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return Uh(i)})(e):e,Vh=Object.is,Kh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,Yh=Object.getOwnPropertyNames,qh=Object.getOwnPropertySymbols,Jh=Object.getPrototypeOf,Qh=globalThis,Zh=Qh.trustedTypes,ec=Zh?Zh.emptyScript:"",tc=Qh.reactiveElementPolyfillSupport,ic=(e,t)=>e,nc={toAttribute(e,t){switch(t){case Boolean:e=e?ec:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},ac=(e,t)=>!Vh(e,t),rc={attribute:!0,type:String,converter:nc,reflect:!1,useDefault:!1,hasChanged:ac};null!==(Fh=Symbol.metadata)&&void 0!==Fh||(Symbol.metadata=Symbol("metadata")),null!==(Oh=Qh.litPropertyMetadata)&&void 0!==Oh||(Qh.litPropertyMetadata=new WeakMap);var oc,sc=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),h(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,i;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.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,i=c(this.constructor.elementProperties.keys());!(e=i()).done;){var n=e.value;this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n])}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(Wh)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=c(t);!(i=n()).done;){var a=i.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,i){this._$AK(e,i)}},{key:"_$ET",value:function(e,t){var i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(void 0!==n&&!0===i.reflect){var a,r=(void 0!==(null===(a=i.converter)||void 0===a?void 0:a.toAttribute)?i.converter:nc).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var i=this.constructor,n=i._$Eh.get(e);if(void 0!==n&&this._$Em!==n){var a,r,o,s=i.getPropertyOptions(n),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:nc;this._$Em=n;var l=u.fromAttribute(t,s.type);this[n]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(n))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,i,n=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===n&&(a=this[e]),null!=i||(i=s.getPropertyOptions(e)),!((null!==(r=i.hasChanged)&&void 0!==r?r:ac)(a,t)||i.useDefault&&i.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:i,reflect:n,wrapped:a},r){var o,s,u;i&&!(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||i||(t=void 0),this._$AL.set(e,t)),!0===n&&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(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,a(this._$ES);case 2:i.n=4;break;case 3:i.p=3,t=i.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){i.n=5;break}return i.n=5,a(e);case 5:return i.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,i=c(this._$Ep);!(t=i()).done;){var n=t.value,a=n[0],r=n[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=c(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],m=h.wrapped,f=this[d];!0!==m||this._$AL.has(d)||void 0===f||this.C(d,void 0,h,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=rc){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 i=Symbol(),n=this.getPropertyDescriptor(e,i,t);void 0!==n&&Kh(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Xh(this.prototype,e))&&void 0!==n?n:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var n=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:rc}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(ic("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(ic("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ic("properties")))for(var e=this.properties,t=0,i=[...Yh(e),...qh(e)];t<i.length;t++){var n=i[t];this.createProperty(n,e[n])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=c(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 h,m=c(this.elementProperties);!(h=m()).done;){var f=h.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 i,n=c(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(Gh(a))}else void 0!==e&&t.push(Gh(e));return t}},{key:"_$Eu",value:function(e,t){var i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}}])}(_(HTMLElement));sc.elementStyles=[],sc.shadowRootOptions={mode:"open"},sc[ic("elementProperties")]=new Map,sc[ic("finalized")]=new Map,null!=tc&&tc({ReactiveElement:sc}),(null!==(Nh=Qh.reactiveElementVersions)&&void 0!==Nh?Nh:Qh.reactiveElementVersions=[]).push("2.1.2");var uc=globalThis,lc=e=>e,dc=uc.trustedTypes,hc=dc?dc.createPolicy("lit-html",{createHTML:e=>e}):void 0,cc="$lit$",mc=`lit$${Math.random().toFixed(9).slice(2)}$`,fc="?"+mc,vc=`<${fc}>`,pc=document,gc=()=>pc.createComment(""),yc=e=>null===e||"object"!=typeof e&&"function"!=typeof e,bc=Array.isArray,wc="[ \t\n\f\r]",kc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Sc=/-->/g,Ec=/>/g,Pc=RegExp(`>|${wc}(?:([^\\s"'>=/]+)(${wc}*=${wc}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Tc=/'/g,Mc=/"/g,_c=/^(?:script|style|textarea|title)$/i,Ac=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),Dc=Ac(1),xc=Ac(2),Cc=Symbol.for("lit-noChange"),Ic=Symbol.for("lit-nothing"),Lc=new WeakMap,Rc=pc.createTreeWalker(pc,129);function Fc(e,t){if(!bc(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==hc?hc.createHTML(t):t}var Oc=function(){return h(function e({strings:t,_$litType$:i},n){var a;o(this,e),this.parts=[];var r=0,s=0,u=t.length-1,l=this.parts,d=((e,t)=>{for(var i,n=e.length-1,a=[],r=2===t?"<svg>":3===t?"<math>":"",o=kc,s=0;s<n;s++){for(var u=e[s],l=void 0,d=void 0,h=-1,c=0;c<u.length&&(o.lastIndex=c,null!==(d=o.exec(u)));)c=o.lastIndex,o===kc?"!--"===d[1]?o=Sc:void 0!==d[1]?o=Ec:void 0!==d[2]?(_c.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=Pc):void 0!==d[3]&&(o=Pc):o===Pc?">"===d[0]?(o=null!=i?i:kc,h=-1):void 0===d[1]?h=-2:(h=o.lastIndex-d[2].length,l=d[1],o=void 0===d[3]?Pc:'"'===d[3]?Mc:Tc):o===Mc||o===Tc?o=Pc:o===Sc||o===Ec?o=kc:(o=Pc,i=void 0);var m=o===Pc&&e[s+1].startsWith("/>")?" ":"";r+=o===kc?u+vc:h>=0?(a.push(l),u.slice(0,h)+cc+u.slice(h)+mc+m):u+mc+(-2===h?s:m)}return[Fc(e,r+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),a]})(t,i),h=d[0],m=d[1];if(this.el=e.createElement(h,n),Rc.currentNode=this.el.content,2===i||3===i){var f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;null!==(a=Rc.nextNode())&&l.length<u;){if(1===a.nodeType){if(a.hasAttributes())for(var v,p=c(a.getAttributeNames());!(v=p()).done;){var g=v.value;if(g.endsWith(cc)){var y=m[s++],b=a.getAttribute(g).split(mc),w=/([.?@])?(.*)/.exec(y);l.push({type:1,index:r,name:w[2],strings:b,ctor:"."===w[1]?Bc:"?"===w[1]?zc:"@"===w[1]?Uc:jc}),a.removeAttribute(g)}else g.startsWith(mc)&&(l.push({type:6,index:r}),a.removeAttribute(g))}if(_c.test(a.tagName)){var k=a.textContent.split(mc),S=k.length-1;if(S>0){a.textContent=dc?dc.emptyScript:"";for(var E=0;E<S;E++)a.append(k[E],gc()),Rc.nextNode(),l.push({type:2,index:++r});a.append(k[S],gc())}}}else if(8===a.nodeType)if(a.data===fc)l.push({type:2,index:r});else for(var P=-1;-1!==(P=a.data.indexOf(mc,P+1));)l.push({type:7,index:r}),P+=mc.length-1;r++}},null,[{key:"createElement",value:function(e,t){var i=pc.createElement("template");return i.innerHTML=e,i}}])}();function Nc(e,t,i=e,n){var a,r,o,s,u;if(t===Cc)return t;var l=void 0!==n?null===(a=i._$Co)||void 0===a?void 0:a[n]:i._$Cl,d=yc(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,i,n),void 0!==n?(null!==(u=i._$Co)&&void 0!==u?u:i._$Co=[])[n]=l:i._$Cl=l),void 0!==l&&(t=Nc(e,l._$AS(e,t.values),l,n)),t}var $c=function(){return h(function e(t,i){o(this,e),this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i},[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(e){var t,i=this._$AD,n=i.el.content,a=i.parts,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:pc).importNode(n,!0);Rc.currentNode=r;for(var o=Rc.nextNode(),s=0,u=0,l=a[0];void 0!==l;){var d;if(s===l.index){var h=void 0;2===l.type?h=new Wc(o,o.nextSibling,this,e):1===l.type?h=new l.ctor(o,l.name,l.strings,this,e):6===l.type&&(h=new Hc(o,this,e)),this._$AV.push(h),l=a[++u]}s!==(null===(d=l)||void 0===d?void 0:d.index)&&(o=Rc.nextNode(),s++)}return Rc.currentNode=pc,r}},{key:"p",value:function(e){for(var t,i=0,n=c(this._$AV);!(t=n()).done;){var a=t.value;void 0!==a&&(void 0!==a.strings?(a._$AI(e,a,i),i+=a.strings.length-2):a._$AI(e[i])),i++}}}])}(),Wc=function(){return h(function e(t,i,n,a){var r;o(this,e),this.type=2,this._$AH=Ic,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=n,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,i=this._$AM;return void 0!==i&&11===(null===(e=t)||void 0===e?void 0:e.nodeType)&&(t=i.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(e,t=this){e=Nc(this,e,t),yc(e)?e===Ic||null==e||""===e?(this._$AH!==Ic&&this._$AR(),this._$AH=Ic):e!==this._$AH&&e!==Cc&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>bc(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!==Ic&&yc(this._$AH)?this._$AA.nextSibling.data=e:this.T(pc.createTextNode(e)),this._$AH=e}},{key:"$",value:function(e){var t,i=e.values,n=e._$litType$,a="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=Oc.createElement(Fc(n.h,n.h[0]),this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===a)this._$AH.p(i);else{var r=new $c(a,this),o=r.u(this.options);r.p(i),this.T(o),this._$AH=r}}},{key:"_$AC",value:function(e){var t=Lc.get(e.strings);return void 0===t&&Lc.set(e.strings,t=new Oc(e)),t}},{key:"k",value:function(e){bc(this._$AH)||(this._$AH=[],this._$AR());for(var t,i,n=this._$AH,a=0,r=c(e);!(i=r()).done;){var o=i.value;a===n.length?n.push(t=new _k(this.O(gc()),this.O(gc()),this,this.options)):t=n[a],t._$AI(o),a++}a<n.length&&(this._$AR(t&&t._$AB.nextSibling,a),n.length=a)}},{key:"_$AR",value:function(e=this._$AA.nextSibling,t){for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,t);e!==this._$AB;){var i,n=lc(e).nextSibling;lc(e).remove(),e=n}}},{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))}}])}(),jc=function(){return h(function e(t,i,n,a,r){o(this,e),this.type=1,this._$AH=Ic,this._$AN=void 0,this.element=t,this.name=i,this._$AM=a,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Ic},[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e,t=this,i,n){var a=this.strings,r=!1;if(void 0===a)e=Nc(this,e,t,0),(r=!yc(e)||e!==this._$AH&&e!==Cc)&&(this._$AH=e);else{var o,s,u=e;for(e=a[0],o=0;o<a.length-1;o++)(s=Nc(this,u[i+o],t,o))===Cc&&(s=this._$AH[o]),r||(r=!yc(s)||s!==this._$AH[o]),s===Ic?e=Ic:e!==Ic&&(e+=(null!=s?s:"")+a[o+1]),this._$AH[o]=s}r&&!n&&this.j(e)}},{key:"j",value:function(e){e===Ic?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}])}(),Bc=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).type=3,e}return p(t,e),h(t,[{key:"j",value:function(e){this.element[this.name]=e===Ic?void 0:e}}])}(jc),zc=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).type=4,e}return p(t,e),h(t,[{key:"j",value:function(e){this.element.toggleAttribute(this.name,!!e&&e!==Ic)}}])}(jc),Uc=function(e){function t(e,i,n,a,s){var u;return o(this,t),(u=r(this,t,[e,i,n,a,s])).type=5,u}return p(t,e),h(t,[{key:"_$AI",value:function(e,t=this){var i;if((e=null!==(i=Nc(this,e,t,0))&&void 0!==i?i:Ic)!==Cc){var n=this._$AH,a=e===Ic&&n!==Ic||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==Ic&&(n===Ic||a);a&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}}},{key:"handleEvent",value:function(e){var t,i;"function"==typeof this._$AH?this._$AH.call(null!==(t=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==t?t:this.element,e):this._$AH.handleEvent(e)}}])}(jc),Hc=function(){return h(function e(t,i,n){o(this,e),this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n},[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){Nc(this,e)}}])}(),Gc={I:Wc},Vc=uc.litHtmlPolyfillSupport;null!=Vc&&Vc(Oc,Wc),(null!==(oc=uc.litHtmlVersions)&&void 0!==oc?oc:uc.litHtmlVersions=[]).push("3.3.2");var Kc,Xc,Yc=globalThis,qc=function(e){function t(){var e;return o(this,t),(e=r(this,t,arguments)).renderOptions={host:n(e)},e._$Do=void 0,e}return p(t,e),h(t,[{key:"createRenderRoot",value:function(){var e,i,n=T(t,"createRenderRoot",this,3)([]);return null!==(i=(e=this.renderOptions).renderBefore)&&void 0!==i||(e.renderBefore=n.firstChild),n}},{key:"update",value:function(e){var i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),T(t,"update",this,3)([e]),this._$Do=((e,t,i)=>{var n,a=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:t,r=a._$litPart$;if(void 0===r){var o,s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;a._$litPart$=r=new Wc(t.insertBefore(gc(),s),s,void 0,null!=i?i:{})}return r._$AI(e),r})(i,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 Cc}}])}(sc);qc._$litElement$=!0,qc.finalized=!0,null===(Kc=Yc.litElementHydrateSupport)||void 0===Kc||Kc.call(Yc,{LitElement:qc});var Jc=Yc.litElementPolyfillSupport;null==Jc||Jc({LitElement:qc}),(null!==(Xc=Yc.litElementVersions)&&void 0!==Xc?Xc:Yc.litElementVersions=[]).push("4.2.2");var Qc,Zc=Hh(Qc||(Qc=(e=>e)`
2
2
  /* ——— keyframes ——— */
3
3
  @keyframes nami-slide-up {
4
4
  from { transform: translateY(100%); }