@namiml/web-sdk 3.3.9-dev.202603130039 → 3.3.9-dev.202603132101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nami-web.cjs CHANGED
@@ -155,7 +155,7 @@
155
155
  `),t,t,t,function(e){return ib[e]||ib.CheckCircleOutlined}(t))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();oe([jc({type:Object})],KA.prototype,"component",void 0),oe([jc({type:Boolean})],KA.prototype,"inFocusedState",void 0),oe([jc({type:Number})],KA.prototype,"scaleFactor",void 0),KA=oe([fc("nami-symbol")],KA);var YA=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t=this.component,n=this.scaleFactor,a=this.inFocusedState,i=t.hidden,r=t.fontSize,o=t.alignment,s=t.strikethrough,u=t.spacing;return e.unsafeCSS(`\n :host {\n line-height: ${UA(r,n)}px;\n display: ${i?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${jf(t,a)}\n ${GA(t,a)}\n font-size: ${(null!=r?r:HA)*n}px;\n text-align: ${o||"center"};\n ${qf("string"!=typeof s&&s)}\n ${Jf(t.fontName)}\n ${Qf(t,n,a)}\n ${BA(t)}\n ${$f(t)}\n ${function({alignment:e,horizontalAlignment:t}){return _f("justify-content",t&&Pf[t]?Pf[t]:e&&Pf[e]?Pf[e]:"center")}(t)}\n }\n :host > :not(:first-child) {\n margin-top: ${u||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n line-height: ${UA(r,n)}px;\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${jf(t,a)}\n ${GA(t,a)}\n font-size: ${(null!=r?r:HA)*n}px;\n text-align: ${o||"center"};\n ${qf("string"!=typeof s&&s)}\n ${Jf(t.fontName)}\n }\n ${BA(t,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n line-height: ${UA(r,n)}px;\n }\n `)}},{key:"render",value:function(){var t=this.component,n=t.fontColor,a=t.fontSize,i=t.activeFontColor,r=t.bulletComponent,o=t.texts,s=t.spacing,u=r?f({fontColor:n,fontSize:a,activeFontColor:i,spacing:s},r):null;if(!Array.isArray(o))return e.html(WA||(WA=zA``));var l=o.map((t=>t?e.html(NA||(NA=zA`<nami-text-list-item-wrapper .component=${0} .scaleFactor=${0}>
156
156
  ${0}
157
157
  <div class="bullet-text-wrapper" .innerHTML="${0}"></div>
158
- </nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&e.html(OA||(OA=zA`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),ny(t)):null));return e.html(jA||(jA=zA`${0}`),l)}}])}();oe([jc({type:Object})],YA.prototype,"component",void 0),oe([jc({type:Boolean})],YA.prototype,"inFocusedState",void 0),oe([jc({type:Number})],YA.prototype,"scaleFactor",void 0),YA=oe([fc("nami-text-list")],YA);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var n=null===(e=ny.Lexer)||void 0===e?void 0:e.rules,a=null==n?void 0:n.inline;a&&Object.values(a).forEach((e=>{e&&Object.keys(e).forEach((t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",n=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),a=e.flags.replace(/u/g,"");return new RegExp(n,a)})(e[t])}))}))}})();var qA=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e.handleFocusIn=()=>e.setFocusState(!0),e.handleFocusOut=t=>{var n,a,i=null!==(n=t.relatedTarget)&&void 0!==n?n:null;if(!i)return e.setFocusState(!1);i===e||null!==(a=e.shadowRoot)&&void 0!==a&&a.contains(i)||e.setFocusState(!1)},e.handleFocusChanged=t=>{var n=t.detail;e.setFocusState(!0===(null==n?void 0:n.inFocusedState))},e.addEventListener("focusin",e.handleFocusIn),e.addEventListener("focusout",e.handleFocusOut),e.addEventListener("focus-changed",e.handleFocusChanged),e}return g(t,Sf),c(t,[{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var t=this.component,n=this.scaleFactor,a=this.minSDKVersion,i=t.backgroundBlur,r="vertical"===t.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=t.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${t.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(jf(t,!1));return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${t.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${u};\n ${ev(t.position)}\n ${$f(t)}\n ${Qf(t,n,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${jf(t,!0)}\n ${Qf(t,n,!0)}\n }\n :host(:focus-visible){\n ${iv(t)}\n }\n :host > * {\n ${Bf(a,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${t.spacing?t.spacing*n:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>Vv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}},{key:"setFocusState",value:function(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();oe([jc({type:Object})],qA.prototype,"component",void 0),oe([jc({type:Boolean})],qA.prototype,"inFocusedState",void 0),oe([jc({type:Number})],qA.prototype,"scaleFactor",void 0),oe([jc({type:Object})],qA.prototype,"minSDKVersion",void 0),qA=oe([fc("nami-container")],qA);var JA=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t=this.component.backgroundBlur,n="vertical"===this.component.direction,a=n?"width":"height",i=n?"margin-top":"margin-left",r=this.component.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(jf(this.component,!1));return e.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${t?`backdrop-filter: blur(${t}px);`:""}\n ${ev(this.component.position)}\n ${$f(this.component)}\n ${Qf(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${i}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${jf(this.component,!0)}\n ${Qf(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${iv(this.component)}\n }\n :host > * {\n ${a}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;zu(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,n=this.contextProvider.state,a=n.mediaList,i=n.currentGroupId,r=n.selectedPaywall,o=n.formFactor,s=Rd(this.contextProvider.productDetails,null!==(e=null==r?void 0:r.sku_menus)&&void 0!==e?e:[],(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||i);return dv(this.contextProvider,s,this.component,a).map((([e,t])=>(this.inFocusedState="television"==o?e:this.inFocusedState,t.map((e=>Vv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))))}}])}();oe([jc({type:Object})],JA.prototype,"component",void 0),oe([jc({type:Boolean})],JA.prototype,"inFocusedState",void 0),oe([jc({type:Number})],JA.prototype,"scaleFactor",void 0),oe([jc({type:Object})],JA.prototype,"minSDKVersion",void 0),JA=oe([fc("nami-product-container")],JA);var QA,ZA,ex=e=>e,tx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t,n,a=this.component,i=a.imageCropping,r=a.alignment,o=a.height,s=a.width,u=a.rightMargin,l=a.spacing,d=a.hidden,h=a.blur,c="fit"===i,m=this.contextConsumer.state.formFactor;return e.unsafeCSS(`\n :host {\n display: ${"television"===m?"flex":"inline-block"};\n ${d?"display:none;":""}\n position: relative;\n height: ${Rf(null!=o?o:"100%",this.scaleFactor)};\n width: ${Rf(null!==(t="fitContent"==s?o:s)&&void 0!==t?t:"100%",this.scaleFactor)};\n }\n :host img {\n transition: all 0.3s;\n object-fit: ${c?"contain":"cover"};\n object-position: ${r} center;\n height: ${Rf(null!=o?o:"100%",this.scaleFactor)};\n width: ${Rf(null!==(n="fitContent"==s?o:s)&&void 0!==n?n:"100%",this.scaleFactor)};\n margin-right: ${u||l||0}px;\n ${h?`filter: blur(${h}px);`:""}\n flex-shrink: ${"number"==typeof s?0:1};\n }\n `)}},{key:"render",value:function(){var t,n=this.component,a=n.url,i=n.alt,r=n.title,o=n.focusedBorderColor,s=n.focusedFillColor,u=n.fillColor;return a?(!o&&Uv(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(t=null!=i?i:r)&&void 0!==t?t:"",e.html(QA||(QA=ex`<img src="${0}" alt="${0}" />`),a,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,e.html(ZA||(ZA=ex``)))}}])}();oe([jc({type:Object})],tx.prototype,"component",void 0),oe([jc({type:Boolean})],tx.prototype,"inFocusedState",void 0),oe([jc({type:Number})],tx.prototype,"scaleFactor",void 0),tx=oe([fc("nami-image")],tx);var nx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).fullscreen=!1,e.inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),document.body.style.background=this.component.fillColor||"transparent"}},{key:"styles",value:function(){var t;if(!this.contextConsumer||!this.component)return e.unsafeCSS("");var n=this.component,a=this.scaleFactor,i=this.contextConsumer.state.formFactor,r=n.backgroundBlur,o="vertical"===n.direction?"margin-top":"margin-left";return e.unsafeCSS(`\n :host {\n max-height: ${"television"===i?"100vh":""};\n display: ${n.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${zf(n)}\n position: fixed;\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(t=n.zIndex)&&void 0!==t?t:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${jf(n,!1)}\n transition: all 0.3s;\n ${Uf(n,a)}\n }\n :host(:focus){\n ${jf(n,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${n.spacing?n.spacing*a:0}px;\n }\n `)}},{key:"updated",value:function(){var e,t,n=Array.from(document.getElementsByTagName("nami-paywall")),a=null===(e=this.component.fillColor)||void 0===e?void 0:e.includes("gradient"),i=null===(t=this.shadowRoot)||void 0===t?void 0:t.innerHTML.includes("nami-image");n[0]&&(n[0].style.position=!i||a?"relative":"","undefined"!=typeof window&&"undefined"!=typeof CSS&&CSS.supports("height: 100dvh")?n[0].style.minHeight=!i||a?"100dvh":"100%":n[0].style.minHeight=!i||a?"100vh":"100%")}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>Vv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}}])}();oe([jc({type:Object})],nx.prototype,"component",void 0),oe([jc({type:Boolean})],nx.prototype,"fullscreen",void 0),oe([jc({type:Boolean})],nx.prototype,"inFocusedState",void 0),oe([jc({type:Number})],nx.prototype,"scaleFactor",void 0),oe([jc({type:Object})],nx.prototype,"minSDKVersion",void 0),nx=oe([fc("nami-background-container")],nx);var ax,ix=e=>e,rx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).zIndex=2,e.inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t=this.contextConsumer,n=this.component,a=this.zIndex,i=this.scaleFactor;if(!t)return e.css(ax||(ax=ix``));var r=t.state.formFactor,o=n.backgroundBlur,s="phone"!==r?"width: 100%;":"",u="100%"==n.height?"height:100vh !important;":"",l="vertical"===n.direction?"margin-top":"margin-left";return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n ${$f(n)}\n ${Xf(n,i)}\n ${s}\n ${u}\n align-items: center;\n justify-content: flex-start;\n justify-content: start;\n ${o?`backdrop-filter: blur(${o}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===r?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Uf(n,i)}\n ${jf(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${jf(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${l}: ${n.spacing?n.spacing*i:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map((e=>Vv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))||[]}}])}();oe([jc({type:Object})],rx.prototype,"component",void 0),oe([jc({type:Number})],rx.prototype,"zIndex",void 0),oe([jc({type:Boolean})],rx.prototype,"inFocusedState",void 0),oe([jc({type:Number})],rx.prototype,"scaleFactor",void 0),oe([jc({type:Object})],rx.prototype,"minSDKVersion",void 0),rx=oe([fc("nami-content-container")],rx);var ox,sx=e=>e,ux=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e._handleClick=t=>{t.preventDefault(),Pp({contextProvider:e.contextProvider,onTap:e.component.onTap})},e.addEventListener("click",e._handleClick),e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t,n,a=tv("active",this.component.components[0]),i=tv("inactive",this.component.components[0]);return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${$f(this.component)}\n ${jf(this.component,!1)}\n ${Qf(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${jf(this.component,!0)}\n ${Qf(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${iv(this.component)}\n }\n .toggle{\n ${t=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${Ff(n,t.topPadding)}px;\n bottom: ${Ff(n,t.bottomPadding)}px;\n width: calc(50% - ${Ff(n,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${nv(i,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${nv(a,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${jf(a,!0)}\n ${av(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${jf(a,!0)}\n ${av(a,this.scaleFactor)}\n `)}},{key:"render",value:function(){this.role="tablist";var t=this.component.components.map((e=>Vv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)));return e.html(ox||(ox=sx`${0}<div class="toggle"></div>`),t)}}])}();oe([jc({type:Object})],ux.prototype,"component",void 0),oe([jc({type:Boolean})],ux.prototype,"inFocusedState",void 0),oe([jc({type:Number})],ux.prototype,"scaleFactor",void 0),oe([jc({type:Object})],ux.prototype,"minSDKVersion",void 0),ux=oe([fc("nami-segment-picker")],ux);var lx,dx=e=>e,hx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e._handleFocus=()=>{e.inFocusedState=!0,e._announceButtonLabel()},e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||e._handleClick()},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return g(t,Sf),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_announceButtonLabel",value:function(){var e=this.component.text||"";e&&lc(e)}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var n=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(n.formId){var a=this._getParentFormId();a&&this.contextProvider.state.formStates[a]&&(this._isActive=this.contextProvider.state.formStates[a]===n.formId)}else this._isActive=zu(n.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var i=this.getRootNode();if(i instanceof ShadowRoot)i.querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}}}},{key:"styles",value:function(){var t,n,a=tv("active",this.component),i=tv("inactive",this.component);return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${nv(f({},i,this.component),this.scaleFactor,this.inFocusedState)}\n ${Yf(null!==(t=this.component.inactiveDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${av(f({},a,this.component),this.scaleFactor)}\n ${Yf(null!==(n=this.component.activeDropShadow)&&void 0!==n?n:this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",e.html(lx||(lx=dx`<input type="radio"
158
+ </nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&e.html(OA||(OA=zA`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),ny(t)):null));return e.html(jA||(jA=zA`${0}`),l)}}])}();oe([jc({type:Object})],YA.prototype,"component",void 0),oe([jc({type:Boolean})],YA.prototype,"inFocusedState",void 0),oe([jc({type:Number})],YA.prototype,"scaleFactor",void 0),YA=oe([fc("nami-text-list")],YA);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var n=null===(e=ny.Lexer)||void 0===e?void 0:e.rules,a=null==n?void 0:n.inline;a&&Object.values(a).forEach((e=>{e&&Object.keys(e).forEach((t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",n=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),a=e.flags.replace(/u/g,"");return new RegExp(n,a)})(e[t])}))}))}})();var qA=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e.handleFocusIn=()=>e.setFocusState(!0),e.handleFocusOut=t=>{var n,a,i=null!==(n=t.relatedTarget)&&void 0!==n?n:null;if(!i)return e.setFocusState(!1);i===e||null!==(a=e.shadowRoot)&&void 0!==a&&a.contains(i)||e.setFocusState(!1)},e.handleFocusChanged=t=>{var n=t.detail;e.setFocusState(!0===(null==n?void 0:n.inFocusedState))},e.addEventListener("focusin",e.handleFocusIn),e.addEventListener("focusout",e.handleFocusOut),e.addEventListener("focus-changed",e.handleFocusChanged),e}return g(t,Sf),c(t,[{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var t=this.component,n=this.scaleFactor,a=this.minSDKVersion,i=t.backgroundBlur,r="vertical"===t.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=t.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${t.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(jf(t,!1));return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${t.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${u};\n ${ev(t.position)}\n ${$f(t)}\n ${Qf(t,n,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${jf(t,!0)}\n ${Qf(t,n,!0)}\n }\n :host(:focus-visible){\n ${iv(t)}\n }\n :host > * {\n ${Bf(a,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${t.spacing?t.spacing*n:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>Vv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}},{key:"setFocusState",value:function(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();oe([jc({type:Object})],qA.prototype,"component",void 0),oe([jc({type:Boolean})],qA.prototype,"inFocusedState",void 0),oe([jc({type:Number})],qA.prototype,"scaleFactor",void 0),oe([jc({type:Object})],qA.prototype,"minSDKVersion",void 0),qA=oe([fc("nami-container")],qA);var JA=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t=this.component.backgroundBlur,n="vertical"===this.component.direction,a=n?"width":"height",i=n?"margin-top":"margin-left",r=this.component.fillImage?e.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):e.unsafeCSS(jf(this.component,!1));return e.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${t?`backdrop-filter: blur(${t}px);`:""}\n ${ev(this.component.position)}\n ${$f(this.component)}\n ${Qf(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${i}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${jf(this.component,!0)}\n ${Qf(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${iv(this.component)}\n }\n :host > * {\n ${a}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;zu(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,n=this.contextProvider.state,a=n.mediaList,i=n.currentGroupId,r=n.selectedPaywall,o=n.formFactor,s=Rd(this.contextProvider.productDetails,null!==(e=null==r?void 0:r.sku_menus)&&void 0!==e?e:[],(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||i);return dv(this.contextProvider,s,this.component,a).map((([e,t])=>(this.inFocusedState="television"==o?e:this.inFocusedState,t.map((e=>Vv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))))}}])}();oe([jc({type:Object})],JA.prototype,"component",void 0),oe([jc({type:Boolean})],JA.prototype,"inFocusedState",void 0),oe([jc({type:Number})],JA.prototype,"scaleFactor",void 0),oe([jc({type:Object})],JA.prototype,"minSDKVersion",void 0),JA=oe([fc("nami-product-container")],JA);var QA,ZA,ex=e=>e,tx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t,n,a=this.component,i=a.imageCropping,r=a.alignment,o=a.height,s=a.width,u=a.rightMargin,l=a.spacing,d=a.hidden,h=a.blur,c="fit"===i,m=this.contextConsumer.state.formFactor;return e.unsafeCSS(`\n :host {\n display: ${"television"===m?"flex":"inline-block"};\n ${d?"display:none;":""}\n position: relative;\n height: ${Rf(null!=o?o:"100%",this.scaleFactor)};\n width: ${Rf(null!==(t="fitContent"==s?o:s)&&void 0!==t?t:"100%",this.scaleFactor)};\n }\n :host img {\n transition: all 0.3s;\n object-fit: ${c?"contain":"cover"};\n object-position: ${r} center;\n height: ${Rf(null!=o?o:"100%",this.scaleFactor)};\n width: ${Rf(null!==(n="fitContent"==s?o:s)&&void 0!==n?n:"100%",this.scaleFactor)};\n margin-right: ${u||l||0}px;\n ${h?`filter: blur(${h}px);`:""}\n flex-shrink: ${"number"==typeof s?0:1};\n }\n `)}},{key:"render",value:function(){var t,n=this.component,a=n.url,i=n.alt,r=n.title,o=n.focusedBorderColor,s=n.focusedFillColor,u=n.fillColor;return a?(!o&&Uv(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(t=null!=i?i:r)&&void 0!==t?t:"",e.html(QA||(QA=ex`<img src="${0}" alt="${0}" />`),a,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,e.html(ZA||(ZA=ex``)))}}])}();oe([jc({type:Object})],tx.prototype,"component",void 0),oe([jc({type:Boolean})],tx.prototype,"inFocusedState",void 0),oe([jc({type:Number})],tx.prototype,"scaleFactor",void 0),tx=oe([fc("nami-image")],tx);var nx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).fullscreen=!1,e.inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),document.body.style.background=this.component.fillColor||"transparent"}},{key:"styles",value:function(){var t;if(!this.contextConsumer||!this.component)return e.unsafeCSS("");var n=this.component,a=this.scaleFactor,i=this.contextConsumer.state.formFactor,r=n.backgroundBlur,o="vertical"===n.direction?"margin-top":"margin-left";return e.unsafeCSS(`\n :host {\n max-height: ${"television"===i?"100vh":""};\n display: ${n.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${zf(n)}\n position: fixed;\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(t=n.zIndex)&&void 0!==t?t:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${jf(n,!1)}\n transition: all 0.3s;\n ${Uf(n,a)}\n }\n :host(:focus){\n ${jf(n,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${n.spacing?n.spacing*a:0}px;\n }\n `)}},{key:"updated",value:function(){var e,t,n=Array.from(document.getElementsByTagName("nami-paywall")),a=null===(e=this.component.fillColor)||void 0===e?void 0:e.includes("gradient"),i=null===(t=this.shadowRoot)||void 0===t?void 0:t.innerHTML.includes("nami-image");n[0]&&(n[0].style.position=!i||a?"relative":"","undefined"!=typeof window&&"undefined"!=typeof CSS&&CSS.supports("height: 100dvh")?n[0].style.minHeight=!i||a?"100dvh":"100%":n[0].style.minHeight=!i||a?"100vh":"100%")}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>Vv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}}])}();oe([jc({type:Object})],nx.prototype,"component",void 0),oe([jc({type:Boolean})],nx.prototype,"fullscreen",void 0),oe([jc({type:Boolean})],nx.prototype,"inFocusedState",void 0),oe([jc({type:Number})],nx.prototype,"scaleFactor",void 0),oe([jc({type:Object})],nx.prototype,"minSDKVersion",void 0),nx=oe([fc("nami-background-container")],nx);var ax,ix=e=>e,rx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).zIndex=2,e.inFocusedState=!1,e.scaleFactor=1,e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t=this.contextConsumer,n=this.component,a=this.zIndex,i=this.scaleFactor;if(!t)return e.css(ax||(ax=ix``));var r=t.state.formFactor,o=n.backgroundBlur,s="phone"!==r?"width: 100%;":"",u="vertical"===n.direction?"margin-top":"margin-left";return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${$f(n)}\n ${Xf(n,i)}\n ${s}\n align-items: center;\n justify-content: flex-start;\n justify-content: start;\n ${o?`backdrop-filter: blur(${o}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===r?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Uf(n,i)}\n ${jf(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${jf(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${u}: ${n.spacing?n.spacing*i:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map((e=>Vv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))||[]}}])}();oe([jc({type:Object})],rx.prototype,"component",void 0),oe([jc({type:Number})],rx.prototype,"zIndex",void 0),oe([jc({type:Boolean})],rx.prototype,"inFocusedState",void 0),oe([jc({type:Number})],rx.prototype,"scaleFactor",void 0),oe([jc({type:Object})],rx.prototype,"minSDKVersion",void 0),rx=oe([fc("nami-content-container")],rx);var ox,sx=e=>e,ux=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e._handleClick=t=>{t.preventDefault(),Pp({contextProvider:e.contextProvider,onTap:e.component.onTap})},e.addEventListener("click",e._handleClick),e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t,n,a=tv("active",this.component.components[0]),i=tv("inactive",this.component.components[0]);return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${$f(this.component)}\n ${jf(this.component,!1)}\n ${Qf(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${jf(this.component,!0)}\n ${Qf(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${iv(this.component)}\n }\n .toggle{\n ${t=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${Ff(n,t.topPadding)}px;\n bottom: ${Ff(n,t.bottomPadding)}px;\n width: calc(50% - ${Ff(n,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${nv(i,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${nv(a,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${jf(a,!0)}\n ${av(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${jf(a,!0)}\n ${av(a,this.scaleFactor)}\n `)}},{key:"render",value:function(){this.role="tablist";var t=this.component.components.map((e=>Vv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)));return e.html(ox||(ox=sx`${0}<div class="toggle"></div>`),t)}}])}();oe([jc({type:Object})],ux.prototype,"component",void 0),oe([jc({type:Boolean})],ux.prototype,"inFocusedState",void 0),oe([jc({type:Number})],ux.prototype,"scaleFactor",void 0),oe([jc({type:Object})],ux.prototype,"minSDKVersion",void 0),ux=oe([fc("nami-segment-picker")],ux);var lx,dx=e=>e,hx=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).inFocusedState=!1,e.scaleFactor=1,e._handleFocus=()=>{e.inFocusedState=!0,e._announceButtonLabel()},e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||e._handleClick()},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return g(t,Sf),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_announceButtonLabel",value:function(){var e=this.component.text||"";e&&lc(e)}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var n=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(n.formId){var a=this._getParentFormId();a&&this.contextProvider.state.formStates[a]&&(this._isActive=this.contextProvider.state.formStates[a]===n.formId)}else this._isActive=zu(n.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var i=this.getRootNode();if(i instanceof ShadowRoot)i.querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}}}},{key:"styles",value:function(){var t,n,a=tv("active",this.component),i=tv("inactive",this.component);return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${nv(f({},i,this.component),this.scaleFactor,this.inFocusedState)}\n ${Yf(null!==(t=this.component.inactiveDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${av(f({},a,this.component),this.scaleFactor)}\n ${Yf(null!==(n=this.component.activeDropShadow)&&void 0!==n?n:this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",e.html(lx||(lx=dx`<input type="radio"
159
159
  autocomplete="off"
160
160
  id="${0}"
161
161
  name="${0}"
@@ -222,7 +222,8 @@
222
222
  flex-direction: column;
223
223
  height: 100%;
224
224
  width: 100%;
225
- min-height: 0;
225
+ min-height: 0;
226
+ overflow: hidden;
226
227
  }
227
228
  `)),oe([jc({type:Object})],Gj.prototype,"paywall",void 0),oe([jc({type:Object})],Gj.prototype,"campaign",void 0),oe([jc({type:Object})],Gj.prototype,"context",void 0),oe([function({context:e}){return(t,n)=>{var a=new WeakMap;if("object"==typeof n)return{get(){return t.get.call(this)},set(e){return a.get(this).setValue(e),t.set.call(this,e)},init(t){return a.set(this,new lf(this,{context:e,initialValue:t})),t}};t.constructor.addInitializer((t=>{a.set(t,new lf(t,{context:e}))}));var i,r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var o=new WeakMap;i={get(){return o.get(this)},set(e){a.get(this).setValue(e),o.set(this,e)},configurable:!0,enumerable:!0}}else{var s=r.set;i=f({},r,{set(e){a.get(this).setValue(e),null==s||s.call(this,e)}})}Object.defineProperty(t,n,i)}}({context:hf})],Gj.prototype,"contextProvider",void 0),Gj=oe([fc("nami-paywall-screen")],Gj);var Vj,Xj,Kj={};function Yj(){return Xj?Vj:(Xj=1,Vj=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var qj,Jj={},Qj={};function Zj(){if(qj)return Qj;var e;qj=1;var t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Qj.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},Qj.getSymbolTotalCodewords=function(e){return t[e]},Qj.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},Qj.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},Qj.isKanjiModeEnabled=function(){return void 0!==e},Qj.toSJIS=function(t){return e(t)},Qj}var e$,t$,n$,a$,i$,r$={};function o$(){return e$||(e$=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}}(r$)),r$}var s$,u$={};var l$,d$={};var h$,c$={};var m$,f$={};function v$(){if(m$)return f$;m$=1;var e=o$(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return f$.getBlocksCount=function(n,a){switch(a){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},f$.getTotalCodewordsCount=function(t,a){switch(a){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},f$}var p$,g$,y$,b$,w$={},k$={};function S$(){return g$||(g$=1,function(e){var t=function(){if(p$)return k$;p$=1;var e=new Uint8Array(512),t=new Uint8Array(256);return function(){for(var n=1,a=0;a<255;a++)e[a]=n,t[n]=a,256&(n<<=1)&&(n^=285);for(var i=255;i<512;i++)e[i]=e[i-255]}(),k$.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},k$.exp=function(t){return e[t]},k$.mul=function(n,a){return 0===n||0===a?0:e[t[n]+t[a]]},k$}();e.mul=function(e,n){for(var a=new Uint8Array(e.length+n.length-1),i=0;i<e.length;i++)for(var r=0;r<n.length;r++)a[i+r]^=t.mul(e[i],n[r]);return a},e.mod=function(e,n){for(var a=new Uint8Array(e);a.length-n.length>=0;){for(var i=a[0],r=0;r<n.length;r++)a[r]^=t.mul(n[r],i);for(var o=0;o<a.length&&0===a[o];)o++;a=a.slice(o)}return a},e.generateECPolynomial=function(n){for(var a=new Uint8Array([1]),i=0;i<n;i++)a=e.mul(a,new Uint8Array([1,t.exp(i)]));return a}}(w$)),w$}var E$,M$={},P$={},T$={};function _$(){return E$||(E$=1,T$.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),T$}var D$,A$,x$,C$={};function I$(){if(D$)return C$;D$=1;var e="[0-9]+",t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",n="(?:(?![A-Z0-9 $%*+\\-./:]|"+(t=t.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";C$.KANJI=new RegExp(t,"g"),C$.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),C$.BYTE=new RegExp(n,"g"),C$.NUMERIC=new RegExp(e,"g"),C$.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var a=new RegExp("^"+t+"$"),i=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return C$.testKanji=function(e){return a.test(e)},C$.testNumeric=function(e){return i.test(e)},C$.testAlphanumeric=function(e){return r.test(e)},C$}function L$(){return A$||(A$=1,function(e){var t=_$(),n=I$();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}(P$)),P$}function F$(){return x$||(x$=1,function(e){var t=Zj(),n=v$(),a=o$(),i=L$(),r=_$(),o=t.getBCHDigit(7973);function s(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){var n=0;return e.forEach((function(e){var a=s(e.mode,t);n+=a+e.getBitsLength()})),n}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,a,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=i.BYTE);var u=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,a));if(o===i.MIXED)return u;var l=u-s(o,e);switch(o){case i.NUMERIC:return Math.floor(l/10*3);case i.ALPHANUMERIC:return Math.floor(l/11*2);case i.KANJI:return Math.floor(l/13);case i.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){var r,o=a.from(n,a.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(var a=1;a<=40;a++)if(u(t,a)<=e.getCapacity(a,n,i.MIXED))return a}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,a){for(var i=1;i<=40;i++)if(n<=e.getCapacity(i,a,t))return i}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var n=e<<12;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(M$)),M$}var R$,W$={};var N$,O$,j$,$$,z$,B$,H$,U$,G$={};var V$,X$,K$,Y$={exports:{}};function q$(){return V$||(V$=1,function(e){var t={single_source_shortest_paths:function(e,n,a){var i={},r={};r[n]=0;var o,s,u,l,d,h,c,m=t.PriorityQueue.make();for(m.push(n,0);!m.empty();)for(u in s=(o=m.pop()).value,l=o.cost,d=e[s]||{})d.hasOwnProperty(u)&&(h=l+d[u],c=r[u],(void 0===r[u]||c>h)&&(r[u]=h,m.push(u,h),i[u]=s));if(void 0!==a&&void 0===r[a]){var f=["Could not find a path from ",n," to ",a,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],a=t;a;)n.push(a),e[a],a=e[a];return n.reverse(),n},find_path:function(e,n,a){var i=t.single_source_shortest_paths(e,n,a);return t.extract_shortest_path_from_predecessor_list(i,a)},PriorityQueue:{make:function(e){var n,a=t.PriorityQueue,i={};for(n in e=e||{},a)a.hasOwnProperty(n)&&(i[n]=a[n]);return i.queue=[],i.sorter=e.sorter||a.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(Y$)),Y$.exports}function J$(){return X$||(X$=1,function(e){var t=L$(),n=function(){if(O$)return N$;O$=1;var e=L$();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){var t,n,a;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),a=parseInt(n,10),e.put(a,10);var i=this.data.length-t;i>0&&(n=this.data.substr(t),a=parseInt(n,10),e.put(a,3*i+1))},N$=t}(),a=function(){if($$)return j$;$$=1;var e=L$(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var n;for(n=0;n+2<=this.data.length;n+=2){var a=45*t.indexOf(this.data[n]);a+=t.indexOf(this.data[n+1]),e.put(a,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},j$=n}(),i=function(){if(B$)return z$;B$=1;var e=L$();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(var t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},z$=t}(),r=function(){if(U$)return H$;U$=1;var e=L$(),t=Zj();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var n;for(n=0;n<this.data.length;n++){var a=t.toSJIS(this.data[n]);if(a>=33088&&a<=40956)a-=33088;else{if(!(a>=57408&&a<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");a-=49472}a=192*(a>>>8&255)+(255&a),e.put(a,13)}},H$=n}(),o=I$(),s=Zj(),u=q$();function l(e){return unescape(encodeURIComponent(e)).length}function d(e,t,n){for(var a,i=[];null!==(a=e.exec(n));)i.push({data:a[0],index:a.index,mode:t,length:a[0].length});return i}function h(e){var n,a,i=d(o.NUMERIC,t.NUMERIC,e),r=d(o.ALPHANUMERIC,t.ALPHANUMERIC,e);return s.isKanjiModeEnabled()?(n=d(o.BYTE,t.BYTE,e),a=d(o.KANJI,t.KANJI,e)):(n=d(o.BYTE_KANJI,t.BYTE,e),a=[]),i.concat(r,n,a).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function c(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return a.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function m(e,o){var u,l=t.getBestModeForData(e);if((u=t.from(o,l))!==t.BYTE&&u.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(u)+".\n Suggested mode is: "+t.toString(l));switch(u!==t.KANJI||s.isKanjiModeEnabled()||(u=t.BYTE),u){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new a(e);case t.KANJI:return new r(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},e.fromString=function(n,a){for(var i=function(e){for(var n=[],a=0;a<e.length;a++){var i=e[a];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}(h(n,s.isKanjiModeEnabled())),r=function(e,n){for(var a={},i={start:{}},r=["start"],o=0;o<e.length;o++){for(var s=e[o],u=[],l=0;l<s.length;l++){var d=s[l],h=""+o+l;u.push(h),a[h]={node:d,lastCount:0},i[h]={};for(var m=0;m<r.length;m++){var f=r[m];a[f]&&a[f].node.mode===d.mode?(i[f][h]=c(a[f].lastCount+d.length,d.mode)-c(a[f].lastCount,d.mode),a[f].lastCount+=d.length):(a[f]&&(a[f].lastCount=d.length),i[f][h]=c(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,n))}}r=u}for(var v=0;v<r.length;v++)i[r[v]].end=0;return{map:i,table:a}}(i,a),o=u.find_path(r.map,"start","end"),d=[],m=1;m<o.length-1;m++)d.push(r.table[o[m]].node);return e.fromArray(function(e){return e.reduce((function(e,t){var n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(d))},e.rawSplit=function(t){return e.fromArray(h(t,s.isKanjiModeEnabled()))}}(G$)),G$}function Q$(){if(K$)return Jj;K$=1;var e=Zj(),t=o$(),n=function(){if(n$)return t$;function e(){this.buffer=[],this.length=0}return n$=1,e.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t$=e}(),a=function(){if(i$)return a$;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return i$=1,e.prototype.set=function(e,t,n,a){var i=e*this.size+t;this.data[i]=n,a&&(this.reservedBit[i]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},a$=e}(),i=(s$||(s$=1,function(e){var t=Zj().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];for(var n=Math.floor(e/7)+2,a=t(e),i=145===a?26:2*Math.ceil((a-13)/(2*n-2)),r=[a-7],o=1;o<n-1;o++)r[o]=r[o-1]-i;return r.push(6),r.reverse()},e.getPositions=function(t){for(var n=[],a=e.getRowColCoords(t),i=a.length,r=0;r<i;r++)for(var o=0;o<i;o++)0===r&&0===o||0===r&&o===i-1||r===i-1&&0===o||n.push([a[r],a[o]]);return n}}(u$)),u$),r=function(){if(l$)return d$;l$=1;var e=Zj().getSymbolSize;return d$.getPositions=function(t){var n=e(t);return[[0,0],[n-7,0],[0,n-7]]},d$}(),o=(h$||(h$=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t=3,n=3,a=40,i=10;function r(t,n,a){switch(t){case e.Patterns.PATTERN000:return(n+a)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return a%3==0;case e.Patterns.PATTERN011:return(n+a)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(a/3))%2==0;case e.Patterns.PATTERN101:return n*a%2+n*a%3==0;case e.Patterns.PATTERN110:return(n*a%2+n*a%3)%2==0;case e.Patterns.PATTERN111:return(n*a%3+(n+a)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){for(var n=e.size,a=0,i=0,r=0,o=null,s=null,u=0;u<n;u++){i=r=0,o=s=null;for(var l=0;l<n;l++){var d=e.get(u,l);d===o?i++:(i>=5&&(a+=t+(i-5)),o=d,i=1),(d=e.get(l,u))===s?r++:(r>=5&&(a+=t+(r-5)),s=d,r=1)}i>=5&&(a+=t+(i-5)),r>=5&&(a+=t+(r-5))}return a},e.getPenaltyN2=function(e){for(var t=e.size,a=0,i=0;i<t-1;i++)for(var r=0;r<t-1;r++){var o=e.get(i,r)+e.get(i,r+1)+e.get(i+1,r)+e.get(i+1,r+1);4!==o&&0!==o||a++}return a*n},e.getPenaltyN3=function(e){for(var t=e.size,n=0,i=0,r=0,o=0;o<t;o++){i=r=0;for(var s=0;s<t;s++)i=i<<1&2047|e.get(o,s),s>=10&&(1488===i||93===i)&&n++,r=r<<1&2047|e.get(s,o),s>=10&&(1488===r||93===r)&&n++}return n*a},e.getPenaltyN4=function(e){for(var t=0,n=e.data.length,a=0;a<n;a++)t+=e.data[a];return Math.abs(Math.ceil(100*t/n/5)-10)*i},e.applyMask=function(e,t){for(var n=t.size,a=0;a<n;a++)for(var i=0;i<n;i++)t.isReserved(i,a)||t.xor(i,a,r(e,i,a))},e.getBestMask=function(t,n){for(var a=Object.keys(e.Patterns).length,i=0,r=1/0,o=0;o<a;o++){n(o),e.applyMask(o,t);var s=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),s<r&&(r=s,i=o)}return i}}(c$)),c$),s=v$(),u=function(){if(b$)return y$;b$=1;var e=S$();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=new Uint8Array(t.length+this.degree);n.set(t);var a=e.mod(n,this.genPoly),i=this.degree-a.length;if(i>0){var r=new Uint8Array(this.degree);return r.set(a,i),r}return a},y$=t}(),l=F$(),d=function(){if(R$)return W$;R$=1;var e=Zj(),t=e.getBCHDigit(1335);return W$.getEncodedBits=function(n,a){for(var i=n.bit<<3|a,r=i<<10;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(i<<10|r)},W$}(),h=L$(),c=J$();function m(e,t,n){var a,i,r=e.size,o=d.getEncodedBits(t,n);for(a=0;a<15;a++)i=1==(o>>a&1),a<6?e.set(a,8,i,!0):a<8?e.set(a+1,8,i,!0):e.set(r-15+a,8,i,!0),a<8?e.set(8,r-a-1,i,!0):a<9?e.set(8,15-a-1+1,i,!0):e.set(8,15-a-1,i,!0);e.set(r-8,8,1,!0)}function f(t,a,i){var r=new n;i.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),h.getCharCountIndicator(e.mode,t)),e.write(r)}));var o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,a));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);for(var l=(o-r.getLengthInBits())/8,d=0;d<l;d++)r.put(d%2?17:236,8);return function(t,n,a){for(var i=e.getSymbolTotalCodewords(n),r=s.getTotalCodewordsCount(n,a),o=i-r,l=s.getBlocksCount(n,a),d=l-i%l,h=Math.floor(i/l),c=Math.floor(o/l),m=c+1,f=h-c,v=new u(f),p=0,g=new Array(l),y=new Array(l),b=0,w=new Uint8Array(t.buffer),k=0;k<l;k++){var S=k<d?c:m;g[k]=w.slice(p,p+S),y[k]=v.encode(g[k]),p+=S,b=Math.max(b,S)}var E,M,P=new Uint8Array(i),T=0;for(E=0;E<b;E++)for(M=0;M<l;M++)E<g[M].length&&(P[T++]=g[M][E]);for(E=0;E<f;E++)for(M=0;M<l;M++)P[T++]=y[M][E];return P}(r,t,a)}function v(t,n,s,u){var d;if(Array.isArray(t))d=c.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var h=n;if(!h){var v=c.rawSplit(t);h=l.getBestVersionForData(v,s)}d=c.fromString(t,h||40)}var p=l.getBestVersionForData(d,s);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else n=p;var g=f(n,s,d),y=e.getSymbolSize(n),b=new a(y);return function(e,t){for(var n=e.size,a=r.getPositions(t),i=0;i<a.length;i++)for(var o=a[i][0],s=a[i][1],u=-1;u<=7;u++)if(!(o+u<=-1||n<=o+u))for(var l=-1;l<=7;l++)s+l<=-1||n<=s+l||(u>=0&&u<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===u||6===u)||u>=2&&u<=4&&l>=2&&l<=4?e.set(o+u,s+l,!0,!0):e.set(o+u,s+l,!1,!0))}(b,n),function(e){for(var t=e.size,n=8;n<t-8;n++){var a=n%2==0;e.set(n,6,a,!0),e.set(6,n,a,!0)}}(b),function(e,t){for(var n=i.getPositions(t),a=0;a<n.length;a++)for(var r=n[a][0],o=n[a][1],s=-2;s<=2;s++)for(var u=-2;u<=2;u++)-2===s||2===s||-2===u||2===u||0===s&&0===u?e.set(r+s,o+u,!0,!0):e.set(r+s,o+u,!1,!0)}(b,n),m(b,s,0),n>=7&&function(e,t){for(var n,a,i,r=e.size,o=l.getEncodedBits(t),s=0;s<18;s++)n=Math.floor(s/3),a=s%3+r-8-3,i=1==(o>>s&1),e.set(n,a,i,!0),e.set(a,n,i,!0)}(b,n),function(e,t){for(var n=e.size,a=-1,i=n-1,r=7,o=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!e.isReserved(i,s-u)){var l=!1;o<t.length&&(l=1==(t[o]>>>r&1)),e.set(i,s-u,l),-1==--r&&(o++,r=7)}if((i+=a)<0||n<=i){i-=a,a=-a;break}}}(b,g),isNaN(u)&&(u=o.getBestMask(b,m.bind(null,b,s))),o.applyMask(u,b),m(b,s,u),{modules:b,version:n,errorCorrectionLevel:s,maskPattern:u,segments:d}}return Jj.create=function(n,a){if(void 0===n||""===n)throw new Error("No input text");var i,r,s=t.M;return void 0!==a&&(s=t.from(a.errorCorrectionLevel,t.M),i=l.from(a.version),r=o.from(a.maskPattern),a.toSJISFunc&&e.setToSJISFunction(a.toSJISFunc)),v(n,i,s,r)},Jj}var Z$,ez,tz={},nz={};function az(){return Z$||(Z$=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});var n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,a=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:a,scale:a?4:i,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){var a=e.getScale(t,n);return Math.floor((t+2*n.margin)*a)},e.qrToImageData=function(t,n,a){for(var i=n.modules.size,r=n.modules.data,o=e.getScale(i,a),s=Math.floor((i+2*a.margin)*o),u=a.margin*o,l=[a.color.light,a.color.dark],d=0;d<s;d++)for(var h=0;h<s;h++){var c=4*(d*s+h),m=a.color.light;if(d>=u&&h>=u&&d<s-u&&h<s-u)m=l[r[Math.floor((d-u)/o)*i+Math.floor((h-u)/o)]?1:0];t[c++]=m.r,t[c++]=m.g,t[c++]=m.b,t[c]=m.a}}}(nz)),nz}function iz(){return ez||(ez=1,function(e){var t=az();e.render=function(e,n,a){var i=a,r=n;void 0!==i||n&&n.getContext||(i=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=t.getOptions(i);var o=t.getImageWidth(e.modules.size,i),s=r.getContext("2d"),u=s.createImageData(o,o);return t.qrToImageData(u.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,r,o),s.putImageData(u,0,0),r},e.renderToDataURL=function(t,n,a){var i=a;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});var r=e.render(t,n,i),o=i.type||"image/png",s=i.rendererOpts||{};return r.toDataURL(o,s.quality)}}(tz)),tz}var rz,oz,sz={};function uz(){if(rz)return sz;rz=1;var e=az();function t(e,t){var n=e.a/255,a=t+'="'+e.hex+'"';return n<1?a+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':a}function n(e,t,n){var a=e+t;return void 0!==n&&(a+=" "+n),a}return sz.render=function(a,i,r){var o=e.getOptions(i),s=a.modules.size,u=a.modules.data,l=s+2*o.margin,d=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",h="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,a){for(var i="",r=0,o=!1,s=0,u=0;u<e.length;u++){var l=Math.floor(u%t),d=Math.floor(u/t);l||o||(o=!0),e[u]?(s++,u>0&&l>0&&e[u-1]||(i+=o?n("M",l+a,.5+d+a):n("m",r,0),r=0,o=!1),l+1<t&&e[u+1]||(i+=n("h",s),s=0)):r++}return i}(u,s,o.margin)+'"/>',c='viewBox="0 0 '+l+" "+l+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+c+' shape-rendering="crispEdges">'+d+h+"</svg>\n";return"function"==typeof r&&r(null,m),m},sz}var lz,dz,hz=function(){if(oz)return Kj;oz=1;var e=Yj(),t=Q$(),n=iz(),a=uz();function i(n,a,i,r,o){var s=[].slice.call(arguments,1),u=s.length,l="function"==typeof s[u-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(u<1)throw new Error("Too few arguments provided");return 1===u?(i=a,a=r=void 0):2!==u||a.getContext||(r=i,i=a,a=void 0),new Promise((function(e,o){try{var s=t.create(i,r);e(n(s,a,r))}catch(e){o(e)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(o=i,i=a,a=r=void 0):3===u&&(a.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=i,i=a,a=void 0));try{var d=t.create(i,r);o(null,n(d,a,r))}catch(e){o(e)}}return Kj.create=t.create,Kj.toCanvas=i.bind(null,n.render),Kj.toDataURL=i.bind(null,n.renderToDataURL),Kj.toString=i.bind(null,(function(e,t,n){return a.render(e,n)})),Kj}(),cz=Us(hz),mz=e=>e,fz=function(){function t(){var e;return s(this,t),(e=o(this,t,arguments)).scaleFactor=1,e}return g(t,Sf),c(t,[{key:"styles",value:function(){var t;return this.component?e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n ${Xf(this.component,this.scaleFactor)}\n ${Uf(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${null!==(t=this.component.borderWidth)&&void 0!==t?t:0}px;\n ${Nf(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):e.unsafeCSS(":host { box-sizing: border-box; display: inline-block; }")}},{key:"renderQr",value:function(){var e,t,n,a,i,o,s,u;return S((function(l){for(;;)switch(l.p=l.n){case 0:if((a=this.renderRoot.querySelector("canvas"))&&null!==(e=this.component)&&void 0!==e&&e.url){l.n=1;break}return l.a(2);case 1:return i=this.computedSize,a.width=i,a.height=i,a.style.width=`${i}px`,a.style.height=`${i}px`,o=null!==(t=Hv(this.component.color))&&void 0!==t?t:"#000000",s=null!==(n=Hv(this.component.fillColor))&&void 0!==n?n:"#ffffff",l.p=2,l.n=3,r(cz.toCanvas(a,this.component.url,{width:i,color:{dark:o,light:s},margin:0}));case 3:l.n=5;break;case 4:l.p=4,u=l.v,Wn.error(`QR render failed for URL "${this.component.url}":`,u);case 5:return l.a(2)}}),null,this,[[2,4]],Promise)}},{key:"firstUpdated",value:function(){this.renderQr()}},{key:"updated",value:function(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then((()=>this.renderQr()))}},{key:"computedSize",get:function(){var e,t=Number(null!==(e=this.component.borderWidth)&&void 0!==e?e:0),n=Number(this.component.width)*this.scaleFactor,a=Math.floor(this.component.width?n-2*t:360);return Math.max(1,a)}},{key:"render",value:function(){if(this.component){var t=this.computedSize;return e.html(lz||(lz=mz`<canvas width="${0}" height="${0}" style="width:${0}px;height:${0}px;"></canvas>`),t,t,t,t)}return e.html(dz||(dz=mz`<canvas></canvas>`))}}])}();oe([jc({type:Object})],fz.prototype,"component",void 0),oe([jc({type:Number})],fz.prototype,"scaleFactor",void 0),fz=oe([fc("nami-qr-code")],fz);var vz,pz=e=>e,gz=function(){function t(){var e;return s(this,t),(e=o(this,t)).inFocusedState=!1,e.scaleFactor=1,e.isActive=!1,e._handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||e._handleClick()},e}return g(t,Sf),c(t,[{key:"connectedCallback",value:function(){T(t,"connectedCallback",this)([]),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}},{key:"disconnectedCallback",value:function(){T(t,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}},{key:"_handleClick",value:function(){var e=this.component,t=e.onTap,n=e.disabled,a=e.formId;if(!0!==n){this.component.checked=!this.component.checked,this.isActive=this.component.checked;var i=void 0;i=a?{function:(null==t?void 0:t.function)||"",parameters:f({},null==t?void 0:t.parameters,{formId:a||""})}:t,!this.contextProvider.flow||a?Pp({onTap:i,contextProvider:this.contextProvider}):this.component.id?(Wn.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):Wn.warn("Cannot trigger button hoisting without an id")}}},{key:"styles",value:function(){return e.unsafeCSS(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}},{key:"applyPlateStyles",value:function(){var e=this.component,t=this.scaleFactor,n=this.isActive||e.checked||!1,a=n?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",i=n?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Xf(e,t)};\n ${Nf(i||"transparent")}\n border-width: ${n?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${Wf(a)}\n `}},{key:"applyHandleStyles",value:function(){var e=this.component,t=e.checked||!1,n=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",a=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${Nf(a)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Yf(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${Wf(n)}\n `}},{key:"render",value:function(){return this.tabIndex=0,this.role="switch",e.html(vz||(vz=pz`
228
229
  <div class="toggle-plate">
package/dist/nami-web.mjs CHANGED
@@ -155,7 +155,7 @@ import{css as e,html as t,LitElement as n,unsafeCSS as i,svg as a}from"lit";impo
155
155
  `),e,e,e,function(e){return ub[e]||ub.CheckCircleOutlined}(e))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();de([Hc({type:Object})],QA.prototype,"component",void 0),de([Hc({type:Boolean})],QA.prototype,"inFocusedState",void 0),de([Hc({type:Number})],QA.prototype,"scaleFactor",void 0),QA=de([yc("nami-symbol")],QA);var ZA=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return k(e,Tf),p(e,[{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,n=this.inFocusedState,a=e.hidden,r=e.fontSize,o=e.alignment,s=e.strikethrough,u=e.spacing;return i(`\n :host {\n line-height: ${KA(r,t)}px;\n display: ${a?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${Hf(e,n)}\n ${YA(e,n)}\n font-size: ${(null!=r?r:XA)*t}px;\n text-align: ${o||"center"};\n ${ev("string"!=typeof s&&s)}\n ${tv(e.fontName)}\n ${nv(e,t,n)}\n ${VA(e)}\n ${Uf(e)}\n ${function({alignment:e,horizontalAlignment:t}){return Cf("justify-content",t&&Af[t]?Af[t]:e&&Af[e]?Af[e]:"center")}(e)}\n }\n :host > :not(:first-child) {\n margin-top: ${u||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n line-height: ${KA(r,t)}px;\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${Hf(e,n)}\n ${YA(e,n)}\n font-size: ${(null!=r?r:XA)*t}px;\n text-align: ${o||"center"};\n ${ev("string"!=typeof s&&s)}\n ${tv(e.fontName)}\n }\n ${VA(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n line-height: ${KA(r,t)}px;\n }\n `)}},{key:"render",value:function(){var e=this.component,n=e.fontColor,i=e.fontSize,a=e.activeFontColor,r=e.bulletComponent,o=e.texts,s=e.spacing,u=r?y({fontColor:n,fontSize:i,activeFontColor:a,spacing:s},r):null;if(!Array.isArray(o))return t($A||($A=GA``));var l=o.map((e=>e?t(zA||(zA=GA`<nami-text-list-item-wrapper .component=${0} .scaleFactor=${0}>
156
156
  ${0}
157
157
  <div class="bullet-text-wrapper" .innerHTML="${0}"></div>
158
- </nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&t(BA||(BA=GA`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),oy(e)):null));return t(HA||(HA=GA`${0}`),l)}}])}();de([Hc({type:Object})],ZA.prototype,"component",void 0),de([Hc({type:Boolean})],ZA.prototype,"inFocusedState",void 0),de([Hc({type:Number})],ZA.prototype,"scaleFactor",void 0),ZA=de([yc("nami-text-list")],ZA);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var n=null===(e=oy.Lexer)||void 0===e?void 0:e.rules,i=null==n?void 0:n.inline;i&&Object.values(i).forEach((e=>{e&&Object.keys(e).forEach((t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",n=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),i=e.flags.replace(/u/g,"");return new RegExp(n,i)})(e[t])}))}))}})();var ex=function(){function e(){var t;return h(this,e),(t=d(this,e)).inFocusedState=!1,t.scaleFactor=1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var n,i,a=null!==(n=e.relatedTarget)&&void 0!==n?n:null;if(!a)return t.setFocusState(!1);a===t||null!==(i=t.shadowRoot)&&void 0!==i&&i.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var n=e.detail;t.setFocusState(!0===(null==n?void 0:n.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return k(e,Tf),p(e,[{key:"disconnectedCallback",value:function(){x(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=e.fillImage?i(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):i(Hf(e,!1));return i(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${av(e.position)}\n ${Uf(e)}\n ${nv(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Hf(e,!0)}\n ${nv(e,t,!0)}\n }\n :host(:focus-visible){\n ${uv(e)}\n }\n :host > * {\n ${Vf(n,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>qv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}},{key:"setFocusState",value:function(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();de([Hc({type:Object})],ex.prototype,"component",void 0),de([Hc({type:Boolean})],ex.prototype,"inFocusedState",void 0),de([Hc({type:Number})],ex.prototype,"scaleFactor",void 0),de([Hc({type:Object})],ex.prototype,"minSDKVersion",void 0),ex=de([yc("nami-container")],ex);var tx=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return k(e,Tf),p(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,t="vertical"===this.component.direction,n=t?"width":"height",a=t?"margin-top":"margin-left",r=this.component.fillImage?i(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):i(Hf(this.component,!1));return i(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${av(this.component.position)}\n ${Uf(this.component)}\n ${nv(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${a}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Hf(this.component,!0)}\n ${nv(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${uv(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;Gu(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,n=this.contextProvider.state,i=n.mediaList,a=n.currentGroupId,r=n.selectedPaywall,o=n.formFactor,s=jd(this.contextProvider.productDetails,null!==(e=null==r?void 0:r.sku_menus)&&void 0!==e?e:[],(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||a);return fv(this.contextProvider,s,this.component,i).map((([e,t])=>(this.inFocusedState="television"==o?e:this.inFocusedState,t.map((e=>qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))))}}])}();de([Hc({type:Object})],tx.prototype,"component",void 0),de([Hc({type:Boolean})],tx.prototype,"inFocusedState",void 0),de([Hc({type:Number})],tx.prototype,"scaleFactor",void 0),de([Hc({type:Object})],tx.prototype,"minSDKVersion",void 0),tx=de([yc("nami-product-container")],tx);var nx,ix,ax=e=>e,rx=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return k(e,Tf),p(e,[{key:"styles",value:function(){var e,t,n=this.component,a=n.imageCropping,r=n.alignment,o=n.height,s=n.width,u=n.rightMargin,l=n.spacing,d=n.hidden,h=n.blur,c="fit"===a,m=this.contextConsumer.state.formFactor;return i(`\n :host {\n display: ${"television"===m?"flex":"inline-block"};\n ${d?"display:none;":""}\n position: relative;\n height: ${jf(null!=o?o:"100%",this.scaleFactor)};\n width: ${jf(null!==(e="fitContent"==s?o:s)&&void 0!==e?e:"100%",this.scaleFactor)};\n }\n :host img {\n transition: all 0.3s;\n object-fit: ${c?"contain":"cover"};\n object-position: ${r} center;\n height: ${jf(null!=o?o:"100%",this.scaleFactor)};\n width: ${jf(null!==(t="fitContent"==s?o:s)&&void 0!==t?t:"100%",this.scaleFactor)};\n margin-right: ${u||l||0}px;\n ${h?`filter: blur(${h}px);`:""}\n flex-shrink: ${"number"==typeof s?0:1};\n }\n `)}},{key:"render",value:function(){var e,n=this.component,i=n.url,a=n.alt,r=n.title,o=n.focusedBorderColor,s=n.focusedFillColor,u=n.fillColor;return i?(!o&&Kv(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t(nx||(nx=ax`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t(ix||(ix=ax``)))}}])}();de([Hc({type:Object})],rx.prototype,"component",void 0),de([Hc({type:Boolean})],rx.prototype,"inFocusedState",void 0),de([Hc({type:Number})],rx.prototype,"scaleFactor",void 0),rx=de([yc("nami-image")],rx);var ox=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return k(e,Tf),p(e,[{key:"connectedCallback",value:function(){x(e,"connectedCallback",this)([]),document.body.style.background=this.component.fillColor||"transparent"}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return i("");var t=this.component,n=this.scaleFactor,a=this.contextConsumer.state.formFactor,r=t.backgroundBlur,o="vertical"===t.direction?"margin-top":"margin-left";return i(`\n :host {\n max-height: ${"television"===a?"100vh":""};\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Gf(t)}\n position: fixed;\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=t.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${Hf(t,!1)}\n transition: all 0.3s;\n ${Kf(t,n)}\n }\n :host(:focus){\n ${Hf(t,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${t.spacing?t.spacing*n:0}px;\n }\n `)}},{key:"updated",value:function(){var e,t,n=Array.from(document.getElementsByTagName("nami-paywall")),i=null===(e=this.component.fillColor)||void 0===e?void 0:e.includes("gradient"),a=null===(t=this.shadowRoot)||void 0===t?void 0:t.innerHTML.includes("nami-image");n[0]&&(n[0].style.position=!a||i?"relative":"","undefined"!=typeof window&&"undefined"!=typeof CSS&&CSS.supports("height: 100dvh")?n[0].style.minHeight=!a||i?"100dvh":"100%":n[0].style.minHeight=!a||i?"100vh":"100%")}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>qv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}}])}();de([Hc({type:Object})],ox.prototype,"component",void 0),de([Hc({type:Boolean})],ox.prototype,"fullscreen",void 0),de([Hc({type:Boolean})],ox.prototype,"inFocusedState",void 0),de([Hc({type:Number})],ox.prototype,"scaleFactor",void 0),de([Hc({type:Object})],ox.prototype,"minSDKVersion",void 0),ox=de([yc("nami-background-container")],ox);var sx,ux=e=>e,lx=function(){function t(){var e;return h(this,t),(e=d(this,t,arguments)).zIndex=2,e.inFocusedState=!1,e.scaleFactor=1,e}return k(t,Tf),p(t,[{key:"styles",value:function(){var t=this.contextConsumer,n=this.component,a=this.zIndex,r=this.scaleFactor;if(!t)return e(sx||(sx=ux``));var o=t.state.formFactor,s=n.backgroundBlur,u="phone"!==o?"width: 100%;":"",l="100%"==n.height?"height:100vh !important;":"",d="vertical"===n.direction?"margin-top":"margin-left";return i(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n ${Uf(n)}\n ${Jf(n,r)}\n ${u}\n ${l}\n align-items: center;\n justify-content: flex-start;\n justify-content: start;\n ${s?`backdrop-filter: blur(${s}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===o?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Kf(n,r)}\n ${Hf(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Hf(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${d}: ${n.spacing?n.spacing*r:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map((e=>qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))||[]}}])}();de([Hc({type:Object})],lx.prototype,"component",void 0),de([Hc({type:Number})],lx.prototype,"zIndex",void 0),de([Hc({type:Boolean})],lx.prototype,"inFocusedState",void 0),de([Hc({type:Number})],lx.prototype,"scaleFactor",void 0),de([Hc({type:Object})],lx.prototype,"minSDKVersion",void 0),lx=de([yc("nami-content-container")],lx);var dx,hx=e=>e,cx=function(){function e(){var t;return h(this,e),(t=d(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleClick=e=>{e.preventDefault(),Ap({contextProvider:t.contextProvider,onTap:t.component.onTap})},t.addEventListener("click",t._handleClick),t}return k(e,Tf),p(e,[{key:"styles",value:function(){var e,t,n=rv("active",this.component.components[0]),a=rv("inactive",this.component.components[0]);return i(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Uf(this.component)}\n ${Hf(this.component,!1)}\n ${nv(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Hf(this.component,!0)}\n ${nv(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${uv(this.component)}\n }\n .toggle{\n ${e=this.component,t=this.scaleFactor,`\n position: absolute;\n top: ${Nf(t,e.topPadding)}px;\n bottom: ${Nf(t,e.bottomPadding)}px;\n width: calc(50% - ${Nf(t,e.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${ov(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${ov(n,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${Hf(n,!0)}\n ${sv(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${Hf(n,!0)}\n ${sv(n,this.scaleFactor)}\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map((e=>qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)));return t(dx||(dx=hx`${0}<div class="toggle"></div>`),e)}}])}();de([Hc({type:Object})],cx.prototype,"component",void 0),de([Hc({type:Boolean})],cx.prototype,"inFocusedState",void 0),de([Hc({type:Number})],cx.prototype,"scaleFactor",void 0),de([Hc({type:Object})],cx.prototype,"minSDKVersion",void 0),cx=de([yc("nami-segment-picker")],cx);var mx,fx=e=>e,vx=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0,t._announceButtonLabel()},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return k(e,Tf),p(e,[{key:"connectedCallback",value:function(){x(e,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){x(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_announceButtonLabel",value:function(){var e=this.component.text||"";e&&mc(e)}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var n=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(n.formId){var i=this._getParentFormId();i&&this.contextProvider.state.formStates[i]&&(this._isActive=this.contextProvider.state.formStates[i]===n.formId)}else this._isActive=Gu(n.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}}}},{key:"styles",value:function(){var e,t,n=rv("active",this.component),a=rv("inactive",this.component);return i(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${ov(y({},a,this.component),this.scaleFactor,this.inFocusedState)}\n ${Zf(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${sv(y({},n,this.component),this.scaleFactor)}\n ${Zf(null!==(t=this.component.activeDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",t(mx||(mx=fx`<input type="radio"
158
+ </nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&t(BA||(BA=GA`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),oy(e)):null));return t(HA||(HA=GA`${0}`),l)}}])}();de([Hc({type:Object})],ZA.prototype,"component",void 0),de([Hc({type:Boolean})],ZA.prototype,"inFocusedState",void 0),de([Hc({type:Number})],ZA.prototype,"scaleFactor",void 0),ZA=de([yc("nami-text-list")],ZA);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var n=null===(e=oy.Lexer)||void 0===e?void 0:e.rules,i=null==n?void 0:n.inline;i&&Object.values(i).forEach((e=>{e&&Object.keys(e).forEach((t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",n=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),i=e.flags.replace(/u/g,"");return new RegExp(n,i)})(e[t])}))}))}})();var ex=function(){function e(){var t;return h(this,e),(t=d(this,e)).inFocusedState=!1,t.scaleFactor=1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var n,i,a=null!==(n=e.relatedTarget)&&void 0!==n?n:null;if(!a)return t.setFocusState(!1);a===t||null!==(i=t.shadowRoot)&&void 0!==i&&i.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var n=e.detail;t.setFocusState(!0===(null==n?void 0:n.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return k(e,Tf),p(e,[{key:"disconnectedCallback",value:function(){x(e,"disconnectedCallback",this)([]),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}},{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=e.fillImage?i(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):i(Hf(e,!1));return i(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${av(e.position)}\n ${Uf(e)}\n ${nv(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Hf(e,!0)}\n ${nv(e,t,!0)}\n }\n :host(:focus-visible){\n ${uv(e)}\n }\n :host > * {\n ${Vf(n,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>qv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}},{key:"setFocusState",value:function(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();de([Hc({type:Object})],ex.prototype,"component",void 0),de([Hc({type:Boolean})],ex.prototype,"inFocusedState",void 0),de([Hc({type:Number})],ex.prototype,"scaleFactor",void 0),de([Hc({type:Object})],ex.prototype,"minSDKVersion",void 0),ex=de([yc("nami-container")],ex);var tx=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return k(e,Tf),p(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,t="vertical"===this.component.direction,n=t?"width":"height",a=t?"margin-top":"margin-left",r=this.component.fillImage?i(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):i(Hf(this.component,!1));return i(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${av(this.component.position)}\n ${Uf(this.component)}\n ${nv(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${a}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Hf(this.component,!0)}\n ${nv(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${uv(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;Gu(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}},{key:"render",value:function(){var e,t,n=this.contextProvider.state,i=n.mediaList,a=n.currentGroupId,r=n.selectedPaywall,o=n.formFactor,s=jd(this.contextProvider.productDetails,null!==(e=null==r?void 0:r.sku_menus)&&void 0!==e?e:[],(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||a);return fv(this.contextProvider,s,this.component,i).map((([e,t])=>(this.inFocusedState="television"==o?e:this.inFocusedState,t.map((e=>qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))))}}])}();de([Hc({type:Object})],tx.prototype,"component",void 0),de([Hc({type:Boolean})],tx.prototype,"inFocusedState",void 0),de([Hc({type:Number})],tx.prototype,"scaleFactor",void 0),de([Hc({type:Object})],tx.prototype,"minSDKVersion",void 0),tx=de([yc("nami-product-container")],tx);var nx,ix,ax=e=>e,rx=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return k(e,Tf),p(e,[{key:"styles",value:function(){var e,t,n=this.component,a=n.imageCropping,r=n.alignment,o=n.height,s=n.width,u=n.rightMargin,l=n.spacing,d=n.hidden,h=n.blur,c="fit"===a,m=this.contextConsumer.state.formFactor;return i(`\n :host {\n display: ${"television"===m?"flex":"inline-block"};\n ${d?"display:none;":""}\n position: relative;\n height: ${jf(null!=o?o:"100%",this.scaleFactor)};\n width: ${jf(null!==(e="fitContent"==s?o:s)&&void 0!==e?e:"100%",this.scaleFactor)};\n }\n :host img {\n transition: all 0.3s;\n object-fit: ${c?"contain":"cover"};\n object-position: ${r} center;\n height: ${jf(null!=o?o:"100%",this.scaleFactor)};\n width: ${jf(null!==(t="fitContent"==s?o:s)&&void 0!==t?t:"100%",this.scaleFactor)};\n margin-right: ${u||l||0}px;\n ${h?`filter: blur(${h}px);`:""}\n flex-shrink: ${"number"==typeof s?0:1};\n }\n `)}},{key:"render",value:function(){var e,n=this.component,i=n.url,a=n.alt,r=n.title,o=n.focusedBorderColor,s=n.focusedFillColor,u=n.fillColor;return i?(!o&&Kv(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t(nx||(nx=ax`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t(ix||(ix=ax``)))}}])}();de([Hc({type:Object})],rx.prototype,"component",void 0),de([Hc({type:Boolean})],rx.prototype,"inFocusedState",void 0),de([Hc({type:Number})],rx.prototype,"scaleFactor",void 0),rx=de([yc("nami-image")],rx);var ox=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return k(e,Tf),p(e,[{key:"connectedCallback",value:function(){x(e,"connectedCallback",this)([]),document.body.style.background=this.component.fillColor||"transparent"}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return i("");var t=this.component,n=this.scaleFactor,a=this.contextConsumer.state.formFactor,r=t.backgroundBlur,o="vertical"===t.direction?"margin-top":"margin-left";return i(`\n :host {\n max-height: ${"television"===a?"100vh":""};\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Gf(t)}\n position: fixed;\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${null!==(e=t.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${Hf(t,!1)}\n transition: all 0.3s;\n ${Kf(t,n)}\n }\n :host(:focus){\n ${Hf(t,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${t.spacing?t.spacing*n:0}px;\n }\n `)}},{key:"updated",value:function(){var e,t,n=Array.from(document.getElementsByTagName("nami-paywall")),i=null===(e=this.component.fillColor)||void 0===e?void 0:e.includes("gradient"),a=null===(t=this.shadowRoot)||void 0===t?void 0:t.innerHTML.includes("nami-image");n[0]&&(n[0].style.position=!a||i?"relative":"","undefined"!=typeof window&&"undefined"!=typeof CSS&&CSS.supports("height: 100dvh")?n[0].style.minHeight=!a||i?"100dvh":"100%":n[0].style.minHeight=!a||i?"100vh":"100%")}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map((e=>qv(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}}])}();de([Hc({type:Object})],ox.prototype,"component",void 0),de([Hc({type:Boolean})],ox.prototype,"fullscreen",void 0),de([Hc({type:Boolean})],ox.prototype,"inFocusedState",void 0),de([Hc({type:Number})],ox.prototype,"scaleFactor",void 0),de([Hc({type:Object})],ox.prototype,"minSDKVersion",void 0),ox=de([yc("nami-background-container")],ox);var sx,ux=e=>e,lx=function(){function t(){var e;return h(this,t),(e=d(this,t,arguments)).zIndex=2,e.inFocusedState=!1,e.scaleFactor=1,e}return k(t,Tf),p(t,[{key:"styles",value:function(){var t=this.contextConsumer,n=this.component,a=this.zIndex,r=this.scaleFactor;if(!t)return e(sx||(sx=ux``));var o=t.state.formFactor,s=n.backgroundBlur,u="phone"!==o?"width: 100%;":"",l="vertical"===n.direction?"margin-top":"margin-left";return i(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Uf(n)}\n ${Jf(n,r)}\n ${u}\n align-items: center;\n justify-content: flex-start;\n justify-content: start;\n ${s?`backdrop-filter: blur(${s}px);`:""}\n z-index: ${a};\n transition: all 0.3s;\n overflow-y: ${"television"===o?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${Kf(n,r)}\n ${Hf(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Hf(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${l}: ${n.spacing?n.spacing*r:0}px;\n }\n `)}},{key:"firstUpdated",value:function(){var e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}},{key:"render",value:function(){var e;return(null===(e=this.component.components)||void 0===e?void 0:e.map((e=>qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))||[]}}])}();de([Hc({type:Object})],lx.prototype,"component",void 0),de([Hc({type:Number})],lx.prototype,"zIndex",void 0),de([Hc({type:Boolean})],lx.prototype,"inFocusedState",void 0),de([Hc({type:Number})],lx.prototype,"scaleFactor",void 0),de([Hc({type:Object})],lx.prototype,"minSDKVersion",void 0),lx=de([yc("nami-content-container")],lx);var dx,hx=e=>e,cx=function(){function e(){var t;return h(this,e),(t=d(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleClick=e=>{e.preventDefault(),Ap({contextProvider:t.contextProvider,onTap:t.component.onTap})},t.addEventListener("click",t._handleClick),t}return k(e,Tf),p(e,[{key:"styles",value:function(){var e,t,n=rv("active",this.component.components[0]),a=rv("inactive",this.component.components[0]);return i(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Uf(this.component)}\n ${Hf(this.component,!1)}\n ${nv(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Hf(this.component,!0)}\n ${nv(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${uv(this.component)}\n }\n .toggle{\n ${e=this.component,t=this.scaleFactor,`\n position: absolute;\n top: ${Nf(t,e.topPadding)}px;\n bottom: ${Nf(t,e.bottomPadding)}px;\n width: calc(50% - ${Nf(t,e.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${ov(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${ov(n,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${Hf(n,!0)}\n ${sv(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${Hf(n,!0)}\n ${sv(n,this.scaleFactor)}\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map((e=>qv(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)));return t(dx||(dx=hx`${0}<div class="toggle"></div>`),e)}}])}();de([Hc({type:Object})],cx.prototype,"component",void 0),de([Hc({type:Boolean})],cx.prototype,"inFocusedState",void 0),de([Hc({type:Number})],cx.prototype,"scaleFactor",void 0),de([Hc({type:Object})],cx.prototype,"minSDKVersion",void 0),cx=de([yc("nami-segment-picker")],cx);var mx,fx=e=>e,vx=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0,t._announceButtonLabel()},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return k(e,Tf),p(e,[{key:"connectedCallback",value:function(){x(e,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){x(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{key:"_announceButtonLabel",value:function(){var e=this.component.text||"";e&&mc(e)}},{key:"_getParentPicker",value:function(){var e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}},{key:"_getParentFormId",value:function(){var e;return null===(e=this._getParentPicker())||void 0===e?void 0:e.component.formId}},{key:"_updateFormState",value:function(){if(this.contextProvider)if(this.component.formId){var e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}},{key:"updated",value:function(e){var t;if(e.has("component")&&this.contextProvider){var n=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(n.formId){var i=this._getParentFormId();i&&this.contextProvider.state.formStates[i]&&(this._isActive=this.contextProvider.state.formStates[i]===n.formId)}else this._isActive=Gu(n.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),this._isActive){var a=this.getRootNode();if(a instanceof ShadowRoot)a.querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}}}},{key:"styles",value:function(){var e,t,n=rv("active",this.component),a=rv("inactive",this.component);return i(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${ov(y({},a,this.component),this.scaleFactor,this.inFocusedState)}\n ${Zf(null!==(e=this.component.inactiveDropShadow)&&void 0!==e?e:this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${sv(y({},n,this.component),this.scaleFactor)}\n ${Zf(null!==(t=this.component.activeDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",t(mx||(mx=fx`<input type="radio"
159
159
  autocomplete="off"
160
160
  id="${0}"
161
161
  name="${0}"
@@ -222,7 +222,8 @@ import{css as e,html as t,LitElement as n,unsafeCSS as i,svg as a}from"lit";impo
222
222
  flex-direction: column;
223
223
  height: 100%;
224
224
  width: 100%;
225
- min-height: 0;
225
+ min-height: 0;
226
+ overflow: hidden;
226
227
  }
227
228
  `)),de([Hc({type:Object})],Yj.prototype,"paywall",void 0),de([Hc({type:Object})],Yj.prototype,"campaign",void 0),de([Hc({type:Object})],Yj.prototype,"context",void 0),de([function({context:e}){return(t,n)=>{var i=new WeakMap;if("object"==typeof n)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new mf(this,{context:e,initialValue:t})),t}};t.constructor.addInitializer((t=>{i.set(t,new mf(t,{context:e}))}));var a,r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var o=new WeakMap;a={get(){return o.get(this)},set(e){i.get(this).setValue(e),o.set(this,e)},configurable:!0,enumerable:!0}}else{var s=r.set;a=y({},r,{set(e){i.get(this).setValue(e),null==s||s.call(this,e)}})}Object.defineProperty(t,n,a)}}({context:vf})],Yj.prototype,"contextProvider",void 0),Yj=de([yc("nami-paywall-screen")],Yj);var qj,Jj,Qj={};function Zj(){return Jj?qj:(Jj=1,qj=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var e$,t$={},n$={};function i$(){if(e$)return n$;var e;e$=1;var t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return n$.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},n$.getSymbolTotalCodewords=function(e){return t[e]},n$.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},n$.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},n$.isKanjiModeEnabled=function(){return void 0!==e},n$.toSJIS=function(t){return e(t)},n$}var a$,r$,o$,s$,u$,l$={};function d$(){return a$||(a$=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}}(l$)),l$}var h$,c$={};var m$,f$={};var v$,p$={};var g$,y$={};function b$(){if(g$)return y$;g$=1;var e=d$(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return y$.getBlocksCount=function(n,i){switch(i){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},y$.getTotalCodewordsCount=function(t,i){switch(i){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},y$}var w$,k$,S$,E$,M$={},P$={};function T$(){return k$||(k$=1,function(e){var t=function(){if(w$)return P$;w$=1;var e=new Uint8Array(512),t=new Uint8Array(256);return function(){for(var n=1,i=0;i<255;i++)e[i]=n,t[n]=i,256&(n<<=1)&&(n^=285);for(var a=255;a<512;a++)e[a]=e[a-255]}(),P$.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},P$.exp=function(t){return e[t]},P$.mul=function(n,i){return 0===n||0===i?0:e[t[n]+t[i]]},P$}();e.mul=function(e,n){for(var i=new Uint8Array(e.length+n.length-1),a=0;a<e.length;a++)for(var r=0;r<n.length;r++)i[a+r]^=t.mul(e[a],n[r]);return i},e.mod=function(e,n){for(var i=new Uint8Array(e);i.length-n.length>=0;){for(var a=i[0],r=0;r<n.length;r++)i[r]^=t.mul(n[r],a);for(var o=0;o<i.length&&0===i[o];)o++;i=i.slice(o)}return i},e.generateECPolynomial=function(n){for(var i=new Uint8Array([1]),a=0;a<n;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}}(M$)),M$}var _$,D$={},A$={},x$={};function C$(){return _$||(_$=1,x$.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),x$}var I$,L$,F$,R$={};function W$(){if(I$)return R$;I$=1;var e="[0-9]+",t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",n="(?:(?![A-Z0-9 $%*+\\-./:]|"+(t=t.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";R$.KANJI=new RegExp(t,"g"),R$.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),R$.BYTE=new RegExp(n,"g"),R$.NUMERIC=new RegExp(e,"g"),R$.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var i=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return R$.testKanji=function(e){return i.test(e)},R$.testNumeric=function(e){return a.test(e)},R$.testAlphanumeric=function(e){return r.test(e)},R$}function O$(){return L$||(L$=1,function(e){var t=C$(),n=W$();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}(A$)),A$}function N$(){return F$||(F$=1,function(e){var t=i$(),n=b$(),i=d$(),a=O$(),r=C$(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){var n=0;return e.forEach((function(e){var i=s(e.mode,t);n+=i+e.getBitsLength()})),n}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,i,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);var u=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,i));if(o===a.MIXED)return u;var l=u-s(o,e);switch(o){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){var r,o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(var i=1;i<=40;i++)if(u(t,i)<=e.getCapacity(i,n,a.MIXED))return i}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,i){for(var a=1;a<=40;a++)if(n<=e.getCapacity(a,i,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var n=e<<12;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(D$)),D$}var j$,$$={};var z$,B$,H$,U$,G$,V$,X$,K$,Y$={};var q$,J$,Q$,Z$={exports:{}};function ez(){return q$||(q$=1,function(e){var t={single_source_shortest_paths:function(e,n,i){var a={},r={};r[n]=0;var o,s,u,l,d,h,c,m=t.PriorityQueue.make();for(m.push(n,0);!m.empty();)for(u in s=(o=m.pop()).value,l=o.cost,d=e[s]||{})d.hasOwnProperty(u)&&(h=l+d[u],c=r[u],(void 0===r[u]||c>h)&&(r[u]=h,m.push(u,h),a[u]=s));if(void 0!==i&&void 0===r[i]){var f=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],i=t;i;)n.push(i),e[i],i=e[i];return n.reverse(),n},find_path:function(e,n,i){var a=t.single_source_shortest_paths(e,n,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(e){var n,i=t.PriorityQueue,a={};for(n in e=e||{},i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a.queue=[],a.sorter=e.sorter||i.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(Z$)),Z$.exports}function tz(){return J$||(J$=1,function(e){var t=O$(),n=function(){if(B$)return z$;B$=1;var e=O$();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){var t,n,i;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),i=parseInt(n,10),e.put(i,10);var a=this.data.length-t;a>0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,3*a+1))},z$=t}(),i=function(){if(U$)return H$;U$=1;var e=O$(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var n;for(n=0;n+2<=this.data.length;n+=2){var i=45*t.indexOf(this.data[n]);i+=t.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},H$=n}(),a=function(){if(V$)return G$;V$=1;var e=O$();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(var t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},G$=t}(),r=function(){if(K$)return X$;K$=1;var e=O$(),t=i$();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var n;for(n=0;n<this.data.length;n++){var i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}},X$=n}(),o=W$(),s=i$(),u=ez();function l(e){return unescape(encodeURIComponent(e)).length}function d(e,t,n){for(var i,a=[];null!==(i=e.exec(n));)a.push({data:i[0],index:i.index,mode:t,length:i[0].length});return a}function h(e){var n,i,a=d(o.NUMERIC,t.NUMERIC,e),r=d(o.ALPHANUMERIC,t.ALPHANUMERIC,e);return s.isKanjiModeEnabled()?(n=d(o.BYTE,t.BYTE,e),i=d(o.KANJI,t.KANJI,e)):(n=d(o.BYTE_KANJI,t.BYTE,e),i=[]),a.concat(r,n,i).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function c(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return i.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){var u,l=t.getBestModeForData(e);if((u=t.from(o,l))!==t.BYTE&&u.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(u)+".\n Suggested mode is: "+t.toString(l));switch(u!==t.KANJI||s.isKanjiModeEnabled()||(u=t.BYTE),u){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new i(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},e.fromString=function(n,i){for(var a=function(e){for(var n=[],i=0;i<e.length;i++){var a=e[i];switch(a.mode){case t.NUMERIC:n.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:n.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:n.push([a,{data:a.data,mode:t.BYTE,length:l(a.data)}]);break;case t.BYTE:n.push([{data:a.data,mode:t.BYTE,length:l(a.data)}])}}return n}(h(n,s.isKanjiModeEnabled())),r=function(e,n){for(var i={},a={start:{}},r=["start"],o=0;o<e.length;o++){for(var s=e[o],u=[],l=0;l<s.length;l++){var d=s[l],h=""+o+l;u.push(h),i[h]={node:d,lastCount:0},a[h]={};for(var m=0;m<r.length;m++){var f=r[m];i[f]&&i[f].node.mode===d.mode?(a[f][h]=c(i[f].lastCount+d.length,d.mode)-c(i[f].lastCount,d.mode),i[f].lastCount+=d.length):(i[f]&&(i[f].lastCount=d.length),a[f][h]=c(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,n))}}r=u}for(var v=0;v<r.length;v++)a[r[v]].end=0;return{map:a,table:i}}(a,i),o=u.find_path(r.map,"start","end"),d=[],m=1;m<o.length-1;m++)d.push(r.table[o[m]].node);return e.fromArray(function(e){return e.reduce((function(e,t){var n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(d))},e.rawSplit=function(t){return e.fromArray(h(t,s.isKanjiModeEnabled()))}}(Y$)),Y$}function nz(){if(Q$)return t$;Q$=1;var e=i$(),t=d$(),n=function(){if(o$)return r$;function e(){this.buffer=[],this.length=0}return o$=1,e.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},r$=e}(),i=function(){if(u$)return s$;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return u$=1,e.prototype.set=function(e,t,n,i){var a=e*this.size+t;this.data[a]=n,i&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},s$=e}(),a=(h$||(h$=1,function(e){var t=i$().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];for(var n=Math.floor(e/7)+2,i=t(e),a=145===i?26:2*Math.ceil((i-13)/(2*n-2)),r=[i-7],o=1;o<n-1;o++)r[o]=r[o-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){for(var n=[],i=e.getRowColCoords(t),a=i.length,r=0;r<a;r++)for(var o=0;o<a;o++)0===r&&0===o||0===r&&o===a-1||r===a-1&&0===o||n.push([i[r],i[o]]);return n}}(c$)),c$),r=function(){if(m$)return f$;m$=1;var e=i$().getSymbolSize;return f$.getPositions=function(t){var n=e(t);return[[0,0],[n-7,0],[0,n-7]]},f$}(),o=(v$||(v$=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t=3,n=3,i=40,a=10;function r(t,n,i){switch(t){case e.Patterns.PATTERN000:return(n+i)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return i%3==0;case e.Patterns.PATTERN011:return(n+i)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2==0;case e.Patterns.PATTERN101:return n*i%2+n*i%3==0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2==0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){for(var n=e.size,i=0,a=0,r=0,o=null,s=null,u=0;u<n;u++){a=r=0,o=s=null;for(var l=0;l<n;l++){var d=e.get(u,l);d===o?a++:(a>=5&&(i+=t+(a-5)),o=d,a=1),(d=e.get(l,u))===s?r++:(r>=5&&(i+=t+(r-5)),s=d,r=1)}a>=5&&(i+=t+(a-5)),r>=5&&(i+=t+(r-5))}return i},e.getPenaltyN2=function(e){for(var t=e.size,i=0,a=0;a<t-1;a++)for(var r=0;r<t-1;r++){var o=e.get(a,r)+e.get(a,r+1)+e.get(a+1,r)+e.get(a+1,r+1);4!==o&&0!==o||i++}return i*n},e.getPenaltyN3=function(e){for(var t=e.size,n=0,a=0,r=0,o=0;o<t;o++){a=r=0;for(var s=0;s<t;s++)a=a<<1&2047|e.get(o,s),s>=10&&(1488===a||93===a)&&n++,r=r<<1&2047|e.get(s,o),s>=10&&(1488===r||93===r)&&n++}return n*i},e.getPenaltyN4=function(e){for(var t=0,n=e.data.length,i=0;i<n;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/n/5)-10)*a},e.applyMask=function(e,t){for(var n=t.size,i=0;i<n;i++)for(var a=0;a<n;a++)t.isReserved(a,i)||t.xor(a,i,r(e,a,i))},e.getBestMask=function(t,n){for(var i=Object.keys(e.Patterns).length,a=0,r=1/0,o=0;o<i;o++){n(o),e.applyMask(o,t);var s=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),s<r&&(r=s,a=o)}return a}}(p$)),p$),s=b$(),u=function(){if(E$)return S$;E$=1;var e=T$();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=new Uint8Array(t.length+this.degree);n.set(t);var i=e.mod(n,this.genPoly),a=this.degree-i.length;if(a>0){var r=new Uint8Array(this.degree);return r.set(i,a),r}return i},S$=t}(),l=N$(),d=function(){if(j$)return $$;j$=1;var e=i$(),t=e.getBCHDigit(1335);return $$.getEncodedBits=function(n,i){for(var a=n.bit<<3|i,r=a<<10;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},$$}(),h=O$(),c=tz();function m(e,t,n){var i,a,r=e.size,o=d.getEncodedBits(t,n);for(i=0;i<15;i++)a=1==(o>>i&1),i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(r-15+i,8,a,!0),i<8?e.set(8,r-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(r-8,8,1,!0)}function f(t,i,a){var r=new n;a.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),h.getCharCountIndicator(e.mode,t)),e.write(r)}));var o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,i));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);for(var l=(o-r.getLengthInBits())/8,d=0;d<l;d++)r.put(d%2?17:236,8);return function(t,n,i){for(var a=e.getSymbolTotalCodewords(n),r=s.getTotalCodewordsCount(n,i),o=a-r,l=s.getBlocksCount(n,i),d=l-a%l,h=Math.floor(a/l),c=Math.floor(o/l),m=c+1,f=h-c,v=new u(f),p=0,g=new Array(l),y=new Array(l),b=0,w=new Uint8Array(t.buffer),k=0;k<l;k++){var S=k<d?c:m;g[k]=w.slice(p,p+S),y[k]=v.encode(g[k]),p+=S,b=Math.max(b,S)}var E,M,P=new Uint8Array(a),T=0;for(E=0;E<b;E++)for(M=0;M<l;M++)E<g[M].length&&(P[T++]=g[M][E]);for(E=0;E<f;E++)for(M=0;M<l;M++)P[T++]=y[M][E];return P}(r,t,i)}function v(t,n,s,u){var d;if(Array.isArray(t))d=c.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var h=n;if(!h){var v=c.rawSplit(t);h=l.getBestVersionForData(v,s)}d=c.fromString(t,h||40)}var p=l.getBestVersionForData(d,s);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else n=p;var g=f(n,s,d),y=e.getSymbolSize(n),b=new i(y);return function(e,t){for(var n=e.size,i=r.getPositions(t),a=0;a<i.length;a++)for(var o=i[a][0],s=i[a][1],u=-1;u<=7;u++)if(!(o+u<=-1||n<=o+u))for(var l=-1;l<=7;l++)s+l<=-1||n<=s+l||(u>=0&&u<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===u||6===u)||u>=2&&u<=4&&l>=2&&l<=4?e.set(o+u,s+l,!0,!0):e.set(o+u,s+l,!1,!0))}(b,n),function(e){for(var t=e.size,n=8;n<t-8;n++){var i=n%2==0;e.set(n,6,i,!0),e.set(6,n,i,!0)}}(b),function(e,t){for(var n=a.getPositions(t),i=0;i<n.length;i++)for(var r=n[i][0],o=n[i][1],s=-2;s<=2;s++)for(var u=-2;u<=2;u++)-2===s||2===s||-2===u||2===u||0===s&&0===u?e.set(r+s,o+u,!0,!0):e.set(r+s,o+u,!1,!0)}(b,n),m(b,s,0),n>=7&&function(e,t){for(var n,i,a,r=e.size,o=l.getEncodedBits(t),s=0;s<18;s++)n=Math.floor(s/3),i=s%3+r-8-3,a=1==(o>>s&1),e.set(n,i,a,!0),e.set(i,n,a,!0)}(b,n),function(e,t){for(var n=e.size,i=-1,a=n-1,r=7,o=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var u=0;u<2;u++)if(!e.isReserved(a,s-u)){var l=!1;o<t.length&&(l=1==(t[o]>>>r&1)),e.set(a,s-u,l),-1==--r&&(o++,r=7)}if((a+=i)<0||n<=a){a-=i,i=-i;break}}}(b,g),isNaN(u)&&(u=o.getBestMask(b,m.bind(null,b,s))),o.applyMask(u,b),m(b,s,u),{modules:b,version:n,errorCorrectionLevel:s,maskPattern:u,segments:d}}return t$.create=function(n,i){if(void 0===n||""===n)throw new Error("No input text");var a,r,s=t.M;return void 0!==i&&(s=t.from(i.errorCorrectionLevel,t.M),a=l.from(i.version),r=o.from(i.maskPattern),i.toSJISFunc&&e.setToSJISFunction(i.toSJISFunc)),v(n,a,s,r)},t$}var iz,az,rz={},oz={};function sz(){return iz||(iz=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});var n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){var i=e.getScale(t,n);return Math.floor((t+2*n.margin)*i)},e.qrToImageData=function(t,n,i){for(var a=n.modules.size,r=n.modules.data,o=e.getScale(a,i),s=Math.floor((a+2*i.margin)*o),u=i.margin*o,l=[i.color.light,i.color.dark],d=0;d<s;d++)for(var h=0;h<s;h++){var c=4*(d*s+h),m=i.color.light;if(d>=u&&h>=u&&d<s-u&&h<s-u)m=l[r[Math.floor((d-u)/o)*a+Math.floor((h-u)/o)]?1:0];t[c++]=m.r,t[c++]=m.g,t[c++]=m.b,t[c]=m.a}}}(oz)),oz}function uz(){return az||(az=1,function(e){var t=sz();e.render=function(e,n,i){var a=i,r=n;void 0!==a||n&&n.getContext||(a=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);var o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),u=s.createImageData(o,o);return t.qrToImageData(u.data,e,a),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,r,o),s.putImageData(u,0,0),r},e.renderToDataURL=function(t,n,i){var a=i;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});var r=e.render(t,n,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(rz)),rz}var lz,dz,hz={};function cz(){if(lz)return hz;lz=1;var e=sz();function t(e,t){var n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function n(e,t,n){var i=e+t;return void 0!==n&&(i+=" "+n),i}return hz.render=function(i,a,r){var o=e.getOptions(a),s=i.modules.size,u=i.modules.data,l=s+2*o.margin,d=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",h="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,i){for(var a="",r=0,o=!1,s=0,u=0;u<e.length;u++){var l=Math.floor(u%t),d=Math.floor(u/t);l||o||(o=!0),e[u]?(s++,u>0&&l>0&&e[u-1]||(a+=o?n("M",l+i,.5+d+i):n("m",r,0),r=0,o=!1),l+1<t&&e[u+1]||(a+=n("h",s),s=0)):r++}return a}(u,s,o.margin)+'"/>',c='viewBox="0 0 '+l+" "+l+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+c+' shape-rendering="crispEdges">'+d+h+"</svg>\n";return"function"==typeof r&&r(null,m),m},hz}var mz,fz,vz=function(){if(dz)return Qj;dz=1;var e=Zj(),t=nz(),n=uz(),i=cz();function a(n,i,a,r,o){var s=[].slice.call(arguments,1),u=s.length,l="function"==typeof s[u-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(u<1)throw new Error("Too few arguments provided");return 1===u?(a=i,i=r=void 0):2!==u||i.getContext||(r=a,a=i,i=void 0),new Promise((function(e,o){try{var s=t.create(a,r);e(n(s,i,r))}catch(e){o(e)}}))}if(u<2)throw new Error("Too few arguments provided");2===u?(o=a,a=i,i=r=void 0):3===u&&(i.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=i,i=void 0));try{var d=t.create(a,r);o(null,n(d,i,r))}catch(e){o(e)}}return Qj.create=t.create,Qj.toCanvas=a.bind(null,n.render),Qj.toDataURL=a.bind(null,n.renderToDataURL),Qj.toString=a.bind(null,(function(e,t,n){return i.render(e,n)})),Qj}(),pz=Ks(vz),gz=e=>e,yz=function(){function e(){var t;return h(this,e),(t=d(this,e,arguments)).scaleFactor=1,t}return k(e,Tf),p(e,[{key:"styles",value:function(){var e;return this.component?i(`\n :host {\n box-sizing: border-box;\n ${Jf(this.component,this.scaleFactor)}\n ${Kf(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${null!==(e=this.component.borderWidth)&&void 0!==e?e:0}px;\n ${zf(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):i(":host { box-sizing: border-box; display: inline-block; }")}},{key:"renderQr",value:function(){var e,t,n,i,a,r,o,s;return T((function(u){for(;;)switch(u.p=u.n){case 0:if((i=this.renderRoot.querySelector("canvas"))&&null!==(e=this.component)&&void 0!==e&&e.url){u.n=1;break}return u.a(2);case 1:return a=this.computedSize,i.width=a,i.height=a,i.style.width=`${a}px`,i.style.height=`${a}px`,r=null!==(t=Xv(this.component.color))&&void 0!==t?t:"#000000",o=null!==(n=Xv(this.component.fillColor))&&void 0!==n?n:"#ffffff",u.p=2,u.n=3,l(pz.toCanvas(i,this.component.url,{width:a,color:{dark:r,light:o},margin:0}));case 3:u.n=5;break;case 4:u.p=4,s=u.v,$n.error(`QR render failed for URL "${this.component.url}":`,s);case 5:return u.a(2)}}),null,this,[[2,4]],Promise)}},{key:"firstUpdated",value:function(){this.renderQr()}},{key:"updated",value:function(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then((()=>this.renderQr()))}},{key:"computedSize",get:function(){var e,t=Number(null!==(e=this.component.borderWidth)&&void 0!==e?e:0),n=Number(this.component.width)*this.scaleFactor,i=Math.floor(this.component.width?n-2*t:360);return Math.max(1,i)}},{key:"render",value:function(){if(this.component){var e=this.computedSize;return t(mz||(mz=gz`<canvas width="${0}" height="${0}" style="width:${0}px;height:${0}px;"></canvas>`),e,e,e,e)}return t(fz||(fz=gz`<canvas></canvas>`))}}])}();de([Hc({type:Object})],yz.prototype,"component",void 0),de([Hc({type:Number})],yz.prototype,"scaleFactor",void 0),yz=de([yc("nami-qr-code")],yz);var bz,wz=e=>e,kz=function(){function e(){var t;return h(this,e),(t=d(this,e)).inFocusedState=!1,t.scaleFactor=1,t.isActive=!1,t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||t._handleClick()},t}return k(e,Tf),p(e,[{key:"connectedCallback",value:function(){x(e,"connectedCallback",this)([]),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}},{key:"disconnectedCallback",value:function(){x(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}},{key:"_handleClick",value:function(){var e=this.component,t=e.onTap,n=e.disabled,i=e.formId;if(!0!==n){this.component.checked=!this.component.checked,this.isActive=this.component.checked;var a=void 0;a=i?{function:(null==t?void 0:t.function)||"",parameters:y({},null==t?void 0:t.parameters,{formId:i||""})}:t,!this.contextProvider.flow||i?Ap({onTap:a,contextProvider:this.contextProvider}):this.component.id?($n.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):$n.warn("Cannot trigger button hoisting without an id")}}},{key:"styles",value:function(){return i(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}},{key:"applyPlateStyles",value:function(){var e=this.component,t=this.scaleFactor,n=this.isActive||e.checked||!1,i=n?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",a=n?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Jf(e,t)};\n ${zf(a||"transparent")}\n border-width: ${n?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${$f(i)}\n `}},{key:"applyHandleStyles",value:function(){var e=this.component,t=e.checked||!1,n=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",i=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${zf(i)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Zf(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${$f(n)}\n `}},{key:"render",value:function(){return this.tabIndex=0,this.role="switch",t(bz||(bz=wz`
228
229
  <div class="toggle-plate">
@@ -155,7 +155,7 @@
155
155
  `}render(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}};T([qh({type:Object})],Gx.prototype,"component",void 0),T([qh({type:Boolean})],Gx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Gx.prototype,"scaleFactor",void 0),Gx=T([Mh("nami-symbol")],Gx);let Vx=class extends vp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{component:e,scaleFactor:t,inFocusedState:n}=this,{hidden:i,fontSize:a,alignment:r,strikethrough:o,spacing:s}=e;return Ch(`\n :host {\n line-height: ${zx(a,t)}px;\n display: ${i?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${Rp(e,n)}\n ${Hx(e,n)}\n font-size: ${(a??jx)*t}px;\n text-align: ${r||"center"};\n ${Gp("string"!=typeof o&&o)}\n ${Vp(e.fontName)}\n ${Xp(e,t,n)}\n ${$x(e)}\n ${Wp(e)}\n ${function({alignment:e,horizontalAlignment:t}){let n;return n=t&&wp[t]?wp[t]:e&&wp[e]?wp[e]:"center",Sp("justify-content",n)}(e)}\n }\n :host > :not(:first-child) {\n margin-top: ${s||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n line-height: ${zx(a,t)}px;\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${Rp(e,n)}\n ${Hx(e,n)}\n font-size: ${(a??jx)*t}px;\n text-align: ${r||"center"};\n ${Gp("string"!=typeof o&&o)}\n ${Vp(e.fontName)}\n }\n ${$x(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n line-height: ${zx(a,t)}px;\n }\n `)}render(){const{fontColor:e,fontSize:t,activeFontColor:n,bulletComponent:i,texts:a,spacing:r}=this.component,o=i?{fontColor:e,fontSize:t,activeFontColor:n,spacing:r,...i}:null;if(!Array.isArray(a))return ym``;const s=a.map((e=>e?ym`<nami-text-list-item-wrapper .component=${this.component} .scaleFactor=${this.scaleFactor}>
156
156
  ${o&&ym`<nami-symbol .component=${o} .scaleFactor=${this.scaleFactor}></nami-symbol>`}
157
157
  <div class="bullet-text-wrapper" .innerHTML="${db(e)}"></div>
158
- </nami-text-list-item-wrapper>`:null));return ym`${s}`}};T([qh({type:Object})],Vx.prototype,"component",void 0),T([qh({type:Boolean})],Vx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Vx.prototype,"scaleFactor",void 0),Vx=T([Mh("nami-text-list")],Vx);(()=>{let e=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch{e=!1}if(e)return;const t=db.Lexer?.rules,n=t?.inline;n&&Object.values(n).forEach((e=>{e&&Object.keys(e).forEach((t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;const t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",n=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),i=e.flags.replace(/u/g,"");return new RegExp(n,i)})(e[t])}))}))})();let Xx=class extends vp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this.handleFocusIn=()=>this.setFocusState(!0),this.handleFocusOut=e=>{const t=e.relatedTarget??null;if(!t)return this.setFocusState(!1);t===this||this.shadowRoot?.contains(t)||this.setFocusState(!1)},this.handleFocusChanged=e=>{const{detail:t}=e;this.setFocusState(!0===t?.inFocusedState)},this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),this.addEventListener("focus-changed",this.handleFocusChanged)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}styles(){const{component:e,scaleFactor:t,minSDKVersion:n}=this,{backgroundBlur:i}=e,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=e.fillImage?Ch(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):Ch(Rp(e,!1));return Ch(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${s};\n ${Yp(e.position)}\n ${Wp(e)}\n ${Xp(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Rp(e,!0)}\n ${Xp(e,t,!0)}\n }\n :host(:focus-visible){\n ${Zp(e)}\n }\n :host > * {\n ${Fp(n,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}render(){return(this.component.components??[]).map((e=>hg(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}setFocusState(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}};T([qh({type:Object})],Xx.prototype,"component",void 0),T([qh({type:Boolean})],Xx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Xx.prototype,"scaleFactor",void 0),T([qh({type:Object})],Xx.prototype,"minSDKVersion",void 0),Xx=T([Mh("nami-container")],Xx);let Kx=class extends vp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{backgroundBlur:e}=this.component,t="vertical"===this.component.direction,n=t?"width":"height",i=t?"margin-top":"margin-left",a=this.component.fillImage?Ch(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):Ch(Rp(this.component,!1));return Ch(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${a};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Yp(this.component.position)}\n ${Wp(this.component)}\n ${Xp(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${i}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Rp(this.component,!0)}\n ${Xp(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Zp(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}updated(){const{currentGroupId:e}=this.contextProvider.state;td(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}render(){const{mediaList:e,currentGroupId:t,selectedPaywall:n,formFactor:i}=this.contextProvider.state,a=Ku(this.contextProvider.productDetails,n?.sku_menus??[],this.component?.subsetGroup||t);return ng(this.contextProvider,a,this.component,e).map((([e,t])=>(this.inFocusedState="television"==i?e:this.inFocusedState,t.map((e=>hg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))))}};T([qh({type:Object})],Kx.prototype,"component",void 0),T([qh({type:Boolean})],Kx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Kx.prototype,"scaleFactor",void 0),T([qh({type:Object})],Kx.prototype,"minSDKVersion",void 0),Kx=T([Mh("nami-product-container")],Kx);let Yx=class extends vp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{imageCropping:e,alignment:t,height:n,width:i,rightMargin:a,spacing:r,hidden:o,blur:s}=this.component,l="fit"===e,{formFactor:d}=this.contextConsumer.state;return Ch(`\n :host {\n display: ${"television"===d?"flex":"inline-block"};\n ${o?"display:none;":""}\n position: relative;\n height: ${Cp(n??"100%",this.scaleFactor)};\n width: ${Cp(("fitContent"==i?n:i)??"100%",this.scaleFactor)};\n }\n :host img {\n transition: all 0.3s;\n object-fit: ${l?"contain":"cover"};\n object-position: ${t} center;\n height: ${Cp(n??"100%",this.scaleFactor)};\n width: ${Cp(("fitContent"==i?n:i)??"100%",this.scaleFactor)};\n margin-right: ${a||r||0}px;\n ${s?`filter: blur(${s}px);`:""}\n flex-shrink: ${"number"==typeof i?0:1};\n }\n `)}render(){const{url:e,alt:t,title:n,focusedBorderColor:i,focusedFillColor:a,fillColor:r}=this.component;return e?(!i&&cg(r,a)||(this.tabIndex=0),this.ariaLabel=t??n??"",ym`<img src="${e}" alt="${this.ariaLabel}" />`):(this.tabIndex=-1,this.ariaLabel=null,ym``)}};T([qh({type:Object})],Yx.prototype,"component",void 0),T([qh({type:Boolean})],Yx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Yx.prototype,"scaleFactor",void 0),Yx=T([Mh("nami-image")],Yx);let qx=class extends vp{constructor(){super(...arguments),this.fullscreen=!1,this.inFocusedState=!1,this.scaleFactor=1}connectedCallback(){super.connectedCallback(),document.body.style.background=this.component.fillColor||"transparent"}styles(){if(!this.contextConsumer||!this.component)return Ch("");const{component:e,scaleFactor:t}=this,{formFactor:n}=this.contextConsumer.state,{backgroundBlur:i}=e,a="vertical"===e.direction?"margin-top":"margin-left";return Ch(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${e.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Np(e)}\n position: fixed;\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${e.zIndex??1};\n top: 0px;\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${Rp(e,!1)}\n transition: all 0.3s;\n ${$p(e,t)}\n }\n :host(:focus){\n ${Rp(e,!0)}\n }\n :host > *:not(:first-child) {\n ${a}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}updated(){const e=Array.from(document.getElementsByTagName("nami-paywall")),t=this.component.fillColor?.includes("gradient"),n=this.shadowRoot?.innerHTML.includes("nami-image");e[0]&&(e[0].style.position=!n||t?"relative":"","undefined"!=typeof window&&"undefined"!=typeof CSS&&CSS.supports("height: 100dvh")?e[0].style.minHeight=!n||t?"100dvh":"100%":e[0].style.minHeight=!n||t?"100vh":"100%")}render(){return(this.component.components??[]).map((e=>hg(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}};T([qh({type:Object})],qx.prototype,"component",void 0),T([qh({type:Boolean})],qx.prototype,"fullscreen",void 0),T([qh({type:Boolean})],qx.prototype,"inFocusedState",void 0),T([qh({type:Number})],qx.prototype,"scaleFactor",void 0),T([qh({type:Object})],qx.prototype,"minSDKVersion",void 0),qx=T([Mh("nami-background-container")],qx);let Jx=class extends vp{constructor(){super(...arguments),this.zIndex=2,this.inFocusedState=!1,this.scaleFactor=1}styles(){const{contextConsumer:e,component:t,zIndex:n,scaleFactor:i}=this;if(!e)return Lh``;const{formFactor:a}=e.state,{backgroundBlur:r}=t,o="phone"!==a?"width: 100%;":"",s="100%"==t.height?"height:100vh !important;":"",l="vertical"===t.direction?"margin-top":"margin-left";return Ch(`\n :host {\n box-sizing: border-box;\n display: ${t.hidden?"none":"flex"};\n position: relative;\n ${Wp(t)}\n ${Hp(t,i)}\n ${o}\n ${s}\n align-items: center;\n justify-content: flex-start;\n justify-content: start;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n z-index: ${n};\n transition: all 0.3s;\n overflow-y: ${"television"===a?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${$p(t,i)}\n ${Rp(t,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Rp(t,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${l}: ${t.spacing?t.spacing*i:0}px;\n }\n `)}firstUpdated(){const e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}render(){return this.component.components?.map((e=>hg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}};T([qh({type:Object})],Jx.prototype,"component",void 0),T([qh({type:Number})],Jx.prototype,"zIndex",void 0),T([qh({type:Boolean})],Jx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Jx.prototype,"scaleFactor",void 0),T([qh({type:Object})],Jx.prototype,"minSDKVersion",void 0),Jx=T([Mh("nami-content-container")],Jx);let Qx=class extends vp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleClick=e=>{e.preventDefault(),jg({contextProvider:this.contextProvider,onTap:this.component.onTap})},this.addEventListener("click",this._handleClick)}styles(){const e=qp("active",this.component.components[0]),t=qp("inactive",this.component.components[0]);return Ch(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Wp(this.component)}\n ${Rp(this.component,!1)}\n ${Xp(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Rp(this.component,!0)}\n ${Xp(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Zp(this.component)}\n }\n .toggle{\n ${n=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Ap(i,n.topPadding)}px;\n bottom: ${Ap(i,n.bottomPadding)}px;\n width: calc(50% - ${Ap(i,n.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Jp(t,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${Jp(e,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${Rp(e,!0)}\n ${Qp(e,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${Rp(e,!0)}\n ${Qp(e,this.scaleFactor)}\n `);var n,i}render(){this.role="tablist";const e=this.component.components.map((e=>hg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)));return ym`${e}<div class="toggle"></div>`}};T([qh({type:Object})],Qx.prototype,"component",void 0),T([qh({type:Boolean})],Qx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Qx.prototype,"scaleFactor",void 0),T([qh({type:Object})],Qx.prototype,"minSDKVersion",void 0),Qx=T([Mh("nami-segment-picker")],Qx);let Zx=class extends vp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this._handleFocus=()=>{this.inFocusedState=!0,this._announceButtonLabel()},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{this._updateFormState(),this.requestUpdate("component")},this._handleHover=()=>{this.inFocusedState=!0}}connectedCallback(){super.connectedCallback(),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}_announceButtonLabel(){const e=this.component.text||"";e&&kh(e)}_getParentPicker(){const e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}_getParentFormId(){return this._getParentPicker()?.component.formId}_updateFormState(){if(this.contextProvider)if(this.component.formId){const e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}updated(e){if(!e.has("component"))return;if(!this.contextProvider)return;const t=e.get("component")??this.component;if(t.formId){const e=this._getParentFormId();e&&this.contextProvider.state.formStates[e]&&(this._isActive=this.contextProvider.state.formStates[e]===t.formId)}else this._isActive=td(t.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),!this._isActive)return;const n=this.getRootNode();if(!(n instanceof ShadowRoot))return;n.querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}styles(){const e=qp("active",this.component),t=qp("inactive",this.component);return Ch(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${Jp({...t,...this.component},this.scaleFactor,this.inFocusedState)}\n ${Up(this.component.inactiveDropShadow??this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${Qp({...e,...this.component},this.scaleFactor)}\n ${Up(this.component.activeDropShadow??this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}render(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",ym`<input type="radio"
158
+ </nami-text-list-item-wrapper>`:null));return ym`${s}`}};T([qh({type:Object})],Vx.prototype,"component",void 0),T([qh({type:Boolean})],Vx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Vx.prototype,"scaleFactor",void 0),Vx=T([Mh("nami-text-list")],Vx);(()=>{let e=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch{e=!1}if(e)return;const t=db.Lexer?.rules,n=t?.inline;n&&Object.values(n).forEach((e=>{e&&Object.keys(e).forEach((t=>{e[t]=(e=>{if(!(e instanceof RegExp))return e;if(!/\\p\{/.test(e.source))return e;const t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",n=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),i=e.flags.replace(/u/g,"");return new RegExp(n,i)})(e[t])}))}))})();let Xx=class extends vp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this.handleFocusIn=()=>this.setFocusState(!0),this.handleFocusOut=e=>{const t=e.relatedTarget??null;if(!t)return this.setFocusState(!1);t===this||this.shadowRoot?.contains(t)||this.setFocusState(!1)},this.handleFocusChanged=e=>{const{detail:t}=e;this.setFocusState(!0===t?.inFocusedState)},this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),this.addEventListener("focus-changed",this.handleFocusChanged)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("focus-changed",this.handleFocusChanged)}styles(){const{component:e,scaleFactor:t,minSDKVersion:n}=this,{backgroundBlur:i}=e,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=e.fillImage?Ch(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):Ch(Rp(e,!1));return Ch(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${s};\n ${Yp(e.position)}\n ${Wp(e)}\n ${Xp(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Rp(e,!0)}\n ${Xp(e,t,!0)}\n }\n :host(:focus-visible){\n ${Zp(e)}\n }\n :host > * {\n ${Fp(n,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}render(){return(this.component.components??[]).map((e=>hg(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}setFocusState(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}};T([qh({type:Object})],Xx.prototype,"component",void 0),T([qh({type:Boolean})],Xx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Xx.prototype,"scaleFactor",void 0),T([qh({type:Object})],Xx.prototype,"minSDKVersion",void 0),Xx=T([Mh("nami-container")],Xx);let Kx=class extends vp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{backgroundBlur:e}=this.component,t="vertical"===this.component.direction,n=t?"width":"height",i=t?"margin-top":"margin-left",a=this.component.fillImage?Ch(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):Ch(Rp(this.component,!1));return Ch(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${a};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Yp(this.component.position)}\n ${Wp(this.component)}\n ${Xp(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${i}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Rp(this.component,!0)}\n ${Xp(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Zp(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}updated(){const{currentGroupId:e}=this.contextProvider.state;td(e,this.currentGroupId)||(this.classList.remove("fade-in"),setTimeout((()=>this.classList.add("fade-in")),100),this.currentGroupId=e)}render(){const{mediaList:e,currentGroupId:t,selectedPaywall:n,formFactor:i}=this.contextProvider.state,a=Ku(this.contextProvider.productDetails,n?.sku_menus??[],this.component?.subsetGroup||t);return ng(this.contextProvider,a,this.component,e).map((([e,t])=>(this.inFocusedState="television"==i?e:this.inFocusedState,t.map((e=>hg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))))}};T([qh({type:Object})],Kx.prototype,"component",void 0),T([qh({type:Boolean})],Kx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Kx.prototype,"scaleFactor",void 0),T([qh({type:Object})],Kx.prototype,"minSDKVersion",void 0),Kx=T([Mh("nami-product-container")],Kx);let Yx=class extends vp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1}styles(){const{imageCropping:e,alignment:t,height:n,width:i,rightMargin:a,spacing:r,hidden:o,blur:s}=this.component,l="fit"===e,{formFactor:d}=this.contextConsumer.state;return Ch(`\n :host {\n display: ${"television"===d?"flex":"inline-block"};\n ${o?"display:none;":""}\n position: relative;\n height: ${Cp(n??"100%",this.scaleFactor)};\n width: ${Cp(("fitContent"==i?n:i)??"100%",this.scaleFactor)};\n }\n :host img {\n transition: all 0.3s;\n object-fit: ${l?"contain":"cover"};\n object-position: ${t} center;\n height: ${Cp(n??"100%",this.scaleFactor)};\n width: ${Cp(("fitContent"==i?n:i)??"100%",this.scaleFactor)};\n margin-right: ${a||r||0}px;\n ${s?`filter: blur(${s}px);`:""}\n flex-shrink: ${"number"==typeof i?0:1};\n }\n `)}render(){const{url:e,alt:t,title:n,focusedBorderColor:i,focusedFillColor:a,fillColor:r}=this.component;return e?(!i&&cg(r,a)||(this.tabIndex=0),this.ariaLabel=t??n??"",ym`<img src="${e}" alt="${this.ariaLabel}" />`):(this.tabIndex=-1,this.ariaLabel=null,ym``)}};T([qh({type:Object})],Yx.prototype,"component",void 0),T([qh({type:Boolean})],Yx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Yx.prototype,"scaleFactor",void 0),Yx=T([Mh("nami-image")],Yx);let qx=class extends vp{constructor(){super(...arguments),this.fullscreen=!1,this.inFocusedState=!1,this.scaleFactor=1}connectedCallback(){super.connectedCallback(),document.body.style.background=this.component.fillColor||"transparent"}styles(){if(!this.contextConsumer||!this.component)return Ch("");const{component:e,scaleFactor:t}=this,{formFactor:n}=this.contextConsumer.state,{backgroundBlur:i}=e,a="vertical"===e.direction?"margin-top":"margin-left";return Ch(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${e.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Np(e)}\n position: fixed;\n width: 100%;\n bottom: 0px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n z-index: ${e.zIndex??1};\n top: 0px;\n ${i?`backdrop-filter: blur(${i}px);`:""}\n ${Rp(e,!1)}\n transition: all 0.3s;\n ${$p(e,t)}\n }\n :host(:focus){\n ${Rp(e,!0)}\n }\n :host > *:not(:first-child) {\n ${a}: ${e.spacing?e.spacing*t:0}px;\n }\n `)}updated(){const e=Array.from(document.getElementsByTagName("nami-paywall")),t=this.component.fillColor?.includes("gradient"),n=this.shadowRoot?.innerHTML.includes("nami-image");e[0]&&(e[0].style.position=!n||t?"relative":"","undefined"!=typeof window&&"undefined"!=typeof CSS&&CSS.supports("height: 100dvh")?e[0].style.minHeight=!n||t?"100dvh":"100%":e[0].style.minHeight=!n||t?"100vh":"100%")}render(){return(this.component.components??[]).map((e=>hg(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion)))}};T([qh({type:Object})],qx.prototype,"component",void 0),T([qh({type:Boolean})],qx.prototype,"fullscreen",void 0),T([qh({type:Boolean})],qx.prototype,"inFocusedState",void 0),T([qh({type:Number})],qx.prototype,"scaleFactor",void 0),T([qh({type:Object})],qx.prototype,"minSDKVersion",void 0),qx=T([Mh("nami-background-container")],qx);let Jx=class extends vp{constructor(){super(...arguments),this.zIndex=2,this.inFocusedState=!1,this.scaleFactor=1}styles(){const{contextConsumer:e,component:t,zIndex:n,scaleFactor:i}=this;if(!e)return Lh``;const{formFactor:a}=e.state,{backgroundBlur:r}=t,o="phone"!==a?"width: 100%;":"",s="vertical"===t.direction?"margin-top":"margin-left";return Ch(`\n :host {\n box-sizing: border-box;\n display: ${t.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Wp(t)}\n ${Hp(t,i)}\n ${o}\n align-items: center;\n justify-content: flex-start;\n justify-content: start;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n z-index: ${n};\n transition: all 0.3s;\n overflow-y: ${"television"===a?"hidden":"scroll"};\n overflow-x: hidden;\n scrollbar-width: none;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n ${$p(t,i)}\n ${Rp(t,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Rp(t,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${s}: ${t.spacing?t.spacing*i:0}px;\n }\n `)}firstUpdated(){const e=new CustomEvent("child-spacing",{detail:{spacing:this.component.spacing},bubbles:!0,composed:!0});this.dispatchEvent(e)}render(){return this.component.components?.map((e=>hg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}};T([qh({type:Object})],Jx.prototype,"component",void 0),T([qh({type:Number})],Jx.prototype,"zIndex",void 0),T([qh({type:Boolean})],Jx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Jx.prototype,"scaleFactor",void 0),T([qh({type:Object})],Jx.prototype,"minSDKVersion",void 0),Jx=T([Mh("nami-content-container")],Jx);let Qx=class extends vp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this._handleClick=e=>{e.preventDefault(),jg({contextProvider:this.contextProvider,onTap:this.component.onTap})},this.addEventListener("click",this._handleClick)}styles(){const e=qp("active",this.component.components[0]),t=qp("inactive",this.component.components[0]);return Ch(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Wp(this.component)}\n ${Rp(this.component,!1)}\n ${Xp(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Rp(this.component,!0)}\n ${Xp(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Zp(this.component)}\n }\n .toggle{\n ${n=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Ap(i,n.topPadding)}px;\n bottom: ${Ap(i,n.bottomPadding)}px;\n width: calc(50% - ${Ap(i,n.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Jp(t,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${Jp(e,this.scaleFactor,!0)}\n }\n \n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${Rp(e,!0)}\n ${Qp(e,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${Rp(e,!0)}\n ${Qp(e,this.scaleFactor)}\n `);var n,i}render(){this.role="tablist";const e=this.component.components.map((e=>hg(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)));return ym`${e}<div class="toggle"></div>`}};T([qh({type:Object})],Qx.prototype,"component",void 0),T([qh({type:Boolean})],Qx.prototype,"inFocusedState",void 0),T([qh({type:Number})],Qx.prototype,"scaleFactor",void 0),T([qh({type:Object})],Qx.prototype,"minSDKVersion",void 0),Qx=T([Mh("nami-segment-picker")],Qx);let Zx=class extends vp{constructor(){super(...arguments),this.inFocusedState=!1,this.scaleFactor=1,this._handleFocus=()=>{this.inFocusedState=!0,this._announceButtonLabel()},this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()},this._handleClick=()=>{this._updateFormState(),this.requestUpdate("component")},this._handleHover=()=>{this.inFocusedState=!0}}connectedCallback(){super.connectedCallback(),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}_announceButtonLabel(){const e=this.component.text||"";e&&kh(e)}_getParentPicker(){const e=this.getRootNode();return e instanceof ShadowRoot?e.host:null}_getParentFormId(){return this._getParentPicker()?.component.formId}_updateFormState(){if(this.contextProvider)if(this.component.formId){const e=this._getParentFormId();e&&this.contextProvider.setFormState(e,this.component.formId)}else this.component.id&&this.contextProvider.setCurrentGroupData(this.component.id,this.component.text||"")}updated(e){if(!e.has("component"))return;if(!this.contextProvider)return;const t=e.get("component")??this.component;if(t.formId){const e=this._getParentFormId();e&&this.contextProvider.state.formStates[e]&&(this._isActive=this.contextProvider.state.formStates[e]===t.formId)}else this._isActive=td(t.id,this.contextProvider.state.currentGroupId);if(this.classList.toggle("active",this._isActive),!this._isActive)return;const n=this.getRootNode();if(!(n instanceof ShadowRoot))return;n.querySelectorAll("nami-segment-picker-item").forEach((e=>{e!==this&&e.requestUpdate("component",e)}))}styles(){const e=qp("active",this.component),t=qp("inactive",this.component);return Ch(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${Jp({...t,...this.component},this.scaleFactor,this.inFocusedState)}\n ${Up(this.component.inactiveDropShadow??this.component.dropShadow)}\n }\n\n :host > * {\n cursor: pointer;\n }\n\n :host(.active) {\n z-index: 1 !important;\n ${Qp({...e,...this.component},this.scaleFactor)}\n ${Up(this.component.activeDropShadow??this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}render(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",ym`<input type="radio"
159
159
  autocomplete="off"
160
160
  id="${this.component.text}"
161
161
  name="${this.component.text}"
@@ -222,7 +222,8 @@
222
222
  flex-direction: column;
223
223
  height: 100%;
224
224
  width: 100%;
225
- min-height: 0;
225
+ min-height: 0;
226
+ overflow: hidden;
226
227
  }
227
228
  `,T([qh({type:Object})],rO.prototype,"paywall",void 0),T([qh({type:Object})],rO.prototype,"campaign",void 0),T([qh({type:Object})],rO.prototype,"context",void 0),T([function({context:e}){return(t,n)=>{const i=new WeakMap;if("object"==typeof n)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new sp(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer((t=>{i.set(t,new sp(t,{context:e}))}));const a=Object.getOwnPropertyDescriptor(t,n);let r;if(void 0===a){const e=new WeakMap;r={get(){return e.get(this)},set(t){i.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{const e=a.set;r={...a,set(t){i.get(this).setValue(t),e?.call(this,t)}}}return void Object.defineProperty(t,n,r)}}}({context:dp})],rO.prototype,"contextProvider",void 0),rO=T([Mh("nami-paywall-screen")],rO);var oO,sO,lO={};function dO(){return sO?oO:(sO=1,oO=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var uO,cO={},hO={};function mO(){if(uO)return hO;let e;uO=1;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return hO.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},hO.getSymbolTotalCodewords=function(e){return t[e]},hO.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},hO.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},hO.isKanjiModeEnabled=function(){return void 0!==e},hO.toSJIS=function(t){return e(t)},hO}var fO,pO,gO,vO,bO,yO={};function wO(){return fO||(fO=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}}(yO)),yO}var kO,SO={};var _O,MO={};var EO,PO={};var TO,xO={};function AO(){if(TO)return xO;TO=1;const e=wO(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return xO.getBlocksCount=function(n,i){switch(i){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},xO.getTotalCodewordsCount=function(t,i){switch(i){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},xO}var CO,LO,IO,DO,RO={},WO={};function NO(){return LO||(LO=1,function(e){const t=function(){if(CO)return WO;CO=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let i=0;i<255;i++)e[i]=n,t[n]=i,n<<=1,256&n&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),WO.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},WO.exp=function(t){return e[t]},WO.mul=function(n,i){return 0===n||0===i?0:e[t[n]+t[i]]},WO}();e.mul=function(e,n){const i=new Uint8Array(e.length+n.length-1);for(let a=0;a<e.length;a++)for(let r=0;r<n.length;r++)i[a+r]^=t.mul(e[a],n[r]);return i},e.mod=function(e,n){let i=new Uint8Array(e);for(;i.length-n.length>=0;){const e=i[0];for(let a=0;a<n.length;a++)i[a]^=t.mul(n[a],e);let a=0;for(;a<i.length&&0===i[a];)a++;i=i.slice(a)}return i},e.generateECPolynomial=function(n){let i=new Uint8Array([1]);for(let a=0;a<n;a++)i=e.mul(i,new Uint8Array([1,t.exp(a)]));return i}}(RO)),RO}var FO,OO={},$O={},jO={};function zO(){return FO||(FO=1,jO.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),jO}var HO,BO,UO,GO={};function VO(){if(HO)return GO;HO=1;const e="[0-9]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+")(?:.|[\r\n]))+";GO.KANJI=new RegExp(t,"g"),GO.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),GO.BYTE=new RegExp(n,"g"),GO.NUMERIC=new RegExp(e,"g"),GO.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return GO.testKanji=function(e){return i.test(e)},GO.testNumeric=function(e){return a.test(e)},GO.testAlphanumeric=function(e){return r.test(e)},GO}function XO(){return BO||(BO=1,function(e){const t=zO(),n=VO();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}($O)),$O}function KO(){return UO||(UO=1,function(e){const t=mO(),n=AO(),i=wO(),a=XO(),r=zO(),o=t.getBCHDigit(7973);function s(e,t){return a.getCharCountIndicator(e,t)+4}function l(e,t){let n=0;return e.forEach((function(e){const i=s(e.mode,t);n+=i+e.getBitsLength()})),n}e.from=function(e,t){return r.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,i,o){if(!r.isValid(e))throw new Error("Invalid QR Code version");void 0===o&&(o=a.BYTE);const l=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,i));if(o===a.MIXED)return l;const d=l-s(o,e);switch(o){case a.NUMERIC:return Math.floor(d/10*3);case a.ALPHANUMERIC:return Math.floor(d/11*2);case a.KANJI:return Math.floor(d/13);case a.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let i=1;i<=40;i++)if(l(t,i)<=e.getCapacity(i,n,a.MIXED))return i}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,i){for(let a=1;a<=40;a++)if(n<=e.getCapacity(a,i,t))return a}(r.mode,r.getLength(),o)},e.getEncodedBits=function(e){if(!r.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-o>=0;)n^=7973<<t.getBCHDigit(n)-o;return e<<12|n}}(OO)),OO}var YO,qO={};var JO,QO,ZO,e$,t$,n$,i$,a$,r$={};var o$,s$,l$,d$={exports:{}};function u$(){return o$||(o$=1,function(e){var t={single_source_shortest_paths:function(e,n,i){var a={},r={};r[n]=0;var o,s,l,d,u,c,h,m=t.PriorityQueue.make();for(m.push(n,0);!m.empty();)for(l in s=(o=m.pop()).value,d=o.cost,u=e[s]||{})u.hasOwnProperty(l)&&(c=d+u[l],h=r[l],(void 0===r[l]||h>c)&&(r[l]=c,m.push(l,c),a[l]=s));if(void 0!==i&&void 0===r[i]){var f=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],i=t;i;)n.push(i),e[i],i=e[i];return n.reverse(),n},find_path:function(e,n,i){var a=t.single_source_shortest_paths(e,n,i);return t.extract_shortest_path_from_predecessor_list(a,i)},PriorityQueue:{make:function(e){var n,i=t.PriorityQueue,a={};for(n in e=e||{},i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a.queue=[],a.sorter=e.sorter||i.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(d$)),d$.exports}function c$(){return s$||(s$=1,function(e){const t=XO(),n=function(){if(QO)return JO;QO=1;const e=XO();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,i;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),i=parseInt(n,10),e.put(i,10);const a=this.data.length-t;a>0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,3*a+1))},JO=t}(),i=function(){if(e$)return ZO;e$=1;const e=XO(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=45*t.indexOf(this.data[n]);i+=t.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},ZO=n}(),a=function(){if(n$)return t$;n$=1;const e=XO();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t$=t}(),r=function(){if(a$)return i$;a$=1;const e=XO(),t=mO();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let i=t.toSJIS(this.data[n]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}},i$=n}(),o=VO(),s=mO(),l=u$();function d(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){const i=[];let a;for(;null!==(a=e.exec(n));)i.push({data:a[0],index:a.index,mode:t,length:a[0].length});return i}function c(e){const n=u(o.NUMERIC,t.NUMERIC,e),i=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e);let a,r;s.isKanjiModeEnabled()?(a=u(o.BYTE,t.BYTE,e),r=u(o.KANJI,t.KANJI,e)):(a=u(o.BYTE_KANJI,t.BYTE,e),r=[]);return n.concat(i,a,r).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function h(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return i.getBitsLength(e);case t.KANJI:return r.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function m(e,o){let l;const d=t.getBestModeForData(e);if(l=t.from(o,d),l!==t.BYTE&&l.bit<d.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(l)+".\n Suggested mode is: "+t.toString(d));switch(l!==t.KANJI||s.isKanjiModeEnabled()||(l=t.BYTE),l){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new i(e);case t.KANJI:return new r(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},e.fromString=function(n,i){const a=function(e){const n=[];for(let i=0;i<e.length;i++){const a=e[i];switch(a.mode){case t.NUMERIC:n.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:n.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:n.push([a,{data:a.data,mode:t.BYTE,length:d(a.data)}]);break;case t.BYTE:n.push([{data:a.data,mode:t.BYTE,length:d(a.data)}])}}return n}(c(n,s.isKanjiModeEnabled())),r=function(e,n){const i={},a={start:{}};let r=["start"];for(let o=0;o<e.length;o++){const s=e[o],l=[];for(let e=0;e<s.length;e++){const d=s[e],u=""+o+e;l.push(u),i[u]={node:d,lastCount:0},a[u]={};for(let e=0;e<r.length;e++){const o=r[e];i[o]&&i[o].node.mode===d.mode?(a[o][u]=h(i[o].lastCount+d.length,d.mode)-h(i[o].lastCount,d.mode),i[o].lastCount+=d.length):(i[o]&&(i[o].lastCount=d.length),a[o][u]=h(d.length,d.mode)+4+t.getCharCountIndicator(d.mode,n))}}r=l}for(let e=0;e<r.length;e++)a[r[e]].end=0;return{map:a,table:i}}(a,i),o=l.find_path(r.map,"start","end"),u=[];for(let e=1;e<o.length-1;e++)u.push(r.table[o[e]].node);return e.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(u))},e.rawSplit=function(t){return e.fromArray(c(t,s.isKanjiModeEnabled()))}}(r$)),r$}function h$(){if(l$)return cO;l$=1;const e=mO(),t=wO(),n=function(){if(gO)return pO;function e(){this.buffer=[],this.length=0}return gO=1,e.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},pO=e}(),i=function(){if(bO)return vO;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return bO=1,e.prototype.set=function(e,t,n,i){const a=e*this.size+t;this.data[a]=n,i&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},vO=e}(),a=(kO||(kO=1,function(e){const t=mO().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,i=t(e),a=145===i?26:2*Math.ceil((i-13)/(2*n-2)),r=[i-7];for(let e=1;e<n-1;e++)r[e]=r[e-1]-a;return r.push(6),r.reverse()},e.getPositions=function(t){const n=[],i=e.getRowColCoords(t),a=i.length;for(let e=0;e<a;e++)for(let t=0;t<a;t++)0===e&&0===t||0===e&&t===a-1||e===a-1&&0===t||n.push([i[e],i[t]]);return n}}(SO)),SO),r=function(){if(_O)return MO;_O=1;const e=mO().getSymbolSize;return MO.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},MO}(),o=(EO||(EO=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,n=3,i=40,a=10;function r(t,n,i){switch(t){case e.Patterns.PATTERN000:return(n+i)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return i%3==0;case e.Patterns.PATTERN011:return(n+i)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2==0;case e.Patterns.PATTERN101:return n*i%2+n*i%3==0;case e.Patterns.PATTERN110:return(n*i%2+n*i%3)%2==0;case e.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const n=e.size;let i=0,a=0,r=0,o=null,s=null;for(let l=0;l<n;l++){a=r=0,o=s=null;for(let d=0;d<n;d++){let n=e.get(l,d);n===o?a++:(a>=5&&(i+=t+(a-5)),o=n,a=1),n=e.get(d,l),n===s?r++:(r>=5&&(i+=t+(r-5)),s=n,r=1)}a>=5&&(i+=t+(a-5)),r>=5&&(i+=t+(r-5))}return i},e.getPenaltyN2=function(e){const t=e.size;let i=0;for(let n=0;n<t-1;n++)for(let a=0;a<t-1;a++){const t=e.get(n,a)+e.get(n,a+1)+e.get(n+1,a)+e.get(n+1,a+1);4!==t&&0!==t||i++}return i*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,a=0,r=0;for(let i=0;i<t;i++){a=r=0;for(let o=0;o<t;o++)a=a<<1&2047|e.get(i,o),o>=10&&(1488===a||93===a)&&n++,r=r<<1&2047|e.get(o,i),o>=10&&(1488===r||93===r)&&n++}return n*i},e.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let i=0;i<n;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/n/5)-10)*a},e.applyMask=function(e,t){const n=t.size;for(let i=0;i<n;i++)for(let a=0;a<n;a++)t.isReserved(a,i)||t.xor(a,i,r(e,a,i))},e.getBestMask=function(t,n){const i=Object.keys(e.Patterns).length;let a=0,r=1/0;for(let o=0;o<i;o++){n(o),e.applyMask(o,t);const i=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),i<r&&(r=i,a=o)}return a}}(PO)),PO),s=AO(),l=function(){if(DO)return IO;DO=1;const e=NO();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const i=e.mod(n,this.genPoly),a=this.degree-i.length;if(a>0){const e=new Uint8Array(this.degree);return e.set(i,a),e}return i},IO=t}(),d=KO(),u=function(){if(YO)return qO;YO=1;const e=mO(),t=e.getBCHDigit(1335);return qO.getEncodedBits=function(n,i){const a=n.bit<<3|i;let r=a<<10;for(;e.getBCHDigit(r)-t>=0;)r^=1335<<e.getBCHDigit(r)-t;return 21522^(a<<10|r)},qO}(),c=XO(),h=c$();function m(e,t,n){const i=e.size,a=u.getEncodedBits(t,n);let r,o;for(r=0;r<15;r++)o=1==(a>>r&1),r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),r<8?e.set(8,i-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}function f(t,i,a){const r=new n;a.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),c.getCharCountIndicator(e.mode,t)),e.write(r)}));const o=8*(e.getSymbolTotalCodewords(t)-s.getTotalCodewordsCount(t,i));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const d=(o-r.getLengthInBits())/8;for(let e=0;e<d;e++)r.put(e%2?17:236,8);return function(t,n,i){const a=e.getSymbolTotalCodewords(n),r=s.getTotalCodewordsCount(n,i),o=a-r,d=s.getBlocksCount(n,i),u=a%d,c=d-u,h=Math.floor(a/d),m=Math.floor(o/d),f=m+1,p=h-m,g=new l(p);let v=0;const b=new Array(d),y=new Array(d);let w=0;const k=new Uint8Array(t.buffer);for(let e=0;e<d;e++){const t=e<c?m:f;b[e]=k.slice(v,v+t),y[e]=g.encode(b[e]),v+=t,w=Math.max(w,t)}const S=new Uint8Array(a);let _,M,E=0;for(_=0;_<w;_++)for(M=0;M<d;M++)_<b[M].length&&(S[E++]=b[M][_]);for(_=0;_<p;_++)for(M=0;M<d;M++)S[E++]=y[M][_];return S}(r,t,i)}function p(t,n,s,l){let u;if(Array.isArray(t))u=h.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let e=n;if(!e){const n=h.rawSplit(t);e=d.getBestVersionForData(n,s)}u=h.fromString(t,e||40)}}const c=d.getBestVersionForData(u,s);if(!c)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<c)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+c+".\n")}else n=c;const p=f(n,s,u),g=e.getSymbolSize(n),v=new i(g);return function(e,t){const n=e.size,i=r.getPositions(t);for(let t=0;t<i.length;t++){const a=i[t][0],r=i[t][1];for(let t=-1;t<=7;t++)if(!(a+t<=-1||n<=a+t))for(let i=-1;i<=7;i++)r+i<=-1||n<=r+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(a+t,r+i,!0,!0):e.set(a+t,r+i,!1,!0))}}(v,n),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(v),function(e,t){const n=a.getPositions(t);for(let t=0;t<n.length;t++){const i=n[t][0],a=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(i+t,a+n,!0,!0):e.set(i+t,a+n,!1,!0)}}(v,n),m(v,s,0),n>=7&&function(e,t){const n=e.size,i=d.getEncodedBits(t);let a,r,o;for(let t=0;t<18;t++)a=Math.floor(t/3),r=t%3+n-8-3,o=1==(i>>t&1),e.set(a,r,o,!0),e.set(r,a,o,!0)}(v,n),function(e,t){const n=e.size;let i=-1,a=n-1,r=7,o=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(a,s-n)){let i=!1;o<t.length&&(i=1==(t[o]>>>r&1)),e.set(a,s-n,i),r--,-1===r&&(o++,r=7)}if(a+=i,a<0||n<=a){a-=i,i=-i;break}}}(v,p),isNaN(l)&&(l=o.getBestMask(v,m.bind(null,v,s))),o.applyMask(l,v),m(v,s,l),{modules:v,version:n,errorCorrectionLevel:s,maskPattern:l,segments:u}}return cO.create=function(n,i){if(void 0===n||""===n)throw new Error("No input text");let a,r,s=t.M;return void 0!==i&&(s=t.from(i.errorCorrectionLevel,t.M),a=d.from(i.version),r=o.from(i.maskPattern),i.toSJISFunc&&e.setToSJISFunction(i.toSJISFunc)),p(n,a,s,r)},cO}var m$,f$,p$={},g$={};function v$(){return m$||(m$=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){const i=e.getScale(t,n);return Math.floor((t+2*n.margin)*i)},e.qrToImageData=function(t,n,i){const a=n.modules.size,r=n.modules.data,o=e.getScale(a,i),s=Math.floor((a+2*i.margin)*o),l=i.margin*o,d=[i.color.light,i.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=4*(e*s+n),c=i.color.light;if(e>=l&&n>=l&&e<s-l&&n<s-l){c=d[r[Math.floor((e-l)/o)*a+Math.floor((n-l)/o)]?1:0]}t[u++]=c.r,t[u++]=c.g,t[u++]=c.b,t[u]=c.a}}}(g$)),g$}function b$(){return f$||(f$=1,function(e){const t=v$();e.render=function(e,n,i){let a=i,r=n;void 0!==a||n&&n.getContext||(a=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);const o=t.getImageWidth(e.modules.size,a),s=r.getContext("2d"),l=s.createImageData(o,o);return t.qrToImageData(l.data,e,a),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,r,o),s.putImageData(l,0,0),r},e.renderToDataURL=function(t,n,i){let a=i;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});const r=e.render(t,n,a),o=a.type||"image/png",s=a.rendererOpts||{};return r.toDataURL(o,s.quality)}}(p$)),p$}var y$,w$,k$={};function S$(){if(y$)return k$;y$=1;const e=v$();function t(e,t){const n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function n(e,t,n){let i=e+t;return void 0!==n&&(i+=" "+n),i}return k$.render=function(i,a,r){const o=e.getOptions(a),s=i.modules.size,l=i.modules.data,d=s+2*o.margin,u=o.color.light.a?"<path "+t(o.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",c="<path "+t(o.color.dark,"stroke")+' d="'+function(e,t,i){let a="",r=0,o=!1,s=0;for(let l=0;l<e.length;l++){const d=Math.floor(l%t),u=Math.floor(l/t);d||o||(o=!0),e[l]?(s++,l>0&&d>0&&e[l-1]||(a+=o?n("M",d+i,.5+u+i):n("m",r,0),r=0,o=!1),d+1<t&&e[l+1]||(a+=n("h",s),s=0)):r++}return a}(l,s,o.margin)+'"/>',h='viewBox="0 0 '+d+" "+d+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+c+"</svg>\n";return"function"==typeof r&&r(null,m),m},k$}var _$=function(){if(w$)return lO;w$=1;const e=dO(),t=h$(),n=b$(),i=S$();function a(n,i,a,r,o){const s=[].slice.call(arguments,1),l=s.length,d="function"==typeof s[l-1];if(!d&&!e())throw new Error("Callback required as last argument");if(!d){if(l<1)throw new Error("Too few arguments provided");return 1===l?(a=i,i=r=void 0):2!==l||i.getContext||(r=a,a=i,i=void 0),new Promise((function(e,o){try{const o=t.create(a,r);e(n(o,i,r))}catch(e){o(e)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(o=a,a=i,i=r=void 0):3===l&&(i.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=a,a=i,i=void 0));try{const e=t.create(a,r);o(null,n(e,i,r))}catch(e){o(e)}}return lO.create=t.create,lO.toCanvas=a.bind(null,n.render),lO.toDataURL=a.bind(null,n.renderToDataURL),lO.toString=a.bind(null,(function(e,t,n){return i.render(e,n)})),lO}(),M$=al(_$);let E$=class extends vp{constructor(){super(...arguments),this.scaleFactor=1}styles(){return this.component?Ch(`\n :host {\n box-sizing: border-box;\n ${Hp(this.component,this.scaleFactor)}\n ${$p(this.component,this.scaleFactor)}\n background-color: ${this.component.fillColor||this.component.borderColor||"transparent"};\n border-width: ${this.component.borderWidth??0}px;\n ${Ip(this.component.borderColor||"transparent")}\n border-style: solid;\n display: inline-block;\n }`):Ch(":host { box-sizing: border-box; display: inline-block; }")}async renderQr(){const e=this.renderRoot.querySelector("canvas");if(!e||!this.component?.url)return;const t=this.computedSize;e.width=t,e.height=t,e.style.width=`${t}px`,e.style.height=`${t}px`;const n=ug(this.component.color)??"#000000",i=ug(this.component.fillColor)??"#ffffff";try{await M$.toCanvas(e,this.component.url,{width:t,color:{dark:n,light:i},margin:0})}catch(e){Je.error(`QR render failed for URL "${this.component.url}":`,e)}}firstUpdated(){this.renderQr()}updated(e){(e.has("component")||e.has("scaleFactor"))&&Promise.resolve().then((()=>this.renderQr()))}get computedSize(){const e=Number(this.component.borderWidth??0),t=Number(this.component.width)*this.scaleFactor,n=Math.floor(this.component.width?t-2*e:360);return Math.max(1,n)}render(){if(this.component){const e=this.computedSize;return ym`<canvas width="${e}" height="${e}" style="width:${e}px;height:${e}px;"></canvas>`}return ym`<canvas></canvas>`}};T([qh({type:Object})],E$.prototype,"component",void 0),T([qh({type:Number})],E$.prototype,"scaleFactor",void 0),E$=T([Mh("nami-qr-code")],E$);let P$=class extends vp{constructor(){super(),this.inFocusedState=!1,this.scaleFactor=1,this.isActive=!1,this._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||this._handleClick()}}connectedCallback(){super.connectedCallback(),this.isActive=!!this.component.checked,this.contextProvider.setFormState(this.component.formId,this.isActive),this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick),this.removeEventListener("keydown",this._handleKeyDown)}_handleClick(){const{onTap:e,disabled:t,formId:n}=this.component;if(!0===t)return;let i;this.component.checked=!this.component.checked,this.isActive=this.component.checked,i=n?{function:e?.function||"",parameters:{...e?.parameters,formId:n||""}}:e,!this.contextProvider.flow||n?jg({onTap:i,contextProvider:this.contextProvider}):this.component.id?(Je.debug(`Trigger NamiFlow action for component ${this.component.id}`),this.contextProvider.flow.triggerActions(this.component.id)):Je.warn("Cannot trigger button hoisting without an id")}styles(){return Ch(`\n :host {\n box-sizing: border-box;\n }\n :host .toggle-plate {\n display: flex;\n position: relative;\n ${this.applyPlateStyles()}\n }\n :host .toggle-handle {\n display: flex;\n position: relative;\n ${this.applyHandleStyles()}\n }\n `)}applyPlateStyles(){const{component:e,scaleFactor:t}=this,n=this.isActive||e.checked||!1,i=n?e.activePlateFillColor||"transparent":e.inactivePlateFillColor||"transparent",a=n?e.activePlateBorderColor||"transparent":e.inactivePlateBorderColor||"transparent";return`\n transition: all 0.3s;\n ${Hp(e,t)};\n ${Ip(a||"transparent")}\n border-width: ${n?e.activePlateBorderWidth||0:e.inactivePlateBorderWidth||0}px !important;\n border-style: solid;\n border-radius: ${e.borderRadius||0}px !important;\n padding: ${e.innerPadding||0}px !important;\n ${Lp(i)}\n `}applyHandleStyles(){const e=this.component,t=e.checked||!1,n=t?e.activeHandleFillColor||"transparent":e.inactiveHandleFillColor||"transparent",i=t?e.activeHandleBorderColor||"transparent":e.inactiveHandleBorderColor||"transparent";return`\n transition: all 0.3s;\n height: 100%;\n width: 50%;\n border-radius: ${e.borderRadius}px !important;\n ${Ip(i)}\n border-width: ${t?e.activeHandleBorderWidth||0:e.inactiveHandleBorderWidth||0}px !important;\n ${Up(e.dropShadow)}\n border-style: solid;\n left: ${t?"50%":0};\n ${Lp(n)}\n `}render(){return this.tabIndex=0,this.role="switch",ym`
228
229
  <div class="toggle-plate">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@namiml/web-sdk",
3
3
  "type": "module",
4
- "version": "3.3.9-dev.202603130039",
4
+ "version": "3.3.9-dev.202603132101",
5
5
  "source": "src/nami-web.ts",
6
6
  "description": "Subscription monetization infrastructure — drop-in SDK with no-code paywalls, onboarding flows, A/B testing for web",
7
7
  "scripts": {
@@ -13,15 +13,12 @@
13
13
  "build": "NAMI_SDK_ENV=production rollup -c",
14
14
  "build:dev": "NAMI_SDK_ENV=development rollup -c",
15
15
  "build:prod": "NAMI_SDK_ENV=production rollup -c",
16
- "react-dev": "yarn build:dev && yarn copy-react && cd examples/react-demo && yarn start",
17
- "react-prod": "yarn build:dev && yarn copy-react && cd examples/react-demo && yarn start",
18
- "vue-dev": "yarn build:dev && yarn copy-vue && cd examples/vue-demo && yarn serve",
19
- "vue-prod": "yarn build:dev && yarn copy-vue && cd examples/vue-demo && yarn serve",
20
- "lit-dev": "yarn build:dev && yarn copy-lit && cd examples/lit && yarn serve",
21
- "lit-prod": "yarn build:dev && yarn copy-lit && cd examples/lit && yarn serve",
22
- "copy-react": "cd examples/react-demo/src && rm -rf nami-dist && mkdir nami-dist && cp -r ../../../dist/nami-web.* nami-dist/",
23
- "copy-lit": "cd examples/lit && rm -rf nami-dist && mkdir nami-dist && cp -r ../../dist/nami-web.mjs nami-dist/",
24
- "copy-vue": "cd examples/vue-demo && rm -rf nami-dist && mkdir nami-dist && cp -r ../../dist/nami-web.* nami-dist/"
16
+ "react-dev": "yarn build:dev && cd examples/react-demo && yarn start",
17
+ "react-prod": "yarn build:dev && cd examples/react-demo && yarn start",
18
+ "vue-dev": "yarn build:dev && cd examples/vue-demo && yarn serve",
19
+ "vue-prod": "yarn build:dev && cd examples/vue-demo && yarn serve",
20
+ "lit-dev": "yarn build:dev && cd examples/lit && yarn serve",
21
+ "lit-prod": "yarn build:dev && cd examples/lit && yarn serve"
25
22
  },
26
23
  "main": "./dist/nami-web.cjs",
27
24
  "module": "./dist/nami-web.mjs",