@namiml/web-sdk 3.4.11-dev.202609100527 → 3.4.11-dev.202609120011

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.mjs CHANGED
@@ -251,7 +251,7 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
251
251
  .nami-modal-content nami-content-container {
252
252
  overflow: visible;
253
253
  }
254
- `)),Pt=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},At=globalThis,Dt=At.ShadowRoot&&(void 0===At.ShadyCSS||At.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xt=Symbol(),Ct=new WeakMap,It=function(){return ae(function e(t,i,n){if(Z(this,e),this._$cssResult$=!0,n!==xt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Dt&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Ct.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ct.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Lt=(e,t)=>{if(Dt)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=re(t);!(i=n()).done;){var a=i.value,r=document.createElement("style"),o=At.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}},_t=Dt?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=re(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return(e=>new It("string"==typeof e?e:e+"",void 0,xt))(i)})(e):e,Rt=Object.is,Ft=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,Wt=Object.getOwnPropertyNames,$t=Object.getOwnPropertySymbols,Nt=Object.getPrototypeOf,jt=globalThis,Bt=jt.trustedTypes,zt=Bt?Bt.emptyScript:"",Ut=jt.reactiveElementPolyfillSupport,Ht=(e,t)=>e,Gt={toAttribute(e,t){switch(t){case Boolean:e=e?zt:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},Vt=(e,t)=>!Rt(e,t),Kt={attribute:!0,type:String,converter:Gt,reflect:!1,useDefault:!1,hasChanged:Vt};null!==(kt=Symbol.metadata)&&void 0!==kt||(Symbol.metadata=Symbol("metadata")),null!==(St=jt.litPropertyMetadata)&&void 0!==St||(jt.litPropertyMetadata=new WeakMap);var Xt=function(){function e(){var t;return Z(this,e),(t=Q(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return le(e,be(HTMLElement)),ae(e,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}},{key:"addController",value:function(e){var t,i;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,i=re(this.constructor.elementProperties.keys());!(e=i()).done;){var n=e.value;this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Lt(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}},{key:"attributeChangedCallback",value:function(e,t,i){this._$AK(e,i)}},{key:"_$ET",value:function(e,t){var i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(void 0!==n&&!0===i.reflect){var a,r=(void 0!==(null===(a=i.converter)||void 0===a?void 0:a.toAttribute)?i.converter:Gt).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var i=this.constructor,n=i._$Eh.get(e);if(void 0!==n&&this._$Em!==n){var a,r,o,s=i.getPropertyOptions(n),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:Gt;this._$Em=n;var l=u.fromAttribute(t,s.type);this[n]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(n))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,i,n=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===n&&(a=this[e]),null!=i||(i=s.getPropertyOptions(e)),!((null!==(r=i.hasChanged)&&void 0!==r?r:Vt)(a,t)||i.useDefault&&i.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:i,reflect:n,wrapped:a},r){var o,s,u;i&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return me(function(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,J(this._$ES);case 2:i.n=4;break;case 3:i.p=3,t=i.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){i.n=5;break}return i.n=5,J(e);case 5:return i.a(2,!this.isUpdatePending)}},null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,i=re(this._$Ep);!(t=i()).done;){var n=t.value,a=n[0],r=n[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=re(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],c=h.wrapped,m=this[d];!0!==c||this._$AL.has(d)||void 0===m||this.C(d,void 0,h,m)}}var f=!1,v=this._$AL;try{var p;(f=this.shouldUpdate(v))?(this.willUpdate(v),null!==(p=this._$EO)&&void 0!==p&&p.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(v)):this._$EM()}catch(v){throw f=!1,this._$EM(),v}f&&this._$AE(v)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=Kt){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var i=Symbol(),n=this.getPropertyDescriptor(e,i,t);void 0!==n&&Ft(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Ot(this.prototype,e))&&void 0!==n?n:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var n=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:Kt}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Ht("elementProperties"))){var e=Nt(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Ht("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ht("properties")))for(var e=this.properties,t=0,i=[...Wt(e),...$t(e)];t<i.length;t++){var n=i[t];this.createProperty(n,e[n])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=re(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var h,c=re(this.elementProperties);!(h=c()).done;){var m=h.value,f=m[0],v=m[1],p=this._$Eu(f,v);void 0!==p&&this._$Eh.set(p,f)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var i,n=re(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(_t(a))}else void 0!==e&&t.push(_t(e));return t}},{key:"_$Eu",value:function(e,t){var i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}}])}();Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Xt[Ht("elementProperties")]=new Map,Xt[Ht("finalized")]=new Map,null!=Ut&&Ut({ReactiveElement:Xt}),(null!==(Et=jt.reactiveElementVersions)&&void 0!==Et?Et:jt.reactiveElementVersions=[]).push("2.1.2");var Yt={attribute:!0,type:String,converter:Gt,reflect:!1,hasChanged:Vt},qt=(e=Yt,t,i)=>{var n=i.kind,a=i.metadata,r=globalThis.litPropertyMetadata.get(a);if(void 0===r&&globalThis.litPropertyMetadata.set(a,r=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),"accessor"===n){var o=i.name;return{set(i){var n=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,n,e,!0,i)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===n){var s=i.name;return function(i){var n=this[s];t.call(this,i),this.requestUpdate(s,n,e,!0,i)}}throw Error("Unsupported decorator location: "+n)};function Jt(e){return(t,i)=>"object"==typeof i?qt(e,t,i):((e,t,i)=>{var n=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),n?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function Qt(e){return Jt(oe({},e,{state:!0,attribute:!1}))}var Zt=function(){function e(t,i,n){var a;return Z(this,e),(a=Q(this,e,[t,i,n])).host=null,a.defineDynamicStateProps(),a}return le(e,i),ae(e,[{key:"hostConnected",value:function(){}},{key:"hostDisconnected",value:function(){this.subscribers.clear()}},{key:"onStateChanged",value:function(){this.defineDynamicStateProps(),this.host&&this.host.requestUpdate()}},{key:"defineDynamicStateProps",value:function(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportWidth",{get:this.getViewportWidth.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportHeight",{get:this.getViewportHeight.bind(this),enumerable:!1,configurable:!0})}},{key:"getTVQuality",value:function(){var e,t;if("television"!==this.getFormFactor())return"";var i=window.devicePixelRatio||1,n=window.innerWidth||(null===(e=window.screen)||void 0===e?void 0:e.availWidth),a=window.innerHeight||(null===(t=window.screen)||void 0===t?void 0:t.availHeight);if(!n||!a)return"720p";var r=Math.max(n,a)*i,o=Math.min(n,a)*i;return r>=3840||o>=2160?"4K":r>=1920||o>=1080?"1080p":"720p"}},{key:"getViewportWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getViewportHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}],[{key:"create",value:function(t,i,n){var a=new e(t,i,n);return this.providers.push(a),a}},{key:"remove",value:function(e){this.providers=this.providers.filter(t=>t!==e)}},{key:"currentProvider",get:function(){return this.providers[0]}}])}();var ei=e=>{var t;return me(function(i){for(;;)if(0===i.n)return t=new Set(Array.from(document.fonts.values()).map(e=>e.family)),e.forEach(e=>{var i=ti(e);if(!t.has(i)){var n=new FontFace(i,`url(${e.file})`);document.fonts.add(n)}}),i.a(2,document.fonts.ready.then())},null,null,null,Promise)};function ti(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function ii(e,t,i){var a,r,o,s,u,l,d,h;if("undefined"==typeof window||!e||!t)return n.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var c={minDistance:null!==(a=null==i?void 0:i.minDistance)&&void 0!==a?a:30,maxDuration:null!==(r=null==i?void 0:i.maxDuration)&&void 0!==r?r:600,lockAxis:null===(o=null==i?void 0:i.lockAxis)||void 0===o||o,preventScrollOnSwipe:null!==(s=null==i?void 0:i.preventScrollOnSwipe)&&void 0!==s&&s,pointerTypes:null!==(u=null==i?void 0:i.pointerTypes)&&void 0!==u?u:["touch"],passiveListeners:null===(l=null==i?void 0:i.passiveListeners)||void 0===l||l,axisHint:null!==(d=null==i?void 0:i.axisHint)&&void 0!==d?d:"y",edgeLeakThreshold:null!==(h=null==i?void 0:i.edgeLeakThreshold)&&void 0!==h?h:24},m=e.style.touchAction;c.preventScrollOnSwipe&&(e.style.touchAction="none");var f=null,v=0,p=0,g=0,y=0,b=0,w=null,k=null,S=!1,E=!1,T=!1,M=e=>{try{var t=window.getComputedStyle(e);if(!t)return!1;var i=t.overflowY;if("auto"!==i&&"scroll"!==i)return!1;var n=e;return n.scrollHeight>n.clientHeight}catch(e){return!1}},P=e=>c.pointerTypes.includes(e.pointerType),A=t=>{var i=t.composedPath?t.composedPath()[0]:t.target;if(P(t)&&null===f){f=t.pointerId,v=g=t.clientX,p=y=t.clientY,b=performance.now(),w=null,T=!1,S=!1,E=!1,(k="y"===c.axisHint?((e,t)=>{for(var i=e;i&&i!==t&&i instanceof HTMLElement;){var n,a;if(M(i))return i;i=i.parentElement||(null!==(n=null===(a=i.parentNode)||void 0===a?void 0:a.host)&&void 0!==n?n:null)}return null})(i,e):null)||(E=!0);try{var n;null==e||null===(n=e.setPointerCapture)||void 0===n||n.call(e,t.pointerId)}catch(e){try{var a;null==i||null===(a=i.setPointerCapture)||void 0===a||a.call(i,t.pointerId)}catch(e){}}}},D=e=>{if(e.pointerId===f&&P(e)){if(g=e.clientX,y=e.clientY,c.lockAxis&&!w){var i=Math.abs(g-v),n=Math.abs(y-p);(i>2||n>2)&&(w=n>=i?"y":"x")}if("y"===c.axisHint&&("y"===w||!c.lockAxis)){var a=y-p,r=a<0?"up":"down",o=Math.abs(a),s=performance.now()-b,u=o/Math.max(s,1),l=o>=c.minDistance||u>.5;if(k)if(l)E=!0;else if(((e,t)=>!!e&&("down"===t?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight-1))(k,r)){if(!(("down"===r&&k.scrollTop<=50||"up"===r&&k.scrollTop+k.clientHeight>=k.scrollHeight-50)&&u>.3))return void(S=!0);E=!0}else E=!0;var d=!k||o>=c.edgeLeakThreshold;if(!T&&!S&&E&&d&&o>=c.minDistance){T=!0;var h=performance.now(),m={direction:"up"===r?"up":"down",distanceX:g-v,distanceY:a,absX:Math.abs(g-v),absY:o,duration:h-b,velocity:o/Math.max(h-b,1),startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:h,originalEvent:e};t(m)}}}},x=e=>{if(e.pointerId===f)if(P(e))if(k)C();else if(T||S)C();else{var i,n=performance.now(),a=n-b,r=g-v,o=y-p,s=Math.abs(r),u=Math.abs(o),l="x"===(i=c.lockAxis&&w?w:"x"===c.axisHint?"x":"y"===c.axisHint?"y":s>=u?"x":"y")?s:u,d=a<=c.maxDuration,h=c.minDistance;if(k&&"y"===i&&E&&(h+=c.edgeLeakThreshold),d&&l>=h){var m;m="x"===i?r>0?"right":"left":o>0?"down":"up";var M=l/Math.max(a,1);t({direction:m,distanceX:r,distanceY:o,absX:s,absY:u,duration:a,velocity:M,startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:n,originalEvent:e})}C()}else C()},C=()=>{f=null,w=null,b=0,k=null,E=!1,S=!1,T=!1},I=!!c.passiveListeners&&{passive:!0},L=c.passiveListeners?{passive:!0,capture:!0}:{capture:!0};e.addEventListener("pointerdown",A,L),e.addEventListener("pointermove",D,I),e.addEventListener("pointerup",x,I),e.addEventListener("pointercancel",x,I),e.addEventListener("lostpointercapture",x,I);return{destroy:()=>{e.removeEventListener("pointerdown",A,L),e.removeEventListener("pointermove",D,I),e.removeEventListener("pointerup",x,I),e.removeEventListener("pointercancel",x,I),e.removeEventListener("lostpointercapture",x,I),c.preventScrollOnSwipe&&(e.style.touchAction=m),C()},updateOptions:t=>{Object.assign(c,t),"boolean"==typeof t.preventScrollOnSwipe&&(t.preventScrollOnSwipe?e.style.touchAction="none":e.style.touchAction=m)}}}var ni={},ai=ni.NAMI_CLOSE_PAYWALL,ri=void 0===ai?"namiClosePaywall":ai,oi=ni.NAMI_RESTORE_PURCHASES,si=void 0===oi?"namiRestorePurchases":oi,ui=ni.NAMI_SIGN_IN,li=void 0===ui?"namiSignIn":ui,di=ni.NAMI_BUY_SKU,hi=void 0===di?"namiBuySKU":di,ci=ni.SET_STATE,mi=void 0===ci?"setState":ci,fi=ni.NAMI_SELECT_SKU,vi=void 0===fi?"namiSelectSKU":fi,pi=ni.NAMI_PURCHASE_SELECTED_SKU,gi=void 0===pi?"namiPurchaseSelectedSKU":pi,yi=ni.NAMI_DEEP_LINK,bi=void 0===yi?"namiDeeplink":yi,wi=ni.NAMI_NAVIGATE_TO_SCREEN,ki=void 0===wi?"namiNavigateToScreen":wi,Si=ni.NAMI_RELOAD_PRODUCTS,Ei=void 0===Si?"namiReloadProducts":Si,Ti=ni.NAMI_PLAY_VIDEO,Mi=void 0===Ti?"namiPlayVideo":Ti,Pi=ni.NAMI_PAUSE_VIDEO,Ai=void 0===Pi?"namiPauseVideo":Pi,Di=ni.NAMI_MUTE_VIDEO,xi=void 0===Di?"namiMuteVideo":Di,Ci=ni.NAMI_UNMUTE_VIDEO,Ii=void 0===Ci?"namiUnmuteVideo":Ci,Li=e=>"subscription"===e;function _i(e){if(Li(null==e?void 0:e.product_type)){var t=Fi(e);if(t.length>0)return t[0].billingPeriod}return null}function Ri(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return Oi(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Fi(e){return e?Oi(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function Oi(e,t){return e.map(e=>Wi(e,t))}function Wi(e,t){var i,n,a,r,o,s,u,l;if(!e)return{};var d=null!==(i=null===(n=e.promo_period)||void 0===n?void 0:n.count)&&void 0!==i?i:null==t?void 0:t.count,h=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,c=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:ji(m).format(c)}}function $i(e,t=!1,i=!1,n=!1,r=!1){if(!e)return null;var o=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!o)return null;var s=o.slice(1).map(e=>parseInt(e)),u=s[0],l=s[1],d=s[2],h=s[3],c=(e,t,i,n,o)=>{var s=(e=>r?`${e}_abbrev`:e)(o),u=(e=>r?`${e}_abbrev_plural`:`${e}_plural`)(o),l=a(s),d=a(u);return r||l!==s||(l=a(`${o}_abbrev`)),r||d!==u||(d=a(`${o}_abbrev_plural`)),n?e.toString():i?1===e||t?l:d:1===e||t?`${e} ${l}`:`${e} ${d}`};switch(e.at(-1)){case"D":return c(h,t,i,n,"nami_day");case"W":return c(d,t,i,n,"nami_week");case"M":return c(l,t,i,n,"nami_month");case"Y":return c(u,t,i,n,"nami_year")}return null}function Ni(e){var t;if(!e||e.length<2)return!1;var i=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===i||"Y"===i}function ji(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,oe({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,oe({},t,{style:"currency",currency:"USD"}))}}var Bi=(e,t,i)=>e&&t&&i?i.format(e-t):null,zi=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Ui=(e,t)=>{if(""!=t){var i=parseInt(t)-1;return i>=0&&i<(null==e?void 0:e.length)?e[i]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},Hi=e=>Vi(e.priceAmountMicros)/Gi(e.billingPeriod),Gi=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Vi=e=>e/1e6;function Ki(e){return parseFloat((Math.round(e)/100).toFixed(2))}var Xi=(e,t,i=[])=>({price:()=>qi(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>Ji(e),durationSingular:()=>Ji(e,!0),period:()=>Ji(e,!1,!0),periodNumber:()=>Ji(e,!1,!1,!0),freeTrialDuration:()=>Qi(e),freeTrialDurationSingular:()=>Qi(e,!0),freeTrialPeriod:()=>Qi(e,!1,!0),freeTrialPeriodNumber:()=>Qi(e,!1,!1,!0),pricePerMonth:()=>Zi(e),pricePerMonthRounded:()=>Zi(e,!0),periodInMonths:()=>en(e),durationInMonths:()=>tn(e),durationInMonthsSingular:()=>tn(e,!0),periodNumberInMonths:()=>nn(e),percentagePriceDifferenceFromSku:()=>an(e,t,i),priceDifferenceFromSku:()=>rn(e,t,i),promoEligible:()=>null===on(e)&&null!==sn(e,t),freeTrialEligible:()=>null!==on(e),promo:()=>{var i;return null===(i=sn(e,t))||void 0===i?void 0:i.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var i;return null===(i=un(e,t))||void 0===i?void 0:i.formattedPrice},promoPeriod:()=>ln(e,t,!1,!0),promoPeriodNumber:()=>ln(e,t,!1,!1,!0),promoDuration:()=>ln(e,t),promoDurationSingular:()=>ln(e,t,!0),introEligible:()=>!1,pricePerDay:()=>fn(e),pricePerWeek:()=>vn(e),pricePerWeekRounded:()=>vn(e,!0),introductoryPrice:()=>cn(e,t),introductoryPeriod:()=>hn(e,t,!1,!0),introductoryPeriodNumber:()=>hn(e,t,!1,!1,!0),introductoryDuration:()=>hn(e,t),introductoryDurationSingular:()=>hn(e,t,!0),introductoryPricePerMonth:()=>mn(e,t),introductoryPricePerMonthRounded:()=>mn(e,t,!0),durationAbbrev:()=>Ji(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>Qi(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>hn(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>ln(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>ln(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>tn(e,!1,!1,!1,!0),durationSingularAbbrev:()=>Ji(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>Qi(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>hn(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>ln(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>ln(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>tn(e,!0,!1,!1,!0),periodAbbrev:()=>Ji(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>Qi(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>hn(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>ln(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>ln(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>tn(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;var t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;var i=t[1],n=t[2],r=t[3],o=t[4],s=void 0!==i?parseInt(i,10):0,u=void 0!==n?parseInt(n,10):0,l=void 0!==r?parseInt(r,10):0;return(void 0!==o?parseInt(o,10):0)>0?null:l>0?1===l?a("nami_weekly"):2===l?a("nami_biweekly"):null:u>0?a(1===u?"nami_monthly":2===u?"nami_bimonthly":3===u?"nami_quarterly":6===u?"nami_biannually":12===u?"nami_yearly":"nami_monthly"):s>0?a("nami_yearly"):null}(_i(e)),iso_subscription_duration:()=>pn(e),invalid:()=>!1,unavailable:()=>!1}),Yi=(e,t,i,n=[])=>{if(!t)return null;var a=Xi(t,i,n);return a[e]?a[e]():null},qi=e=>{var t=Fi(e);return t&&t.length?t[0].formattedPrice:null},Ji=(e,t,i,n,a)=>$i(_i(e),t,i,n,a),Qi=(e,t,i,n,a)=>$i(Ri(e),t,i,n,a),Zi=(e,t)=>{var i=Fi(e);if(!i||0===i.length)return null;var n=Hi(i[0]);return n?ji(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},en=(e,t)=>{var i=Fi(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Ni(n)?$i("P1Y"===n?"P12M":n,!1,!1,!1,t):null},tn=(e,t,i,n,a)=>{var r=Fi(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Ni(o)?$i("P1Y"===o?"P12M":o,t,i,n,a):null},nn=e=>{if(!e)return 0;var t=Fi(e);return t&&t.length?Gi(t[0].billingPeriod):0},an=(e,t,i=[])=>{var n,a=Fi(e);if(!a||0===a.length)return null;var r=null===(n=Ui(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return zi(Ki(a[0].priceAmountMicros),nn(e));var o=Fi(r);return zi(Ki(a[0].priceAmountMicros),nn(e),(null==o?void 0:o.length)>0?Ki(o[0].priceAmountMicros):0,nn(r))},rn=(e,t,i=[])=>{var n,a=Fi(e);if(!a||0===a.length)return null;var r=null===(n=Ui(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Bi(Hi(a[0]));var o=Fi(r);return Bi(Hi(a[0]),Hi(o[0]),ji(o[0].priceCurrencyCode))},on=e=>Ri(e),sn=(e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null},un=(e,t)=>{if(!e)return null;var i=sn(e,t);return i?Wi(i,e.subscription_period):null},ln=(e,t,i,n,a,r)=>{var o=un(e,t);return $i((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},dn=(e,t)=>{if(!e)return null;var i=((e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"intro"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null})(e,t);return i?Wi(i,e.subscription_period):null},hn=(e,t,i,n,a,r)=>{var o=dn(e,t);return $i((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},cn=(e,t)=>{var i=dn(e,t);return i?i.formattedPrice:null},mn=(e,t,i)=>{var n=dn(e,t);if(!n)return null;var a=Hi(n);return a?ji(n.priceCurrencyCode).format(i?Math.round(a):a):null},fn=e=>{var t=Fi(e);if(!t||0===t.length)return null;var i,n,a=Vi(t[0].priceAmountMicros)/(i=t[0].billingPeriod,(n=Gi(i))?30.437*n:1);return ji(t[0].priceCurrencyCode).format(a)},vn=(e,t)=>{var i=Fi(e);if(!i||0===i.length)return null;var n,a,r=Vi(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=Gi(n))?52*a/12:1);return ji(i[0].priceCurrencyCode).format(t?Math.round(r):r)},pn=e=>{var t=Fi(e)[0];return t?t.billingPeriod:null},gn="object"==typeof global&&global&&global.Object===Object&&global,yn="object"==typeof self&&self&&self.Object===Object&&self,bn=gn||yn||Function("return this")(),wn=bn.Symbol;var kn=Array.isArray,Sn=Object.prototype,En=Sn.hasOwnProperty,Tn=Sn.toString,Mn=wn?wn.toStringTag:void 0;var Pn=Object.prototype.toString;var An=wn?wn.toStringTag:void 0;function Dn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":An&&An in Object(e)?function(e){var t=En.call(e,Mn),i=e[Mn];try{e[Mn]=void 0;var n=!0}catch(e){}var a=Tn.call(e);return n&&(t?e[Mn]=i:delete e[Mn]),a}(e):function(e){return Pn.call(e)}(e)}function xn(e){return null!=e&&"object"==typeof e}var Cn=wn?wn.prototype:void 0,In=Cn?Cn.toString:void 0;function Ln(e){if("string"==typeof e)return e;if(kn(e))return function(e,t){for(var i=-1,n=null==e?0:e.length,a=Array(n);++i<n;)a[i]=t(e[i],i,e);return a}(e,Ln)+"";if(function(e){return"symbol"==typeof e||xn(e)&&"[object Symbol]"==Dn(e)}(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function _n(e){return null==e?"":Ln(e)}function Rn(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:function(e,t,i){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(i=i>a?a:i)<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(a);++n<a;)r[n]=e[n+t];return r}(e,t,i)}var Fn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function On(e){return Fn.test(e)}var Wn="\\ud800-\\udfff",$n="["+Wn+"]",Nn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",jn="\\ud83c[\\udffb-\\udfff]",Bn="[^"+Wn+"]",zn="(?:\\ud83c[\\udde6-\\uddff]){2}",Un="[\\ud800-\\udbff][\\udc00-\\udfff]",Hn="(?:"+Nn+"|"+jn+")"+"?",Gn="[\\ufe0e\\ufe0f]?",Vn=Gn+Hn+("(?:\\u200d(?:"+[Bn,zn,Un].join("|")+")"+Gn+Hn+")*"),Kn="(?:"+[Bn+Nn+"?",Nn,zn,Un,$n].join("|")+")",Xn=RegExp(jn+"(?="+jn+")|"+Kn+Vn,"g");function Yn(e){return On(e)?function(e){return e.match(Xn)||[]}(e):function(e){return e.split("")}(e)}var qn,Jn=(qn="toUpperCase",function(e){var t=On(e=_n(e))?Yn(e):void 0,i=t?t[0]:e.charAt(0),n=t?Rn(t,1).join(""):e.slice(1);return i[qn]()+n});var Qn,Zn=(Qn={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(e){return null==Qn?void 0:Qn[e]}),ea=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ta=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var ia=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var na=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var aa="\\ud800-\\udfff",ra="\\u2700-\\u27bf",oa="a-z\\xdf-\\xf6\\xf8-\\xff",sa="A-Z\\xc0-\\xd6\\xd8-\\xde",ua="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",la="["+ua+"]",da="\\d+",ha="["+ra+"]",ca="["+oa+"]",ma="[^"+aa+ua+da+ra+oa+sa+"]",fa="(?:\\ud83c[\\udde6-\\uddff]){2}",va="[\\ud800-\\udbff][\\udc00-\\udfff]",pa="["+sa+"]",ga="(?:"+ca+"|"+ma+")",ya="(?:"+pa+"|"+ma+")",ba="(?:['’](?:d|ll|m|re|s|t|ve))?",wa="(?:['’](?:D|LL|M|RE|S|T|VE))?",ka="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Sa="[\\ufe0e\\ufe0f]?",Ea=Sa+ka+("(?:\\u200d(?:"+["[^"+aa+"]",fa,va].join("|")+")"+Sa+ka+")*"),Ta="(?:"+[ha,fa,va].join("|")+")"+Ea,Ma=RegExp([pa+"?"+ca+"+"+ba+"(?="+[la,pa,"$"].join("|")+")",ya+"+"+wa+"(?="+[la,pa+ga,"$"].join("|")+")",pa+"?"+ga+"+"+ba,pa+"+"+wa,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",da,Ta].join("|"),"g");function Pa(e,t,i){return e=_n(e),void 0===t?function(e){return na.test(e)}(e)?function(e){return e.match(Ma)||[]}(e):function(e){return e.match(ia)||[]}(e):e.match(t)||[]}var Aa=RegExp("['’]","g");var Da,xa=(Da=function(e,t,i){return t=t.toLowerCase(),e+(i?Jn(_n(t).toLowerCase()):t)},function(e){return function(e,t,i){for(var n=-1,a=null==e?0:e.length;++n<a;)i=t(i,e[n],n,e);return i}(Pa(function(e){return(e=_n(e))&&e.replace(ea,Zn).replace(ta,"")}(e).replace(Aa,"")),Da,"")});function Ca(e,t,i){var n,a,r=null!==(n=null===(a=t.find(e=>e.id===i))||void 0===a?void 0:a.products)&&void 0!==n?n:[];return r.forEach(t=>{t.product_details=Ra(e,t.sku_ref_id||""),t.variables=function(e,t,i){if(!t)return{};var n=function(e){if(!Array.isArray(e))return e;var t=e.filter(e=>e&&"object"==typeof e&&"entitlement_ref_id"in e).map(e=>e.entitlement_ref_id);return t.length?t:e}(t.entitlements),a=t.variables;if(!a)return oe({},t,{entitlements:n});Object.keys(a).forEach(t=>{if(Ia(a[t])){var n=_a(a[t],e,i);a[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(n)}});var r={};return(()=>Object.keys(Xi({})))().forEach(t=>{if(void 0===a[t]){var n=Yi(t,e,void 0,i);null!==n&&(r[t]=n)}}),oe({},t,r,a,{entitlements:n})}(t.product_details,t,r)}),r}function Ia(e){return"string"==typeof e&&e.includes(r)}function La(e,t,i){return t?(Object.keys(t).forEach(n=>{Ia(t[n])&&(t[n]=t[xa(n)]=_a(t[n],e,i))}),oe({},t)):{}}var _a=(e,t,i)=>e.replace(o,(n,a)=>{var r,s,u,l,d=(null===(r=o.exec(e))||void 0===r?void 0:r.slice(1))||[];a=null!==(s=d[0])&&void 0!==s?s:a;var h=null!==(u=null===(l=d[1])||void 0===l?void 0:l.replace(":",""))&&void 0!==u?u:"";return Yi(a,t,h,i)});function Ra(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Fa,Oa=["conditionAttributes"];function Wa(e,t){return Array.isArray(e)?e.reduce((e,i)=>{var n=Wa(i,t);return Array.isArray(n)?[...e,...n]:[...e,n]},[]):null==e?e:"object"==typeof e?Object.entries(e).reduce((e,[i,n])=>{var a="newRow"===i?n:Wa(n,t);return oe({},e,{[i]:a})},{}):"string"==typeof e?Ka(e,t):e}function $a(e){for(var t,i=re(e);!(t=i()).done;){var n=t.value;if("button"===n.component)return n.focused=!0,!0;if(Array.isArray(n.components)&&$a(n.components))return!0}return!1}function Na(e,t,i,n={}){var a=i.productBaseComponents||i.components||[],r=i.productFeaturedComponents||a,o="television"===e.state.formFactor;return t.map(t=>{var i,s,u,l=t.featured?r:a,d=t.entitlements.map(e=>e.entitlement_ref_id),c=Ra(e.productDetails,t.sku_ref_id),m={freeTrialEligible:1==Yi("freeTrialEligible",c),introEligible:1==Yi("introEligible",c),promoEligible:1==Yi("promoEligible",c),invalid:Yi("invalid",c),unavailable:Yi("unavailable",c)},f=oe({},t,t.variables,m,{id:t.id,entitlements:d});s=t,u=e=>{for(var t,i=re(e);!(t=i()).done;){var n=t.value;n.sku=h(s),n.components&&u(n.components),n.collapseHeader&&n.collapseHeader.components&&u(n.collapseHeader.components)}},u(l);var v={sku:f,media:Va(n,{convertToUrl:!0})},p=Wa(l,Wa(v,v));return function(e,t){var i=e=>{for(var n,a=re(e);!(n=a()).done;){var r,o=n.value;o&&"object"==typeof o&&(Object.defineProperty(o,"__skuContext",{value:t,enumerable:!1,writable:!0,configurable:!0}),Array.isArray(o.components)&&i(o.components),Array.isArray(o.conditionAttributes)&&i(o.conditionAttributes),null!==(r=o.collapseHeader)&&void 0!==r&&r.components&&i(o.collapseHeader.components))}};i(e)}(p,f),o&&t.featured&&$a(p),[null!==(i=t.featured)&&void 0!==i&&i,p]},[])}function ja(e,t){var i;if(!t.loopSource)return[];var n=c(t.loopSource),a=(null!=n?n:[]).filter(i=>{var n;return!(null!==(n=t.loopSourceConditions)&&void 0!==n&&n.length)||t.loopSourceConditions.every(t=>Ga(e,t,i))}),r=t.groupBy,o=t.groupHeaderTemplate,s=e=>Wa(t.components,Wa({block:e},{block:e})),u=(null!==(i=t.slots)&&void 0!==i?i:[]).filter(t=>{var i;return!(null!==(i=t.conditions)&&void 0!==i&&i.length)||t.conditions.every(t=>Ga(e,t,null))}),l=e=>[null!=e.columnSpan?oe({},e.template,{__namiSlotColumnSpan:e.columnSpan}):e.template],d=u.filter(e=>"listStart"===e.position).map(l),h=u.filter(e=>"listEnd"===e.position).map(l);if(!r||!o){"number"==typeof t.max&&(a=a.slice(0,t.max));var m=a.map(s).filter(e=>null!=e);return[{key:"",header:null,items:[...d,...m,...h]}]}for(var f,v=[],p=new Map,g=re(a);!(f=g()).done;){var y=f.value,b=Wa(r,Wa({block:y},{block:y})),w=null==b?"":String(b);p.has(w)||(v.push(w),p.set(w,[])),p.get(w).push(y)}for(var k,S=t=>{var i,n=v.filter(i=>((t,i)=>{var n,a,r=null!==(n=null===(a=t.group)||void 0===a?void 0:a.itemConditions)&&void 0!==n?n:[];return r.length?i.some(t=>r.every(i=>Ga(e,i,t))):i.length>0})(t,p.get(i)));return"last"===(null===(i=t.group)||void 0===i?void 0:i.ordinal)?n[n.length-1]:n[0]},E=new Map,T=new Map,M=re(u);!(k=M()).done;){var P=k.value,A="groupStart"===P.position?E:"groupEnd"===P.position?T:null;if(A){var D=S(P);null!=D&&(A.has(D)||A.set(D,[]),A.get(D).push(l(P)))}}var x=v.map(e=>{var i,n,a={key:e},r=Wa(o,Wa({group:a},{group:a})),u=p.get(e);return"number"==typeof t.groupMax&&(u=u.slice(0,t.groupMax)),{key:e,header:[r],items:[...null!==(i=E.get(e))&&void 0!==i?i:[],...u.map(s),...null!==(n=T.get(e))&&void 0!==n?n:[]]}});return[...d.length?[{key:"",header:null,items:d}]:[],...x,...h.length?[{key:"",header:null,items:h}]:[]]}function Ba(e,t,i){var n=(t,n)=>Ga(e,t,n,i);return t.assertions?t.assertions.every(n):!!t.orAssertions&&(!t.orAssertions.length||t.orAssertions.some(n))}function za(e,t,i){var n=t.conditionAttributes,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(t,Oa);if(!n)return a;var r=null!=i?i:a.__skuContext;return n.reduce((t,i)=>{if(!Ba(e,i,r))return t;var n={};return Object.entries(i.attributes).forEach(([t,i])=>{n[t]=Ha(e,i,r)}),oe({},t,n)},a)}function Ua(){if(!Fa){var e=u(),t=e.browser_name,i=e.browser_version;Fa={browser:t,browserVersion:i}}return Fa}function Ha(e,t,i,n=null){var a,o=null!==(a=null==e?void 0:e.flow)&&void 0!==a?a:{},u=o.manager,l=o.previousStepAvailable,d=o.nextStepAvailable,h=e.state,c={};return n&&(c={block:n}),c=oe({},c,{state:h,urlParams:s(),flow:{isLaunched:!(null==u||!u.flowOpen),previousStepAvailable:!!l,nextStepAvailable:!!d},launch:h.launch,sku:i||h.sku,customer:h.customer,device:Ua()}),"string"==typeof t&&t.includes(r)&&(t=Ka(t,c)),t}function Ga(e,{value:t,expected:i,operator:n},a,r){if(t=Ha(e,t,r,a),i=Ha(e,i,r,a),"equals"===n)return t===i;if("notEquals"===n)return t!==i;if("contains"===n){var o;if(Array.isArray(t)||"string"==typeof t||t instanceof String||(t=t.toString()),"collapse"==i)i+="_"+(null===(o=e.getCurrentCollapsibleSku())||void 0===o?void 0:o.skuId);return t.includes(i)}if("notContains"===n)return Array.isArray(t)||"string"==typeof t||t instanceof String||(t=t.toString()),!t.includes(i);if("set"===n){var s=null!=t&&""!==t&&!t.toString().match(d);return"boolean"==typeof i?s===i:s}return"notSet"===n?null==t||""===t||!!t.toString().match(d):"gt"===n?t>i:"gte"===n?t>=i:"lt"===n?t<i:"lte"===n&&t<=i}function Va(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce((e,[i,{content:n}])=>(t&&"string"!=typeof n&&n&&(n=URL.createObjectURL(n)),oe({},e,{[i]:n})),{})}function Ka(e,t){var i=e;if("string"!=typeof e)return i;for(var n,a=new RegExp(l.source,l.flags),r=[];null!==(n=a.exec(e))&&(r.push(n),a.global);)n.index===a.lastIndex&&a.lastIndex++;for(var o=0,s=r;o<s.length;o++){var u=s[o],d=u[0],h=u[1],c=Ka(h,t);if(d===e)return m(d,c);c!==h&&(i=i.replace(h,c)),i=i.replace(l,m)}return i;function m(e,i){var n=String(i).split("."),a=n[0];if(!a)return e;var r=Xa(t,a);if(void 0===r)return e;if("object"==typeof r&&null!==r&&0===Object.keys(r).length)return"";var o=Xa(t,...n);return void 0===o?"":"string"!=typeof o?o:Ka(o,t)}}function Xa(e,...t){for(var i=e,n=0,a=t;n<a.length;n++){var r=a[n];if(null==i)return;i=Array.isArray(i)?i[+r]:i[r]}return i}var Ya=e=>{var t=e.state.timeSpentOnPaywall;if(t)return Date.now()-t},qa=e=>{if(!e)return null;if(e.includes("#"))return e;var t=e.match(/[\d.]+/g);if(!t||t.length<3)return null;var i=t.map(Number),n=i[0],a=i[1],r=i[2],o=i[3],s=e=>Math.round(e).toString(16).padStart(2,"0"),u=void 0!==o&&o<1?s(255*o):"";return`#${s(n)}${s(a)}${s(r)}${u}`},Ja=(e,t)=>{if(!e||!t)return!0;var i=null!=e&&e.includes("rgb")?qa(e):e,n=null!=t&&t.includes("rgb")?qa(t):t;return(null==i?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())};function Qa(e){var t,i,n,a,r,o,s,u,l,d,h,c,m;return{width:null!==(t=e.width)&&void 0!==t?t:20,railSpacing:null!==(i=e.railSpacing)&&void 0!==i?i:12,dotLineSpacing:null!==(n=e.dotLineSpacing)&&void 0!==n?n:10,lineTopOffset:null!==(a=e.lineTopOffset)&&void 0!==a?a:0,lineBottomOffset:null!==(r=e.lineBottomOffset)&&void 0!==r?r:0,lineWidth:null!==(o=e.lineWidth)&&void 0!==o?o:1,lineColor:null!==(s=e.lineColor)&&void 0!==s?s:"#C6CBD7",lineCornerRadius:null!==(u=e.lineCornerRadius)&&void 0!==u?u:0,dotSize:null!==(l=e.dotSize)&&void 0!==l?l:6,dotColor:null!==(d=e.dotColor)&&void 0!==d?d:"#C6CBD7",dotCornerRadius:null!==(h=e.dotCornerRadius)&&void 0!==h?h:3,dotBorderWidth:null!==(c=e.dotBorderWidth)&&void 0!==c?c:0,dotBorderColor:null!==(m=e.dotBorderColor)&&void 0!==m?m:"transparent",conditionAttributes:e.conditionAttributes}}function Za(e,t,i){for(var n,a=Qa(t),r={key:i},o=Wa(t,Wa({group:r},{group:r})),s={dotSize:a.dotSize,dotColor:a.dotColor,dotCornerRadius:a.dotCornerRadius,dotBorderWidth:a.dotBorderWidth,dotBorderColor:a.dotBorderColor},u=re(null!==(l=o.conditionAttributes)&&void 0!==l?l:[]);!(n=u()).done;){var l,d,h=n.value;if(Ba(e,h)){var c=null!==(d=h.attributes)&&void 0!==d?d:{};s={dotSize:"number"==typeof c.dotSize?c.dotSize:s.dotSize,dotColor:"string"==typeof c.dotColor?c.dotColor:s.dotColor,dotCornerRadius:"number"==typeof c.dotCornerRadius?c.dotCornerRadius:s.dotCornerRadius,dotBorderWidth:"number"==typeof c.dotBorderWidth?c.dotBorderWidth:s.dotBorderWidth,dotBorderColor:"string"==typeof c.dotBorderColor?c.dotBorderColor:s.dotBorderColor}}}return s.dotCornerRadius=Math.min(s.dotCornerRadius,s.dotSize/2),s}var er=!0,tr=!1,ir=!1,nr=!1,ar=!1,rr=!1,or=null,sr=null,ur=null,lr=null,dr=!1,hr="",cr=!1,mr=null,fr=null,vr=null,pr=null,gr=null,yr=null,br=null,wr=null,kr=!1,Sr=null,Er="",Tr=0,Mr=1,Pr=null,Ar=[],Dr=new WeakMap,xr=new WeakMap,Cr=1;function Ir(e){var t=xr.get(e);return t||(t=Cr++,xr.set(e,t)),String(t)}var Lr=null,_r=null,Rr=null,Fr=null;function Or(e){return!0===e||"true"===e||"1"===e||"yes"===e}function Wr(e,t){if(function(){if("undefined"==typeof window)return!1;try{var e,t;return!!Or(window.NAMI_TTS_DEBUG)||Or(null===(e=window.localStorage)||void 0===e?void 0:e.getItem("nami:tts:debug"))||Or(null===(t=window.localStorage)||void 0===t?void 0:t.getItem("NAMI_TTS_DEBUG"))}catch(e){return!1}}())try{t?console.debug(`[Nami TTS] ${e}`,t):console.debug(`[Nami TTS] ${e}`)}catch(e){}}function $r(e="TTS is unavailable in this runtime."){tr||(tr=!0,Wr(e))}function Nr(e){if(!e)return"none";var t=e.id?`#${e.id}`:"",i=e.getAttribute("data-testid"),n=i?`[data-testid="${i}"]`:"";return`${e.tagName.toLowerCase()}${t}${n}`}function jr(e){return function(e){return null==e?"":String(e).replace(/[^.!?\n]*\$\{[^}]*subscribeUrl[^}]*\}[^.!?\n]*[.!?]?/gi,"To subscribe, follow the on-screen instructions.").replace(/\$\{[^}]+\}/g," ").replace(/\s+([.,!?;:])/g,"$1").replace(/\s+/g," ").trim()}(e)}function Br(e){return e.toLowerCase().replace(/[^a-z0-9$]+/g," ").replace(/\s+/g," ").trim()}function zr(e){return jr(String(null!=e?e:"").replace(/<[^>]*>/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_`#>~]/g," "))}function Ur(e,t){var i=jr(t);i&&e[e.length-1]!==i&&e.push(i)}function Hr(e,t=[]){var i=[];return[...e,...t].forEach(e=>{var t=function(e){var t=jr(e);if(!t)return[];for(var i=[],n=0,a=0;a<t.length;a+=1){var r=t.charAt(a),o=t.charAt(a+1);if(("."===r||"!"===r||"?"===r)&&(!o||/\s/.test(o))){var s=jr(t.slice(n,a+1));for(s&&i.push(s);a+1<t.length&&/\s/.test(t.charAt(a+1));)a+=1;n=a+1}}var u=jr(t.slice(n));u&&i.push(u);return i.length?i:[t]}(e);t.length||Ur(i,e),t.forEach(e=>Ur(i,e))}),i.slice(0,60)}function Gr(e){return jr(e.join(". ").replace(/\.\s*([.!?])/g,"$1"))}function Vr(e){var t,i=Pr;i&&(e&&i.id===e||(i.status="cancelled",(null===(t=Pr)||void 0===t?void 0:t.id)===i.id&&(Pr=null)))}function Kr(){if("undefined"==typeof document)return null;for(var e=document.activeElement;e&&null!==(t=e.shadowRoot)&&void 0!==t&&t.activeElement;){var t,i,n;e=null!==(i=null===(n=e.shadowRoot)||void 0===n?void 0:n.activeElement)&&void 0!==i?i:e}return e}function Xr(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function Yr(e){for(var t=[],i=null!=e?e:null;i;){i instanceof Element&&-1===t.indexOf(i)&&t.push(i);var n=i.parentNode;i=Xr(n)?n.host:n}return t}function qr(e,t){return!!t&&-1!==Yr(t).indexOf(e)}function Jr(e,t){if(!t)return!1;if(t===e)return!0;if(e.contains(t))return!0;var i=e.shadowRoot;return!!i&&(i.activeElement===t||i.contains(t))}function Qr(e,t){t&&-1===e.indexOf(t)&&e.push(t)}function Zr(e,t){var i=t.shadowRoot;i&&i.querySelectorAll('button,[role="button"],a,input,select,textarea,[tabindex]:not([tabindex="-1"])').forEach(t=>Qr(e,t))}function eo(e,t){var i,n=("function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():null!==(i=null==t?void 0:t.composedPath)&&void 0!==i?i:[]).filter(e=>e instanceof Element);return n.length?n:Yr(e)}function to(e,t=[],i={}){var n=[];if(i.focusedElementOnly)return Qr(n,e),n;var a=(t.length?t:Yr(e)).filter(e=>e.isConnected),r=function(e,t){var i,n=t.find(e=>e.matches("nami-product-container"));if(n)return n;var a=Yr(e).find(e=>e.matches("nami-product-container"));if(a)return a;var r=lr&&"querySelectorAll"in lr?lr:"undefined"!=typeof document?document:null;return r&&null!==(i=Array.prototype.slice.call(r.querySelectorAll("nami-product-container")).find(t=>qr(t,e)))&&void 0!==i?i:null}(e,a);return Qr(n,e),Zr(n,e),a.forEach(t=>{var i=!!r&&(t===r||qr(r,t)),a=t!==e&&qr(t,e),o=t.matches('nami-product-container,nami-button,[role="button"],button,[tabindex]:not([tabindex="-1"])');(i||a||t===e)&&o&&(Qr(n,t),Zr(n,t))}),null!=r&&r.isConnected&&(Qr(n,r),Zr(n,r)),n}function io(e){return Dr.has(e)}function no(e,t,i=[]){var n=jr(t);if(!n)return!1;so(),ao(void 0,"new-composite",!0);var a=to(e,i,Eo()||So()?{focusedElementOnly:!1}:{focusedElementOnly:!0});return a.forEach(e=>function(e,t){var i=jr(t);return!!i&&(Dr.has(e)||Dr.set(e,{"aria-label":e.getAttribute("aria-label")}),e.setAttribute("aria-label",i),!0)}(e,n)),Ar=a,!0}function ao(e,t="manual",i=!1){var n=e&&-1===Ar.indexOf(e)?to(e):Ar;n.length&&(!i&&Pr&&n.some(e=>Dr.has(e))?Wr("composite restore skipped: transaction still active",{reason:t}):(so(),n.forEach(e=>{var t=Dr.get(e);t&&(!function(e,t,i){null===i?e.removeAttribute(t):e.setAttribute(t,i)}(e,"aria-label",t["aria-label"]),Dr.delete(e))}),e&&-1===Ar.indexOf(e)||(Ar=[])))}function ro(e,t){Dr.has(e)&&(t instanceof Element&&Jr(e,t)||(so(),vr=setTimeout(()=>{(vr=null,e.isConnected)?Jr(e,Kr())||ao(e,"blur"):ao(e,"blur-disconnected",!0)},50)))}function oo(e){Ar.length&&ao(void 0,e,!0)}function so(){vr&&(clearTimeout(vr),vr=null)}function uo(){pr&&(clearTimeout(pr),pr=null),Lr=null}function lo(){gr&&(clearTimeout(gr),gr=null)}function ho(){yr&&(clearTimeout(yr),yr=null)}function co(){br&&(clearTimeout(br),br=null)}function mo(){wr&&(clearTimeout(wr),wr=null)}function fo(e){kr=!0,mo(),wr=setTimeout(()=>{wr=null,kr=!1},po(e)+500)}function vo(){mo(),kr=!1}function po(e){var t=jr(e),i=350*(t?t.split(/\s+/).filter(Boolean).length:0);return Math.min(3e4,Math.max(4e3,i))}function go(){return"undefined"==typeof window?null:window}function yo(){var e,t=null===(e=go())||void 0===e||null===(e=e.webOS)||void 0===e||null===(e=e.service)||void 0===e?void 0:e.request;return"function"==typeof t?t:null}function bo(){return!!yo()}function wo(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.VIZIO)||void 0===e?void 0:e.Chromevox;return t&&"function"==typeof t.play?t:null}function ko(){return"undefined"!=typeof window&&void 0!==window.speechSynthesis&&"function"==typeof window.speechSynthesis.speak&&"function"==typeof window.SpeechSynthesisUtterance}function So(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!(!t.VIZIO&&-1===i.indexOf("vizio"))}function Eo(){var e,t;if("undefined"==typeof window)return!1;if(So())return!1;var i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"",n=go();return!!(null!=n&&n.webOS||null!=n&&n.webOSDev||null!=n&&n.PalmSystem||null!=n&&null!==(t=n.webOS)&&void 0!==t&&null!==(t=t.platform)&&void 0!==t&&t.tv||-1!==i.indexOf("webos")||-1!==i.indexOf("netcast"))}function To(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!!(t.tizen||-1!==i.indexOf("tizen")||-1!==i.indexOf("samsung")&&(-1!==i.indexOf("smart-tv")||-1!==i.indexOf("smarttv"))||-1!==i.indexOf("samsungbrowser")&&-1!==i.indexOf("tv"))}function Mo(e){return"string"==typeof e&&-1!==e.toLowerCase().indexOf("xbox")}function Po(){var e,t,i;if("undefined"==typeof window)return!1;if(!0===Rr)return!0;var n=window.navigator;return[n.userAgent,n.platform,n.vendor,null===(e=n.userAgentData)||void 0===e?void 0:e.platform,...(null!==(t=null===(i=n.userAgentData)||void 0===i?void 0:i.brands)&&void 0!==t?t:[]).map(e=>e.brand)].some(Mo)}function Ao(){if("undefined"==typeof window)return!1;try{return"television"===m()}catch(e){return!1}}function Do(){if(ar)return!1;var e=wo();if(!e)return!1;try{return"function"!=typeof e.isEnabled||e.isEnabled()}catch(e){return!1}}function xo(){return{televisionRuntime:Ao(),televisionTtsRuntime:Co(),webos:Eo(),tizen:To(),vizio:So(),xbox:Po(),xboxClientHintsResult:Rr,hasWebOsServiceRequest:bo(),webOsRequestType:typeof yo(),hasWebSpeechApi:ko(),webSpeechUnavailableForSession:ir,webOsLunaUnavailableForSession:nr,vizioChromevoxUnavailableForSession:ar}}function Co(){return Ao()||Eo()||So()||To()}function Io(){return Co()&&!ir&&ko()}function Lo(e){if(rr=e,Wr("set media playing",{playing:e,hasDeferredUtterance:!!or}),!e&&or){var t,i=or;if(or=null,i.options.transactionId&&(null===(t=Pr)||void 0===t?void 0:t.id)!==i.options.transactionId)return void Wr("drop stale deferred speech",{transactionId:i.options.transactionId,reason:i.options.reason});qo(i.text,i.options)}}function _o(e){ir=!0,$r(Eo()?"Web Speech TTS unavailable in this webOS runtime":"Web Speech TTS unavailable in this runtime"),Wr("web speech unavailable",{error:e})}function Ro(e){nr=!0,Wr("webOS Luna unavailable",{error:e})}function Fo(e,t){or={text:e,options:t}}var Oo={name:"webos-luna-tts",platform:"webos",isAvailable:function(){return Co()&&!So()&&!nr&&bo()},speak:function(e,t){Wr("speakViaWebOsLuna:enter",{textPreview:e.slice(0,160),reason:t.reason,transactionId:t.transactionId,requestType:typeof yo()});var i=yo();if(!i)return Wr("speakViaWebOsLuna:no-request"),!1;var n="composite"===t.reason,a=!1,r=()=>{var r,o;if(yr=null,t.transactionId&&(null===(r=Pr)||void 0===r?void 0:r.id)!==t.transactionId)return Wr("speakViaWebOsLuna:drop-stale-delayed-speak",{transactionId:t.transactionId,activeTransaction:null===(o=Pr)||void 0===o?void 0:o.id,reason:t.reason}),!1;if(rr)return Wr("speakViaWebOsLuna:defer-delayed-speak-media-playing",{transactionId:t.transactionId,reason:t.reason}),Fo(e,t),!0;var s=!1;try{Wr("speakViaWebOsLuna:request",{uri:"luna://com.webos.service.tts",method:"speak",delayedComposite:n,textPreview:e.slice(0,160)}),i("luna://com.webos.service.tts",{method:"speak",parameters:{text:e,clear:!0,feedback:!0},onSuccess:e=>{var i;if(Wr("speakViaWebOsLuna:onSuccess",{response:e,transactionId:t.transactionId}),!t.transactionId||(null===(i=Pr)||void 0===i?void 0:i.id)===t.transactionId){var n,r=function(e){var t,i=jr(null!==(t=null==e?void 0:e.msgStatus)&&void 0!==t?t:null==e?void 0:e.status).toLowerCase();return"done"===i||"stopped"===i||"canceled"===i||"cancelled"===i||"error"===i}(e),o=!(null==e||!e.returnValue||"msgStatus"in Object(null!=e?e:{}));if(!a&&(r||o))a=!0,t.transactionId&&(null===(n=Pr)||void 0===n?void 0:n.id)===t.transactionId&&(Pr.status="ended",Pr=null)}},onFailure:e=>{var i;s=!0,Wr("speakViaWebOsLuna:onFailure",{error:e,transactionId:t.transactionId});var n=!t.transactionId||(null===(i=Pr)||void 0===i?void 0:i.id)===t.transactionId;t.transactionId&&n&&Pr&&(Pr.status="cancelled",Pr=null),Ro(e)}})}catch(e){var u;return t.transactionId&&(null===(u=Pr)||void 0===u?void 0:u.id)===t.transactionId&&(Pr.status="cancelled",Pr=null),Ro(e),!1}return!s};if(n)return ho(),Wr("speakViaWebOsLuna:delay-composite-until-focus-settles",{delayMs:250,transactionId:t.transactionId}),yr=setTimeout(r,250),!0;return r()},stop:No},Wo={name:"web-speech",platform:"web",isAvailable:Io,speak:function(e,t){if(!Io())return!1;try{var i=new window.SpeechSynthesisUtterance(e);return i.onstart=()=>{var e;t.transactionId&&(null===(e=Pr)||void 0===e?void 0:e.id)===t.transactionId&&(Pr.status="started")},i.onend=()=>{var e=Pr,i=!t.transactionId||(null==e?void 0:e.id)===t.transactionId;t.transactionId&&i&&e&&(e.status="ended",Pr=null)},i.onerror=e=>{var i,n=e.error;t.transactionId&&(null===(i=Pr)||void 0===i?void 0:i.id)===t.transactionId&&(Pr.status="cancelled",Pr=null),"synthesis-failed"===n&&_o(n)},window.speechSynthesis.speak(i),!0}catch(e){return _o("exception"),!1}},stop:()=>{if(ko())try{window.speechSynthesis.cancel()}catch(e){}}},$o={name:"vizio-chromevox",platform:"vizio",isAvailable:Do,speak:Bo,stop:jo};function No(){var e=yo();if(e)try{e("luna://com.webos.service.tts",{method:"stop",parameters:{},onFailure:e=>Wr("webOS Luna stop failed",{error:e})})}catch(e){Wr("webOS Luna stop threw",{error:e})}}function jo(e=!0){var t=!!gr,i=kr;lo();var n=wo(),a=function(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.chrome)||void 0===e||null===(e=e.tts)||void 0===e?void 0:e.stop;return"function"==typeof t?t:null}();if((n||a)&&(i||t||a)&&(i||!t||a))try{var r=!1;n&&"function"==typeof n.stop&&(n.stop(),r=!0),n&&"function"==typeof n.cancel&&n.cancel(),n&&"function"==typeof n.pause&&n.pause(),a&&(a(),r=!0),n&&e&&!r&&i&&n.play(""),vo()}catch(e){vo(),Wr("VIZIO stop threw",{error:e})}}function Bo(e,t){var i=wo();if(!i)return!1;try{var n,a,r=!0===(null===(n=t.element)||void 0===n?void 0:n.isConnected),o="composite"===t.reason?1400:"focus"===t.reason?700:0;return o>0?(lo(),gr=setTimeout(()=>{var n;if(gr=null,!t.transactionId||!Pr||Pr.id===t.transactionId)if(t.element&&r&&!t.element.isConnected){var a;t.transactionId&&(null===(a=Pr)||void 0===a?void 0:a.id)===t.transactionId&&(Pr.status="cancelled",Pr=null)}else{if(rr)return uo(),_r=null,void Fo(e,t);i.play(e),fo(e),t.transactionId&&(null===(n=Pr)||void 0===n?void 0:n.id)===t.transactionId&&(Pr.status="ended",Pr=null)}},o),!0):(i.play(e),fo(e),t.transactionId&&(null===(a=Pr)||void 0===a?void 0:a.id)===t.transactionId&&(Pr.status="ended",Pr=null),!0)}catch(e){return function(e){ar=!0,Wr("VIZIO Chromevox unavailable",{error:e})}(e),!1}}function zo(e){return"high"===e?3:"normal"===e?2:1}function Uo(){return Date.now()-Tr<1500}function Ho(e){return Br(e)}function Go(e){if(!e)return"";var t=function(e){return e?[e.tagName.toLowerCase(),e.id||"",e.getAttribute("data-component-id")||"",e.getAttribute("data-nami-id")||"",e.getAttribute("data-testid")||"",`el-${Ir(e)}`].filter(Boolean).join("|"):""}(e);return Br(t||is(e))}function Vo(e){var t=Ho(e);return"clickable"===t||"button"===t||"focusable"===t||"selected"===t||"unselected"===t}function Ko(e,t,i){var n;if(_r={textKey:Ho(e),reason:t.reason,timestamp:Date.now()},"high"===i){var a=po(e),r=Date.now();Lr={transactionId:t.transactionId,pageKey:hr,element:null!==(n=t.element)&&void 0!==n?n:null,elementKey:Go(t.element),textKey:Ho(e),startedAt:r,suppressUntil:r+a},pr&&clearTimeout(pr),pr=setTimeout(()=>{pr=null,Lr=null},a)}}function Xo(e,t=!0){var i,n,a,r=!(!e||(null===(i=Pr)||void 0===i?void 0:i.id)!==e||"pending"!==Pr.status);if(Wr("stopSpeech",{preserveTransactionId:e,allowVizioEmptyFallback:t,activeTransaction:null===(n=Pr)||void 0===n?void 0:n.id,reason:null===(a=Pr)||void 0===a?void 0:a.reason,preservingCurrentTransaction:r}),or=null,r||(co(),ho()),e||(uo(),so(),oo("stop")),Vr(e),fr&&(clearTimeout(fr),fr=null),!r){if(ko())try{window.speechSynthesis.cancel()}catch(e){}Eo()&&No(),So()&&jo(t)}}function Yo(){Xo()}function qo(e,t={}){var i,n,a;Wr("speakText:enter",{textPreview:jr(e).slice(0,160),reason:t.reason,transactionId:t.transactionId,element:Nr(t.element),runtime:xo()});var r=jr(e);if(!r)return!1;if(!Co())return Wr("skip speech: non-CTV runtime"),!1;var o={interrupt:!1!==t.interrupt,reason:null!==(i=t.reason)&&void 0!==i?i:"manual",transactionId:t.transactionId,element:t.element,focusPath:t.focusPath,priority:t.priority},s=function(e,t){return t.priority?t.priority:"composite"===t.reason?"high":Vo(e)?"low":"normal"}(r,o);if(function(e,t,i){var n=Ho(e),a=Date.now(),r=Go(t.element);if(Vo(e))return!0;if(_r&&_r.reason===t.reason&&_r.textKey===n&&a-_r.timestamp<600)return Wr("suppress:duplicate-request",{reason:t.reason,textPreview:e.slice(0,120)}),!0;if(!Lr)return!1;if(zo(i)>=zo("high"))return!1;if("focus"===t.reason){var o=Lr.textKey;if(!Uo()&&(n===o||n.includes(o)))return Wr("suppress:focus-text-is-active-composite",{textPreview:e.slice(0,120),transactionId:Lr.transactionId,element:Nr(t.element)}),!0}var s=function(e,t){return!!e&&!!t&&e===t}(t.element,Lr.element),u=!!r&&Lr.elementKey===r,l=!Lr.pageKey||Lr.pageKey===hr,d=Uo(),h=l&&!d&&a<Lr.startedAt+2500;return!(!s&&!u&&(l&&"focus"===t.reason&&t.element&&Lr.element!==t.element||"low"!==i&&!h)&&(uo(),1))}(r,o,s))return!1;if(o.interrupt&&Xo(o.transactionId,!1),rr)return Fo(r,o),!0;var u=function(e){var t;return"manual"!==(null!==(t=e.reason)&&void 0!==t?t:"manual")&&e.element?Eo()||So()?"programmatic":"accessibility-label":"programmatic"}(o);Wr("speakText:owner",{owner:u,reason:o.reason,element:Nr(o.element)});var l,d,h="programmatic"===u?function(){if(!Co())return null;var e=So(),t=Eo();return $o.isAvailable()?(Wr("resolveTtsEngine:selected",{engine:"vizio-chromevox"}),$o):e?null:Oo.isAvailable()?(Wr("resolveTtsEngine:selected",{engine:"webos-luna-tts"}),Oo):Wo.isAvailable()?(Wr("resolveTtsEngine:selected",{engine:"web-speech"}),Wo):(Wr("tts engine unavailable",{webos:t,vizio:e}),null)}():null;(Wr("speakText:engine",{engine:null!==(n=null==h?void 0:h.name)&&void 0!==n?n:null,owner:u}),"composite"===o.reason&&o.transactionId&&o.element&&function(e){return"accessibility-label"===e||Eo()}(u))&&no(o.element,r,null!==(l=o.focusPath)&&void 0!==l?l:[]);if("accessibility-label"===u)return"focus"===o.reason&&o.element&&o.element.setAttribute("aria-label",r),o.transactionId&&(null===(d=Pr)||void 0===d?void 0:d.id)===o.transactionId&&(Pr.status="started"),Ko(r,o,s),!0;if(!h)return function(e,t){if(!So()||ar)return!1;var i=Date.now(),n=()=>{var a;br=null,t.transactionId&&Pr&&Pr.id!==t.transactionId||(Do()?Bo(e,t):Date.now()-i>=8e3?t.transactionId&&(null===(a=Pr)||void 0===a?void 0:a.id)===t.transactionId&&(Pr.status="cancelled",Pr=null):br=setTimeout(n,250))};return co(),br=setTimeout(n,250),!0}(r,o)?(Ko(r,o,s),!0):($r(),!1);var c="focus"===o.reason&&o.element?es(o.element,r):r,m=h.speak(c,o);if(Wr("speakText:engine-result",{engine:h.name,accepted:m,reason:o.reason,transactionId:o.transactionId}),m)return Ko(r,o,s),m;if(!o.element)return m;var f=no(o.element,r,null!==(a=o.focusPath)&&void 0!==a?a:[]);return Wr("speakText:aria-label-fallback",{engine:h.name,accepted:f,reason:o.reason}),f&&Ko(r,o,s),f}function Jo(e){var t=e.component;return e.hasAttribute("data-nami-primary-cta")||!0===(null==t?void 0:t.focused)||"productButton"===(null==t?void 0:t.namiComponentType)}function Qo(e){var t,i=null===(t=e.getAttribute("role"))||void 0===t?void 0:t.toLowerCase();return"button"===e.tagName.toLowerCase()||"button"===i||e.matches("nami-button,nami-play-pause-button,nami-volume-button,nami-toggle-button")}function Zo(e){return jr(e).replace(/(?:,\s*)?\bbutton\b\s*$/i,"").trim()||jr(e)}function es(e,t){var i=jr(t);return i&&(So()||Eo())&&Qo(e)?/\bbutton\b\s*$/i.test(i)?i:jr(`${i} button`):i}function ts(e){return jr(e.innerText||e.textContent||"")}function is(e){if(!e)return"";if(io(e)){var t=function(e){var t=Dr.get(e);return t?jr(t["aria-label"]||e.getAttribute("title")||""):""}(e);if(t)return t;var i=ns(e.component);if(i)return i}var n=e.getAttribute("data-tts-spoken-label");if(n)return jr(n);var a=ns(e.component);if(a)return a;var r=e.getAttribute("aria-label")||e.getAttribute("title");return r?jr(r):ts(e)}function ns(e){var t=rs(e,ur);if(!t)return"";var i=t,n=jr(as(i.speechLabel)||as(i.speech_label)||as(i.screenreaderText)||as(i.title)||as(i.alt)||as(i.text)||(Array.isArray(i.texts)?i.texts.map(e=>as(e)).join(", "):""));if(n)return n;for(var a,r=re(ss(i));!(a=r()).done;){var o=ns(a.value);if(o)return o}return""}function as(e,t=ur){return t?Ha(t,e):e}function rs(e,t){if(!e||e.hidden)return null;var i=e;if("condition"===i.component)return t&&Ba(t,i)?e:null;if(i.conditionAttributes&&t){var n=za(t,i);return n.hidden?null:n}return e}function os(e,t){if(Wr("applySpeechAttributes:enter",{element:Nr(e),label:t,activeComposite:io(e)}),!io(e)){var i=jr(t),n=function(e,t){var i=jr(t);return i?Qo(e)?Zo(i):i:""}(e,t);if(!n)return e.removeAttribute("data-tts-spoken-label"),void e.removeAttribute("aria-label");i?e.setAttribute("data-tts-spoken-label",i):e.removeAttribute("data-tts-spoken-label"),e.setAttribute("aria-label",function(e,t){return Qo(e)?Zo(t):jr(t)}(e,n))}}function ss(e){for(var t=[],i=0,n=["components","playingComponents","pausedComponents","mutedComponents","volumeComponents","productBaseComponents","productFeaturedComponents"];i<n.length;i++){var a=null==e?void 0:e[n[i]];Array.isArray(a)&&t.push(...a)}return null!=e&&e.collapseHeader&&(Array.isArray(e.collapseHeader)?t.push(...e.collapseHeader):t.push(e.collapseHeader)),t}function us(e,t,i){var n=rs(e,ur);if(n&&!function(e){var t=rs(e,ur);if(!t)return!1;var i=t,n=String(i.component||i.namiComponentType||"").toLowerCase();return-1!==n.indexOf("button")||-1!==n.indexOf("toggle")||-1!==n.indexOf("checkbox")||-1!==n.indexOf("radio")||-1!==n.indexOf("select")||-1!==n.indexOf("input")||!!i.onTap||!!i.sku||!0===i.focused}(n)){var a=function(e){var t=rs(e,ur);if(!t)return"";var i=t;switch(t.component){case"text":case"countdownTimerText":return zr(as(i.screenreaderText)||as(i.text));case"text-list":return Array.isArray(i.texts)?zr(i.texts.map(e=>as(e)).join(", ")):"";case"videoUrl":case"progressBar":return jr(as(i.screenreaderText));default:return""}}(n);Ur(t,a),ss(n).forEach(e=>us(e,t))}}function ls(e,t){var i=[];if(!e)return i;var n=e;return[n.header,n.contentContainer,n.footer,n.backgroundContainer,n.components].forEach(e=>{Array.isArray(e)?e.forEach(e=>us(e,i)):us(e,i)}),i}function ds(e,t){var i=ls(e),n=function(e){if(!e)return"";var t=ns(e.component),i=e.getAttribute("aria-label")||e.getAttribute("title")||ts(e),n=jr(t||i);return n?es(e,n):""}(t);return Gr(Hr(i,n?[n]:[]))}function hs(e){return e?Br(`${jr(e.id||e.name||"")}|${Gr(Hr(ls(e),[]))}`):""}function cs(){return cr}function ms(e,t=null){!function(){if(null===Rr&&null===Fr){var e=navigator.userAgentData;"function"==typeof(null==e?void 0:e.getHighEntropyValues)?Fr=e.getHighEntropyValues(["platform","model"]).then(e=>{var t,i,n=(null!==(t=e.platform)&&void 0!==t?t:"").toLowerCase(),a=(null!==(i=e.model)&&void 0!==i?i:"").toLowerCase();Rr=n.includes("xbox")||a.includes("xbox"),Wr("xbox client hints resolved",{platform:n,model:a,result:Rr})}).catch(()=>{Rr=!1}).finally(()=>{Fr=null}):Rr=!1}}(),Wr("setActivePage:enter",{nextKey:hs(e),previousKey:hr,activePageAnnounced:dr,pageName:jr((null==e?void 0:e.name)||(null==e?void 0:e.id)||"")});var i=hr;sr=e,ur=t,function(e){var t=hs(e);if(t!==hr){var i=!hr&&!!Sr;dr=!1,hr=t,cr=i,Sr=null,Er=""}}(e),i!==hr&&Xo(void 0,!1)}function fs(e,t){if(Wr("prepareInitialComposite:enter",{element:Nr(e),activePageKey:hr,activePageAnnounced:dr,blockedByNavigation:cs(),label:is(e),isPrimary:Jo(e)}),!sr||dr||!Jo(e)||cs())return Wr("prepareInitialComposite:skip",{hasActivePage:!!sr,activePageAnnounced:dr,isPrimary:Jo(e),blockedByNavigation:cs()}),!1;var i=ds(sr,e);if(!i)return!1;var n=eo(e,t),a=function(e,t,i){var n={id:Mr++,reason:e,element:i,text:t,page:sr,status:"pending"};return Pr=n,n}("composite",i,e);dr=!0,Sr=e,Er=Go(e);var r,o=qo(i,{reason:"composite",interrupt:!0,transactionId:a.id,element:e,focusPath:n,priority:"high"});o||(dr=!1,(null===(r=Pr)||void 0===r?void 0:r.id)===a.id&&(Pr.status="cancelled",Pr=null));return o}function vs(e,t){Wr("preparePrimaryCtaCompositeFocus:enter",{element:Nr(e),label:is(e),activePageKey:hr,activePageAnnounced:dr});var i=fs(e,t);return Wr("preparePrimaryCtaCompositeFocus:result",{result:i,activePageKey:hr,activePageAnnounced:dr}),i}function ps(e){Wr("handleNativeFocusIn:enter",{target:e.target instanceof Element?Nr(e.target):String(e.target),activePageKey:hr,activePageAnnounced:dr});var t=function(e){for(var t,i=null,n=re("function"==typeof e.composedPath?e.composedPath():[]);!(t=n()).done;){var a=t.value;if(a instanceof Element&&is(a)){if(a.tagName.toLowerCase().startsWith("nami-"))return a;i||(i=a)}}return null!=i?i:e.target instanceof Element?e.target:null}(e);t&&gs(t,e)}function gs(e,t){if(Wr("handleFocusedElementForSpeech:enter",{element:Nr(e),label:is(e),ttsEnabled:er,runtime:xo(),activePageKey:hr,activePageAnnounced:dr,lastFocused:Nr(Sr),lastFocusedElementIdentity:Er}),!e)return Wr("handleFocusedElementForSpeech:skip-basic",{hasElement:!!e,ttsEnabled:er}),!1;if(!Co())return!1;var i=Go(e);if(Lr&&Lr.pageKey===hr&&Date.now()<Lr.startedAt+2500){var n=Lr.element===e,a=!!i&&Lr.elementKey===i;if(!Uo()&&(n||a))return Wr("handleFocusedElementForSpeech:skip-during-initial-composite-lock",{element:Nr(e),sameCompositeElement:n,sameCompositeElementKey:a}),!1;var r=is(e),o=r?Ho(r):"";if(!Uo()&&o&&Lr.textKey.includes(o))return Wr("handleFocusedElementForSpeech:skip-composite-contained-label-during-initial-lock",{element:Nr(e),labelPreview:r.slice(0,120),transactionId:Lr.transactionId}),Sr=e,Er=i,!1}if(Sr===e||i&&i===Er&&!dr)return Wr("handleFocusedElementForSpeech:skip-same-element",{element:Nr(e),activePageAnnounced:dr,elementIdentity:i,lastFocusedElementIdentity:Er}),!1;if(!dr&&sr&&Jo(e)&&!Sr&&!cs())return fs(e,t);var s=is(e);if(!s)return!1;if(Lr){var u=Ho(s),l=Lr.textKey;if(!Uo()&&(u===l||u.includes(l)))return Wr("handleFocusedElementForSpeech:skip-active-composite-label",{element:Nr(e),labelPreview:s.slice(0,120),transactionId:Lr.transactionId}),Sr=e,Er=i,!1}return Sr=e,Er=i,fr&&clearTimeout(fr),fr=setTimeout(()=>{fr=null,Sr===e&&qo(s,{reason:"focus",interrupt:!0,element:e,focusPath:eo(e,t),priority:"normal"})},120),!0}function ys(e=document){var t;if(Wr("attachFocusSpeechListeners:enter",{root:e instanceof Element?Nr(e):e instanceof DocumentFragment?"document-fragment":"document",runtime:xo()}),bs(),!Co())return Wr("focus speech listeners not attached: non-CTV runtime"),bs;var i,n=e=>ps(e),a=()=>(Wr("handleUserNavigationKey",{activePageKey:hr,activePageAnnounced:dr}),Tr=Date.now(),void(cr=!0));e.addEventListener("focusin",n,!0),e.addEventListener("keydown",a,!0);var r=window;if("undefined"!=typeof window&&null!==(t=r.TVJS)&&void 0!==t&&t.DirectionalNavigation){var o=r.TVJS.DirectionalNavigation;i=o.onfocuschanged,o.onfocuschanged=e=>{var t;null===(t=i)||void 0===t||t.call(o,e),function(e){var t,i=null===(t=e.detail)||void 0===t?void 0:t.nextFocusElement;i&&gs(i,e)}(e)}}return mr={root:e,focusListener:n,keyListener:a,previousTvjsHandler:i},bs}function bs(){var e;if(Wr("detachFocusSpeechListeners:enter",{hasCleanup:!!mr}),mr){var t=mr,i=t.root,n=t.focusListener,a=t.keyListener,r=t.previousTvjsHandler;i.removeEventListener("focusin",n,!0),a&&i.removeEventListener("keydown",a,!0);var o=window;null!==(e=o.TVJS)&&void 0!==e&&e.DirectionalNavigation&&r&&(o.TVJS.DirectionalNavigation.onfocuschanged=r),mr=null}}function ws(){var e;Wr("resetScreenreaderState:enter",{activePageKey:hr,activePageAnnounced:dr,activeTransaction:null===(e=Pr)||void 0===e?void 0:e.id,lastFocused:Nr(Sr)}),bs(),or=null,rr=!1,sr=null,ur=null,lr=null,dr=!1,hr="",cr=!1,Sr=null,Er="",Tr=0,_r=null,uo(),so(),lo(),ho(),co(),vo(),fr&&(clearTimeout(fr),fr=null),oo("reset"),Vr(),Pr=null}var ks=function(){return ae(function e(t,i,n="",a=""){var r;Z(this,e),this.playing=!1,this.toggling=!1,this.handleVideoEvents=e=>{this.video.onended=()=>{Lo(!1),this.handlePlayerAnalytics(e,f.VIDEO_ENDED)},this.video.onpause=()=>{Lo(!1),this.toggling||this.handlePlayerAnalytics(e,f.VIDEO_PAUSED)},this.video.onplay=()=>{Lo(!this.video.muted),this.toggling||this.handlePlayerAnalytics(e,this.video.currentTime>.05?f.VIDEO_RESUMED:f.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=this.video.muted,Lo(!this.video.paused&&!this.video.ended&&!this.muted),this.handlePlayerAnalytics(e,this.muted?f.VIDEO_MUTED:f.VIDEO_UNMUTED))}},this.removeVideoEvents=()=>{this.video&&(Lo(!1),this.video.onended=null,this.video.onpause=null,this.video.onplay=null,this.video.onvolumechange=null,this.toggling=!1)},this.video=null!=i?i:this.video,null!==(r=e.instance)&&void 0!==r&&r.videoSrc&&i.src!=e.instance.videoSrc&&this.handlePlayerAnalytics(t,f.VIDEO_CHANGED),this.videoSrc=i.src,this.video&&(this.muteByDefault=i.muted,this.loopVideo=i.loop,this.autoplayVideo=i.autoplay,this.muted=this.video.muted,this.videoComponentName=n,this.videoComponentId=a,this.playing=!(!(this.video.currentTime>0)||this.video.paused||this.video.ended),Lo(this.playing&&!this.video.muted),this.handleVideoEvents(t))},[{key:"togglePlayVideo",value:function(e){this.toggling=!0,this.playing?this.video.pause():this.video.play(),this.playing=!this.playing,this.handlePlayerAnalytics(e)}},{key:"toggleMuteVideo",value:function(e){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(e,this.muted?f.VIDEO_MUTED:f.VIDEO_UNMUTED)}},{key:"videoPlayingAction",value:function(){var e,t;return(null===(e=this.video)||void 0===e?void 0:e.currentTime)<=0?f.VIDEO_STARTED:this.video.paused?f.VIDEO_PAUSED:this.video.ended?f.VIDEO_ENDED:(null===(t=this.video)||void 0===t?void 0:t.currentTime)>.05?f.VIDEO_RESUMED:f.UNKNOWN}},{key:"handlePlayerAnalytics",value:function(e,t){if(this.video){var i={id:this.videoComponentId,name:this.videoComponentName,url:this.video.src,loopVideo:this.loopVideo,muteByDefault:this.muteByDefault,autoplayVideo:this.autoplayVideo,contentDuration:this.video.duration/1e3,contentTimecode:this.video.currentTime/1e3};v.getInstance().emit(p,{action:null!=t?t:this.videoPlayingAction(),videoMetaData:i,timeSpentOnPaywall:Ya(e)})}}}])}();ks.instance=null;var Ss=({onTap:e,sku:t,componentChange:i,contextProvider:n}={})=>{var a,r,o,s,u,l,d,h,c,m,g,y=f.UNKNOWN;switch(null==e?void 0:e.function){case ri:y=f.CLOSE_PAYWALL,g=Ya(n),Es(),null===(a=ks.instance)||void 0===a||a.handlePlayerAnalytics(n,f.VIDEO_ENDED);break;case si:y=f.RESTORE_PURCHASES,Ts();break;case li:y=f.SIGN_IN,Ms();break;case bi:Ps(null===(r=e.parameters)||void 0===r?void 0:r.url);break;case hi:t&&(y=f.BUY_SKU,t=As(n,e,t));break;case ki:y=f.PAGE_CHANGE,i={name:null==e||null===(o=e.parameters)||void 0===o?void 0:o.screen},Ds(n,null==e||null===(s=e.parameters)||void 0===s?void 0:s.screen);break;case mi:y=f.TOGGLE_CHANGE,i=xs(n,null==e||null===(u=e.parameters)||void 0===u?void 0:u.formId,null==e||null===(l=e.parameters)||void 0===l?void 0:l.value);break;case vi:t&&(y=f.SELECT_SKU,Cs(n,t));break;case gi:t&&(y=f.PURCHASE_SELECTED_SKU,Is(n,t));break;case Ei:break;case Mi:null===(d=ks.instance)||void 0===d||d.togglePlayVideo(n);break;case Ai:null===(h=ks.instance)||void 0===h||h.togglePlayVideo(n);break;case xi:null===(c=ks.instance)||void 0===c||c.toggleMuteVideo(n);break;case Ii:null===(m=ks.instance)||void 0===m||m.toggleMuteVideo(n)}y!==f.UNKNOWN&&v.getInstance().emit(p,oe({},n.getPaywallActionEventData(),{action:y,sku:t,timeSpentOnPaywall:g,componentChange:i,purchaseError:void 0,purchases:void 0}))},Es=()=>{Yo(),g.clearLaunchId(),Ls(y.Close)||"undefined"==typeof window||window.history.back()},Ts=()=>{var e=b(w.THIRD_PARTY_TRANSACTIONS);Ls(y.Restore)||e||n.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},Ms=()=>{Ls(y.SignIn)},Ps=e=>{e?Ls(y.DeeplinkAction,e)||"undefined"!=typeof window&&window.open(e,"_blank"):n.debug("Paywall deep link action invoked, but no url present.")},As=(e,t,i)=>{var a,r=null===(a=t.parameters)||void 0===a?void 0:a.promo,o=i;if(r)n.debug(`promo id is not null ${null==i?void 0:i.id}`),o.promoId=r.toString();else{n.debug(`promo id is null for ${i.id}, product details: ${JSON.stringify(i.productDetails)}`);var s=i.productDetails;if(Li(null==s?void 0:s.product_type)){var u=function(e){return e.offers.find(e=>"promo"===e.offer_type&&0===e.price)}(s);if(u&&u.offer_ref_id)n.debug(`Found a free trial offer ${u.offer_ref_id}`),o.promoId=u.offer_ref_id.toString();else{var l,d=s.offers[0];if(d)n.debug(`Found an offer ${d.offer_ref_id}`),o.promoId=null===(l=d.offer_ref_id)||void 0===l?void 0:l.toString()}}}return function(e,t){if(b(w.THIRD_PARTY_TRANSACTIONS)){if(g.setPurchaseImpression(),v.getInstance().listenerCount(y.BuySku)<=0)return void n.warn("In order for Nami to hand off the purchase so the transaction can be handled by, you must register a NamiBuySkuHandler callbackwith NamiPaywallManager.registerBuySkuHandler.");n.info(`Handing off purchase for processing by developer skuId=${t.skuId} promoId=${t.promoId}`),Ls(y.BuySku,t)}else{var i=k(t.skuId);if(i&&(n.info(`Purchase flow completed, success=${i.success}, code=${i.billingResponseCode}, message=${i.message}`),i.success)){var a;v.getInstance().emit(p,{action:f.CLOSE_PAYWALL,sku:t,timeSpentOnPaywall:Ya(e)}),null===(a=ks.instance)||void 0===a||a.handlePlayerAnalytics(e,f.VIDEO_ENDED);var r=e.getSelectedCampaign();r&&r.conversion_event_type==S.IN_APP&&r.conversion_event_url?(g.clearLaunchId(),window.location.href=r.conversion_event_url):Es()}}}(e,o),o},Ds=(e,t)=>{var i;t&&((null===(i=window.history.state)||void 0===i?void 0:i.prevUrl)==t?window.history.back():e.setCurrentPage(t))},xs=(e,t,i)=>{if(t)return e.setCurrentFormId(t,i),{formId:t,value:i};var n=e.getCurrentGroupId(),a=e.getCurrentGroupName();return e.setCurrentGroupData(n,a),{id:n,name:a}},Cs=(e,t)=>{var i=e.getCurrentGroupId(),n=e.selectedProducts();i&&t.id!=n[i]&&e.setSelectedProducts(oe({},n,{[i]:t.id}))},Is=(e,t)=>{e.setPurchase(!0,t)};function Ls(e,...t){var i=v.getInstance();return i.emit(e,...t),i.listenerCount(e)>0}var _s,Rs,Fs,Os,Ws,$s,Ns,js,Bs,zs,Us,Hs,Gs=e=>e,Vs=E.NamiFlowManager,Ks=250,Xs=(_s=function(){function e(t,i,n){var a;return Z(this,e),(a=Q(this,e)).pages=[],a.currentOffset=0,a.presentationStyle="fullscreen",a._sheetEntranceActive=!0,a.formFactor=m(),a.timeSpentOnPaywall=0,a.animation={transition:"none",direction:"forward"},a._originalBodyStyles={},a._originalDocumentStyles={},a._savedScrollY=0,a._sheetDragStartY=0,a._sheetIsDragging=!1,a._dismissThreshold=100,a._boundHandleKeyDownEvent=e=>a.handleKeyDownEvent(e),a._stylesAlreadySaved=!1,a.type=t,a.value=i,a.context=n,a.setPaywallData(),a.presentationStyle=a.getPresentationStyle(a.paywall),a.applyPresentationHostClasses(),he(a,a)}return le(e,U),ae(e,[{key:"applyPresentationHostClasses",value:function(){this.classList.toggle("nami-half-sheet-mode",this.isOverlaySheet),this.classList.toggle("nami-modal-mode",this.isModal),this.classList.toggle("nami-modal-phone",this.isModal&&"phone"===this.formFactor),this.classList.toggle("nami-modal-wide",this.isModal&&"phone"!==this.formFactor)}},{key:"setPaywallData",value:function(){var e=T(this.value,this.type);this.paywall=e.paywall,this.campaign=e.campaign}},{key:"getPresentationStyle",value:function(e){var t,i,n,a=null!==(t=null==e||null===(i=e.template)||void 0===i||null===(i=i.initialState)||void 0===i?void 0:i.presentationStyle)&&void 0!==t?t:null==e||null===(n=e.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.presentation_style;return M(a)}},{key:"isHalfSheet",get:function(){return"compact_sheet"===this.presentationStyle}},{key:"isSheet",get:function(){return"sheet"===this.presentationStyle}},{key:"isOverlaySheet",get:function(){return this.isHalfSheet||this.isSheet}},{key:"isModal",get:function(){return"modal"===this.presentationStyle}},{key:"isOverlay",get:function(){return this.isOverlaySheet||this.isModal}},{key:"connectedCallback",value:function(){var t;ge(e,"connectedCallback",this)([]),null!==(t=window.TVJS)&&void 0!==t&&t.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),this._detachFocusSpeechListeners=ys(this),document.addEventListener("keydown",this._boundHandleKeyDownEvent),this._swipeHandler=ii(this,this.handleSwipeEvent.bind(this),{axisHint:"y",lockAxis:!0,minDistance:25,edgeLeakThreshold:15,preventScrollOnSwipe:!1,pointerTypes:["touch"]}),this.setOriginalStyles()}},{key:"disconnectedCallback",value:function(){var t,i,n;ge(e,"disconnectedCallback",this)([]),Yo(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=void 0,ws(),g.clearLaunchId(),null!==(i=window.TVJS)&&void 0!==i&&i.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this._boundHandleKeyDownEvent),v.getInstance().removeAllListeners(p),this.restoreStyles(),null===(n=this._halfSheetAbortController)||void 0===n||n.abort(),this._swipeHandler.destroy()}},{key:"setOriginalStyles",value:function(){this._stylesAlreadySaved||(this._stylesAlreadySaved=!0,this._originalBodyStyles.background=document.body.style.background,this._originalBodyStyles.overflow=document.body.style.overflow||null,this._originalBodyStyles.position=document.body.style.position||null,this._originalBodyStyles.top=document.body.style.top||null,this._originalBodyStyles.width=document.body.style.width||null,"phone"===this.formFactor&&(this._originalBodyStyles["overscroll-behavior"]=document.body.style.overscrollBehavior||null,this._originalDocumentStyles["overscroll-behavior"]=document.documentElement.style.overscrollBehavior||null)),"television"===this.formFactor&&(document.body.style.overflow="hidden"),"phone"===this.formFactor&&(document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none",this.isOverlay||(document.body.style.overflow="hidden")),this.isOverlay&&(this._savedScrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%",document.body.style.overflow="hidden")}},{key:"restoreStyles",value:function(){Object.entries(this._originalBodyStyles).forEach(([e,t])=>{null!==t?document.body.style.setProperty(e,t):document.body.style.removeProperty(e)}),Object.entries(this._originalDocumentStyles).forEach(([e,t])=>{null!==t?document.documentElement.style.setProperty(e,t):document.documentElement.style.removeProperty(e)}),this._savedScrollY>0&&(window.scrollTo(0,this._savedScrollY),this._savedScrollY=0)}},{key:"handleKeyDownEvent",value:function(e){if(10009===e.keyCode||27===e.keyCode||166===e.keyCode||196===e.keyCode||"Backspace"===e.key||"GoBack"===e.key||"BrowserBack"===e.key||"XF86Back"===e.key){if("Backspace"===e.key)if(e.composedPath().some(e=>e instanceof HTMLElement&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)))return;e.preventDefault(),Yo(),this.flow?this.flow.triggerActions(P.REMOTE_BACK):this.isModal&&this.animateSheetDismiss().then(()=>Es())}}},{key:"handleBackdropClick",value:function(e){var t;(e.stopPropagation(),this.flow)?null!==(t=this.flow.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==t&&t?this.flow.triggerActions("__swipe_down__"):this.animateSheetDismiss().then(()=>{var e;null===(e=this.flow)||void 0===e||e.dismiss(),Es()}):this.animateSheetDismiss().then(()=>Es())}},{key:"animateSheetDismiss",value:function(){var e,t,i,n,a;return me(function(r){for(;;)switch(r.n){case 0:return i=this.shadowRoot,n=null!==(e=null==i?void 0:i.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null==i?void 0:i.querySelector(".nami-modal-container"),a=null!==(t=null==i?void 0:i.querySelector(".nami-half-sheet-backdrop"))&&void 0!==t?t:null==i?void 0:i.querySelector(".nami-modal-backdrop"),n&&n.classList.add("nami-dismissing"),a&&a.classList.add("nami-dismissing"),r.n=1,J(new Promise(e=>setTimeout(e,200)));case 1:return r.a(2)}},null,this,null,Promise)}},{key:"handleSwipeEvent",value:function({direction:e}){var t;if("down"===e)null===(t=this.flow)||void 0===t||t.triggerActions("__swipe_down__");else if("up"===e){var i;null===(i=this.flow)||void 0===i||i.triggerActions("__swipe_up__")}}},{key:"setupHalfSheetDragTracking",value:function(){var e,t,i;null===(e=this._halfSheetAbortController)||void 0===e||e.abort(),this._halfSheetAbortController=new AbortController;var n=this._halfSheetAbortController.signal,a=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"),r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-half-sheet-content");if(a&&r){a.addEventListener("touchstart",e=>{r.scrollTop>0||(this._sheetDragStartY=e.touches[0].clientY,this._sheetIsDragging=!0)},{passive:!0,signal:n}),a.addEventListener("touchmove",e=>{if(this._sheetIsDragging){var t=e.touches[0].clientY-this._sheetDragStartY;t>0&&(a.style.transform=`translateY(${t}px)`,a.style.transition="none",e.preventDefault())}},{passive:!1,signal:n}),a.addEventListener("touchend",()=>{if(this._sheetIsDragging){this._sheetIsDragging=!1;var e,t,i=a.style.transform.match(/translateY\((\d+(?:\.\d+)?)px\)/);if((i?parseFloat(i[1]):0)>this._dismissThreshold)if(null!==(e=null===(t=this.flow)||void 0===t?void 0:t.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==e&&e){var n;a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out",null===(n=this.flow)||void 0===n||n.triggerActions("__swipe_down__")}else{var r;a.style.transform="translateY(100%)",a.style.transition="transform 0.2s ease-in";var o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(".nami-half-sheet-backdrop");o&&o.classList.add("nami-dismissing"),setTimeout(()=>{var e;null===(e=this.flow)||void 0===e||e.dismiss()},200)}else a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out"}},{signal:n})}}},{key:"setupHalfSheetFocusTrap",value:function(){var e,t,i,n,a=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-modal-container");if(a){a.focus();var r=null===(n=this._halfSheetAbortController)||void 0===n?void 0:n.signal;a.addEventListener("keydown",e=>{if("Tab"===e.key){var t=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0!==t.length){var i,n,r=t[0],o=t[t.length-1];if(e.shiftKey)document.activeElement!==r&&(null===(i=this.shadowRoot)||void 0===i?void 0:i.activeElement)!==r||(e.preventDefault(),o.focus());else document.activeElement!==o&&(null===(n=this.shadowRoot)||void 0===n?void 0:n.activeElement)!==o||(e.preventDefault(),r.focus())}}},r?{signal:r}:void 0)}}},{key:"firstUpdated",value:function(){var e;this.timeSpentOnPaywall=Date.now(),null===(e=this._detachFocusSpeechListeners)||void 0===e||e.call(this),this._detachFocusSpeechListeners=ys(this.renderRoot),A(this.campaign)&&(this.flow=Vs.instance.presentFlow(this.campaign,this,this.context)),this.isOverlay&&this.updateComplete.then(()=>{this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()})}},{key:"updated",value:function(t){if(ge(e,"updated",this)([t]),t.has("presentationStyle")){var i=t.get("presentationStyle");("compact_sheet"===i||"sheet"===i||"modal"===i)!==this.isOverlay&&(this.restoreStyles(),this._stylesAlreadySaved=!1,this.setOriginalStyles()),this.isOverlay&&(this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap())}}},{key:"getAnimationStyles",value:function(e){var t="backward"===this.animation.direction?-1:1;switch(this.animation.transition){case"verticalSlide":return`transform: translateY(${100*(e-this.currentOffset)*t}vh);`;case"slide":return`transform: translateX(${100*(e-this.currentOffset)*t}vw);`;case"fade":return`opacity: ${e===this.currentOffset?1:0};`;default:return""}}},{key:"updatePages",value:function(e){var t,i,n;return me(function(a){for(;;)switch(a.n){case 0:if(0!==this.pages.length&&"none"!==this.animation.transition){a.n=1;break}return this.pages=[e],a.a(2);case 1:if((null==(t=this.pages[this.pages.length-1])?void 0:t.id)!==e.id){a.n=2;break}return a.a(2);case 2:return i=null,this.isOverlaySheet&&(i=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".nami-half-sheet-content"))&&(i.style.height=`${i.clientHeight}px`),this.pages=[t,e],this.currentOffset=0,a.n=3,J(this.updateComplete);case 3:requestAnimationFrame(()=>{this.currentOffset=1,setTimeout(()=>{this.pages=[e],this.currentOffset=0,this.paywall=e,i&&(i.style.height="")},Ks)});case 4:return a.a(2)}},null,this,null,Promise)}},{key:"animateFullscreenEntry",value:function(){return me(function(e){for(;;)switch(e.n){case 0:return e.n=1,J(new Promise(e=>requestAnimationFrame(()=>e())));case 1:return this.classList.remove("nami-fullscreen-entering"),this.classList.add("nami-fullscreen-entering-active"),e.n=2,J(new Promise(e=>setTimeout(e,Ks)));case 2:this.classList.remove("nami-fullscreen-entering-active");case 3:return e.a(2)}},null,this,null,Promise)}},{key:"_captureExitOverlay",value:function(e){var t=this.shadowRoot;if(!t)return null;var i=t.querySelector(".nami-flow-container"),n=document.createElement("div");if(n.className="nami-fullscreen-exit-overlay",n.style.cssText=`\n position: fixed; inset: 0; z-index: 10000;\n pointer-events: none;\n background: ${e};\n overflow: hidden;\n `,i){var a=i.cloneNode(!0);a.style.transform="none",a.style.transition="none",n.appendChild(a)}return t.appendChild(n),n.offsetHeight,n}},{key:"_slideExitOverlayAway",value:function(e){var t;return me(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}return i.a(2);case 1:return t="undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,e.style.transition=t?"none":"transform 250ms ease-in",e.style.transform="translateY(100%)",i.n=2,J(new Promise(e=>setTimeout(e,t?0:Ks)));case 2:e.remove();case 3:return i.a(2)}},null,null,null,Promise)}},{key:"flowNavigateToScreen",value:function(e,t){var i,n,a,r,o,s,u,l,d,h,c;return me(function(m){for(;;)switch(m.n){case 0:if(null!==(i=this.flow)&&void 0!==i&&i.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,P.DISAPPEAR),a=this.presentationStyle,r=this.getPresentationStyle(e),o=0===this.pages.length,s="backward"===t.direction,"compact_sheet"!==a&&"sheet"!==a||"fullscreen"!==r){m.n=3;break}return this.classList.add("nami-fullscreen-entering"),this.presentationStyle="fullscreen",this.applyPresentationHostClasses(),m.n=1,J(this.updateComplete);case 1:return m.n=2,J(this.animateFullscreenEntry());case 2:m.n=11;break;case 3:if("fullscreen"!==a||"compact_sheet"!==r&&"sheet"!==r){m.n=10;break}if(!o&&!s){m.n=8;break}if(!s){m.n=6;break}return u=document.body.style.background||getComputedStyle(this).backgroundColor||"#000",this._sheetEntranceActive=!1,l=this._captureExitOverlay(u),this.presentationStyle=r,this.applyPresentationHostClasses(),this.pages=[e],this.paywall=e,m.n=4,J(this.updateComplete);case 4:return m.n=5,J(this._slideExitOverlayAway(l));case 5:m.n=7;break;case 6:this.presentationStyle=r,this.applyPresentationHostClasses();case 7:m.n=9;break;case 8:console.warn(`Unsupported forward transition: fullscreen → ${r}. Presenting as fullscreen.`);case 9:m.n=11;break;case 10:this.presentationStyle=r,this.applyPresentationHostClasses();case 11:return d=("compact_sheet"===a||"sheet"===a)&&"fullscreen"===r,h="fullscreen"===a&&("compact_sheet"===r||"sheet"===r),c=!("compact_sheet"!==a&&"sheet"!==a||"compact_sheet"!==r&&"sheet"!==r||a===r)||d||h,this.animation=c?{transition:"fade",direction:t.direction}:t,m.n=12,J(this.updatePages(e));case 12:null!==(n=this.flow)&&void 0!==n&&n.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,P.APPEAR);case 13:return m.a(2)}},null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return Zt.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?z(Rs||(Rs=Gs``)):this.isOverlaySheet?this.renderHalfSheet():this.isModal?this.renderModal(this.renderFlowContainer()):this.renderFlowContainer()}},{key:"renderFlowContainer",value:function(){return z(Fs||(Fs=Gs`
254
+ `)),Pt=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},At=globalThis,Dt=At.ShadowRoot&&(void 0===At.ShadyCSS||At.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xt=Symbol(),Ct=new WeakMap,It=function(){return ae(function e(t,i,n){if(Z(this,e),this._$cssResult$=!0,n!==xt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i},[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Dt&&void 0===e){var i=void 0!==t&&1===t.length;i&&(e=Ct.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ct.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])}(),Lt=(e,t)=>{if(Dt)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(var i,n=re(t);!(i=n()).done;){var a=i.value,r=document.createElement("style"),o=At.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=a.cssText,e.appendChild(r)}},_t=Dt?e=>e:e=>e instanceof CSSStyleSheet?(e=>{for(var t,i="",n=re(e.cssRules);!(t=n()).done;){i+=t.value.cssText}return(e=>new It("string"==typeof e?e:e+"",void 0,xt))(i)})(e):e,Rt=Object.is,Ft=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,Wt=Object.getOwnPropertyNames,$t=Object.getOwnPropertySymbols,Nt=Object.getPrototypeOf,jt=globalThis,Bt=jt.trustedTypes,zt=Bt?Bt.emptyScript:"",Ut=jt.reactiveElementPolyfillSupport,Ht=(e,t)=>e,Gt={toAttribute(e,t){switch(t){case Boolean:e=e?zt:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){var i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},Vt=(e,t)=>!Rt(e,t),Kt={attribute:!0,type:String,converter:Gt,reflect:!1,useDefault:!1,hasChanged:Vt};null!==(kt=Symbol.metadata)&&void 0!==kt||(Symbol.metadata=Symbol("metadata")),null!==(St=jt.litPropertyMetadata)&&void 0!==St||(jt.litPropertyMetadata=new WeakMap);var Xt=function(){function e(){var t;return Z(this,e),(t=Q(this,e))._$Ep=void 0,t.isUpdatePending=!1,t.hasUpdated=!1,t._$Em=null,t._$Ev(),t}return le(e,be(HTMLElement)),ae(e,[{key:"_$Ev",value:function(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}},{key:"addController",value:function(e){var t,i;(null!==(t=this._$EO)&&void 0!==t?t:this._$EO=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}},{key:"removeController",value:function(e){var t;null===(t=this._$EO)||void 0===t||t.delete(e)}},{key:"_$E_",value:function(){for(var e,t=new Map,i=re(this.constructor.elementProperties.keys());!(e=i()).done;){var n=e.value;this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n])}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return Lt(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e,t;null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$EO)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$EO)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}},{key:"attributeChangedCallback",value:function(e,t,i){this._$AK(e,i)}},{key:"_$ET",value:function(e,t){var i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(void 0!==n&&!0===i.reflect){var a,r=(void 0!==(null===(a=i.converter)||void 0===a?void 0:a.toAttribute)?i.converter:Gt).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}},{key:"_$AK",value:function(e,t){var i=this.constructor,n=i._$Eh.get(e);if(void 0!==n&&this._$Em!==n){var a,r,o,s=i.getPropertyOptions(n),u="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(a=s.converter)||void 0===a?void 0:a.fromAttribute)?s.converter:Gt;this._$Em=n;var l=u.fromAttribute(t,s.type);this[n]=null!==(r=null!=l?l:null===(o=this._$Ej)||void 0===o?void 0:o.get(n))&&void 0!==r?r:l,this._$Em=null}}},{key:"requestUpdate",value:function(e,t,i,n=!1,a){if(void 0!==e){var r,o,s=this.constructor;if(!1===n&&(a=this[e]),null!=i||(i=s.getPropertyOptions(e)),!((null!==(r=i.hasChanged)&&void 0!==r?r:Vt)(a,t)||i.useDefault&&i.reflect&&a===(null===(o=this._$Ej)||void 0===o?void 0:o.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(e,t,{useDefault:i,reflect:n,wrapped:a},r){var o,s,u;i&&!(null!==(o=this._$Ej)&&void 0!==o?o:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,null!==(s=null!=r?r:t)&&void 0!==s?s:this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(null!==(u=this._$Eq)&&void 0!==u?u:this._$Eq=new Set).add(e))}},{key:"_$EP",value:function(){var e,t;return me(function(i){for(;;)switch(i.p=i.n){case 0:return this.isUpdatePending=!0,i.p=1,i.n=2,J(this._$ES);case 2:i.n=4;break;case 3:i.p=3,t=i.v,Promise.reject(t);case 4:if(e=this.scheduleUpdate(),!(null!=e)){i.n=5;break}return i.n=5,J(e);case 5:return i.a(2,!this.isUpdatePending)}},null,this,[[1,3]],Promise)}},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var e;if(null!==(e=this.renderRoot)&&void 0!==e||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(var t,i=re(this._$Ep);!(t=i()).done;){var n=t.value,a=n[0],r=n[1];this[a]=r}this._$Ep=void 0}var o=this.constructor.elementProperties;if(o.size>0)for(var s,u=re(o);!(s=u()).done;){var l=s.value,d=l[0],h=l[1],c=h.wrapped,m=this[d];!0!==c||this._$AL.has(d)||void 0===m||this.C(d,void 0,h,m)}}var f=!1,v=this._$AL;try{var p;(f=this.shouldUpdate(v))?(this.willUpdate(v),null!==(p=this._$EO)&&void 0!==p&&p.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(v)):this._$EM()}catch(v){throw f=!1,this._$EM(),v}f&&this._$AE(v)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null!==(t=this._$EO)&&void 0!==t&&t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;this._$Ei(),(null!==(t=this.l)&&void 0!==t?t:this.l=[]).push(e)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}},{key:"createProperty",value:function(e,t=Kt){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){var i=Symbol(),n=this.getPropertyDescriptor(e,i,t);void 0!==n&&Ft(this.prototype,e,n)}}},{key:"getPropertyDescriptor",value:function(e,t,i){var n,a=null!==(n=Ot(this.prototype,e))&&void 0!==n?n:{get(){return this[t]},set(e){this[t]=e}},r=a.get,o=a.set;return{get:r,set(t){var n=null==r?void 0:r.call(this);null!=o&&o.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){var t;return null!==(t=this.elementProperties.get(e))&&void 0!==t?t:Kt}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Ht("elementProperties"))){var e=Nt(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Ht("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ht("properties")))for(var e=this.properties,t=0,i=[...Wt(e),...$t(e)];t<i.length;t++){var n=i[t];this.createProperty(n,e[n])}var a=this[Symbol.metadata];if(null!==a){var r=litPropertyMetadata.get(a);if(void 0!==r)for(var o,s=re(r);!(o=s()).done;){var u=o.value,l=u[0],d=u[1];this.elementProperties.set(l,d)}}this._$Eh=new Map;for(var h,c=re(this.elementProperties);!(h=c()).done;){var m=h.value,f=m[0],v=m[1],p=this._$Eu(f,v);void 0!==p&&this._$Eh.set(p,f)}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e))for(var i,n=re(new Set(e.flat(1/0).reverse()));!(i=n()).done;){var a=i.value;t.unshift(_t(a))}else void 0!==e&&t.push(_t(e));return t}},{key:"_$Eu",value:function(e,t){var i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}}])}();Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Xt[Ht("elementProperties")]=new Map,Xt[Ht("finalized")]=new Map,null!=Ut&&Ut({ReactiveElement:Xt}),(null!==(Et=jt.reactiveElementVersions)&&void 0!==Et?Et:jt.reactiveElementVersions=[]).push("2.1.2");var Yt={attribute:!0,type:String,converter:Gt,reflect:!1,hasChanged:Vt},qt=(e=Yt,t,i)=>{var n=i.kind,a=i.metadata,r=globalThis.litPropertyMetadata.get(a);if(void 0===r&&globalThis.litPropertyMetadata.set(a,r=new Map),"setter"===n&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),"accessor"===n){var o=i.name;return{set(i){var n=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,n,e,!0,i)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===n){var s=i.name;return function(i){var n=this[s];t.call(this,i),this.requestUpdate(s,n,e,!0,i)}}throw Error("Unsupported decorator location: "+n)};function Jt(e){return(t,i)=>"object"==typeof i?qt(e,t,i):((e,t,i)=>{var n=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),n?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function Qt(e){return Jt(oe({},e,{state:!0,attribute:!1}))}var Zt=function(){function e(t,i,n){var a;return Z(this,e),(a=Q(this,e,[t,i,n])).host=null,a.defineDynamicStateProps(),a}return le(e,i),ae(e,[{key:"hostConnected",value:function(){}},{key:"hostDisconnected",value:function(){this.subscribers.clear()}},{key:"onStateChanged",value:function(){this.defineDynamicStateProps(),this.host&&this.host.requestUpdate()}},{key:"defineDynamicStateProps",value:function(){Object.defineProperty(this.state,"tvQuality",{get:this.getTVQuality.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportWidth",{get:this.getViewportWidth.bind(this),enumerable:!1,configurable:!0}),Object.defineProperty(this.state,"viewportHeight",{get:this.getViewportHeight.bind(this),enumerable:!1,configurable:!0})}},{key:"getTVQuality",value:function(){var e,t;if("television"!==this.getFormFactor())return"";var i=window.devicePixelRatio||1,n=window.innerWidth||(null===(e=window.screen)||void 0===e?void 0:e.availWidth),a=window.innerHeight||(null===(t=window.screen)||void 0===t?void 0:t.availHeight);if(!n||!a)return"720p";var r=Math.max(n,a)*i,o=Math.min(n,a)*i;return r>=3840||o>=2160?"4K":r>=1920||o>=1080?"1080p":"720p"}},{key:"getViewportWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getViewportHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}],[{key:"create",value:function(t,i,n){var a=new e(t,i,n);return this.providers.push(a),a}},{key:"remove",value:function(e){this.providers=this.providers.filter(t=>t!==e)}},{key:"currentProvider",get:function(){return this.providers[0]}}])}();var ei=e=>{var t;return me(function(i){for(;;)if(0===i.n)return t=new Set(Array.from(document.fonts.values()).map(e=>e.family)),e.forEach(e=>{var i=ti(e);if(!t.has(i)){var n=new FontFace(i,`url(${e.file})`);document.fonts.add(n)}}),i.a(2,document.fonts.ready.then())},null,null,null,Promise)};function ti(e){return`${e.family}-${e.style}`.replace(/ /g,"")}function ii(e,t,i){var a,r,o,s,u,l,d,h;if("undefined"==typeof window||!e||!t)return n.debug("Swipe detection is not supported in this environment."),{destroy(){},updateOptions(){}};var c={minDistance:null!==(a=null==i?void 0:i.minDistance)&&void 0!==a?a:30,maxDuration:null!==(r=null==i?void 0:i.maxDuration)&&void 0!==r?r:600,lockAxis:null===(o=null==i?void 0:i.lockAxis)||void 0===o||o,preventScrollOnSwipe:null!==(s=null==i?void 0:i.preventScrollOnSwipe)&&void 0!==s&&s,pointerTypes:null!==(u=null==i?void 0:i.pointerTypes)&&void 0!==u?u:["touch"],passiveListeners:null===(l=null==i?void 0:i.passiveListeners)||void 0===l||l,axisHint:null!==(d=null==i?void 0:i.axisHint)&&void 0!==d?d:"y",edgeLeakThreshold:null!==(h=null==i?void 0:i.edgeLeakThreshold)&&void 0!==h?h:24},m=e.style.touchAction;c.preventScrollOnSwipe&&(e.style.touchAction="none");var f=null,v=0,p=0,g=0,y=0,b=0,w=null,k=null,S=!1,E=!1,T=!1,M=e=>{try{var t=window.getComputedStyle(e);if(!t)return!1;var i=t.overflowY;if("auto"!==i&&"scroll"!==i)return!1;var n=e;return n.scrollHeight>n.clientHeight}catch(e){return!1}},P=e=>c.pointerTypes.includes(e.pointerType),A=t=>{var i=t.composedPath?t.composedPath()[0]:t.target;if(P(t)&&null===f){f=t.pointerId,v=g=t.clientX,p=y=t.clientY,b=performance.now(),w=null,T=!1,S=!1,E=!1,(k="y"===c.axisHint?((e,t)=>{for(var i=e;i&&i!==t&&i instanceof HTMLElement;){var n,a;if(M(i))return i;i=i.parentElement||(null!==(n=null===(a=i.parentNode)||void 0===a?void 0:a.host)&&void 0!==n?n:null)}return null})(i,e):null)||(E=!0);try{var n;null==e||null===(n=e.setPointerCapture)||void 0===n||n.call(e,t.pointerId)}catch(e){try{var a;null==i||null===(a=i.setPointerCapture)||void 0===a||a.call(i,t.pointerId)}catch(e){}}}},D=e=>{if(e.pointerId===f&&P(e)){if(g=e.clientX,y=e.clientY,c.lockAxis&&!w){var i=Math.abs(g-v),n=Math.abs(y-p);(i>2||n>2)&&(w=n>=i?"y":"x")}if("y"===c.axisHint&&("y"===w||!c.lockAxis)){var a=y-p,r=a<0?"up":"down",o=Math.abs(a),s=performance.now()-b,u=o/Math.max(s,1),l=o>=c.minDistance||u>.5;if(k)if(l)E=!0;else if(((e,t)=>!!e&&("down"===t?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight-1))(k,r)){if(!(("down"===r&&k.scrollTop<=50||"up"===r&&k.scrollTop+k.clientHeight>=k.scrollHeight-50)&&u>.3))return void(S=!0);E=!0}else E=!0;var d=!k||o>=c.edgeLeakThreshold;if(!T&&!S&&E&&d&&o>=c.minDistance){T=!0;var h=performance.now(),m={direction:"up"===r?"up":"down",distanceX:g-v,distanceY:a,absX:Math.abs(g-v),absY:o,duration:h-b,velocity:o/Math.max(h-b,1),startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:h,originalEvent:e};t(m)}}}},x=e=>{if(e.pointerId===f)if(P(e))if(k)C();else if(T||S)C();else{var i,n=performance.now(),a=n-b,r=g-v,o=y-p,s=Math.abs(r),u=Math.abs(o),l="x"===(i=c.lockAxis&&w?w:"x"===c.axisHint?"x":"y"===c.axisHint?"y":s>=u?"x":"y")?s:u,d=a<=c.maxDuration,h=c.minDistance;if(k&&"y"===i&&E&&(h+=c.edgeLeakThreshold),d&&l>=h){var m;m="x"===i?r>0?"right":"left":o>0?"down":"up";var M=l/Math.max(a,1);t({direction:m,distanceX:r,distanceY:o,absX:s,absY:u,duration:a,velocity:M,startX:v,startY:p,endX:g,endY:y,startedAt:b,endedAt:n,originalEvent:e})}C()}else C()},C=()=>{f=null,w=null,b=0,k=null,E=!1,S=!1,T=!1},I=!!c.passiveListeners&&{passive:!0},L=c.passiveListeners?{passive:!0,capture:!0}:{capture:!0};e.addEventListener("pointerdown",A,L),e.addEventListener("pointermove",D,I),e.addEventListener("pointerup",x,I),e.addEventListener("pointercancel",x,I),e.addEventListener("lostpointercapture",x,I);return{destroy:()=>{e.removeEventListener("pointerdown",A,L),e.removeEventListener("pointermove",D,I),e.removeEventListener("pointerup",x,I),e.removeEventListener("pointercancel",x,I),e.removeEventListener("lostpointercapture",x,I),c.preventScrollOnSwipe&&(e.style.touchAction=m),C()},updateOptions:t=>{Object.assign(c,t),"boolean"==typeof t.preventScrollOnSwipe&&(t.preventScrollOnSwipe?e.style.touchAction="none":e.style.touchAction=m)}}}var ni={},ai=ni.NAMI_CLOSE_PAYWALL,ri=void 0===ai?"namiClosePaywall":ai,oi=ni.NAMI_RESTORE_PURCHASES,si=void 0===oi?"namiRestorePurchases":oi,ui=ni.NAMI_SIGN_IN,li=void 0===ui?"namiSignIn":ui,di=ni.NAMI_BUY_SKU,hi=void 0===di?"namiBuySKU":di,ci=ni.SET_STATE,mi=void 0===ci?"setState":ci,fi=ni.NAMI_SELECT_SKU,vi=void 0===fi?"namiSelectSKU":fi,pi=ni.NAMI_PURCHASE_SELECTED_SKU,gi=void 0===pi?"namiPurchaseSelectedSKU":pi,yi=ni.NAMI_DEEP_LINK,bi=void 0===yi?"namiDeeplink":yi,wi=ni.NAMI_NAVIGATE_TO_SCREEN,ki=void 0===wi?"namiNavigateToScreen":wi,Si=ni.NAMI_RELOAD_PRODUCTS,Ei=void 0===Si?"namiReloadProducts":Si,Ti=ni.NAMI_PLAY_VIDEO,Mi=void 0===Ti?"namiPlayVideo":Ti,Pi=ni.NAMI_PAUSE_VIDEO,Ai=void 0===Pi?"namiPauseVideo":Pi,Di=ni.NAMI_MUTE_VIDEO,xi=void 0===Di?"namiMuteVideo":Di,Ci=ni.NAMI_UNMUTE_VIDEO,Ii=void 0===Ci?"namiUnmuteVideo":Ci,Li=e=>"subscription"===e;function _i(e){if(Li(null==e?void 0:e.product_type)){var t=Fi(e);if(t.length>0)return t[0].billingPeriod}return null}function Ri(e){var t=function(e){if(!e)return[];var t=e.offers.filter(e=>"promo"===e.offer_type);return Oi(t,e.subscription_period)}(e).find(e=>0===e.priceAmountMicros);return(null==t?void 0:t.billingPeriod)||null}function Fi(e){return e?Oi(e.offers.filter(e=>"default"===e.offer_type),e.subscription_period):[]}function Oi(e,t){return e.map(e=>Wi(e,t))}function Wi(e,t){var i,n,a,r,o,s,u,l;if(!e)return{};var d=null!==(i=null===(n=e.promo_period)||void 0===n?void 0:n.count)&&void 0!==i?i:null==t?void 0:t.count,h=null!==(a=null===(r=e.promo_period)||void 0===r?void 0:r.type)&&void 0!==a?a:null==t?void 0:t.type,c=null!==(o=null===(s=e.promo_price)||void 0===s?void 0:s.price)&&void 0!==o?o:e.price,m=null!==(u=null===(l=e.promo_price)||void 0===l?void 0:l.currency)&&void 0!==u?u:e.currency;return{priceAmountMicros:1e6*c,priceCurrencyCode:m,billingPeriod:h?`P${d}${h[0].toUpperCase()}`:"",formattedPrice:ji(m).format(c)}}function $i(e,t=!1,i=!1,n=!1,r=!1){if(!e)return null;var o=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!o)return null;var s=o.slice(1).map(e=>parseInt(e)),u=s[0],l=s[1],d=s[2],h=s[3],c=(e,t,i,n,o)=>{var s=(e=>r?`${e}_abbrev`:e)(o),u=(e=>r?`${e}_abbrev_plural`:`${e}_plural`)(o),l=a(s),d=a(u);return r||l!==s||(l=a(`${o}_abbrev`)),r||d!==u||(d=a(`${o}_abbrev_plural`)),n?e.toString():i?1===e||t?l:d:1===e||t?`${e} ${l}`:`${e} ${d}`};switch(e.at(-1)){case"D":return c(h,t,i,n,"nami_day");case"W":return c(d,t,i,n,"nami_week");case"M":return c(l,t,i,n,"nami_month");case"Y":return c(u,t,i,n,"nami_year")}return null}function Ni(e){var t;if(!e||e.length<2)return!1;var i=null===(t=e.at(-1))||void 0===t?void 0:t.toUpperCase();return"M"===i||"Y"===i}function ji(e){var t={maximumFractionDigits:2,minimumFractionDigits:0};try{return new Intl.NumberFormat(navigator.language,oe({},t,{style:"currency",currency:e}))}catch(e){return new Intl.NumberFormat(navigator.language,oe({},t,{style:"currency",currency:"USD"}))}}var Bi=(e,t,i)=>e&&t&&i?i.format(e-t):null,zi=(e,t,i,n)=>{if(e&&t&&i&&n){var a=100*(1-e/(i/n*t));return`${Math.round(a)}%`}return null},Ui=(e,t)=>{if(""!=t){var i=parseInt(t)-1;return i>=0&&i<(null==e?void 0:e.length)?e[i]:null==e?void 0:e.find(e=>e.sku_ref_id===t)}},Hi=e=>Vi(e.priceAmountMicros)/Gi(e.billingPeriod),Gi=e=>{var t=parseInt(e[1]);return e.includes("Y")&&(t*=12),t},Vi=e=>e/1e6;function Ki(e){return parseFloat((Math.round(e)/100).toFixed(2))}var Xi=(e,t,i=[])=>({price:()=>qi(e),name:()=>null==e?void 0:e.name,title:()=>null==e?void 0:e.name,description:()=>null==e?void 0:e.description,duration:()=>Ji(e),durationSingular:()=>Ji(e,!0),period:()=>Ji(e,!1,!0),periodNumber:()=>Ji(e,!1,!1,!0),freeTrialDuration:()=>Qi(e),freeTrialDurationSingular:()=>Qi(e,!0),freeTrialPeriod:()=>Qi(e,!1,!0),freeTrialPeriodNumber:()=>Qi(e,!1,!1,!0),pricePerMonth:()=>Zi(e),pricePerMonthRounded:()=>Zi(e,!0),periodInMonths:()=>en(e),durationInMonths:()=>tn(e),durationInMonthsSingular:()=>tn(e,!0),periodNumberInMonths:()=>nn(e),percentagePriceDifferenceFromSku:()=>an(e,t,i),priceDifferenceFromSku:()=>rn(e,t,i),promoEligible:()=>null===on(e)&&null!==sn(e,t),freeTrialEligible:()=>null!==on(e),promo:()=>{var i;return null===(i=sn(e,t))||void 0===i?void 0:i.offer_ref_id},promoCode:()=>"XXXXX",promoPrice:()=>{var i;return null===(i=un(e,t))||void 0===i?void 0:i.formattedPrice},promoPeriod:()=>ln(e,t,!1,!0),promoPeriodNumber:()=>ln(e,t,!1,!1,!0),promoDuration:()=>ln(e,t),promoDurationSingular:()=>ln(e,t,!0),introEligible:()=>!1,pricePerDay:()=>fn(e),pricePerWeek:()=>vn(e),pricePerWeekRounded:()=>vn(e,!0),introductoryPrice:()=>cn(e,t),introductoryPeriod:()=>hn(e,t,!1,!0),introductoryPeriodNumber:()=>hn(e,t,!1,!1,!0),introductoryDuration:()=>hn(e,t),introductoryDurationSingular:()=>hn(e,t,!0),introductoryPricePerMonth:()=>mn(e,t),introductoryPricePerMonthRounded:()=>mn(e,t,!0),durationAbbrev:()=>Ji(e,!1,!1,!1,!0),freeTrialDurationAbbrev:()=>Qi(e,!1,!1,!1,!0),introductoryDurationAbbrev:()=>hn(e,t,!1,!1,!1,!0),promoDurationAbbrev:()=>ln(e,t,!1,!1,!1,!0),promoDurationPhase2Abbrev:()=>ln(e,t,!0,!0,!1,!0),durationInMonthsAbbrev:()=>tn(e,!1,!1,!1,!0),durationSingularAbbrev:()=>Ji(e,!0,!1,!1,!0),freeTrialDurationSingularAbbrev:()=>Qi(e,!0,!1,!1,!0),introductoryDurationSingularAbbrev:()=>hn(e,t,!0,!1,!1,!0),promoDurationSingularAbbrev:()=>ln(e,t,!0,!1,!1,!0),promoDurationSingularPhase2Abbrev:()=>ln(e,t,!0,!0,!1,!0),durationInMonthsSingularAbbrev:()=>tn(e,!0,!1,!1,!0),periodAbbrev:()=>Ji(e,!1,!0,!1,!0),freeTrialPeriodAbbrev:()=>Qi(e,!1,!0,!1,!0),introductoryPeriodAbbrev:()=>hn(e,t,!1,!0,!1,!0),promoPeriodAbbrev:()=>ln(e,t,!1,!0,!1,!0),promoPeriodPhase2Abbrev:()=>ln(e,t,!1,!0,!0,!0),periodInMonthsAbbrev:()=>tn(e,!1,!0,!1,!0),periodly:()=>function(e){if(!e)return null;var t=e.match(/P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/);if(!t)return null;var i=t[1],n=t[2],r=t[3],o=t[4],s=void 0!==i?parseInt(i,10):0,u=void 0!==n?parseInt(n,10):0,l=void 0!==r?parseInt(r,10):0;return(void 0!==o?parseInt(o,10):0)>0?null:l>0?1===l?a("nami_weekly"):2===l?a("nami_biweekly"):null:u>0?a(1===u?"nami_monthly":2===u?"nami_bimonthly":3===u?"nami_quarterly":6===u?"nami_biannually":12===u?"nami_yearly":"nami_monthly"):s>0?a("nami_yearly"):null}(_i(e)),iso_subscription_duration:()=>pn(e),invalid:()=>!1,unavailable:()=>!1}),Yi=(e,t,i,n=[])=>{if(!t)return null;var a=Xi(t,i,n);return a[e]?a[e]():null},qi=e=>{var t=Fi(e);return t&&t.length?t[0].formattedPrice:null},Ji=(e,t,i,n,a)=>$i(_i(e),t,i,n,a),Qi=(e,t,i,n,a)=>$i(Ri(e),t,i,n,a),Zi=(e,t)=>{var i=Fi(e);if(!i||0===i.length)return null;var n=Hi(i[0]);return n?ji(i[0].priceCurrencyCode).format(t?Math.round(n):n):null},en=(e,t)=>{var i=Fi(e);if(!i||0===i.length)return null;var n=i[0].billingPeriod;return Ni(n)?$i("P1Y"===n?"P12M":n,!1,!1,!1,t):null},tn=(e,t,i,n,a)=>{var r=Fi(e);if(!r||0===r.length)return null;var o=r[0].billingPeriod;return Ni(o)?$i("P1Y"===o?"P12M":o,t,i,n,a):null},nn=e=>{if(!e)return 0;var t=Fi(e);return t&&t.length?Gi(t[0].billingPeriod):0},an=(e,t,i=[])=>{var n,a=Fi(e);if(!a||0===a.length)return null;var r=null===(n=Ui(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return zi(Ki(a[0].priceAmountMicros),nn(e));var o=Fi(r);return zi(Ki(a[0].priceAmountMicros),nn(e),(null==o?void 0:o.length)>0?Ki(o[0].priceAmountMicros):0,nn(r))},rn=(e,t,i=[])=>{var n,a=Fi(e);if(!a||0===a.length)return null;var r=null===(n=Ui(i,null!=t?t:""))||void 0===n?void 0:n.product_details;if(!t||!r)return Bi(Hi(a[0]));var o=Fi(r);return Bi(Hi(a[0]),Hi(o[0]),ji(o[0].priceCurrencyCode))},on=e=>Ri(e),sn=(e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"promo"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null},un=(e,t)=>{if(!e)return null;var i=sn(e,t);return i?Wi(i,e.subscription_period):null},ln=(e,t,i,n,a,r)=>{var o=un(e,t);return $i((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},dn=(e,t)=>{if(!e)return null;var i=((e,t)=>{if(!e)return null;var i=e.offers.filter(e=>"intro"===e.offer_type);if(!t)return i[0]||null;var n=i[parseInt(t)];return n?n||null:i.find(e=>e.offer_ref_id===t)||null})(e,t);return i?Wi(i,e.subscription_period):null},hn=(e,t,i,n,a,r)=>{var o=dn(e,t);return $i((null==o?void 0:o.billingPeriod)||null,i,n,a,r)},cn=(e,t)=>{var i=dn(e,t);return i?i.formattedPrice:null},mn=(e,t,i)=>{var n=dn(e,t);if(!n)return null;var a=Hi(n);return a?ji(n.priceCurrencyCode).format(i?Math.round(a):a):null},fn=e=>{var t=Fi(e);if(!t||0===t.length)return null;var i,n,a=Vi(t[0].priceAmountMicros)/(i=t[0].billingPeriod,(n=Gi(i))?30.437*n:1);return ji(t[0].priceCurrencyCode).format(a)},vn=(e,t)=>{var i=Fi(e);if(!i||0===i.length)return null;var n,a,r=Vi(i[0].priceAmountMicros)/(n=i[0].billingPeriod,(a=Gi(n))?52*a/12:1);return ji(i[0].priceCurrencyCode).format(t?Math.round(r):r)},pn=e=>{var t=Fi(e)[0];return t?t.billingPeriod:null},gn="object"==typeof global&&global&&global.Object===Object&&global,yn="object"==typeof self&&self&&self.Object===Object&&self,bn=gn||yn||Function("return this")(),wn=bn.Symbol;var kn=Array.isArray,Sn=Object.prototype,En=Sn.hasOwnProperty,Tn=Sn.toString,Mn=wn?wn.toStringTag:void 0;var Pn=Object.prototype.toString;var An=wn?wn.toStringTag:void 0;function Dn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":An&&An in Object(e)?function(e){var t=En.call(e,Mn),i=e[Mn];try{e[Mn]=void 0;var n=!0}catch(e){}var a=Tn.call(e);return n&&(t?e[Mn]=i:delete e[Mn]),a}(e):function(e){return Pn.call(e)}(e)}function xn(e){return null!=e&&"object"==typeof e}var Cn=wn?wn.prototype:void 0,In=Cn?Cn.toString:void 0;function Ln(e){if("string"==typeof e)return e;if(kn(e))return function(e,t){for(var i=-1,n=null==e?0:e.length,a=Array(n);++i<n;)a[i]=t(e[i],i,e);return a}(e,Ln)+"";if(function(e){return"symbol"==typeof e||xn(e)&&"[object Symbol]"==Dn(e)}(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function _n(e){return null==e?"":Ln(e)}function Rn(e,t,i){var n=e.length;return i=void 0===i?n:i,!t&&i>=n?e:function(e,t,i){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(i=i>a?a:i)<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(a);++n<a;)r[n]=e[n+t];return r}(e,t,i)}var Fn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function On(e){return Fn.test(e)}var Wn="\\ud800-\\udfff",$n="["+Wn+"]",Nn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",jn="\\ud83c[\\udffb-\\udfff]",Bn="[^"+Wn+"]",zn="(?:\\ud83c[\\udde6-\\uddff]){2}",Un="[\\ud800-\\udbff][\\udc00-\\udfff]",Hn="(?:"+Nn+"|"+jn+")"+"?",Gn="[\\ufe0e\\ufe0f]?",Vn=Gn+Hn+("(?:\\u200d(?:"+[Bn,zn,Un].join("|")+")"+Gn+Hn+")*"),Kn="(?:"+[Bn+Nn+"?",Nn,zn,Un,$n].join("|")+")",Xn=RegExp(jn+"(?="+jn+")|"+Kn+Vn,"g");function Yn(e){return On(e)?function(e){return e.match(Xn)||[]}(e):function(e){return e.split("")}(e)}var qn,Jn=(qn="toUpperCase",function(e){var t=On(e=_n(e))?Yn(e):void 0,i=t?t[0]:e.charAt(0),n=t?Rn(t,1).join(""):e.slice(1);return i[qn]()+n});var Qn,Zn=(Qn={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(e){return null==Qn?void 0:Qn[e]}),ea=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ta=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var ia=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var na=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var aa="\\ud800-\\udfff",ra="\\u2700-\\u27bf",oa="a-z\\xdf-\\xf6\\xf8-\\xff",sa="A-Z\\xc0-\\xd6\\xd8-\\xde",ua="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",la="["+ua+"]",da="\\d+",ha="["+ra+"]",ca="["+oa+"]",ma="[^"+aa+ua+da+ra+oa+sa+"]",fa="(?:\\ud83c[\\udde6-\\uddff]){2}",va="[\\ud800-\\udbff][\\udc00-\\udfff]",pa="["+sa+"]",ga="(?:"+ca+"|"+ma+")",ya="(?:"+pa+"|"+ma+")",ba="(?:['’](?:d|ll|m|re|s|t|ve))?",wa="(?:['’](?:D|LL|M|RE|S|T|VE))?",ka="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Sa="[\\ufe0e\\ufe0f]?",Ea=Sa+ka+("(?:\\u200d(?:"+["[^"+aa+"]",fa,va].join("|")+")"+Sa+ka+")*"),Ta="(?:"+[ha,fa,va].join("|")+")"+Ea,Ma=RegExp([pa+"?"+ca+"+"+ba+"(?="+[la,pa,"$"].join("|")+")",ya+"+"+wa+"(?="+[la,pa+ga,"$"].join("|")+")",pa+"?"+ga+"+"+ba,pa+"+"+wa,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",da,Ta].join("|"),"g");function Pa(e,t,i){return e=_n(e),void 0===t?function(e){return na.test(e)}(e)?function(e){return e.match(Ma)||[]}(e):function(e){return e.match(ia)||[]}(e):e.match(t)||[]}var Aa=RegExp("['’]","g");var Da,xa=(Da=function(e,t,i){return t=t.toLowerCase(),e+(i?Jn(_n(t).toLowerCase()):t)},function(e){return function(e,t,i){for(var n=-1,a=null==e?0:e.length;++n<a;)i=t(i,e[n],n,e);return i}(Pa(function(e){return(e=_n(e))&&e.replace(ea,Zn).replace(ta,"")}(e).replace(Aa,"")),Da,"")});function Ca(e,t,i){var n,a,r=null!==(n=null===(a=t.find(e=>e.id===i))||void 0===a?void 0:a.products)&&void 0!==n?n:[];return r.forEach(t=>{t.product_details=Ra(e,t.sku_ref_id||""),t.variables=function(e,t,i){if(!t)return{};var n=function(e){if(!Array.isArray(e))return e;var t=e.filter(e=>e&&"object"==typeof e&&"entitlement_ref_id"in e).map(e=>e.entitlement_ref_id);return t.length?t:e}(t.entitlements),a=t.variables;if(!a)return oe({},t,{entitlements:n});Object.keys(a).forEach(t=>{if(Ia(a[t])){var n=_a(a[t],e,i);a[t]=function(e){if(!e||e.includes("null")||e.includes("undefined"))return"";if(/\$\{\s*(launch\.customAttributes\.|sku\.)\w+\s*}/.test(e))return"";return e}(n)}});var r={};return(()=>Object.keys(Xi({})))().forEach(t=>{if(void 0===a[t]){var n=Yi(t,e,void 0,i);null!==n&&(r[t]=n)}}),oe({},t,r,a,{entitlements:n})}(t.product_details,t,r)}),r}function Ia(e){return"string"==typeof e&&e.includes(r)}function La(e,t,i){return t?(Object.keys(t).forEach(n=>{Ia(t[n])&&(t[n]=t[xa(n)]=_a(t[n],e,i))}),oe({},t)):{}}var _a=(e,t,i)=>e.replace(o,(n,a)=>{var r,s,u,l,d=(null===(r=o.exec(e))||void 0===r?void 0:r.slice(1))||[];a=null!==(s=d[0])&&void 0!==s?s:a;var h=null!==(u=null===(l=d[1])||void 0===l?void 0:l.replace(":",""))&&void 0!==u?u:"";return Yi(a,t,h,i)});function Ra(e=[],t=""){return e.find(e=>e.product_ref_id===t)||null}var Fa,Oa=["conditionAttributes"];function Wa(e,t){return Array.isArray(e)?e.reduce((e,i)=>{var n=Wa(i,t);return Array.isArray(n)?[...e,...n]:[...e,n]},[]):null==e?e:"object"==typeof e?Object.entries(e).reduce((e,[i,n])=>{var a="newRow"===i?n:Wa(n,t);return oe({},e,{[i]:a})},{}):"string"==typeof e?Ka(e,t):e}function $a(e){for(var t,i=re(e);!(t=i()).done;){var n=t.value;if("button"===n.component)return n.focused=!0,!0;if(Array.isArray(n.components)&&$a(n.components))return!0}return!1}function Na(e,t,i,n={}){var a=i.productBaseComponents||i.components||[],r=i.productFeaturedComponents||a,o="television"===e.state.formFactor;return t.map(t=>{var i,s,u,l=t.featured?r:a,d=t.entitlements.map(e=>e.entitlement_ref_id),c=Ra(e.productDetails,t.sku_ref_id),m={freeTrialEligible:1==Yi("freeTrialEligible",c),introEligible:1==Yi("introEligible",c),promoEligible:1==Yi("promoEligible",c),invalid:Yi("invalid",c),unavailable:Yi("unavailable",c)},f=oe({},t,t.variables,m,{id:t.id,entitlements:d});s=t,u=e=>{for(var t,i=re(e);!(t=i()).done;){var n=t.value;n.sku=h(s),n.components&&u(n.components),n.collapseHeader&&n.collapseHeader.components&&u(n.collapseHeader.components)}},u(l);var v={sku:f,media:Va(n,{convertToUrl:!0})},p=Wa(l,Wa(v,v));return function(e,t){var i=e=>{for(var n,a=re(e);!(n=a()).done;){var r,o=n.value;o&&"object"==typeof o&&(Object.defineProperty(o,"__skuContext",{value:t,enumerable:!1,writable:!0,configurable:!0}),Array.isArray(o.components)&&i(o.components),Array.isArray(o.conditionAttributes)&&i(o.conditionAttributes),null!==(r=o.collapseHeader)&&void 0!==r&&r.components&&i(o.collapseHeader.components))}};i(e)}(p,f),o&&t.featured&&$a(p),[null!==(i=t.featured)&&void 0!==i&&i,p]},[])}function ja(e,t){var i;if(!t.loopSource)return[];var n=c(t.loopSource),a=(null!=n?n:[]).filter(i=>{var n;return!(null!==(n=t.loopSourceConditions)&&void 0!==n&&n.length)||t.loopSourceConditions.every(t=>Ga(e,t,i))}),r=t.groupBy,o=t.groupHeaderTemplate,s=e=>Wa(t.components,Wa({block:e},{block:e})),u=(null!==(i=t.slots)&&void 0!==i?i:[]).filter(t=>{var i;return!(null!==(i=t.conditions)&&void 0!==i&&i.length)||t.conditions.every(t=>Ga(e,t,null))}),l=e=>[null!=e.columnSpan?oe({},e.template,{__namiSlotColumnSpan:e.columnSpan}):e.template],d=u.filter(e=>"listStart"===e.position).map(l),h=u.filter(e=>"listEnd"===e.position).map(l);if(!r||!o){"number"==typeof t.max&&(a=a.slice(0,t.max));var m=a.map(s).filter(e=>null!=e);return[{key:"",header:null,items:[...d,...m,...h]}]}for(var f,v=[],p=new Map,g=re(a);!(f=g()).done;){var y=f.value,b=Wa(r,Wa({block:y},{block:y})),w=null==b?"":String(b);p.has(w)||(v.push(w),p.set(w,[])),p.get(w).push(y)}for(var k,S=t=>{var i,n=v.filter(i=>((t,i)=>{var n,a,r=null!==(n=null===(a=t.group)||void 0===a?void 0:a.itemConditions)&&void 0!==n?n:[];return r.length?i.some(t=>r.every(i=>Ga(e,i,t))):i.length>0})(t,p.get(i)));return"last"===(null===(i=t.group)||void 0===i?void 0:i.ordinal)?n[n.length-1]:n[0]},E=new Map,T=new Map,M=re(u);!(k=M()).done;){var P=k.value,A="groupStart"===P.position?E:"groupEnd"===P.position?T:null;if(A){var D=S(P);null!=D&&(A.has(D)||A.set(D,[]),A.get(D).push(l(P)))}}var x=v.map(e=>{var i,n,a={key:e},r=Wa(o,Wa({group:a},{group:a})),u=p.get(e);return"number"==typeof t.groupMax&&(u=u.slice(0,t.groupMax)),{key:e,header:[r],items:[...null!==(i=E.get(e))&&void 0!==i?i:[],...u.map(s),...null!==(n=T.get(e))&&void 0!==n?n:[]]}});return[...d.length?[{key:"",header:null,items:d}]:[],...x,...h.length?[{key:"",header:null,items:h}]:[]]}function Ba(e,t,i){var n=(t,n)=>Ga(e,t,n,i);return t.assertions?t.assertions.every(n):!!t.orAssertions&&(!t.orAssertions.length||t.orAssertions.some(n))}function za(e,t,i){var n=t.conditionAttributes,a=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(t,Oa);if(!n)return a;var r=null!=i?i:a.__skuContext;return n.reduce((t,i)=>{if(!Ba(e,i,r))return t;var n={};return Object.entries(i.attributes).forEach(([t,i])=>{n[t]=Ha(e,i,r)}),oe({},t,n)},a)}function Ua(){if(!Fa){var e=u(),t=e.browser_name,i=e.browser_version;Fa={browser:t,browserVersion:i}}return Fa}function Ha(e,t,i,n=null){var a,o=null!==(a=null==e?void 0:e.flow)&&void 0!==a?a:{},u=o.manager,l=o.previousStepAvailable,d=o.nextStepAvailable,h=e.state,c={};return n&&(c={block:n}),c=oe({},c,{state:h,urlParams:s(),flow:{isLaunched:!(null==u||!u.flowOpen),previousStepAvailable:!!l,nextStepAvailable:!!d},launch:h.launch,sku:i||h.sku,customer:h.customer,device:Ua()}),"string"==typeof t&&t.includes(r)&&(t=Ka(t,c)),t}function Ga(e,{value:t,expected:i,operator:n},a,r){if(t=Ha(e,t,r,a),i=Ha(e,i,r,a),"equals"===n)return t===i;if("notEquals"===n)return t!==i;if("contains"===n){var o;if(Array.isArray(t)||"string"==typeof t||t instanceof String||(t=t.toString()),"collapse"==i)i+="_"+(null===(o=e.getCurrentCollapsibleSku())||void 0===o?void 0:o.skuId);return t.includes(i)}if("notContains"===n)return Array.isArray(t)||"string"==typeof t||t instanceof String||(t=t.toString()),!t.includes(i);if("set"===n){var s=null!=t&&""!==t&&!t.toString().match(d);return"boolean"==typeof i?s===i:s}return"notSet"===n?null==t||""===t||!!t.toString().match(d):"gt"===n?t>i:"gte"===n?t>=i:"lt"===n?t<i:"lte"===n&&t<=i}function Va(e,{convertToUrl:t}={convertToUrl:!1}){return Object.entries(e).reduce((e,[i,{content:n}])=>(t&&"string"!=typeof n&&n&&(n=URL.createObjectURL(n)),oe({},e,{[i]:n})),{})}function Ka(e,t){var i=e;if("string"!=typeof e)return i;for(var n,a=new RegExp(l.source,l.flags),r=[];null!==(n=a.exec(e))&&(r.push(n),a.global);)n.index===a.lastIndex&&a.lastIndex++;for(var o=0,s=r;o<s.length;o++){var u=s[o],d=u[0],h=u[1],c=Ka(h,t);if(d===e)return m(d,c);c!==h&&(i=i.replace(h,c)),i=i.replace(l,m)}return i;function m(e,i){var n=String(i).split("."),a=n[0];if(!a)return e;var r=Xa(t,a);if(void 0===r)return e;if("object"==typeof r&&null!==r&&0===Object.keys(r).length)return"";var o=Xa(t,...n);return void 0===o?"":"string"!=typeof o?o:Ka(o,t)}}function Xa(e,...t){for(var i=e,n=0,a=t;n<a.length;n++){var r=a[n];if(null==i)return;i=Array.isArray(i)?i[+r]:i[r]}return i}var Ya=e=>{var t=e.state.timeSpentOnPaywall;if(t)return Date.now()-t},qa=e=>{if(!e)return null;if(e.includes("#"))return e;var t=e.match(/[\d.]+/g);if(!t||t.length<3)return null;var i=t.map(Number),n=i[0],a=i[1],r=i[2],o=i[3],s=e=>Math.round(e).toString(16).padStart(2,"0"),u=void 0!==o&&o<1?s(255*o):"";return`#${s(n)}${s(a)}${s(r)}${u}`},Ja=(e,t)=>{if(!e||!t)return!0;var i=null!=e&&e.includes("rgb")?qa(e):e,n=null!=t&&t.includes("rgb")?qa(t):t;return(null==i?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())};function Qa(e){var t,i,n,a,r,o,s,u,l,d,h,c,m;return{width:null!==(t=e.width)&&void 0!==t?t:20,railSpacing:null!==(i=e.railSpacing)&&void 0!==i?i:12,dotLineSpacing:null!==(n=e.dotLineSpacing)&&void 0!==n?n:10,lineTopOffset:null!==(a=e.lineTopOffset)&&void 0!==a?a:0,lineBottomOffset:null!==(r=e.lineBottomOffset)&&void 0!==r?r:0,lineWidth:null!==(o=e.lineWidth)&&void 0!==o?o:1,lineColor:null!==(s=e.lineColor)&&void 0!==s?s:"#C6CBD7",lineCornerRadius:null!==(u=e.lineCornerRadius)&&void 0!==u?u:0,dotSize:null!==(l=e.dotSize)&&void 0!==l?l:6,dotColor:null!==(d=e.dotColor)&&void 0!==d?d:"#C6CBD7",dotCornerRadius:null!==(h=e.dotCornerRadius)&&void 0!==h?h:3,dotBorderWidth:null!==(c=e.dotBorderWidth)&&void 0!==c?c:0,dotBorderColor:null!==(m=e.dotBorderColor)&&void 0!==m?m:"transparent",conditionAttributes:e.conditionAttributes}}function Za(e,t,i){for(var n,a=Qa(t),r={key:i},o=Wa(t,Wa({group:r},{group:r})),s={dotSize:a.dotSize,dotColor:a.dotColor,dotCornerRadius:a.dotCornerRadius,dotBorderWidth:a.dotBorderWidth,dotBorderColor:a.dotBorderColor},u=re(null!==(l=o.conditionAttributes)&&void 0!==l?l:[]);!(n=u()).done;){var l,d,h=n.value;if(Ba(e,h)){var c=null!==(d=h.attributes)&&void 0!==d?d:{};s={dotSize:"number"==typeof c.dotSize?c.dotSize:s.dotSize,dotColor:"string"==typeof c.dotColor?c.dotColor:s.dotColor,dotCornerRadius:"number"==typeof c.dotCornerRadius?c.dotCornerRadius:s.dotCornerRadius,dotBorderWidth:"number"==typeof c.dotBorderWidth?c.dotBorderWidth:s.dotBorderWidth,dotBorderColor:"string"==typeof c.dotBorderColor?c.dotBorderColor:s.dotBorderColor}}}return s.dotCornerRadius=Math.min(s.dotCornerRadius,s.dotSize/2),s}var er=!0,tr=!1,ir=!1,nr=!1,ar=!1,rr=!1,or=null,sr=null,ur=null,lr=null,dr=!1,hr="",cr=!1,mr=null,fr=null,vr=null,pr=null,gr=null,yr=null,br=null,wr=null,kr=!1,Sr=null,Er="",Tr=0,Mr=1,Pr=null,Ar=[],Dr=new WeakMap,xr=new WeakMap,Cr=1;function Ir(e){var t=xr.get(e);return t||(t=Cr++,xr.set(e,t)),String(t)}var Lr=null,_r=null,Rr=null,Fr=null;function Or(e){return!0===e||"true"===e||"1"===e||"yes"===e}function Wr(e,t){if(function(){if("undefined"==typeof window)return!1;try{var e,t;return!!Or(window.NAMI_TTS_DEBUG)||Or(null===(e=window.localStorage)||void 0===e?void 0:e.getItem("nami:tts:debug"))||Or(null===(t=window.localStorage)||void 0===t?void 0:t.getItem("NAMI_TTS_DEBUG"))}catch(e){return!1}}())try{t?console.debug(`[Nami TTS] ${e}`,t):console.debug(`[Nami TTS] ${e}`)}catch(e){}}function $r(e="TTS is unavailable in this runtime."){tr||(tr=!0,Wr(e))}function Nr(e){if(!e)return"none";var t=e.id?`#${e.id}`:"",i=e.getAttribute("data-testid"),n=i?`[data-testid="${i}"]`:"";return`${e.tagName.toLowerCase()}${t}${n}`}function jr(e){return function(e){return null==e?"":String(e).replace(/[^.!?\n]*\$\{[^}]*subscribeUrl[^}]*\}[^.!?\n]*[.!?]?/gi,"To subscribe, follow the on-screen instructions.").replace(/\$\{[^}]+\}/g," ").replace(/\s+([.,!?;:])/g,"$1").replace(/\s+/g," ").trim()}(e)}function Br(e){return e.toLowerCase().replace(/[^a-z0-9$]+/g," ").replace(/\s+/g," ").trim()}function zr(e){return jr(String(null!=e?e:"").replace(/<[^>]*>/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[*_`#>~]/g," "))}function Ur(e,t){var i=jr(t);i&&e[e.length-1]!==i&&e.push(i)}function Hr(e,t=[]){var i=[];return[...e,...t].forEach(e=>{var t=function(e){var t=jr(e);if(!t)return[];for(var i=[],n=0,a=0;a<t.length;a+=1){var r=t.charAt(a),o=t.charAt(a+1);if(("."===r||"!"===r||"?"===r)&&(!o||/\s/.test(o))){var s=jr(t.slice(n,a+1));for(s&&i.push(s);a+1<t.length&&/\s/.test(t.charAt(a+1));)a+=1;n=a+1}}var u=jr(t.slice(n));u&&i.push(u);return i.length?i:[t]}(e);t.length||Ur(i,e),t.forEach(e=>Ur(i,e))}),i.slice(0,60)}function Gr(e){return jr(e.join(". ").replace(/\.\s*([.!?])/g,"$1"))}function Vr(e){var t,i=Pr;i&&(e&&i.id===e||(i.status="cancelled",(null===(t=Pr)||void 0===t?void 0:t.id)===i.id&&(Pr=null)))}function Kr(){if("undefined"==typeof document)return null;for(var e=document.activeElement;e&&null!==(t=e.shadowRoot)&&void 0!==t&&t.activeElement;){var t,i,n;e=null!==(i=null===(n=e.shadowRoot)||void 0===n?void 0:n.activeElement)&&void 0!==i?i:e}return e}function Xr(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function Yr(e){for(var t=[],i=null!=e?e:null;i;){i instanceof Element&&-1===t.indexOf(i)&&t.push(i);var n=i.parentNode;i=Xr(n)?n.host:n}return t}function qr(e,t){return!!t&&-1!==Yr(t).indexOf(e)}function Jr(e,t){if(!t)return!1;if(t===e)return!0;if(e.contains(t))return!0;var i=e.shadowRoot;return!!i&&(i.activeElement===t||i.contains(t))}function Qr(e,t){t&&-1===e.indexOf(t)&&e.push(t)}function Zr(e,t){var i=t.shadowRoot;i&&i.querySelectorAll('button,[role="button"],a,input,select,textarea,[tabindex]:not([tabindex="-1"])').forEach(t=>Qr(e,t))}function eo(e,t){var i,n=("function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():null!==(i=null==t?void 0:t.composedPath)&&void 0!==i?i:[]).filter(e=>e instanceof Element);return n.length?n:Yr(e)}function to(e,t=[],i={}){var n=[];if(i.focusedElementOnly)return Qr(n,e),n;var a=(t.length?t:Yr(e)).filter(e=>e.isConnected),r=function(e,t){var i,n=t.find(e=>e.matches("nami-product-container"));if(n)return n;var a=Yr(e).find(e=>e.matches("nami-product-container"));if(a)return a;var r=lr&&"querySelectorAll"in lr?lr:"undefined"!=typeof document?document:null;return r&&null!==(i=Array.prototype.slice.call(r.querySelectorAll("nami-product-container")).find(t=>qr(t,e)))&&void 0!==i?i:null}(e,a);return Qr(n,e),Zr(n,e),a.forEach(t=>{var i=!!r&&(t===r||qr(r,t)),a=t!==e&&qr(t,e),o=t.matches('nami-product-container,nami-button,[role="button"],button,[tabindex]:not([tabindex="-1"])');(i||a||t===e)&&o&&(Qr(n,t),Zr(n,t))}),null!=r&&r.isConnected&&(Qr(n,r),Zr(n,r)),n}function io(e){return Dr.has(e)}function no(e,t,i=[]){var n=jr(t);if(!n)return!1;so(),ao(void 0,"new-composite",!0);var a=to(e,i,Eo()||So()?{focusedElementOnly:!1}:{focusedElementOnly:!0});return a.forEach(e=>function(e,t){var i=jr(t);return!!i&&(Dr.has(e)||Dr.set(e,{"aria-label":e.getAttribute("aria-label")}),e.setAttribute("aria-label",i),!0)}(e,n)),Ar=a,!0}function ao(e,t="manual",i=!1){var n=e&&-1===Ar.indexOf(e)?to(e):Ar;n.length&&(!i&&Pr&&n.some(e=>Dr.has(e))?Wr("composite restore skipped: transaction still active",{reason:t}):(so(),n.forEach(e=>{var t=Dr.get(e);t&&(!function(e,t,i){null===i?e.removeAttribute(t):e.setAttribute(t,i)}(e,"aria-label",t["aria-label"]),Dr.delete(e))}),e&&-1===Ar.indexOf(e)||(Ar=[])))}function ro(e,t){Dr.has(e)&&(t instanceof Element&&Jr(e,t)||(so(),vr=setTimeout(()=>{(vr=null,e.isConnected)?Jr(e,Kr())||ao(e,"blur"):ao(e,"blur-disconnected",!0)},50)))}function oo(e){Ar.length&&ao(void 0,e,!0)}function so(){vr&&(clearTimeout(vr),vr=null)}function uo(){pr&&(clearTimeout(pr),pr=null),Lr=null}function lo(){gr&&(clearTimeout(gr),gr=null)}function ho(){yr&&(clearTimeout(yr),yr=null)}function co(){br&&(clearTimeout(br),br=null)}function mo(){wr&&(clearTimeout(wr),wr=null)}function fo(e){kr=!0,mo(),wr=setTimeout(()=>{wr=null,kr=!1},po(e)+500)}function vo(){mo(),kr=!1}function po(e){var t=jr(e),i=350*(t?t.split(/\s+/).filter(Boolean).length:0);return Math.min(3e4,Math.max(4e3,i))}function go(){return"undefined"==typeof window?null:window}function yo(){var e,t=null===(e=go())||void 0===e||null===(e=e.webOS)||void 0===e||null===(e=e.service)||void 0===e?void 0:e.request;return"function"==typeof t?t:null}function bo(){return!!yo()}function wo(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.VIZIO)||void 0===e?void 0:e.Chromevox;return t&&"function"==typeof t.play?t:null}function ko(){return"undefined"!=typeof window&&void 0!==window.speechSynthesis&&"function"==typeof window.speechSynthesis.speak&&"function"==typeof window.SpeechSynthesisUtterance}function So(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!(!t.VIZIO&&-1===i.indexOf("vizio"))}function Eo(){var e,t;if("undefined"==typeof window)return!1;if(So())return!1;var i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"",n=go();return!!(null!=n&&n.webOS||null!=n&&n.webOSDev||null!=n&&n.PalmSystem||null!=n&&null!==(t=n.webOS)&&void 0!==t&&null!==(t=t.platform)&&void 0!==t&&t.tv||-1!==i.indexOf("webos")||-1!==i.indexOf("netcast"))}function To(){var e;if("undefined"==typeof window)return!1;var t=window,i=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.toLowerCase())||"";return!!(t.tizen||-1!==i.indexOf("tizen")||-1!==i.indexOf("samsung")&&(-1!==i.indexOf("smart-tv")||-1!==i.indexOf("smarttv"))||-1!==i.indexOf("samsungbrowser")&&-1!==i.indexOf("tv"))}function Mo(e){return"string"==typeof e&&-1!==e.toLowerCase().indexOf("xbox")}function Po(){var e,t,i;if("undefined"==typeof window)return!1;if(!0===Rr)return!0;var n=window.navigator;return[n.userAgent,n.platform,n.vendor,null===(e=n.userAgentData)||void 0===e?void 0:e.platform,...(null!==(t=null===(i=n.userAgentData)||void 0===i?void 0:i.brands)&&void 0!==t?t:[]).map(e=>e.brand)].some(Mo)}function Ao(){if("undefined"==typeof window)return!1;try{return"television"===m()}catch(e){return!1}}function Do(){if(ar)return!1;var e=wo();if(!e)return!1;try{return"function"!=typeof e.isEnabled||e.isEnabled()}catch(e){return!1}}function xo(){return{televisionRuntime:Ao(),televisionTtsRuntime:Co(),webos:Eo(),tizen:To(),vizio:So(),xbox:Po(),xboxClientHintsResult:Rr,hasWebOsServiceRequest:bo(),webOsRequestType:typeof yo(),hasWebSpeechApi:ko(),webSpeechUnavailableForSession:ir,webOsLunaUnavailableForSession:nr,vizioChromevoxUnavailableForSession:ar}}function Co(){return Ao()||Eo()||So()||To()}function Io(){return Co()&&!ir&&ko()}function Lo(e){if(rr=e,Wr("set media playing",{playing:e,hasDeferredUtterance:!!or}),!e&&or){var t,i=or;if(or=null,i.options.transactionId&&(null===(t=Pr)||void 0===t?void 0:t.id)!==i.options.transactionId)return void Wr("drop stale deferred speech",{transactionId:i.options.transactionId,reason:i.options.reason});qo(i.text,i.options)}}function _o(e){ir=!0,$r(Eo()?"Web Speech TTS unavailable in this webOS runtime":"Web Speech TTS unavailable in this runtime"),Wr("web speech unavailable",{error:e})}function Ro(e){nr=!0,Wr("webOS Luna unavailable",{error:e})}function Fo(e,t){or={text:e,options:t}}var Oo={name:"webos-luna-tts",platform:"webos",isAvailable:function(){return Co()&&!So()&&!nr&&bo()},speak:function(e,t){Wr("speakViaWebOsLuna:enter",{textPreview:e.slice(0,160),reason:t.reason,transactionId:t.transactionId,requestType:typeof yo()});var i=yo();if(!i)return Wr("speakViaWebOsLuna:no-request"),!1;var n="composite"===t.reason,a=!1,r=()=>{var r,o;if(yr=null,t.transactionId&&(null===(r=Pr)||void 0===r?void 0:r.id)!==t.transactionId)return Wr("speakViaWebOsLuna:drop-stale-delayed-speak",{transactionId:t.transactionId,activeTransaction:null===(o=Pr)||void 0===o?void 0:o.id,reason:t.reason}),!1;if(rr)return Wr("speakViaWebOsLuna:defer-delayed-speak-media-playing",{transactionId:t.transactionId,reason:t.reason}),Fo(e,t),!0;var s=!1;try{Wr("speakViaWebOsLuna:request",{uri:"luna://com.webos.service.tts",method:"speak",delayedComposite:n,textPreview:e.slice(0,160)}),i("luna://com.webos.service.tts",{method:"speak",parameters:{text:e,clear:!0,feedback:!0},onSuccess:e=>{var i;if(Wr("speakViaWebOsLuna:onSuccess",{response:e,transactionId:t.transactionId}),!t.transactionId||(null===(i=Pr)||void 0===i?void 0:i.id)===t.transactionId){var n,r=function(e){var t,i=jr(null!==(t=null==e?void 0:e.msgStatus)&&void 0!==t?t:null==e?void 0:e.status).toLowerCase();return"done"===i||"stopped"===i||"canceled"===i||"cancelled"===i||"error"===i}(e),o=!(null==e||!e.returnValue||"msgStatus"in Object(null!=e?e:{}));if(!a&&(r||o))a=!0,t.transactionId&&(null===(n=Pr)||void 0===n?void 0:n.id)===t.transactionId&&(Pr.status="ended",Pr=null)}},onFailure:e=>{var i;s=!0,Wr("speakViaWebOsLuna:onFailure",{error:e,transactionId:t.transactionId});var n=!t.transactionId||(null===(i=Pr)||void 0===i?void 0:i.id)===t.transactionId;t.transactionId&&n&&Pr&&(Pr.status="cancelled",Pr=null),Ro(e)}})}catch(e){var u;return t.transactionId&&(null===(u=Pr)||void 0===u?void 0:u.id)===t.transactionId&&(Pr.status="cancelled",Pr=null),Ro(e),!1}return!s};if(n)return ho(),Wr("speakViaWebOsLuna:delay-composite-until-focus-settles",{delayMs:250,transactionId:t.transactionId}),yr=setTimeout(r,250),!0;return r()},stop:No},Wo={name:"web-speech",platform:"web",isAvailable:Io,speak:function(e,t){if(!Io())return!1;try{var i=new window.SpeechSynthesisUtterance(e);return i.onstart=()=>{var e;t.transactionId&&(null===(e=Pr)||void 0===e?void 0:e.id)===t.transactionId&&(Pr.status="started")},i.onend=()=>{var e=Pr,i=!t.transactionId||(null==e?void 0:e.id)===t.transactionId;t.transactionId&&i&&e&&(e.status="ended",Pr=null)},i.onerror=e=>{var i,n=e.error;t.transactionId&&(null===(i=Pr)||void 0===i?void 0:i.id)===t.transactionId&&(Pr.status="cancelled",Pr=null),"synthesis-failed"===n&&_o(n)},window.speechSynthesis.speak(i),!0}catch(e){return _o("exception"),!1}},stop:()=>{if(ko())try{window.speechSynthesis.cancel()}catch(e){}}},$o={name:"vizio-chromevox",platform:"vizio",isAvailable:Do,speak:Bo,stop:jo};function No(){var e=yo();if(e)try{e("luna://com.webos.service.tts",{method:"stop",parameters:{},onFailure:e=>Wr("webOS Luna stop failed",{error:e})})}catch(e){Wr("webOS Luna stop threw",{error:e})}}function jo(e=!0){var t=!!gr,i=kr;lo();var n=wo(),a=function(){var e;if("undefined"==typeof window)return null;var t=null===(e=window.chrome)||void 0===e||null===(e=e.tts)||void 0===e?void 0:e.stop;return"function"==typeof t?t:null}();if((n||a)&&(i||t||a)&&(i||!t||a))try{var r=!1;n&&"function"==typeof n.stop&&(n.stop(),r=!0),n&&"function"==typeof n.cancel&&n.cancel(),n&&"function"==typeof n.pause&&n.pause(),a&&(a(),r=!0),n&&e&&!r&&i&&n.play(""),vo()}catch(e){vo(),Wr("VIZIO stop threw",{error:e})}}function Bo(e,t){var i=wo();if(!i)return!1;try{var n,a,r=!0===(null===(n=t.element)||void 0===n?void 0:n.isConnected),o="composite"===t.reason?1400:"focus"===t.reason?700:0;return o>0?(lo(),gr=setTimeout(()=>{var n;if(gr=null,!t.transactionId||!Pr||Pr.id===t.transactionId)if(t.element&&r&&!t.element.isConnected){var a;t.transactionId&&(null===(a=Pr)||void 0===a?void 0:a.id)===t.transactionId&&(Pr.status="cancelled",Pr=null)}else{if(rr)return uo(),_r=null,void Fo(e,t);i.play(e),fo(e),t.transactionId&&(null===(n=Pr)||void 0===n?void 0:n.id)===t.transactionId&&(Pr.status="ended",Pr=null)}},o),!0):(i.play(e),fo(e),t.transactionId&&(null===(a=Pr)||void 0===a?void 0:a.id)===t.transactionId&&(Pr.status="ended",Pr=null),!0)}catch(e){return function(e){ar=!0,Wr("VIZIO Chromevox unavailable",{error:e})}(e),!1}}function zo(e){return"high"===e?3:"normal"===e?2:1}function Uo(){return Date.now()-Tr<1500}function Ho(e){return Br(e)}function Go(e){if(!e)return"";var t=function(e){return e?[e.tagName.toLowerCase(),e.id||"",e.getAttribute("data-component-id")||"",e.getAttribute("data-nami-id")||"",e.getAttribute("data-testid")||"",`el-${Ir(e)}`].filter(Boolean).join("|"):""}(e);return Br(t||is(e))}function Vo(e){var t=Ho(e);return"clickable"===t||"button"===t||"focusable"===t||"selected"===t||"unselected"===t}function Ko(e,t,i){var n;if(_r={textKey:Ho(e),reason:t.reason,timestamp:Date.now()},"high"===i){var a=po(e),r=Date.now();Lr={transactionId:t.transactionId,pageKey:hr,element:null!==(n=t.element)&&void 0!==n?n:null,elementKey:Go(t.element),textKey:Ho(e),startedAt:r,suppressUntil:r+a},pr&&clearTimeout(pr),pr=setTimeout(()=>{pr=null,Lr=null},a)}}function Xo(e,t=!0){var i,n,a,r=!(!e||(null===(i=Pr)||void 0===i?void 0:i.id)!==e||"pending"!==Pr.status);if(Wr("stopSpeech",{preserveTransactionId:e,allowVizioEmptyFallback:t,activeTransaction:null===(n=Pr)||void 0===n?void 0:n.id,reason:null===(a=Pr)||void 0===a?void 0:a.reason,preservingCurrentTransaction:r}),or=null,r||(co(),ho()),e||(uo(),so(),oo("stop")),Vr(e),fr&&(clearTimeout(fr),fr=null),!r){if(ko())try{window.speechSynthesis.cancel()}catch(e){}Eo()&&No(),So()&&jo(t)}}function Yo(){Xo()}function qo(e,t={}){var i,n,a;Wr("speakText:enter",{textPreview:jr(e).slice(0,160),reason:t.reason,transactionId:t.transactionId,element:Nr(t.element),runtime:xo()});var r=jr(e);if(!r)return!1;if(!Co())return Wr("skip speech: non-CTV runtime"),!1;var o={interrupt:!1!==t.interrupt,reason:null!==(i=t.reason)&&void 0!==i?i:"manual",transactionId:t.transactionId,element:t.element,focusPath:t.focusPath,priority:t.priority},s=function(e,t){return t.priority?t.priority:"composite"===t.reason?"high":Vo(e)?"low":"normal"}(r,o);if(function(e,t,i){var n=Ho(e),a=Date.now(),r=Go(t.element);if(Vo(e))return!0;if(_r&&_r.reason===t.reason&&_r.textKey===n&&a-_r.timestamp<600)return Wr("suppress:duplicate-request",{reason:t.reason,textPreview:e.slice(0,120)}),!0;if(!Lr)return!1;if(zo(i)>=zo("high"))return!1;if("focus"===t.reason){var o=Lr.textKey;if(!Uo()&&(n===o||n.includes(o)))return Wr("suppress:focus-text-is-active-composite",{textPreview:e.slice(0,120),transactionId:Lr.transactionId,element:Nr(t.element)}),!0}var s=function(e,t){return!!e&&!!t&&e===t}(t.element,Lr.element),u=!!r&&Lr.elementKey===r,l=!Lr.pageKey||Lr.pageKey===hr,d=Uo(),h=l&&!d&&a<Lr.startedAt+2500;return!(!s&&!u&&(l&&"focus"===t.reason&&t.element&&Lr.element!==t.element||"low"!==i&&!h)&&(uo(),1))}(r,o,s))return!1;if(o.interrupt&&Xo(o.transactionId,!1),rr)return Fo(r,o),!0;var u=function(e){var t;return"manual"!==(null!==(t=e.reason)&&void 0!==t?t:"manual")&&e.element?Eo()||So()?"programmatic":"accessibility-label":"programmatic"}(o);Wr("speakText:owner",{owner:u,reason:o.reason,element:Nr(o.element)});var l,d,h="programmatic"===u?function(){if(!Co())return null;var e=So(),t=Eo();return $o.isAvailable()?(Wr("resolveTtsEngine:selected",{engine:"vizio-chromevox"}),$o):e?null:Oo.isAvailable()?(Wr("resolveTtsEngine:selected",{engine:"webos-luna-tts"}),Oo):Wo.isAvailable()?(Wr("resolveTtsEngine:selected",{engine:"web-speech"}),Wo):(Wr("tts engine unavailable",{webos:t,vizio:e}),null)}():null;(Wr("speakText:engine",{engine:null!==(n=null==h?void 0:h.name)&&void 0!==n?n:null,owner:u}),"composite"===o.reason&&o.transactionId&&o.element&&function(e){return"accessibility-label"===e||Eo()}(u))&&no(o.element,r,null!==(l=o.focusPath)&&void 0!==l?l:[]);if("accessibility-label"===u)return"focus"===o.reason&&o.element&&o.element.setAttribute("aria-label",r),o.transactionId&&(null===(d=Pr)||void 0===d?void 0:d.id)===o.transactionId&&(Pr.status="started"),Ko(r,o,s),!0;if(!h)return function(e,t){if(!So()||ar)return!1;var i=Date.now(),n=()=>{var a;br=null,t.transactionId&&Pr&&Pr.id!==t.transactionId||(Do()?Bo(e,t):Date.now()-i>=8e3?t.transactionId&&(null===(a=Pr)||void 0===a?void 0:a.id)===t.transactionId&&(Pr.status="cancelled",Pr=null):br=setTimeout(n,250))};return co(),br=setTimeout(n,250),!0}(r,o)?(Ko(r,o,s),!0):($r(),!1);var c="focus"===o.reason&&o.element?es(o.element,r):r,m=h.speak(c,o);if(Wr("speakText:engine-result",{engine:h.name,accepted:m,reason:o.reason,transactionId:o.transactionId}),m)return Ko(r,o,s),m;if(!o.element)return m;var f=no(o.element,r,null!==(a=o.focusPath)&&void 0!==a?a:[]);return Wr("speakText:aria-label-fallback",{engine:h.name,accepted:f,reason:o.reason}),f&&Ko(r,o,s),f}function Jo(e){var t=e.component;return e.hasAttribute("data-nami-primary-cta")||!0===(null==t?void 0:t.focused)||"productButton"===(null==t?void 0:t.namiComponentType)}function Qo(e){var t,i=null===(t=e.getAttribute("role"))||void 0===t?void 0:t.toLowerCase();return"button"===e.tagName.toLowerCase()||"button"===i||e.matches("nami-button,nami-play-pause-button,nami-volume-button,nami-toggle-button")}function Zo(e){return jr(e).replace(/(?:,\s*)?\bbutton\b\s*$/i,"").trim()||jr(e)}function es(e,t){var i=jr(t);return i&&(So()||Eo())&&Qo(e)?/\bbutton\b\s*$/i.test(i)?i:jr(`${i} button`):i}function ts(e){return jr(e.innerText||e.textContent||"")}function is(e){if(!e)return"";if(io(e)){var t=function(e){var t=Dr.get(e);return t?jr(t["aria-label"]||e.getAttribute("title")||""):""}(e);if(t)return t;var i=ns(e.component);if(i)return i}var n=e.getAttribute("data-tts-spoken-label");if(n)return jr(n);var a=ns(e.component);if(a)return a;var r=e.getAttribute("aria-label")||e.getAttribute("title");return r?jr(r):ts(e)}function ns(e){var t=rs(e,ur);if(!t)return"";var i=t,n=jr(as(i.speechLabel)||as(i.speech_label)||as(i.screenreaderText)||as(i.title)||as(i.alt)||as(i.text)||(Array.isArray(i.texts)?i.texts.map(e=>as(e)).join(", "):""));if(n)return n;for(var a,r=re(ss(i));!(a=r()).done;){var o=ns(a.value);if(o)return o}return""}function as(e,t=ur){return t?Ha(t,e):e}function rs(e,t){if(!e||e.hidden)return null;var i=e;if("condition"===i.component)return t&&Ba(t,i)?e:null;if(i.conditionAttributes&&t){var n=za(t,i);return n.hidden?null:n}return e}function os(e,t){if(Wr("applySpeechAttributes:enter",{element:Nr(e),label:t,activeComposite:io(e)}),!io(e)){var i=jr(t),n=function(e,t){var i=jr(t);return i?Qo(e)?Zo(i):i:""}(e,t);if(!n)return e.removeAttribute("data-tts-spoken-label"),void e.removeAttribute("aria-label");i?e.setAttribute("data-tts-spoken-label",i):e.removeAttribute("data-tts-spoken-label"),e.setAttribute("aria-label",function(e,t){return Qo(e)?Zo(t):jr(t)}(e,n))}}function ss(e){for(var t=[],i=0,n=["components","playingComponents","pausedComponents","mutedComponents","volumeComponents","productBaseComponents","productFeaturedComponents"];i<n.length;i++){var a=null==e?void 0:e[n[i]];Array.isArray(a)&&t.push(...a)}return null!=e&&e.collapseHeader&&(Array.isArray(e.collapseHeader)?t.push(...e.collapseHeader):t.push(e.collapseHeader)),t}function us(e,t,i){var n=rs(e,ur);if(n&&!function(e){var t=rs(e,ur);if(!t)return!1;var i=t,n=String(i.component||i.namiComponentType||"").toLowerCase();return-1!==n.indexOf("button")||-1!==n.indexOf("toggle")||-1!==n.indexOf("checkbox")||-1!==n.indexOf("radio")||-1!==n.indexOf("select")||-1!==n.indexOf("input")||!!i.onTap||!!i.sku||!0===i.focused}(n)){var a=function(e){var t=rs(e,ur);if(!t)return"";var i=t;switch(t.component){case"text":case"countdownTimerText":return zr(as(i.screenreaderText)||as(i.text));case"text-list":return Array.isArray(i.texts)?zr(i.texts.map(e=>as(e)).join(", ")):"";case"videoUrl":case"progressBar":return jr(as(i.screenreaderText));default:return""}}(n);Ur(t,a),ss(n).forEach(e=>us(e,t))}}function ls(e,t){var i=[];if(!e)return i;var n=e;return[n.header,n.contentContainer,n.footer,n.backgroundContainer,n.components].forEach(e=>{Array.isArray(e)?e.forEach(e=>us(e,i)):us(e,i)}),i}function ds(e,t){var i=ls(e),n=function(e){if(!e)return"";var t=ns(e.component),i=e.getAttribute("aria-label")||e.getAttribute("title")||ts(e),n=jr(t||i);return n?es(e,n):""}(t);return Gr(Hr(i,n?[n]:[]))}function hs(e){return e?Br(`${jr(e.id||e.name||"")}|${Gr(Hr(ls(e),[]))}`):""}function cs(){return cr}function ms(e,t=null){!function(){if(null===Rr&&null===Fr){var e=navigator.userAgentData;"function"==typeof(null==e?void 0:e.getHighEntropyValues)?Fr=e.getHighEntropyValues(["platform","model"]).then(e=>{var t,i,n=(null!==(t=e.platform)&&void 0!==t?t:"").toLowerCase(),a=(null!==(i=e.model)&&void 0!==i?i:"").toLowerCase();Rr=n.includes("xbox")||a.includes("xbox"),Wr("xbox client hints resolved",{platform:n,model:a,result:Rr})}).catch(()=>{Rr=!1}).finally(()=>{Fr=null}):Rr=!1}}(),Wr("setActivePage:enter",{nextKey:hs(e),previousKey:hr,activePageAnnounced:dr,pageName:jr((null==e?void 0:e.name)||(null==e?void 0:e.id)||"")});var i=hr;sr=e,ur=t,function(e){var t=hs(e);if(t!==hr){var i=!hr&&!!Sr;dr=!1,hr=t,cr=i,Sr=null,Er=""}}(e),i!==hr&&Xo(void 0,!1)}function fs(e,t){if(Wr("prepareInitialComposite:enter",{element:Nr(e),activePageKey:hr,activePageAnnounced:dr,blockedByNavigation:cs(),label:is(e),isPrimary:Jo(e)}),!sr||dr||!Jo(e)||cs())return Wr("prepareInitialComposite:skip",{hasActivePage:!!sr,activePageAnnounced:dr,isPrimary:Jo(e),blockedByNavigation:cs()}),!1;var i=ds(sr,e);if(!i)return!1;var n=eo(e,t),a=function(e,t,i){var n={id:Mr++,reason:e,element:i,text:t,page:sr,status:"pending"};return Pr=n,n}("composite",i,e);dr=!0,Sr=e,Er=Go(e);var r,o=qo(i,{reason:"composite",interrupt:!0,transactionId:a.id,element:e,focusPath:n,priority:"high"});o||(dr=!1,(null===(r=Pr)||void 0===r?void 0:r.id)===a.id&&(Pr.status="cancelled",Pr=null));return o}function vs(e,t){Wr("preparePrimaryCtaCompositeFocus:enter",{element:Nr(e),label:is(e),activePageKey:hr,activePageAnnounced:dr});var i=fs(e,t);return Wr("preparePrimaryCtaCompositeFocus:result",{result:i,activePageKey:hr,activePageAnnounced:dr}),i}function ps(e){Wr("handleNativeFocusIn:enter",{target:e.target instanceof Element?Nr(e.target):String(e.target),activePageKey:hr,activePageAnnounced:dr});var t=function(e){for(var t,i=null,n=re("function"==typeof e.composedPath?e.composedPath():[]);!(t=n()).done;){var a=t.value;if(a instanceof Element&&is(a)){if(a.tagName.toLowerCase().startsWith("nami-"))return a;i||(i=a)}}return null!=i?i:e.target instanceof Element?e.target:null}(e);t&&gs(t,e)}function gs(e,t){if(Wr("handleFocusedElementForSpeech:enter",{element:Nr(e),label:is(e),ttsEnabled:er,runtime:xo(),activePageKey:hr,activePageAnnounced:dr,lastFocused:Nr(Sr),lastFocusedElementIdentity:Er}),!e)return Wr("handleFocusedElementForSpeech:skip-basic",{hasElement:!!e,ttsEnabled:er}),!1;if(!Co())return!1;var i=Go(e);if(Lr&&Lr.pageKey===hr&&Date.now()<Lr.startedAt+2500){var n=Lr.element===e,a=!!i&&Lr.elementKey===i;if(!Uo()&&(n||a))return Wr("handleFocusedElementForSpeech:skip-during-initial-composite-lock",{element:Nr(e),sameCompositeElement:n,sameCompositeElementKey:a}),!1;var r=is(e),o=r?Ho(r):"";if(!Uo()&&o&&Lr.textKey.includes(o))return Wr("handleFocusedElementForSpeech:skip-composite-contained-label-during-initial-lock",{element:Nr(e),labelPreview:r.slice(0,120),transactionId:Lr.transactionId}),Sr=e,Er=i,!1}if(Sr===e||i&&i===Er&&!dr)return Wr("handleFocusedElementForSpeech:skip-same-element",{element:Nr(e),activePageAnnounced:dr,elementIdentity:i,lastFocusedElementIdentity:Er}),!1;if(!dr&&sr&&Jo(e)&&!Sr&&!cs())return fs(e,t);var s=is(e);if(!s)return!1;if(Lr){var u=Ho(s),l=Lr.textKey;if(!Uo()&&(u===l||u.includes(l)))return Wr("handleFocusedElementForSpeech:skip-active-composite-label",{element:Nr(e),labelPreview:s.slice(0,120),transactionId:Lr.transactionId}),Sr=e,Er=i,!1}return Sr=e,Er=i,fr&&clearTimeout(fr),fr=setTimeout(()=>{fr=null,Sr===e&&qo(s,{reason:"focus",interrupt:!0,element:e,focusPath:eo(e,t),priority:"normal"})},120),!0}function ys(e=document){var t;if(Wr("attachFocusSpeechListeners:enter",{root:e instanceof Element?Nr(e):e instanceof DocumentFragment?"document-fragment":"document",runtime:xo()}),bs(),!Co())return Wr("focus speech listeners not attached: non-CTV runtime"),bs;var i,n=e=>ps(e),a=()=>(Wr("handleUserNavigationKey",{activePageKey:hr,activePageAnnounced:dr}),Tr=Date.now(),void(cr=!0));e.addEventListener("focusin",n,!0),e.addEventListener("keydown",a,!0);var r=window;if("undefined"!=typeof window&&null!==(t=r.TVJS)&&void 0!==t&&t.DirectionalNavigation){var o=r.TVJS.DirectionalNavigation;i=o.onfocuschanged,o.onfocuschanged=e=>{var t;null===(t=i)||void 0===t||t.call(o,e),function(e){var t,i=null===(t=e.detail)||void 0===t?void 0:t.nextFocusElement;i&&gs(i,e)}(e)}}return mr={root:e,focusListener:n,keyListener:a,previousTvjsHandler:i},bs}function bs(){var e;if(Wr("detachFocusSpeechListeners:enter",{hasCleanup:!!mr}),mr){var t=mr,i=t.root,n=t.focusListener,a=t.keyListener,r=t.previousTvjsHandler;i.removeEventListener("focusin",n,!0),a&&i.removeEventListener("keydown",a,!0);var o=window;null!==(e=o.TVJS)&&void 0!==e&&e.DirectionalNavigation&&r&&(o.TVJS.DirectionalNavigation.onfocuschanged=r),mr=null}}function ws(){var e;Wr("resetScreenreaderState:enter",{activePageKey:hr,activePageAnnounced:dr,activeTransaction:null===(e=Pr)||void 0===e?void 0:e.id,lastFocused:Nr(Sr)}),bs(),or=null,rr=!1,sr=null,ur=null,lr=null,dr=!1,hr="",cr=!1,Sr=null,Er="",Tr=0,_r=null,uo(),so(),lo(),ho(),co(),vo(),fr&&(clearTimeout(fr),fr=null),oo("reset"),Vr(),Pr=null}var ks=function(){return ae(function e(t,i,n="",a=""){var r;Z(this,e),this.playing=!1,this.toggling=!1,this.handleVideoEvents=e=>{this.video.onended=()=>{Lo(!1),this.handlePlayerAnalytics(e,f.VIDEO_ENDED)},this.video.onpause=()=>{Lo(!1),this.toggling||this.handlePlayerAnalytics(e,f.VIDEO_PAUSED)},this.video.onplay=()=>{Lo(!this.video.muted),this.toggling||this.handlePlayerAnalytics(e,this.video.currentTime>.05?f.VIDEO_RESUMED:f.VIDEO_STARTED)},this.video.onvolumechange=()=>{this.toggling||(this.muted=this.video.muted,Lo(!this.video.paused&&!this.video.ended&&!this.muted),this.handlePlayerAnalytics(e,this.muted?f.VIDEO_MUTED:f.VIDEO_UNMUTED))}},this.removeVideoEvents=()=>{this.video&&(Lo(!1),this.video.onended=null,this.video.onpause=null,this.video.onplay=null,this.video.onvolumechange=null,this.toggling=!1)},this.video=null!=i?i:this.video,null!==(r=e.instance)&&void 0!==r&&r.videoSrc&&i.src!=e.instance.videoSrc&&this.handlePlayerAnalytics(t,f.VIDEO_CHANGED),this.videoSrc=i.src,this.video&&(this.muteByDefault=i.muted,this.loopVideo=i.loop,this.autoplayVideo=i.autoplay,this.muted=this.video.muted,this.videoComponentName=n,this.videoComponentId=a,this.playing=!(!(this.video.currentTime>0)||this.video.paused||this.video.ended),Lo(this.playing&&!this.video.muted),this.handleVideoEvents(t))},[{key:"togglePlayVideo",value:function(e){this.toggling=!0,this.playing?this.video.pause():this.video.play(),this.playing=!this.playing,this.handlePlayerAnalytics(e)}},{key:"toggleMuteVideo",value:function(e){this.toggling=!0,this.video.muted=!this.video.muted,this.muted=this.video.muted,this.handlePlayerAnalytics(e,this.muted?f.VIDEO_MUTED:f.VIDEO_UNMUTED)}},{key:"videoPlayingAction",value:function(){var e,t;return(null===(e=this.video)||void 0===e?void 0:e.currentTime)<=0?f.VIDEO_STARTED:this.video.paused?f.VIDEO_PAUSED:this.video.ended?f.VIDEO_ENDED:(null===(t=this.video)||void 0===t?void 0:t.currentTime)>.05?f.VIDEO_RESUMED:f.UNKNOWN}},{key:"handlePlayerAnalytics",value:function(e,t){if(this.video){var i={id:this.videoComponentId,name:this.videoComponentName,url:this.video.src,loopVideo:this.loopVideo,muteByDefault:this.muteByDefault,autoplayVideo:this.autoplayVideo,contentDuration:this.video.duration/1e3,contentTimecode:this.video.currentTime/1e3};v.getInstance().emit(p,{action:null!=t?t:this.videoPlayingAction(),videoMetaData:i,timeSpentOnPaywall:Ya(e)})}}}])}();ks.instance=null;var Ss=({onTap:e,sku:t,componentChange:i,contextProvider:n}={})=>{var a,r,o,s,u,l,d,h,c,m,g,y=f.UNKNOWN;switch(null==e?void 0:e.function){case ri:y=f.CLOSE_PAYWALL,g=Ya(n),Es(),null===(a=ks.instance)||void 0===a||a.handlePlayerAnalytics(n,f.VIDEO_ENDED);break;case si:y=f.RESTORE_PURCHASES,Ts();break;case li:y=f.SIGN_IN,Ms();break;case bi:Ps(null===(r=e.parameters)||void 0===r?void 0:r.url);break;case hi:t&&(y=f.BUY_SKU,t=As(n,e,t));break;case ki:y=f.PAGE_CHANGE,i={name:null==e||null===(o=e.parameters)||void 0===o?void 0:o.screen},Ds(n,null==e||null===(s=e.parameters)||void 0===s?void 0:s.screen);break;case mi:y=f.TOGGLE_CHANGE,i=xs(n,null==e||null===(u=e.parameters)||void 0===u?void 0:u.formId,null==e||null===(l=e.parameters)||void 0===l?void 0:l.value);break;case vi:t&&(y=f.SELECT_SKU,Cs(n,t));break;case gi:t&&(y=f.PURCHASE_SELECTED_SKU,Is(n,t));break;case Ei:break;case Mi:null===(d=ks.instance)||void 0===d||d.togglePlayVideo(n);break;case Ai:null===(h=ks.instance)||void 0===h||h.togglePlayVideo(n);break;case xi:null===(c=ks.instance)||void 0===c||c.toggleMuteVideo(n);break;case Ii:null===(m=ks.instance)||void 0===m||m.toggleMuteVideo(n)}y!==f.UNKNOWN&&v.getInstance().emit(p,oe({},n.getPaywallActionEventData(),{action:y,sku:t,timeSpentOnPaywall:g,componentChange:i,purchaseError:void 0,purchases:void 0}))},Es=()=>{Yo(),g.clearLaunchId(),Ls(y.Close)||"undefined"==typeof window||window.history.back()},Ts=()=>{var e=b(w.THIRD_PARTY_TRANSACTIONS);Ls(y.Restore)||e||n.warn("NamiPaywallManager.registerRestoreHandler is not registered, so restore option on the paywall will use default behavior.")},Ms=()=>{Ls(y.SignIn)},Ps=e=>{e?Ls(y.DeeplinkAction,e)||"undefined"!=typeof window&&window.open(e,"_blank"):n.debug("Paywall deep link action invoked, but no url present.")},As=(e,t,i)=>{var a,r=null===(a=t.parameters)||void 0===a?void 0:a.promo,o=i;if(r)n.debug(`promo id is not null ${null==i?void 0:i.id}`),o.promoId=r.toString();else{n.debug(`promo id is null for ${i.id}, product details: ${JSON.stringify(i.productDetails)}`);var s=i.productDetails;if(Li(null==s?void 0:s.product_type)){var u=function(e){return e.offers.find(e=>"promo"===e.offer_type&&0===e.price)}(s);if(u&&u.offer_ref_id)n.debug(`Found a free trial offer ${u.offer_ref_id}`),o.promoId=u.offer_ref_id.toString();else{var l,d=s.offers[0];if(d)n.debug(`Found an offer ${d.offer_ref_id}`),o.promoId=null===(l=d.offer_ref_id)||void 0===l?void 0:l.toString()}}}return function(e,t){if(b(w.THIRD_PARTY_TRANSACTIONS)){if(g.setPurchaseImpression(),v.getInstance().listenerCount(y.BuySku)<=0)return void n.warn("In order for Nami to hand off the purchase so the transaction can be handled by, you must register a NamiBuySkuHandler callbackwith NamiPaywallManager.registerBuySkuHandler.");n.info(`Handing off purchase for processing by developer skuId=${t.skuId} promoId=${t.promoId}`),Ls(y.BuySku,t)}else{var i=k(t.skuId);if(i&&(n.info(`Purchase flow completed, success=${i.success}, code=${i.billingResponseCode}, message=${i.message}`),i.success)){var a;v.getInstance().emit(p,{action:f.CLOSE_PAYWALL,sku:t,timeSpentOnPaywall:Ya(e)}),null===(a=ks.instance)||void 0===a||a.handlePlayerAnalytics(e,f.VIDEO_ENDED);var r=e.getSelectedCampaign();r&&r.conversion_event_type==S.IN_APP&&r.conversion_event_url?(g.clearLaunchId(),window.location.href=r.conversion_event_url):Es()}}}(e,o),o},Ds=(e,t)=>{var i;t&&((null===(i=window.history.state)||void 0===i?void 0:i.prevUrl)==t?window.history.back():e.setCurrentPage(t))},xs=(e,t,i)=>{if(t)return e.setCurrentFormId(t,i),{formId:t,value:i};var n=e.getCurrentGroupId(),a=e.getCurrentGroupName();return e.setCurrentGroupData(n,a),{id:n,name:a}},Cs=(e,t)=>{var i=e.getCurrentGroupId(),n=e.selectedProducts();i&&t.id!=n[i]&&e.setSelectedProducts(oe({},n,{[i]:t.id}))},Is=(e,t)=>{e.setPurchase(!0,t)};function Ls(e,...t){var i=v.getInstance();return i.emit(e,...t),i.listenerCount(e)>0}var _s,Rs,Fs,Os,Ws,$s,Ns,js,Bs,zs,Us,Hs,Gs=e=>e,Vs=E.NamiFlowManager,Ks=250,Xs=(_s=function(){function e(t,i,n){var a;return Z(this,e),(a=Q(this,e)).pages=[],a.currentOffset=0,a.presentationStyle="fullscreen",a._sheetEntranceActive=!0,a.formFactor=m(),a.timeSpentOnPaywall=0,a.animation={transition:"none",direction:"forward"},a._originalBodyStyles={},a._originalDocumentStyles={},a._savedScrollY=0,a._sheetDragStartY=0,a._sheetIsDragging=!1,a._dismissThreshold=100,a._boundHandleKeyDownEvent=e=>a.handleKeyDownEvent(e),a._stylesAlreadySaved=!1,a.type=t,a.value=i,a.context=n,a.setPaywallData(),a.presentationStyle=a.getPresentationStyle(a.paywall),a.applyPresentationHostClasses(),he(a,a)}return le(e,U),ae(e,[{key:"applyPresentationHostClasses",value:function(){this.classList.toggle("nami-half-sheet-mode",this.isOverlaySheet),this.classList.toggle("nami-modal-mode",this.isModal),this.classList.toggle("nami-modal-phone",this.isModal&&"phone"===this.formFactor),this.classList.toggle("nami-modal-wide",this.isModal&&"phone"!==this.formFactor)}},{key:"setPaywallData",value:function(){var e=T(this.value,this.type);this.paywall=e.paywall,this.campaign=e.campaign}},{key:"getPresentationStyle",value:function(e){var t,i,n,a=null!==(t=null==e||null===(i=e.template)||void 0===i||null===(i=i.initialState)||void 0===i?void 0:i.presentationStyle)&&void 0!==t?t:null==e||null===(n=e.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.presentation_style;return M(a)}},{key:"isHalfSheet",get:function(){return"compact_sheet"===this.presentationStyle}},{key:"isSheet",get:function(){return"sheet"===this.presentationStyle}},{key:"isOverlaySheet",get:function(){return this.isHalfSheet||this.isSheet}},{key:"isModal",get:function(){return"modal"===this.presentationStyle}},{key:"isOverlay",get:function(){return this.isOverlaySheet||this.isModal}},{key:"connectedCallback",value:function(){var t;ge(e,"connectedCallback",this)([]),null!==(t=window.TVJS)&&void 0!==t&&t.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=this),this._detachFocusSpeechListeners=ys(this),document.addEventListener("keydown",this._boundHandleKeyDownEvent),this._swipeHandler=ii(this,this.handleSwipeEvent.bind(this),{axisHint:"y",lockAxis:!0,minDistance:25,edgeLeakThreshold:15,preventScrollOnSwipe:!1,pointerTypes:["touch"]}),this.setOriginalStyles()}},{key:"disconnectedCallback",value:function(){var t,i,n;ge(e,"disconnectedCallback",this)([]),Yo(),null===(t=this._detachFocusSpeechListeners)||void 0===t||t.call(this),this._detachFocusSpeechListeners=void 0,ws(),g.clearLaunchId(),null!==(i=window.TVJS)&&void 0!==i&&i.DirectionalNavigation&&(window.TVJS.DirectionalNavigation.focusRoot=document.body),document.removeEventListener("keydown",this._boundHandleKeyDownEvent),v.getInstance().removeAllListeners(p),this.restoreStyles(),null===(n=this._halfSheetAbortController)||void 0===n||n.abort(),this._swipeHandler.destroy()}},{key:"setOriginalStyles",value:function(){this._stylesAlreadySaved||(this._stylesAlreadySaved=!0,this._originalBodyStyles.background=document.body.style.background,this._originalBodyStyles.overflow=document.body.style.overflow||null,this._originalBodyStyles.position=document.body.style.position||null,this._originalBodyStyles.top=document.body.style.top||null,this._originalBodyStyles.width=document.body.style.width||null,"phone"===this.formFactor&&(this._originalBodyStyles["overscroll-behavior"]=document.body.style.overscrollBehavior||null,this._originalDocumentStyles["overscroll-behavior"]=document.documentElement.style.overscrollBehavior||null)),"television"===this.formFactor&&(document.body.style.overflow="hidden"),"phone"===this.formFactor&&(document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none",this.isOverlay||(document.body.style.overflow="hidden")),this.isOverlay&&(this._savedScrollY=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${this._savedScrollY}px`,document.body.style.width="100%",document.body.style.overflow="hidden")}},{key:"restoreStyles",value:function(){Object.entries(this._originalBodyStyles).forEach(([e,t])=>{null!==t?document.body.style.setProperty(e,t):document.body.style.removeProperty(e)}),Object.entries(this._originalDocumentStyles).forEach(([e,t])=>{null!==t?document.documentElement.style.setProperty(e,t):document.documentElement.style.removeProperty(e)}),this._savedScrollY>0&&(window.scrollTo(0,this._savedScrollY),this._savedScrollY=0)}},{key:"handleKeyDownEvent",value:function(e){if(10009===e.keyCode||27===e.keyCode||166===e.keyCode||196===e.keyCode||"Backspace"===e.key||"GoBack"===e.key||"BrowserBack"===e.key||"XF86Back"===e.key){if("Backspace"===e.key)if(e.composedPath().some(e=>e instanceof HTMLElement&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)))return;e.preventDefault(),Yo(),this.flow?this.flow.triggerActions(P.REMOTE_BACK):this.isModal&&this.animateSheetDismiss().then(()=>Es())}}},{key:"handleBackdropClick",value:function(e){var t;(e.stopPropagation(),this.flow)?null!==(t=this.flow.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==t&&t?this.flow.triggerActions("__swipe_down__"):this.animateSheetDismiss().then(()=>{var e;null===(e=this.flow)||void 0===e||e.dismiss(),Es()}):this.animateSheetDismiss().then(()=>Es())}},{key:"animateSheetDismiss",value:function(){var e,t,i,n,a;return me(function(r){for(;;)switch(r.n){case 0:return i=this.shadowRoot,n=null!==(e=null==i?void 0:i.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null==i?void 0:i.querySelector(".nami-modal-container"),a=null!==(t=null==i?void 0:i.querySelector(".nami-half-sheet-backdrop"))&&void 0!==t?t:null==i?void 0:i.querySelector(".nami-modal-backdrop"),n&&n.classList.add("nami-dismissing"),a&&a.classList.add("nami-dismissing"),r.n=1,J(new Promise(e=>setTimeout(e,200)));case 1:return r.a(2)}},null,this,null,Promise)}},{key:"handleSwipeEvent",value:function({direction:e}){var t;if("down"===e)null===(t=this.flow)||void 0===t||t.triggerActions("__swipe_down__");else if("up"===e){var i;null===(i=this.flow)||void 0===i||i.triggerActions("__swipe_up__")}}},{key:"setupHalfSheetDragTracking",value:function(){var e,t,i;null===(e=this._halfSheetAbortController)||void 0===e||e.abort(),this._halfSheetAbortController=new AbortController;var n=this._halfSheetAbortController.signal,a=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"),r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-half-sheet-content");if(a&&r){a.addEventListener("touchstart",e=>{r.scrollTop>0||(this._sheetDragStartY=e.touches[0].clientY,this._sheetIsDragging=!0)},{passive:!0,signal:n}),a.addEventListener("touchmove",e=>{if(this._sheetIsDragging){var t=e.touches[0].clientY-this._sheetDragStartY;t>0&&(a.style.transform=`translateY(${t}px)`,a.style.transition="none",e.preventDefault())}},{passive:!1,signal:n}),a.addEventListener("touchend",()=>{if(this._sheetIsDragging){this._sheetIsDragging=!1;var e,t,i=a.style.transform.match(/translateY\((\d+(?:\.\d+)?)px\)/);if((i?parseFloat(i[1]):0)>this._dismissThreshold)if(null!==(e=null===(t=this.flow)||void 0===t?void 0:t.currentStepHasHoistedPrimaryActions("__swipe_down__"))&&void 0!==e&&e){var n;a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out",null===(n=this.flow)||void 0===n||n.triggerActions("__swipe_down__")}else{var r;a.style.transform="translateY(100%)",a.style.transition="transform 0.2s ease-in";var o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(".nami-half-sheet-backdrop");o&&o.classList.add("nami-dismissing"),setTimeout(()=>{var e;null===(e=this.flow)||void 0===e||e.dismiss()},200)}else a.style.transform="translateY(0)",a.style.transition="transform 0.2s ease-out"}},{signal:n})}}},{key:"setupHalfSheetFocusTrap",value:function(){var e,t,i,n,a=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".nami-half-sheet-container"))&&void 0!==e?e:null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(".nami-modal-container");if(a){a.focus();var r=null===(n=this._halfSheetAbortController)||void 0===n?void 0:n.signal;a.addEventListener("keydown",e=>{if("Tab"===e.key){var t=a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0!==t.length){var i,n,r=t[0],o=t[t.length-1];if(e.shiftKey)document.activeElement!==r&&(null===(i=this.shadowRoot)||void 0===i?void 0:i.activeElement)!==r||(e.preventDefault(),o.focus());else document.activeElement!==o&&(null===(n=this.shadowRoot)||void 0===n?void 0:n.activeElement)!==o||(e.preventDefault(),r.focus())}}},r?{signal:r}:void 0)}}},{key:"firstUpdated",value:function(){var e;this.timeSpentOnPaywall=Date.now(),null===(e=this._detachFocusSpeechListeners)||void 0===e||e.call(this),this._detachFocusSpeechListeners=ys(this.renderRoot),A(this.campaign)&&(this.flow=Vs.instance.presentFlow(this.campaign,this,this.context)),this.isOverlay&&this.updateComplete.then(()=>{this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap()})}},{key:"updated",value:function(t){if(ge(e,"updated",this)([t]),t.has("presentationStyle")){var i=t.get("presentationStyle");("compact_sheet"===i||"sheet"===i||"modal"===i)!==this.isOverlay&&(this.restoreStyles(),this._stylesAlreadySaved=!1,this.setOriginalStyles()),this.isOverlay&&(this.isOverlaySheet&&this.setupHalfSheetDragTracking(),this.setupHalfSheetFocusTrap())}}},{key:"getAnimationStyles",value:function(e){var t="backward"===this.animation.direction?-1:1;switch(this.animation.transition){case"verticalSlide":return`transform: translateY(${100*(e-this.currentOffset)*t}vh);`;case"slide":return`transform: translateX(${100*(e-this.currentOffset)*t}vw);`;case"fade":return`opacity: ${e===this.currentOffset?1:0};`;default:return""}}},{key:"updatePages",value:function(e){var t,i,n;return me(function(a){for(;;)switch(a.n){case 0:if(this.paywall=e,0!==this.pages.length&&"none"!==this.animation.transition){a.n=1;break}return this.pages=[e],a.a(2);case 1:if((null==(t=this.pages[this.pages.length-1])?void 0:t.id)!==e.id){a.n=2;break}return a.a(2);case 2:return i=null,this.isOverlaySheet&&(i=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".nami-half-sheet-content"))&&(i.style.height=`${i.clientHeight}px`),this.pages=[t,e],this.currentOffset=0,a.n=3,J(this.updateComplete);case 3:requestAnimationFrame(()=>{this.currentOffset=1,setTimeout(()=>{this.pages=[e],this.currentOffset=0,i&&(i.style.height="")},Ks)});case 4:return a.a(2)}},null,this,null,Promise)}},{key:"animateFullscreenEntry",value:function(){return me(function(e){for(;;)switch(e.n){case 0:return e.n=1,J(new Promise(e=>requestAnimationFrame(()=>e())));case 1:return this.classList.remove("nami-fullscreen-entering"),this.classList.add("nami-fullscreen-entering-active"),e.n=2,J(new Promise(e=>setTimeout(e,Ks)));case 2:this.classList.remove("nami-fullscreen-entering-active");case 3:return e.a(2)}},null,this,null,Promise)}},{key:"_captureExitOverlay",value:function(e){var t=this.shadowRoot;if(!t)return null;var i=t.querySelector(".nami-flow-container"),n=document.createElement("div");if(n.className="nami-fullscreen-exit-overlay",n.style.cssText=`\n position: fixed; inset: 0; z-index: 10000;\n pointer-events: none;\n background: ${e};\n overflow: hidden;\n `,i){var a=i.cloneNode(!0);a.style.transform="none",a.style.transition="none",n.appendChild(a)}return t.appendChild(n),n.offsetHeight,n}},{key:"_slideExitOverlayAway",value:function(e){var t;return me(function(i){for(;;)switch(i.n){case 0:if(e){i.n=1;break}return i.a(2);case 1:return t="undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,e.style.transition=t?"none":"transform 250ms ease-in",e.style.transform="translateY(100%)",i.n=2,J(new Promise(e=>setTimeout(e,t?0:Ks)));case 2:e.remove();case 3:return i.a(2)}},null,null,null,Promise)}},{key:"flowNavigateToScreen",value:function(e,t){var i,n,a,r,o,s,u,l,d,h,c;return me(function(m){for(;;)switch(m.n){case 0:if(null!==(i=this.flow)&&void 0!==i&&i.previousFlowStep&&this.flow.executeLifecycle(this.flow.previousFlowStep,P.DISAPPEAR),a=this.presentationStyle,r=this.getPresentationStyle(e),o=0===this.pages.length,s="backward"===t.direction,"compact_sheet"!==a&&"sheet"!==a||"fullscreen"!==r){m.n=3;break}return this.classList.add("nami-fullscreen-entering"),this.presentationStyle="fullscreen",this.applyPresentationHostClasses(),m.n=1,J(this.updateComplete);case 1:return m.n=2,J(this.animateFullscreenEntry());case 2:m.n=11;break;case 3:if("fullscreen"!==a||"compact_sheet"!==r&&"sheet"!==r){m.n=10;break}if(!o&&!s){m.n=8;break}if(!s){m.n=6;break}return u=document.body.style.background||getComputedStyle(this).backgroundColor||"#000",this._sheetEntranceActive=!1,l=this._captureExitOverlay(u),this.presentationStyle=r,this.applyPresentationHostClasses(),this.pages=[e],this.paywall=e,m.n=4,J(this.updateComplete);case 4:return m.n=5,J(this._slideExitOverlayAway(l));case 5:m.n=7;break;case 6:this.presentationStyle=r,this.applyPresentationHostClasses();case 7:m.n=9;break;case 8:console.warn(`Unsupported forward transition: fullscreen → ${r}. Presenting as fullscreen.`);case 9:m.n=11;break;case 10:this.presentationStyle=r,this.applyPresentationHostClasses();case 11:return d=("compact_sheet"===a||"sheet"===a)&&"fullscreen"===r,h="fullscreen"===a&&("compact_sheet"===r||"sheet"===r),c=!("compact_sheet"!==a&&"sheet"!==a||"compact_sheet"!==r&&"sheet"!==r||a===r)||d||h,this.animation=c?{transition:"fade",direction:t.direction}:t,m.n=12,J(this.updatePages(e));case 12:null!==(n=this.flow)&&void 0!==n&&n.currentFlowStep&&this.flow.executeLifecycle(this.flow.currentFlowStep,P.APPEAR);case 13:return m.a(2)}},null,this,null,Promise)}},{key:"getSelectedSlideIndexForCurrentCarousel",value:function(){return Zt.getSelectedSlideIndex()}},{key:"renderFlow",value:function(){return"undefined"==typeof document?z(Rs||(Rs=Gs``)):this.isOverlaySheet?this.renderHalfSheet():this.isModal?this.renderModal(this.renderFlowContainer()):this.renderFlowContainer()}},{key:"renderFlowContainer",value:function(){return z(Fs||(Fs=Gs`
255
255
  <div class="nami-flow-container">
256
256
  ${0}
257
257
  </div>
@@ -459,7 +459,7 @@ import{NAMI_SDK_VERSION as e,getExtendedClientInfo as t,PaywallState as i,logger
459
459
  `),e,e,e,function(e){return qh[e]||qh.CheckCircleOutlined}(e))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();yt([Jt({type:Object})],jS.prototype,"component",void 0),yt([Jt({type:Boolean})],jS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],jS.prototype,"scaleFactor",void 0),jS=yt([Pt("nami-symbol")],jS);var BS=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e=this.component,t=this.scaleFactor,i=this.inFocusedState,n=e.hidden,a=e.fontSize,r=e.alignment,o=e.strikethrough,s=e.spacing;return H(`\n :host {\n ${FS(e,t)}\n display: ${n?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${xu(e,i)}\n ${WS(e,i)}\n font-size: ${(null!=a?a:_S)*t}px;\n text-align: ${r||"center"};\n ${Bu("string"!=typeof o&&o)}\n ${zu(e.fontName)}\n ${Gu(e,t,i)}\n ${LS(e)}\n ${Iu(e)}\n ${function({alignment:e,horizontalAlignment:t}){return gu("justify-content",t&&vu[t]?vu[t]:e&&vu[e]?vu[e]:"center")}(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 ${FS(e,t)}\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${xu(e,i)}\n ${WS(e,i)}\n font-size: ${(null!=a?a:_S)*t}px;\n text-align: ${r||"center"};\n ${Bu("string"!=typeof o&&o)}\n ${zu(e.fontName)}\n }\n ${LS(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n /* NAM-1409: re-applied here (not only on the wrapper) so the p's own\n computed default doesn't shadow the inherited value — see NAM-2875. */\n ${FS(e,t)}\n }\n \n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n \n `)}},{key:"render",value:function(){var e=this.component,t=e.fontColor,i=e.fontSize,n=e.activeFontColor,a=e.bulletComponent,r=e.texts,o=e.spacing,s=a?oe({fontColor:t,fontSize:i,activeFontColor:n,spacing:o},a):null;if(!Array.isArray(r))return z(MS||(MS=IS``));var u=OS(this.component),l=r.map(e=>e?z(PS||(PS=IS`<nami-text-list-item-wrapper aria-hidden="${0}" .component=${0} .scaleFactor=${0}>
460
460
  ${0}
461
461
  <div class="bullet-text-wrapper" .innerHTML="${0}"></div>
462
- </nami-text-list-item-wrapper>`),u?"true":V,this.component,this.scaleFactor,s&&z(AS||(AS=IS`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),s,this.scaleFactor),Xd(e)):null);return z(DS||(DS=IS`${0}${0}`),l,u?z(xS||(xS=IS`<span class="sr-only">${0}</span>`),u):V)}}])}();yt([Jt({type:Object})],BS.prototype,"component",void 0),yt([Jt({type:Boolean})],BS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],BS.prototype,"scaleFactor",void 0),BS=yt([Pt("nami-text-list")],BS);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=Xd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.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;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var zS=function(){function e(){var t;return Z(this,e),(t=Q(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return le(e,fu),ae(e,[{key:"disconnectedCallback",value:function(){ge(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,i=this.minSDKVersion,n=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=H(Cu(e)),u=Boolean(e.fillColor||e.fillImage),l=e.roundBorders,d=Array.isArray(l)&&l.length>0&&l.length<4,h=u&&d?"overflow: hidden;":"";return H(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${s};\n ${h}\n ${Ku(e.position)}\n ${Iu(e)}\n ${Gu(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${xu(e,!0)}\n ${Gu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Ju(e)}\n }\n :host > * {\n ${_u(i,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${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=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function US(e,t){return e===t||e!=e&&t!=t}function HS(e,t){for(var i=e.length;i--;)if(US(e[i][0],t))return i;return-1}yt([Jt({type:Object})],zS.prototype,"component",void 0),yt([Jt({type:Boolean})],zS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],zS.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],zS.prototype,"minSDKVersion",void 0),zS=yt([Pt("nami-container")],zS);var GS=Array.prototype.splice;function VS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function KS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}VS.prototype.clear=function(){this.__data__=[],this.size=0},VS.prototype.delete=function(e){var t=this.__data__,i=HS(t,e);return!(i<0)&&(i==t.length-1?t.pop():GS.call(t,i,1),--this.size,!0)},VS.prototype.get=function(e){var t=this.__data__,i=HS(t,e);return i<0?void 0:t[i][1]},VS.prototype.has=function(e){return HS(this.__data__,e)>-1},VS.prototype.set=function(e,t){var i=this.__data__,n=HS(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function XS(e){if(!KS(e))return!1;var t=Dn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var YS,qS=bn["__core-js_shared__"],JS=(YS=/[^.]+$/.exec(qS&&qS.keys&&qS.keys.IE_PROTO||""))?"Symbol(src)_1."+YS:"";var QS=Function.prototype.toString;function ZS(e){if(null!=e){try{return QS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var eE=/^\[object .+?Constructor\]$/,tE=Function.prototype,iE=Object.prototype,nE=tE.toString,aE=iE.hasOwnProperty,rE=RegExp("^"+nE.call(aE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oE(e){return!(!KS(e)||(t=e,JS&&JS in t))&&(XS(e)?rE:eE).test(ZS(e));var t}function sE(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return oE(i)?i:void 0}var uE=sE(bn,"Map"),lE=sE(Object,"create");var dE=Object.prototype.hasOwnProperty;var hE=Object.prototype.hasOwnProperty;function cE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function mE(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function fE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}cE.prototype.clear=function(){this.__data__=lE?lE(null):{},this.size=0},cE.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},cE.prototype.get=function(e){var t=this.__data__;if(lE){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return dE.call(t,e)?t[e]:void 0},cE.prototype.has=function(e){var t=this.__data__;return lE?void 0!==t[e]:hE.call(t,e)},cE.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=lE&&void 0===t?"__lodash_hash_undefined__":t,this},fE.prototype.clear=function(){this.size=0,this.__data__={hash:new cE,map:new(uE||VS),string:new cE}},fE.prototype.delete=function(e){var t=mE(this,e).delete(e);return this.size-=t?1:0,t},fE.prototype.get=function(e){return mE(this,e).get(e)},fE.prototype.has=function(e){return mE(this,e).has(e)},fE.prototype.set=function(e,t){var i=mE(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function vE(e){var t=this.__data__=new VS(e);this.size=t.size}vE.prototype.clear=function(){this.__data__=new VS,this.size=0},vE.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},vE.prototype.get=function(e){return this.__data__.get(e)},vE.prototype.has=function(e){return this.__data__.has(e)},vE.prototype.set=function(e,t){var i=this.__data__;if(i instanceof VS){var n=i.__data__;if(!uE||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new fE(n)}return i.set(e,t),this.size=i.size,this};function pE(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new fE;++t<i;)this.add(e[t])}function gE(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}pE.prototype.add=pE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},pE.prototype.has=function(e){return this.__data__.has(e)};function yE(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new pE:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!gE(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var bE=bn.Uint8Array;function wE(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function kE(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var SE=wn?wn.prototype:void 0,EE=SE?SE.valueOf:void 0;var TE=Object.prototype.propertyIsEnumerable,ME=Object.getOwnPropertySymbols,PE=ME?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(ME(e),function(t){return TE.call(e,t)}))}:function(){return[]};function AE(e){return xn(e)&&"[object Arguments]"==Dn(e)}var DE=Object.prototype,xE=DE.hasOwnProperty,CE=DE.propertyIsEnumerable,IE=AE(function(){return arguments}())?AE:function(e){return xn(e)&&xE.call(e,"callee")&&!CE.call(e,"callee")};var LE="object"==typeof exports&&exports&&!exports.nodeType&&exports,_E=LE&&"object"==typeof module&&module&&!module.nodeType&&module,RE=_E&&_E.exports===LE?bn.Buffer:void 0,FE=(RE?RE.isBuffer:void 0)||function(){return!1},OE=/^(?:0|[1-9]\d*)$/;function WE(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&OE.test(e))&&e>-1&&e%1==0&&e<t}function $E(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var NE={};NE["[object Float32Array]"]=NE["[object Float64Array]"]=NE["[object Int8Array]"]=NE["[object Int16Array]"]=NE["[object Int32Array]"]=NE["[object Uint8Array]"]=NE["[object Uint8ClampedArray]"]=NE["[object Uint16Array]"]=NE["[object Uint32Array]"]=!0,NE["[object Arguments]"]=NE["[object Array]"]=NE["[object ArrayBuffer]"]=NE["[object Boolean]"]=NE["[object DataView]"]=NE["[object Date]"]=NE["[object Error]"]=NE["[object Function]"]=NE["[object Map]"]=NE["[object Number]"]=NE["[object Object]"]=NE["[object RegExp]"]=NE["[object Set]"]=NE["[object String]"]=NE["[object WeakMap]"]=!1;var jE,BE="object"==typeof exports&&exports&&!exports.nodeType&&exports,zE=BE&&"object"==typeof module&&module&&!module.nodeType&&module,UE=zE&&zE.exports===BE&&gn.process,HE=function(){try{var e=zE&&zE.require&&zE.require("util").types;return e||UE&&UE.binding&&UE.binding("util")}catch(e){}}(),GE=HE&&HE.isTypedArray,VE=GE?(jE=GE,function(e){return jE(e)}):function(e){return xn(e)&&$E(e.length)&&!!NE[Dn(e)]},KE=Object.prototype.hasOwnProperty;function XE(e,t){var i=kn(e),n=!i&&IE(e),a=!i&&!n&&FE(e),r=!i&&!n&&!a&&VE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!KE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||WE(l,u))||s.push(l);return s}var YE=Object.prototype;var qE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),JE=Object.prototype.hasOwnProperty;function QE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||YE))return qE(e);var t,i,n=[];for(var a in Object(e))JE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function ZE(e){return null!=(t=e)&&$E(t.length)&&!XS(t)?XE(e):QE(e);var t}function eT(e){return function(e,t,i){var n=t(e);return kn(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,ZE,PE)}var tT=Object.prototype.hasOwnProperty;var iT=sE(bn,"DataView"),nT=sE(bn,"Promise"),aT=sE(bn,"Set"),rT=sE(bn,"WeakMap"),oT="[object Map]",sT="[object Promise]",uT="[object Set]",lT="[object WeakMap]",dT="[object DataView]",hT=ZS(iT),cT=ZS(uE),mT=ZS(nT),fT=ZS(aT),vT=ZS(rT),pT=Dn;(iT&&pT(new iT(new ArrayBuffer(1)))!=dT||uE&&pT(new uE)!=oT||nT&&pT(nT.resolve())!=sT||aT&&pT(new aT)!=uT||rT&&pT(new rT)!=lT)&&(pT=function(e){var t=Dn(e),i="[object Object]"==t?e.constructor:void 0,n=i?ZS(i):"";if(n)switch(n){case hT:return dT;case cT:return oT;case mT:return sT;case fT:return uT;case vT:return lT}return t});var gT="[object Arguments]",yT="[object Array]",bT="[object Object]",wT=Object.prototype.hasOwnProperty;function kT(e,t,i,n,a,r){var o=kn(e),s=kn(t),u=o?yT:pT(e),l=s?yT:pT(t),d=(u=u==gT?bT:u)==bT,h=(l=l==gT?bT:l)==bT,c=u==l;if(c&&FE(e)){if(!FE(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new vE),o||VE(e)?yE(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new bE(e),new bE(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return US(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=wE;case"[object Set]":var u=1&n;if(s||(s=kE),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=yE(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(EE)return EE.call(e)==EE.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&wT.call(e,"__wrapped__"),f=h&&wT.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new vE),a(v,p,i,n,r)}}return!!c&&(r||(r=new vE),function(e,t,i,n,a,r){var o=1&i,s=eT(e),u=s.length;if(u!=eT(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:tT.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function ST(e,t,i,n,a){return e===t||(null==e||null==t||!xn(e)&&!xn(t)?e!=e&&t!=t:kT(e,t,i,n,ST,a))}function ET(e,t){return ST(e,t)}var TT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,t="vertical"===this.component.direction,i=t?"width":"height",n=t?"margin-top":"margin-left",a=H(Cu(this.component));return H(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${a};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Ku(this.component.position)}\n ${Iu(this.component)}\n ${Gu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${n}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${xu(this.component,!0)}\n ${Gu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Ju(this.component)}\n }\n :host > * {\n ${i}: 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;ET(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,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Ca(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Na(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();yt([Jt({type:Object})],TT.prototype,"component",void 0),yt([Jt({type:Boolean})],TT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],TT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],TT.prototype,"minSDKVersion",void 0),TT=yt([Pt("nami-product-container")],TT);var MT,PT,AT=e=>e;function DT(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var xT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e,t=this.component,i=t.imageCropping,n=t.alignment,a=t.height,r=t.width,o=t.rightMargin,s=t.spacing,u=t.hidden,l=t.blur,d="fit"===i,h=this.contextConsumer.state.formFactor,c=Mu(null!=a?a:"100%",this.scaleFactor),m=Mu(null!==(e="fitContent"==r?a:r)&&void 0!==e?e:"100%",this.scaleFactor),f="string"==typeof a&&a.includes("%")||void 0===a,v="phone"===h&&f?"max-height":"height",p=DT(this.component.moveX)||DT(this.component.moveY);return H(`\n :host {\n display: ${"television"===h?"flex":"inline-block"};\n ${u?"display:none;":""}\n position: relative;\n ${p?Ou(this.component):""}\n ${v}: ${c};\n width: ${m};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${d?"contain":"cover"};\n object-position: ${n} center;\n ${v}: ${c};\n width: ${m};\n margin-right: ${o||s||0}px;\n ${l?`filter: blur(${l}px);`:""}\n flex-shrink: ${"number"==typeof r?0:1};\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.url,n=t.alt,a=t.title,r=t.focusedBorderColor,o=t.focusedFillColor,s=t.fillColor;return i?(!r&&Ja(s,o)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=n?n:a)&&void 0!==e?e:"",z(MT||(MT=AT`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,z(PT||(PT=AT``)))}}])}();yt([Jt({type:Object})],xT.prototype,"component",void 0),yt([Jt({type:Boolean})],xT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],xT.prototype,"scaleFactor",void 0),xT=yt([Pt("nami-image")],xT);var CT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"connectedCallback",value:function(){ge(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return H("");var t=this.component,i=this.scaleFactor,n=this.contextConsumer.state.formFactor,a=t.backgroundBlur,r="vertical"===t.direction?"margin-top":"margin-left";return H(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Lu(t)}\n position: var(--nami-bg-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 ${a?`backdrop-filter: blur(${a}px);`:""}\n ${xu(t,!1)}\n transition: all 0.3s;\n ${Fu(t,i)}\n }\n :host(:focus){\n ${xu(t,!0)}\n }\n :host > *:not(:first-child) {\n ${r}: ${t.spacing?t.spacing*i:0}px;\n }\n `)}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>xl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();yt([Jt({type:Object})],CT.prototype,"component",void 0),yt([Jt({type:Boolean})],CT.prototype,"fullscreen",void 0),yt([Jt({type:Boolean})],CT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],CT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],CT.prototype,"minSDKVersion",void 0),CT=yt([Pt("nami-background-container")],CT);var IT,LT=e=>e,_T=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e,t,i=this.contextConsumer,n=this.component,a=this.zIndex,r=this.scaleFactor;if(!i)return B(IT||(IT=LT``));var o=i.state.formFactor,s=n.backgroundBlur,u="phone"!==o?"width: 100%;":"",l=null!==(e=n.width)&&void 0!==e?e:n.fixedWidth,d=null!==(t=n.height)&&void 0!==t?t:n.fixedHeight,h="phone"===o?`max-width:100%;\n ${void 0!==l?`width: ${Mu(l,r)};`:""}\n ${void 0!==d?`height: ${Mu(d,r)};`:""}`:$u(n,r),c="vertical"===n.direction?"margin-top":"margin-left";return H(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Iu(n)}\n ${h}\n ${u}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?vu[n]:void 0,s=a?vu[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${gu("align-items",t)}${gu("justify-content",i)}`}(n)}\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 ${Fu(n,r)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${Tu(r,n.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${xu(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${xu(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${c}: ${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=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();yt([Jt({type:Object})],_T.prototype,"component",void 0),yt([Jt({type:Number})],_T.prototype,"zIndex",void 0),yt([Jt({type:Boolean})],_T.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],_T.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],_T.prototype,"minSDKVersion",void 0),_T=yt([Pt("nami-content-container")],_T);var RT,FT=e=>e,OT=function(){function e(){var t;return Z(this,e),(t=Q(this,e)).inFocusedState=!1,t.scaleFactor=1,t._anyItemFocused=!1,t._handleClick=e=>{e.preventDefault(),Ss({contextProvider:t.contextProvider,onTap:t.component.onTap})},t._handleFocusIn=e=>{var i,n;"nami-segment-picker-item"===(null===(i=e.target.tagName)||void 0===i?void 0:i.toLowerCase())&&(t._isTv&&(t._anyItemFocused=!0),"television"===(null===(n=t.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&t.contextProvider.clearSelectedProduct(t.contextProvider.getCurrentGroupId()))},t._handleFocusOut=e=>{var i;if(t._isTv){var n=e.relatedTarget;if("nami-segment-picker-item"!==(null==n||null===(i=n.tagName)||void 0===i?void 0:i.toLowerCase())){var a=t.shadowRoot;n&&null!=a&&a.contains(n)||(t._anyItemFocused=!1)}}},t.addEventListener("click",t._handleClick),t}return le(e,fu),ae(e,[{key:"_isTv",get:function(){return"television"===m()}},{key:"firstUpdated",value:function(t){var i,n;ge(e,"firstUpdated",this)([t]),null===(i=this.shadowRoot)||void 0===i||i.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var t,i;ge(e,"disconnectedCallback",this)([]),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusin",this._handleFocusIn),null===(i=this.shadowRoot)||void 0===i||i.removeEventListener("focusout",this._handleFocusOut)}},{key:"styles",value:function(){var e,t,i,n=Xu("active",this.component.components[0]),a=Xu("inactive",this.component.components[0]),r=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||n.fillColor,o=this._anyItemFocused;return H(`\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 ${Iu(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${xu(this.component,!1)}\n ${Gu(this.component,this.scaleFactor,o)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${xu(this.component,!0)}\n ${Gu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Ju(this.component)}\n }\n .toggle{\n ${t=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Tu(i,t.topPadding)}px;\n bottom: ${Tu(i,t.bottomPadding)}px;\n width: calc(50% - ${Tu(i,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Yu(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${Yu(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 ${xu(n,!0)}\n ${qu(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 ${xu(n,!0)}\n ${qu(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return z(RT||(RT=FT`${0}<div class="toggle"></div>`),e)}}])}();yt([Jt({type:Object})],OT.prototype,"component",void 0),yt([Jt({type:Boolean})],OT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],OT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],OT.prototype,"minSDKVersion",void 0),yt([Qt()],OT.prototype,"_anyItemFocused",void 0),OT=yt([Pt("nami-segment-picker")],OT);var WT,$T=e=>e,NT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._isFocused=!1,t._handleFocus=()=>{t.inFocusedState=!0,t._isTv&&(t._isFocused=!0,t.classList.add("focused"))},t._handleBlur=()=>{t.inFocusedState=!1,t._isTv&&(t._isFocused=!1,t.classList.remove("focused"))},t._handleKeyDown=e=>{"Enter"===e.key||" "===e.key||142===e.keyCode||195===e.keyCode?t._handleClick():!t._isTv||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(t._moveFocusToSibling("ArrowRight"===e.key?1:-1),e.preventDefault())},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return le(e,fu),ae(e,[{key:"_isTv",get:function(){return"television"===m()}},{key:"connectedCallback",value:function(){ge(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),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){ge(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{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 i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=ET(i.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,i=Xu("active",this.component),n=Xu("inactive",this.component),a=this.component.focusedFontColor||i.fontColor||n.fontColor||"";return H(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${Yu(oe({},n,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${ju(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 ${qu(oe({},i,this.component),this.scaleFactor)}\n ${ju(null!==(t=this.component.activeDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${a?Du(a):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\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||"",z(WT||(WT=$T`<input type="radio"
462
+ </nami-text-list-item-wrapper>`),u?"true":V,this.component,this.scaleFactor,s&&z(AS||(AS=IS`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),s,this.scaleFactor),Xd(e)):null);return z(DS||(DS=IS`${0}${0}`),l,u?z(xS||(xS=IS`<span class="sr-only">${0}</span>`),u):V)}}])}();yt([Jt({type:Object})],BS.prototype,"component",void 0),yt([Jt({type:Boolean})],BS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],BS.prototype,"scaleFactor",void 0),BS=yt([Pt("nami-text-list")],BS);(()=>{var e,t=!0;try{new RegExp("􏿿","u"),new RegExp("😀","u"),new RegExp("\\p{P}","u")}catch(e){t=!1}if(!t){var i=null===(e=Xd.Lexer)||void 0===e?void 0:e.rules,n=null==i?void 0:i.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;var t="!\"#$%&'()*+,\\-./:;<=>?@[\\\\]^_`{|}~",i=e.source.replace(/\\p\{P\}\\p\{S\}/g,t).replace(/\\p\{P\}/g,t).replace(/\\p\{S\}/g,t),n=e.flags.replace(/u/g,"");return new RegExp(i,n)})(e[t])})})}})();var zS=function(){function e(){var t;return Z(this,e),(t=Q(this,e)).inFocusedState=!1,t.scaleFactor=1,t.focusWithin=!1,t.handleFocusIn=()=>t.setFocusState(!0),t.handleFocusOut=e=>{var i,n,a=null!==(i=e.relatedTarget)&&void 0!==i?i:null;if(!a)return t.setFocusState(!1);a===t||null!==(n=t.shadowRoot)&&void 0!==n&&n.contains(a)||t.setFocusState(!1)},t.handleFocusChanged=e=>{var i=e.detail;t.setFocusState(!0===(null==i?void 0:i.inFocusedState))},t.addEventListener("focusin",t.handleFocusIn),t.addEventListener("focusout",t.handleFocusOut),t.addEventListener("focus-changed",t.handleFocusChanged),t}return le(e,fu),ae(e,[{key:"disconnectedCallback",value:function(){ge(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,i=this.minSDKVersion,n=e.backgroundBlur,a="vertical"===e.direction,r=a?"width":"height",o=a?"margin-top":"margin-left",s=H(Cu(e)),u=Boolean(e.fillColor||e.fillImage),l=e.roundBorders,d=Array.isArray(l)&&l.length>0&&l.length<4,h=u&&d?"overflow: hidden;":"";return H(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${n?`backdrop-filter: blur(${n}px);`:""}\n ${s};\n ${h}\n ${Ku(e.position)}\n ${Iu(e)}\n ${Gu(e,t,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${xu(e,!0)}\n ${Gu(e,t,!0)}\n }\n :host(:focus-visible){\n ${Ju(e)}\n }\n :host > * {\n ${_u(i,r)}\n }\n :host > *:not(:first-child) {\n ${o}: ${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=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.focusWithin!==e&&(this.focusWithin=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function US(e,t){return e===t||e!=e&&t!=t}function HS(e,t){for(var i=e.length;i--;)if(US(e[i][0],t))return i;return-1}yt([Jt({type:Object})],zS.prototype,"component",void 0),yt([Jt({type:Boolean})],zS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],zS.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],zS.prototype,"minSDKVersion",void 0),zS=yt([Pt("nami-container")],zS);var GS=Array.prototype.splice;function VS(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function KS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}VS.prototype.clear=function(){this.__data__=[],this.size=0},VS.prototype.delete=function(e){var t=this.__data__,i=HS(t,e);return!(i<0)&&(i==t.length-1?t.pop():GS.call(t,i,1),--this.size,!0)},VS.prototype.get=function(e){var t=this.__data__,i=HS(t,e);return i<0?void 0:t[i][1]},VS.prototype.has=function(e){return HS(this.__data__,e)>-1},VS.prototype.set=function(e,t){var i=this.__data__,n=HS(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function XS(e){if(!KS(e))return!1;var t=Dn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var YS,qS=bn["__core-js_shared__"],JS=(YS=/[^.]+$/.exec(qS&&qS.keys&&qS.keys.IE_PROTO||""))?"Symbol(src)_1."+YS:"";var QS=Function.prototype.toString;function ZS(e){if(null!=e){try{return QS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var eE=/^\[object .+?Constructor\]$/,tE=Function.prototype,iE=Object.prototype,nE=tE.toString,aE=iE.hasOwnProperty,rE=RegExp("^"+nE.call(aE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oE(e){return!(!KS(e)||(t=e,JS&&JS in t))&&(XS(e)?rE:eE).test(ZS(e));var t}function sE(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return oE(i)?i:void 0}var uE=sE(bn,"Map"),lE=sE(Object,"create");var dE=Object.prototype.hasOwnProperty;var hE=Object.prototype.hasOwnProperty;function cE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function mE(e,t){var i,n,a=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function fE(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}cE.prototype.clear=function(){this.__data__=lE?lE(null):{},this.size=0},cE.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},cE.prototype.get=function(e){var t=this.__data__;if(lE){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return dE.call(t,e)?t[e]:void 0},cE.prototype.has=function(e){var t=this.__data__;return lE?void 0!==t[e]:hE.call(t,e)},cE.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=lE&&void 0===t?"__lodash_hash_undefined__":t,this},fE.prototype.clear=function(){this.size=0,this.__data__={hash:new cE,map:new(uE||VS),string:new cE}},fE.prototype.delete=function(e){var t=mE(this,e).delete(e);return this.size-=t?1:0,t},fE.prototype.get=function(e){return mE(this,e).get(e)},fE.prototype.has=function(e){return mE(this,e).has(e)},fE.prototype.set=function(e,t){var i=mE(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function vE(e){var t=this.__data__=new VS(e);this.size=t.size}vE.prototype.clear=function(){this.__data__=new VS,this.size=0},vE.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},vE.prototype.get=function(e){return this.__data__.get(e)},vE.prototype.has=function(e){return this.__data__.has(e)},vE.prototype.set=function(e,t){var i=this.__data__;if(i instanceof VS){var n=i.__data__;if(!uE||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new fE(n)}return i.set(e,t),this.size=i.size,this};function pE(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new fE;++t<i;)this.add(e[t])}function gE(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}pE.prototype.add=pE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},pE.prototype.has=function(e){return this.__data__.has(e)};function yE(e,t,i,n,a,r){var o=1&i,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var h=-1,c=!0,m=2&i?new pE:void 0;for(r.set(e,t),r.set(t,e);++h<s;){var f=e[h],v=t[h];if(n)var p=o?n(v,f,h,t,e,r):n(f,v,h,e,t,r);if(void 0!==p){if(p)continue;c=!1;break}if(m){if(!gE(t,function(e,t){if(o=t,!m.has(o)&&(f===e||a(f,e,i,n,r)))return m.push(t);var o})){c=!1;break}}else if(f!==v&&!a(f,v,i,n,r)){c=!1;break}}return r.delete(e),r.delete(t),c}var bE=bn.Uint8Array;function wE(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function kE(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var SE=wn?wn.prototype:void 0,EE=SE?SE.valueOf:void 0;var TE=Object.prototype.propertyIsEnumerable,ME=Object.getOwnPropertySymbols,PE=ME?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,a=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[a++]=o)}return r}(ME(e),function(t){return TE.call(e,t)}))}:function(){return[]};function AE(e){return xn(e)&&"[object Arguments]"==Dn(e)}var DE=Object.prototype,xE=DE.hasOwnProperty,CE=DE.propertyIsEnumerable,IE=AE(function(){return arguments}())?AE:function(e){return xn(e)&&xE.call(e,"callee")&&!CE.call(e,"callee")};var LE="object"==typeof exports&&exports&&!exports.nodeType&&exports,_E=LE&&"object"==typeof module&&module&&!module.nodeType&&module,RE=_E&&_E.exports===LE?bn.Buffer:void 0,FE=(RE?RE.isBuffer:void 0)||function(){return!1},OE=/^(?:0|[1-9]\d*)$/;function WE(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&OE.test(e))&&e>-1&&e%1==0&&e<t}function $E(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var NE={};NE["[object Float32Array]"]=NE["[object Float64Array]"]=NE["[object Int8Array]"]=NE["[object Int16Array]"]=NE["[object Int32Array]"]=NE["[object Uint8Array]"]=NE["[object Uint8ClampedArray]"]=NE["[object Uint16Array]"]=NE["[object Uint32Array]"]=!0,NE["[object Arguments]"]=NE["[object Array]"]=NE["[object ArrayBuffer]"]=NE["[object Boolean]"]=NE["[object DataView]"]=NE["[object Date]"]=NE["[object Error]"]=NE["[object Function]"]=NE["[object Map]"]=NE["[object Number]"]=NE["[object Object]"]=NE["[object RegExp]"]=NE["[object Set]"]=NE["[object String]"]=NE["[object WeakMap]"]=!1;var jE,BE="object"==typeof exports&&exports&&!exports.nodeType&&exports,zE=BE&&"object"==typeof module&&module&&!module.nodeType&&module,UE=zE&&zE.exports===BE&&gn.process,HE=function(){try{var e=zE&&zE.require&&zE.require("util").types;return e||UE&&UE.binding&&UE.binding("util")}catch(e){}}(),GE=HE&&HE.isTypedArray,VE=GE?(jE=GE,function(e){return jE(e)}):function(e){return xn(e)&&$E(e.length)&&!!NE[Dn(e)]},KE=Object.prototype.hasOwnProperty;function XE(e,t){var i=kn(e),n=!i&&IE(e),a=!i&&!n&&FE(e),r=!i&&!n&&!a&&VE(e),o=i||n||a||r,s=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],u=s.length;for(var l in e)!KE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||WE(l,u))||s.push(l);return s}var YE=Object.prototype;var qE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),JE=Object.prototype.hasOwnProperty;function QE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||YE))return qE(e);var t,i,n=[];for(var a in Object(e))JE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function ZE(e){return null!=(t=e)&&$E(t.length)&&!XS(t)?XE(e):QE(e);var t}function eT(e){return function(e,t,i){var n=t(e);return kn(e)?n:function(e,t){for(var i=-1,n=t.length,a=e.length;++i<n;)e[a+i]=t[i];return e}(n,i(e))}(e,ZE,PE)}var tT=Object.prototype.hasOwnProperty;var iT=sE(bn,"DataView"),nT=sE(bn,"Promise"),aT=sE(bn,"Set"),rT=sE(bn,"WeakMap"),oT="[object Map]",sT="[object Promise]",uT="[object Set]",lT="[object WeakMap]",dT="[object DataView]",hT=ZS(iT),cT=ZS(uE),mT=ZS(nT),fT=ZS(aT),vT=ZS(rT),pT=Dn;(iT&&pT(new iT(new ArrayBuffer(1)))!=dT||uE&&pT(new uE)!=oT||nT&&pT(nT.resolve())!=sT||aT&&pT(new aT)!=uT||rT&&pT(new rT)!=lT)&&(pT=function(e){var t=Dn(e),i="[object Object]"==t?e.constructor:void 0,n=i?ZS(i):"";if(n)switch(n){case hT:return dT;case cT:return oT;case mT:return sT;case fT:return uT;case vT:return lT}return t});var gT="[object Arguments]",yT="[object Array]",bT="[object Object]",wT=Object.prototype.hasOwnProperty;function kT(e,t,i,n,a,r){var o=kn(e),s=kn(t),u=o?yT:pT(e),l=s?yT:pT(t),d=(u=u==gT?bT:u)==bT,h=(l=l==gT?bT:l)==bT,c=u==l;if(c&&FE(e)){if(!FE(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new vE),o||VE(e)?yE(e,t,i,n,a,r):function(e,t,i,n,a,r,o){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new bE(e),new bE(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return US(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=wE;case"[object Set]":var u=1&n;if(s||(s=kE),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=2,o.set(e,t);var d=yE(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(EE)return EE.call(e)==EE.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&wT.call(e,"__wrapped__"),f=h&&wT.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new vE),a(v,p,i,n,r)}}return!!c&&(r||(r=new vE),function(e,t,i,n,a,r){var o=1&i,s=eT(e),u=s.length;if(u!=eT(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:tT.call(t,d)))return!1}var h=r.get(e),c=r.get(t);if(h&&c)return h==t&&c==e;var m=!0;r.set(e,t),r.set(t,e);for(var f=o;++l<u;){var v=e[d=s[l]],p=t[d];if(n)var g=o?n(p,v,d,t,e,r):n(v,p,d,e,t,r);if(!(void 0===g?v===p||a(v,p,i,n,r):g)){m=!1;break}f||(f="constructor"==d)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,i,n,a,r))}function ST(e,t,i,n,a){return e===t||(null==e||null==t||!xn(e)&&!xn(t)?e!=e&&t!=t:kT(e,t,i,n,ST,a))}function ET(e,t){return ST(e,t)}var TT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,t="vertical"===this.component.direction,i=t?"width":"height",n=t?"margin-top":"margin-left",a=H(Cu(this.component));return H(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${a};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Ku(this.component.position)}\n ${Iu(this.component)}\n ${Gu(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${n}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${xu(this.component,!0)}\n ${Gu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Ju(this.component)}\n }\n :host > * {\n ${i}: 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;ET(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,i,n=this.contextProvider.state,a=n.mediaList,r=n.currentGroupId,o=n.selectedPaywall,s=n.formFactor,u="all"===(null===(e=this.component)||void 0===e?void 0:e.products)?r:(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||r,l=Ca(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Na(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();yt([Jt({type:Object})],TT.prototype,"component",void 0),yt([Jt({type:Boolean})],TT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],TT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],TT.prototype,"minSDKVersion",void 0),TT=yt([Pt("nami-product-container")],TT);var MT,PT,AT=e=>e;function DT(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var xT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e,t=this.component,i=t.imageCropping,n=t.alignment,a=t.height,r=t.width,o=t.rightMargin,s=t.spacing,u=t.hidden,l=t.blur,d="fit"===i,h=this.contextConsumer.state.formFactor,c=Mu(null!=a?a:"100%",this.scaleFactor),m=Mu(null!==(e="fitContent"==r?a:r)&&void 0!==e?e:"100%",this.scaleFactor),f="string"==typeof a&&a.includes("%")||void 0===a,v="phone"===h&&f?"max-height":"height",p=DT(this.component.moveX)||DT(this.component.moveY);return H(`\n :host {\n display: ${"television"===h?"flex":"inline-block"};\n ${u?"display:none;":""}\n position: relative;\n ${p?Ou(this.component):""}\n ${v}: ${c};\n width: ${m};\n }\n :host img {\n transition: all 0.3s;\n /* Don't ride the host's text baseline: a strut taller than a small image\n (dots, inline logos) pushes it below the host box. Keep the inline line\n box itself, though — percent-height hosts on phone size from it. */\n vertical-align: top;\n object-fit: ${d?"contain":"cover"};\n object-position: ${n} center;\n ${v}: ${c};\n width: ${m};\n margin-right: ${o||s||0}px;\n ${l?`filter: blur(${l}px);`:""}\n flex-shrink: ${"number"==typeof r?0:1};\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.url,n=t.alt,a=t.title,r=t.focusedBorderColor,o=t.focusedFillColor,s=t.fillColor;return i?(!r&&Ja(s,o)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=n?n:a)&&void 0!==e?e:"",z(MT||(MT=AT`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,z(PT||(PT=AT``)))}}])}();yt([Jt({type:Object})],xT.prototype,"component",void 0),yt([Jt({type:Boolean})],xT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],xT.prototype,"scaleFactor",void 0),xT=yt([Pt("nami-image")],xT);var CT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"connectedCallback",value:function(){ge(e,"connectedCallback",this)([]),!!document.querySelector("nami-paywall.nami-half-sheet-mode, nami-paywall.nami-modal-mode")||(document.body.style.background=this.component.fillColor||"transparent")}},{key:"styles",value:function(){var e;if(!this.contextConsumer||!this.component)return H("");var t=this.component,i=this.scaleFactor,n=this.contextConsumer.state.formFactor,a=t.backgroundBlur,r="vertical"===t.direction?"margin-top":"margin-left";return H(`\n :host {\n max-height: ${"television"===n?"100vh":""};\n display: ${t.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${Lu(t)}\n position: var(--nami-bg-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 ${a?`backdrop-filter: blur(${a}px);`:""}\n ${xu(t,!1)}\n transition: all 0.3s;\n ${Fu(t,i)}\n }\n :host(:focus){\n ${xu(t,!0)}\n }\n :host > *:not(:first-child) {\n ${r}: ${t.spacing?t.spacing*i:0}px;\n }\n `)}},{key:"updated",value:function(){}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>xl(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();yt([Jt({type:Object})],CT.prototype,"component",void 0),yt([Jt({type:Boolean})],CT.prototype,"fullscreen",void 0),yt([Jt({type:Boolean})],CT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],CT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],CT.prototype,"minSDKVersion",void 0),CT=yt([Pt("nami-background-container")],CT);var IT,LT=e=>e,_T=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return le(e,fu),ae(e,[{key:"styles",value:function(){var e,t,i=this.contextConsumer,n=this.component,a=this.zIndex,r=this.scaleFactor;if(!i)return B(IT||(IT=LT``));var o=i.state.formFactor,s=n.backgroundBlur,u="phone"!==o?"width: 100%;":"",l=null!==(e=n.width)&&void 0!==e?e:n.fixedWidth,d=null!==(t=n.height)&&void 0!==t?t:n.fixedHeight,h="phone"===o?`max-width:100%;\n ${void 0!==l?`width: ${Mu(l,r)};`:""}\n ${void 0!==d?`height: ${Mu(d,r)};`:""}`:$u(n,r),c="vertical"===n.direction?"margin-top":"margin-left";return H(`\n :host {\n box-sizing: border-box;\n display: ${n.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Iu(n)}\n ${h}\n ${u}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?vu[n]:void 0,s=a?vu[a]:void 0;return"vertical"===r?(t=null!=s?s:"center",i=null!=o?o:"start"):(t=null!=o?o:"center",i=null!=s?s:"start"),`${gu("align-items",t)}${gu("justify-content",i)}`}(n)}\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 ${Fu(n,r)}\n /* The footer is position:absolute over this container; inset the\n scroll end by its measured height (--nami-footer-height, set by\n the paywall screen) so bottom content is not hidden behind it. */\n padding-bottom: calc(${Tu(r,n.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${xu(n,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${xu(n,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${c}: ${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=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();yt([Jt({type:Object})],_T.prototype,"component",void 0),yt([Jt({type:Number})],_T.prototype,"zIndex",void 0),yt([Jt({type:Boolean})],_T.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],_T.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],_T.prototype,"minSDKVersion",void 0),_T=yt([Pt("nami-content-container")],_T);var RT,FT=e=>e,OT=function(){function e(){var t;return Z(this,e),(t=Q(this,e)).inFocusedState=!1,t.scaleFactor=1,t._anyItemFocused=!1,t._handleClick=e=>{e.preventDefault(),Ss({contextProvider:t.contextProvider,onTap:t.component.onTap})},t._handleFocusIn=e=>{var i,n,a=e.target;if("nami-segment-picker-item"===(null===(i=a.tagName)||void 0===i?void 0:i.toLowerCase())){if(t._isTv&&(t._anyItemFocused=!0,!t._cameFromInside(e.relatedTarget))){var r,o=null===(r=t.shadowRoot)||void 0===r?void 0:r.querySelector("nami-segment-picker-item.active");if(o&&o!==a)return void o.focus()}"television"===(null===(n=t.contextProvider)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.formFactor)&&t.contextProvider.clearSelectedProduct(t.contextProvider.getCurrentGroupId())}},t._handleFocusOut=e=>{t._isTv&&(t._cameFromInside(e.relatedTarget)||(t._anyItemFocused=!1))},t.addEventListener("click",t._handleClick),t}return le(e,fu),ae(e,[{key:"_isTv",get:function(){return"television"===m()}},{key:"firstUpdated",value:function(t){var i,n;ge(e,"firstUpdated",this)([t]),null===(i=this.shadowRoot)||void 0===i||i.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var t,i;ge(e,"disconnectedCallback",this)([]),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusin",this._handleFocusIn),null===(i=this.shadowRoot)||void 0===i||i.removeEventListener("focusout",this._handleFocusOut)}},{key:"_cameFromInside",value:function(e){var t,i;return!!e&&("nami-segment-picker-item"===(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase())||!(null===(i=this.shadowRoot)||void 0===i||!i.contains(e)))}},{key:"styles",value:function(){var e,t,i,n=Xu("active",this.component.components[0]),a=Xu("inactive",this.component.components[0]),r=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||n.fillColor,o=this._anyItemFocused;return H(`\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 ${Iu(this.component)}\n /* Keep the container's base fill even when an item is focused. Repainting\n the whole container to the (often light) focused fill washes out the\n inactive item's text — the focused item's own pill is the indicator.\n The focused border still reacts via applyStyles(containerFocused). */\n ${xu(this.component,!1)}\n ${Gu(this.component,this.scaleFactor,o)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${xu(this.component,!0)}\n ${Gu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${Ju(this.component)}\n }\n .toggle{\n ${t=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Tu(i,t.topPadding)}px;\n bottom: ${Tu(i,t.bottomPadding)}px;\n width: calc(50% - ${Tu(i,t.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Yu(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${Yu(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 ${xu(n,!0)}\n ${qu(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 ${xu(n,!0)}\n ${qu(n,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(1).focused~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n\n nami-segment-picker-item:nth-of-type(2).focused~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${r?`background-color: ${r} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>xl(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return z(RT||(RT=FT`${0}<div class="toggle"></div>`),e)}}])}();yt([Jt({type:Object})],OT.prototype,"component",void 0),yt([Jt({type:Boolean})],OT.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],OT.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],OT.prototype,"minSDKVersion",void 0),yt([Qt()],OT.prototype,"_anyItemFocused",void 0),OT=yt([Pt("nami-segment-picker")],OT);var WT,$T=e=>e,NT=function(){function e(){var t;return Z(this,e),(t=Q(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._isFocused=!1,t._handleFocus=()=>{t.inFocusedState=!0,t._isTv&&(t._isFocused=!0,t.classList.add("focused"))},t._handleBlur=()=>{t.inFocusedState=!1,t._isTv&&(t._isFocused=!1,t.classList.remove("focused"))},t._handleKeyDown=e=>{"Enter"===e.key||" "===e.key||142===e.keyCode||195===e.keyCode?t._handleClick():!t._isTv||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(t._moveFocusToSibling("ArrowRight"===e.key?1:-1),e.preventDefault())},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return le(e,fu),ae(e,[{key:"_isTv",get:function(){return"television"===m()}},{key:"connectedCallback",value:function(){ge(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),this.addEventListener("blur",this._handleBlur)}},{key:"disconnectedCallback",value:function(){ge(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}},{key:"_moveFocusToSibling",value:function(e){var t=this.getRootNode();if(t instanceof ShadowRoot){var i=Array.from(t.querySelectorAll("nami-segment-picker-item")),n=i.indexOf(this);if(!(n<0)){var a=n+e;a>=0&&a<i.length&&i[a].focus()}}}},{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 i=null!==(t=e.get("component"))&&void 0!==t?t:this.component;if(i.formId){var n=this._getParentFormId();n&&this.contextProvider.state.formStates[n]&&(this._isActive=this.contextProvider.state.formStates[n]===i.formId)}else this._isActive=ET(i.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,i=Xu("active",this.component),n=Xu("inactive",this.component),a=this.component.focusedFontColor||i.fontColor||n.fontColor||"";return H(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n /* On television the sliding .toggle pill is the sole active/focus\n indicator, so the item's own background must stay inactive — otherwise\n it double-renders the focus fill and the previously-focused item stays\n lit. On other form factors there is no .focused pill, so the item\n background carries the hover/focus indication. */\n ${Yu(oe({},n,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${ju(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 ${qu(oe({},i,this.component),this.scaleFactor)}\n ${ju(null!==(t=this.component.activeDropShadow)&&void 0!==t?t:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${a?Du(a):""}\n }\n\n :host(:focus-visible) {\n outline: none !important;\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||"",z(WT||(WT=$T`<input type="radio"
463
463
  autocomplete="off"
464
464
  id="${0}"
465
465
  name="${0}"