@namiml/web-sdk 3.4.3-dev.202606100221 → 3.4.3-dev.202606110413
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.
|
@@ -12,6 +12,7 @@ export declare class NamiPaywallScreen extends LitElement {
|
|
|
12
12
|
flow?: NamiFlow;
|
|
13
13
|
private teardownEvent;
|
|
14
14
|
private activeTemplate;
|
|
15
|
+
private footerResizeObserver?;
|
|
15
16
|
static styles: import("lit").CSSResult;
|
|
16
17
|
connectedCallback(): void;
|
|
17
18
|
disconnectedCallback(): void;
|
|
@@ -19,6 +20,7 @@ export declare class NamiPaywallScreen extends LitElement {
|
|
|
19
20
|
firstUpdated(): void;
|
|
20
21
|
protected updated(): void;
|
|
21
22
|
private updateActiveRenderRoot;
|
|
23
|
+
private observeFooterHeight;
|
|
22
24
|
private postImpression;
|
|
23
25
|
private postPaywallScreenData;
|
|
24
26
|
private getTemplate;
|
|
@@ -2,6 +2,7 @@ import type { TCarouselContainer } from "@namiml/sdk-core";
|
|
|
2
2
|
import { TComponent, type TBaseComponent, type TContainerPosition } from '@namiml/sdk-core';
|
|
3
3
|
import type { TSegmentPicker, TTextLikeComponent } from "@namiml/sdk-core";
|
|
4
4
|
import type { TSemverObj } from "@namiml/sdk-core";
|
|
5
|
+
export declare function toPixels(scaleFactor: number, value?: number | string): number;
|
|
5
6
|
export declare function parseSize(value: string | number, scaleFactor: number): string;
|
|
6
7
|
export declare function backgroundColor(value: string, fallback?: string): string;
|
|
7
8
|
export declare function filteredBorderColor(value: string, fallback?: string): string;
|
package/dist/nami-web.cjs
CHANGED
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
`),e,e,e,function(e){return Xd[e]||Xd.CheckCircleOutlined}(e))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();Ae([ot({type:Object})],Rk.prototype,"component",void 0),Ae([ot({type:Boolean})],Rk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Rk.prototype,"scaleFactor",void 0),Rk=Ae([Fe("nami-symbol")],Rk);var Fk=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.inFocusedState,a=e.hidden,r=e.fontSize,o=e.alignment,s=e.strikethrough,u=e.spacing;return t.unsafeCSS(`\n :host {\n line-height: ${Ck(r,i)}px;\n display: ${a?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${Is(e,n)}\n ${Ik(e,n)}\n font-size: ${(null!=r?r:xk)*i}px;\n text-align: ${o||"center"};\n ${zs("string"!=typeof s&&s)}\n ${Us(e.fontName)}\n ${Hs(e,i,n)}\n ${Dk(e)}\n ${Ls(e)}\n ${function({alignment:e,horizontalAlignment:t}){return bs("justify-content",t&&gs[t]?gs[t]:e&&gs[e]?gs[e]:"center")}(e)}\n }\n :host > :not(:first-child) {\n margin-top: ${u||0}px;\n }\n .anticon {\n text-rendering: optimizelegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: inherit;\n display: inline-block;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -.125em;\n }\n .anticon svg {\n display: inline-block;\n line-height: 1;\n }\n\n :host .bullet-text-wrapper {\n line-height: ${Ck(r,i)}px;\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${Is(e,n)}\n ${Ik(e,n)}\n font-size: ${(null!=r?r:xk)*i}px;\n text-align: ${o||"center"};\n ${zs("string"!=typeof s&&s)}\n ${Us(e.fontName)}\n }\n ${Dk(e,":host .bullet-text-wrapper")}\n :host .bullet-text-wrapper p {\n margin: 0;\n line-height: ${Ck(r,i)}px;\n }\n `)}},{key:"render",value:function(){var e=this.component,i=e.fontColor,n=e.fontSize,a=e.activeFontColor,r=e.bulletComponent,o=e.texts,s=e.spacing,u=r?v({fontColor:i,fontSize:n,activeFontColor:a,spacing:s},r):null;if(!Array.isArray(o))return t.html(Sk||(Sk=Ak``));var l=o.map(e=>e?t.html(Ek||(Ek=Ak`<nami-text-list-item-wrapper .component=${0} .scaleFactor=${0}>
|
|
460
460
|
${0}
|
|
461
461
|
<div class="bullet-text-wrapper" .innerHTML="${0}"></div>
|
|
462
|
-
</nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&t.html(Pk||(Pk=Ak`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),Vl(e)):null);return t.html(Mk||(Mk=Ak`${0}`),l)}}])}();Ae([ot({type:Object})],Fk.prototype,"component",void 0),Ae([ot({type:Boolean})],Fk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Fk.prototype,"scaleFactor",void 0),Fk=Ae([Fe("nami-text-list")],Fk);(()=>{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=Vl.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 Ok=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=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 y(e,ps),m(e,[{key:"disconnectedCallback",value:function(){T(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,i=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=e.fillImage?t.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):t.unsafeCSS(Is(e,!1));return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${Vs(e.position)}\n ${Ls(e)}\n ${Hs(e,i,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Is(e,!0)}\n ${Hs(e,i,!0)}\n }\n :host(:focus-visible){\n ${qs(e)}\n }\n :host > * {\n ${Rs(n,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Au(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function Wk(e,t){return e===t||e!=e&&t!=t}function $k(e,t){for(var i=e.length;i--;)if(Wk(e[i][0],t))return i;return-1}Ae([ot({type:Object})],Ok.prototype,"component",void 0),Ae([ot({type:Boolean})],Ok.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Ok.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],Ok.prototype,"minSDKVersion",void 0),Ok=Ae([Fe("nami-container")],Ok);var Nk=Array.prototype.splice;function jk(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 Bk(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}jk.prototype.clear=function(){this.__data__=[],this.size=0},jk.prototype.delete=function(e){var t=this.__data__,i=$k(t,e);return!(i<0)&&(i==t.length-1?t.pop():Nk.call(t,i,1),--this.size,!0)},jk.prototype.get=function(e){var t=this.__data__,i=$k(t,e);return i<0?void 0:t[i][1]},jk.prototype.has=function(e){return $k(this.__data__,e)>-1},jk.prototype.set=function(e,t){var i=this.__data__,n=$k(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function zk(e){if(!Bk(e))return!1;var t=Oi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Uk,Hk=Ai["__core-js_shared__"],Gk=(Uk=/[^.]+$/.exec(Hk&&Hk.keys&&Hk.keys.IE_PROTO||""))?"Symbol(src)_1."+Uk:"";var Vk=Function.prototype.toString;function Kk(e){if(null!=e){try{return Vk.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Xk=/^\[object .+?Constructor\]$/,Yk=Function.prototype,qk=Object.prototype,Jk=Yk.toString,Qk=qk.hasOwnProperty,Zk=RegExp("^"+Jk.call(Qk).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eS(e){return!(!Bk(e)||(t=e,Gk&&Gk in t))&&(zk(e)?Zk:Xk).test(Kk(e));var t}function tS(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return eS(i)?i:void 0}var iS=tS(Ai,"Map"),nS=tS(Object,"create");var aS=Object.prototype.hasOwnProperty;var rS=Object.prototype.hasOwnProperty;function oS(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 sS(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 uS(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])}}oS.prototype.clear=function(){this.__data__=nS?nS(null):{},this.size=0},oS.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},oS.prototype.get=function(e){var t=this.__data__;if(nS){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return aS.call(t,e)?t[e]:void 0},oS.prototype.has=function(e){var t=this.__data__;return nS?void 0!==t[e]:rS.call(t,e)},oS.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=nS&&void 0===t?"__lodash_hash_undefined__":t,this},uS.prototype.clear=function(){this.size=0,this.__data__={hash:new oS,map:new(iS||jk),string:new oS}},uS.prototype.delete=function(e){var t=sS(this,e).delete(e);return this.size-=t?1:0,t},uS.prototype.get=function(e){return sS(this,e).get(e)},uS.prototype.has=function(e){return sS(this,e).has(e)},uS.prototype.set=function(e,t){var i=sS(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function lS(e){var t=this.__data__=new jk(e);this.size=t.size}lS.prototype.clear=function(){this.__data__=new jk,this.size=0},lS.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},lS.prototype.get=function(e){return this.__data__.get(e)},lS.prototype.has=function(e){return this.__data__.has(e)},lS.prototype.set=function(e,t){var i=this.__data__;if(i instanceof jk){var n=i.__data__;if(!iS||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new uS(n)}return i.set(e,t),this.size=i.size,this};function dS(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new uS;++t<i;)this.add(e[t])}function hS(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}dS.prototype.add=dS.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},dS.prototype.has=function(e){return this.__data__.has(e)};function cS(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 dS: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(!hS(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 mS=Ai.Uint8Array;function fS(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function vS(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var pS=Di?Di.prototype:void 0,gS=pS?pS.valueOf:void 0;var yS=Object.prototype.propertyIsEnumerable,bS=Object.getOwnPropertySymbols,wS=bS?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}(bS(e),function(t){return yS.call(e,t)}))}:function(){return[]};function kS(e){return Wi(e)&&"[object Arguments]"==Oi(e)}var SS=Object.prototype,ES=SS.hasOwnProperty,PS=SS.propertyIsEnumerable,MS=kS(function(){return arguments}())?kS:function(e){return Wi(e)&&ES.call(e,"callee")&&!PS.call(e,"callee")};var TS="object"==typeof exports&&exports&&!exports.nodeType&&exports,AS=TS&&"object"==typeof module&&module&&!module.nodeType&&module,DS=AS&&AS.exports===TS?Ai.Buffer:void 0,xS=(DS?DS.isBuffer:void 0)||function(){return!1},CS=/^(?:0|[1-9]\d*)$/;function IS(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&CS.test(e))&&e>-1&&e%1==0&&e<t}function LS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var _S={};_S["[object Float32Array]"]=_S["[object Float64Array]"]=_S["[object Int8Array]"]=_S["[object Int16Array]"]=_S["[object Int32Array]"]=_S["[object Uint8Array]"]=_S["[object Uint8ClampedArray]"]=_S["[object Uint16Array]"]=_S["[object Uint32Array]"]=!0,_S["[object Arguments]"]=_S["[object Array]"]=_S["[object ArrayBuffer]"]=_S["[object Boolean]"]=_S["[object DataView]"]=_S["[object Date]"]=_S["[object Error]"]=_S["[object Function]"]=_S["[object Map]"]=_S["[object Number]"]=_S["[object Object]"]=_S["[object RegExp]"]=_S["[object Set]"]=_S["[object String]"]=_S["[object WeakMap]"]=!1;var RS,FS="object"==typeof exports&&exports&&!exports.nodeType&&exports,OS=FS&&"object"==typeof module&&module&&!module.nodeType&&module,WS=OS&&OS.exports===FS&&Mi.process,$S=function(){try{var e=OS&&OS.require&&OS.require("util").types;return e||WS&&WS.binding&&WS.binding("util")}catch(e){}}(),NS=$S&&$S.isTypedArray,jS=NS?(RS=NS,function(e){return RS(e)}):function(e){return Wi(e)&&LS(e.length)&&!!_S[Oi(e)]},BS=Object.prototype.hasOwnProperty;function zS(e,t){var i=xi(e),n=!i&&MS(e),a=!i&&!n&&xS(e),r=!i&&!n&&!a&&jS(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)!BS.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||IS(l,u))||s.push(l);return s}var US=Object.prototype;var HS=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),GS=Object.prototype.hasOwnProperty;function VS(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||US))return HS(e);var t,i,n=[];for(var a in Object(e))GS.call(e,a)&&"constructor"!=a&&n.push(a);return n}function KS(e){return null!=(t=e)&&LS(t.length)&&!zk(t)?zS(e):VS(e);var t}function XS(e){return function(e,t,i){var n=t(e);return xi(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,KS,wS)}var YS=Object.prototype.hasOwnProperty;var qS=tS(Ai,"DataView"),JS=tS(Ai,"Promise"),QS=tS(Ai,"Set"),ZS=tS(Ai,"WeakMap"),eE="[object Map]",tE="[object Promise]",iE="[object Set]",nE="[object WeakMap]",aE="[object DataView]",rE=Kk(qS),oE=Kk(iS),sE=Kk(JS),uE=Kk(QS),lE=Kk(ZS),dE=Oi;(qS&&dE(new qS(new ArrayBuffer(1)))!=aE||iS&&dE(new iS)!=eE||JS&&dE(JS.resolve())!=tE||QS&&dE(new QS)!=iE||ZS&&dE(new ZS)!=nE)&&(dE=function(e){var t=Oi(e),i="[object Object]"==t?e.constructor:void 0,n=i?Kk(i):"";if(n)switch(n){case rE:return aE;case oE:return eE;case sE:return tE;case uE:return iE;case lE:return nE}return t});var hE="[object Arguments]",cE="[object Array]",mE="[object Object]",fE=Object.prototype.hasOwnProperty;function vE(e,t,i,n,a,r){var o=xi(e),s=xi(t),u=o?cE:dE(e),l=s?cE:dE(t),d=(u=u==hE?mE:u)==mE,h=(l=l==hE?mE:l)==mE,c=u==l;if(c&&xS(e)){if(!xS(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new lS),o||jS(e)?cS(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 mS(e),new mS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Wk(+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=fS;case"[object Set]":var u=1&n;if(s||(s=vS),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=cS(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(gS)return gS.call(e)==gS.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&fE.call(e,"__wrapped__"),f=h&&fE.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new lS),a(v,p,i,n,r)}}return!!c&&(r||(r=new lS),function(e,t,i,n,a,r){var o=1&i,s=XS(e),u=s.length;if(u!=XS(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:YS.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 pE(e,t,i,n,a){return e===t||(null==e||null==t||!Wi(e)&&!Wi(t)?e!=e&&t!=t:vE(e,t,i,n,pE,a))}function gE(e,t){return pE(e,t)}var yE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,i="vertical"===this.component.direction,n=i?"width":"height",a=i?"margin-top":"margin-left",r=this.component.fillImage?t.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):t.unsafeCSS(Is(this.component,!1));return t.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Vs(this.component.position)}\n ${Ls(this.component)}\n ${Hs(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${a}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Is(this.component,!0)}\n ${Hs(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${qs(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;gE(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=this.contextProvider.state,n=i.mediaList,a=i.currentGroupId,r=i.selectedPaywall,o=i.formFactor,s=Nn(this.contextProvider.productDetails,null!==(e=null==r?void 0:r.sku_menus)&&void 0!==e?e:[],(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||a);return Vn(this.contextProvider,s,this.component,n).map(([e,t])=>(this.inFocusedState="television"==o?e:this.inFocusedState,t.map(e=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();Ae([ot({type:Object})],yE.prototype,"component",void 0),Ae([ot({type:Boolean})],yE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],yE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],yE.prototype,"minSDKVersion",void 0),yE=Ae([Fe("nami-product-container")],yE);var bE,wE,kE=e=>e,SE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e,i=this.component,n=i.imageCropping,a=i.alignment,r=i.height,o=i.width,s=i.rightMargin,u=i.spacing,l=i.hidden,d=i.blur,h="fit"===n,c=this.contextConsumer.state.formFactor,m=As(null!=r?r:"100%",this.scaleFactor),f=As(null!==(e="fitContent"==o?r:o)&&void 0!==e?e:"100%",this.scaleFactor),v="string"==typeof r&&r.includes("%")||void 0===r,p="phone"===c&&v?"max-height":"height";return t.unsafeCSS(`\n :host {\n display: ${"television"===c?"flex":"inline-block"};\n ${l?"display:none;":""}\n position: relative;\n ${p}: ${m};\n width: ${f};\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: ${h?"contain":"cover"};\n object-position: ${a} center;\n ${p}: ${m};\n width: ${f};\n margin-right: ${s||u||0}px;\n ${d?`filter: blur(${d}px);`:""}\n flex-shrink: ${"number"==typeof o?0:1};\n }\n `)}},{key:"render",value:function(){var e,i=this.component,n=i.url,a=i.alt,r=i.title,o=i.focusedBorderColor,s=i.focusedFillColor,u=i.fillColor;return n?(!o&&na(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t.html(bE||(bE=kE`<img src="${0}" alt="${0}" />`),n,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t.html(wE||(wE=kE``)))}}])}();Ae([ot({type:Object})],SE.prototype,"component",void 0),Ae([ot({type:Boolean})],SE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],SE.prototype,"scaleFactor",void 0),SE=Ae([Fe("nami-image")],SE);var EE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"connectedCallback",value:function(){T(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 t.unsafeCSS("");var i=this.component,n=this.scaleFactor,a=this.contextConsumer.state.formFactor,r=i.backgroundBlur,o="vertical"===i.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n max-height: ${"television"===a?"100vh":""};\n display: ${i.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${_s(i)}\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=i.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${Is(i,!1)}\n transition: all 0.3s;\n ${Os(i,n)}\n }\n :host(:focus){\n ${Is(i,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${i.spacing?i.spacing*n: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=>Au(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],EE.prototype,"component",void 0),Ae([ot({type:Boolean})],EE.prototype,"fullscreen",void 0),Ae([ot({type:Boolean})],EE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],EE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],EE.prototype,"minSDKVersion",void 0),EE=Ae([Fe("nami-background-container")],EE);var PE,ME=e=>e,TE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e,i,n=this.contextConsumer,a=this.component,r=this.zIndex,o=this.scaleFactor;if(!n)return t.css(PE||(PE=ME``));var s=n.state.formFactor,u=a.backgroundBlur,l="phone"!==s?"width: 100%;":"",d=null!==(e=a.width)&&void 0!==e?e:a.fixedWidth,h=null!==(i=a.height)&&void 0!==i?i:a.fixedHeight,c="phone"===s?`max-width:100%;\n ${void 0!==d?`width: ${As(d,o)};`:""}\n ${void 0!==h?`height: ${As(h,o)};`:""}`:Ns(a,o),m="vertical"===a.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${a.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Ls(a)}\n ${c}\n ${l}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?gs[n]:void 0,s=a?gs[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"),`${bs("align-items",t)}${bs("justify-content",i)}`}(a)}\n ${u?`backdrop-filter: blur(${u}px);`:""}\n z-index: ${r};\n transition: all 0.3s;\n overflow-y: ${"television"===s?"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 ${Os(a,o)}\n ${Is(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Is(a,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${m}: ${a.spacing?a.spacing*o: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=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();Ae([ot({type:Object})],TE.prototype,"component",void 0),Ae([ot({type:Number})],TE.prototype,"zIndex",void 0),Ae([ot({type:Boolean})],TE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],TE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],TE.prototype,"minSDKVersion",void 0),TE=Ae([Fe("nami-content-container")],TE);var AE,DE=e=>e,xE=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleClick=e=>{e.preventDefault(),Mo({contextProvider:t.contextProvider,onTap:t.component.onTap})},t.addEventListener("click",t._handleClick),t}return y(e,ps),m(e,[{key:"styles",value:function(){var e,i,n=Ks("active",this.component.components[0]),a=Ks("inactive",this.component.components[0]);return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Ls(this.component)}\n ${Is(this.component,!1)}\n ${Hs(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Is(this.component,!0)}\n ${Hs(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${qs(this.component)}\n }\n .toggle{\n ${e=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Ts(i,e.topPadding)}px;\n bottom: ${Ts(i,e.bottomPadding)}px;\n width: calc(50% - ${Ts(i,e.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Xs(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${Xs(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 ${Is(n,!0)}\n ${Ys(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 ${Is(n,!0)}\n ${Ys(n,this.scaleFactor)}\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return t.html(AE||(AE=DE`${0}<div class="toggle"></div>`),e)}}])}();Ae([ot({type:Object})],xE.prototype,"component",void 0),Ae([ot({type:Boolean})],xE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],xE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],xE.prototype,"minSDKVersion",void 0),xE=Ae([Fe("nami-segment-picker")],xE);var CE,IE=e=>e,LE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return y(e,ps),m(e,[{key:"connectedCallback",value:function(){T(e,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){T(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{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=gE(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,i,n=Ks("active",this.component),a=Ks("inactive",this.component);return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${Xs(v({},a,this.component),this.scaleFactor,this.inFocusedState)}\n ${Bs(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 ${Ys(v({},n,this.component),this.scaleFactor)}\n ${Bs(null!==(i=this.component.activeDropShadow)&&void 0!==i?i:this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",t.html(CE||(CE=IE`<input type="radio"
|
|
462
|
+
</nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&t.html(Pk||(Pk=Ak`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),Vl(e)):null);return t.html(Mk||(Mk=Ak`${0}`),l)}}])}();Ae([ot({type:Object})],Fk.prototype,"component",void 0),Ae([ot({type:Boolean})],Fk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Fk.prototype,"scaleFactor",void 0),Fk=Ae([Fe("nami-text-list")],Fk);(()=>{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=Vl.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 Ok=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=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 y(e,ps),m(e,[{key:"disconnectedCallback",value:function(){T(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,i=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=e.fillImage?t.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):t.unsafeCSS(Is(e,!1));return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${Vs(e.position)}\n ${Ls(e)}\n ${Hs(e,i,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${Is(e,!0)}\n ${Hs(e,i,!0)}\n }\n :host(:focus-visible){\n ${qs(e)}\n }\n :host > * {\n ${Rs(n,o)}\n }\n :host > *:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e;return(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Au(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}},{key:"setFocusState",value:function(e){this.inFocusedState!==e&&(this.inFocusedState=e,this.classList.toggle("nami-focus-within",e),this.toggleAttribute("data-nami-focused",e))}}])}();function Wk(e,t){return e===t||e!=e&&t!=t}function $k(e,t){for(var i=e.length;i--;)if(Wk(e[i][0],t))return i;return-1}Ae([ot({type:Object})],Ok.prototype,"component",void 0),Ae([ot({type:Boolean})],Ok.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Ok.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],Ok.prototype,"minSDKVersion",void 0),Ok=Ae([Fe("nami-container")],Ok);var Nk=Array.prototype.splice;function jk(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 Bk(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}jk.prototype.clear=function(){this.__data__=[],this.size=0},jk.prototype.delete=function(e){var t=this.__data__,i=$k(t,e);return!(i<0)&&(i==t.length-1?t.pop():Nk.call(t,i,1),--this.size,!0)},jk.prototype.get=function(e){var t=this.__data__,i=$k(t,e);return i<0?void 0:t[i][1]},jk.prototype.has=function(e){return $k(this.__data__,e)>-1},jk.prototype.set=function(e,t){var i=this.__data__,n=$k(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function zk(e){if(!Bk(e))return!1;var t=Oi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Uk,Hk=Ai["__core-js_shared__"],Gk=(Uk=/[^.]+$/.exec(Hk&&Hk.keys&&Hk.keys.IE_PROTO||""))?"Symbol(src)_1."+Uk:"";var Vk=Function.prototype.toString;function Kk(e){if(null!=e){try{return Vk.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Xk=/^\[object .+?Constructor\]$/,Yk=Function.prototype,qk=Object.prototype,Jk=Yk.toString,Qk=qk.hasOwnProperty,Zk=RegExp("^"+Jk.call(Qk).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eS(e){return!(!Bk(e)||(t=e,Gk&&Gk in t))&&(zk(e)?Zk:Xk).test(Kk(e));var t}function tS(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return eS(i)?i:void 0}var iS=tS(Ai,"Map"),nS=tS(Object,"create");var aS=Object.prototype.hasOwnProperty;var rS=Object.prototype.hasOwnProperty;function oS(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 sS(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 uS(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])}}oS.prototype.clear=function(){this.__data__=nS?nS(null):{},this.size=0},oS.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},oS.prototype.get=function(e){var t=this.__data__;if(nS){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return aS.call(t,e)?t[e]:void 0},oS.prototype.has=function(e){var t=this.__data__;return nS?void 0!==t[e]:rS.call(t,e)},oS.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=nS&&void 0===t?"__lodash_hash_undefined__":t,this},uS.prototype.clear=function(){this.size=0,this.__data__={hash:new oS,map:new(iS||jk),string:new oS}},uS.prototype.delete=function(e){var t=sS(this,e).delete(e);return this.size-=t?1:0,t},uS.prototype.get=function(e){return sS(this,e).get(e)},uS.prototype.has=function(e){return sS(this,e).has(e)},uS.prototype.set=function(e,t){var i=sS(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function lS(e){var t=this.__data__=new jk(e);this.size=t.size}lS.prototype.clear=function(){this.__data__=new jk,this.size=0},lS.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},lS.prototype.get=function(e){return this.__data__.get(e)},lS.prototype.has=function(e){return this.__data__.has(e)},lS.prototype.set=function(e,t){var i=this.__data__;if(i instanceof jk){var n=i.__data__;if(!iS||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new uS(n)}return i.set(e,t),this.size=i.size,this};function dS(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new uS;++t<i;)this.add(e[t])}function hS(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}dS.prototype.add=dS.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},dS.prototype.has=function(e){return this.__data__.has(e)};function cS(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 dS: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(!hS(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 mS=Ai.Uint8Array;function fS(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function vS(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var pS=Di?Di.prototype:void 0,gS=pS?pS.valueOf:void 0;var yS=Object.prototype.propertyIsEnumerable,bS=Object.getOwnPropertySymbols,wS=bS?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}(bS(e),function(t){return yS.call(e,t)}))}:function(){return[]};function kS(e){return Wi(e)&&"[object Arguments]"==Oi(e)}var SS=Object.prototype,ES=SS.hasOwnProperty,PS=SS.propertyIsEnumerable,MS=kS(function(){return arguments}())?kS:function(e){return Wi(e)&&ES.call(e,"callee")&&!PS.call(e,"callee")};var TS="object"==typeof exports&&exports&&!exports.nodeType&&exports,AS=TS&&"object"==typeof module&&module&&!module.nodeType&&module,DS=AS&&AS.exports===TS?Ai.Buffer:void 0,xS=(DS?DS.isBuffer:void 0)||function(){return!1},CS=/^(?:0|[1-9]\d*)$/;function IS(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&CS.test(e))&&e>-1&&e%1==0&&e<t}function LS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var _S={};_S["[object Float32Array]"]=_S["[object Float64Array]"]=_S["[object Int8Array]"]=_S["[object Int16Array]"]=_S["[object Int32Array]"]=_S["[object Uint8Array]"]=_S["[object Uint8ClampedArray]"]=_S["[object Uint16Array]"]=_S["[object Uint32Array]"]=!0,_S["[object Arguments]"]=_S["[object Array]"]=_S["[object ArrayBuffer]"]=_S["[object Boolean]"]=_S["[object DataView]"]=_S["[object Date]"]=_S["[object Error]"]=_S["[object Function]"]=_S["[object Map]"]=_S["[object Number]"]=_S["[object Object]"]=_S["[object RegExp]"]=_S["[object Set]"]=_S["[object String]"]=_S["[object WeakMap]"]=!1;var RS,FS="object"==typeof exports&&exports&&!exports.nodeType&&exports,OS=FS&&"object"==typeof module&&module&&!module.nodeType&&module,WS=OS&&OS.exports===FS&&Mi.process,$S=function(){try{var e=OS&&OS.require&&OS.require("util").types;return e||WS&&WS.binding&&WS.binding("util")}catch(e){}}(),NS=$S&&$S.isTypedArray,jS=NS?(RS=NS,function(e){return RS(e)}):function(e){return Wi(e)&&LS(e.length)&&!!_S[Oi(e)]},BS=Object.prototype.hasOwnProperty;function zS(e,t){var i=xi(e),n=!i&&MS(e),a=!i&&!n&&xS(e),r=!i&&!n&&!a&&jS(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)!BS.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||IS(l,u))||s.push(l);return s}var US=Object.prototype;var HS=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),GS=Object.prototype.hasOwnProperty;function VS(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||US))return HS(e);var t,i,n=[];for(var a in Object(e))GS.call(e,a)&&"constructor"!=a&&n.push(a);return n}function KS(e){return null!=(t=e)&&LS(t.length)&&!zk(t)?zS(e):VS(e);var t}function XS(e){return function(e,t,i){var n=t(e);return xi(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,KS,wS)}var YS=Object.prototype.hasOwnProperty;var qS=tS(Ai,"DataView"),JS=tS(Ai,"Promise"),QS=tS(Ai,"Set"),ZS=tS(Ai,"WeakMap"),eE="[object Map]",tE="[object Promise]",iE="[object Set]",nE="[object WeakMap]",aE="[object DataView]",rE=Kk(qS),oE=Kk(iS),sE=Kk(JS),uE=Kk(QS),lE=Kk(ZS),dE=Oi;(qS&&dE(new qS(new ArrayBuffer(1)))!=aE||iS&&dE(new iS)!=eE||JS&&dE(JS.resolve())!=tE||QS&&dE(new QS)!=iE||ZS&&dE(new ZS)!=nE)&&(dE=function(e){var t=Oi(e),i="[object Object]"==t?e.constructor:void 0,n=i?Kk(i):"";if(n)switch(n){case rE:return aE;case oE:return eE;case sE:return tE;case uE:return iE;case lE:return nE}return t});var hE="[object Arguments]",cE="[object Array]",mE="[object Object]",fE=Object.prototype.hasOwnProperty;function vE(e,t,i,n,a,r){var o=xi(e),s=xi(t),u=o?cE:dE(e),l=s?cE:dE(t),d=(u=u==hE?mE:u)==mE,h=(l=l==hE?mE:l)==mE,c=u==l;if(c&&xS(e)){if(!xS(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new lS),o||jS(e)?cS(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 mS(e),new mS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Wk(+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=fS;case"[object Set]":var u=1&n;if(s||(s=vS),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=cS(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(gS)return gS.call(e)==gS.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&fE.call(e,"__wrapped__"),f=h&&fE.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new lS),a(v,p,i,n,r)}}return!!c&&(r||(r=new lS),function(e,t,i,n,a,r){var o=1&i,s=XS(e),u=s.length;if(u!=XS(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:YS.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 pE(e,t,i,n,a){return e===t||(null==e||null==t||!Wi(e)&&!Wi(t)?e!=e&&t!=t:vE(e,t,i,n,pE,a))}function gE(e,t){return pE(e,t)}var yE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e=this.component.backgroundBlur,i="vertical"===this.component.direction,n=i?"width":"height",a=i?"margin-top":"margin-left",r=this.component.fillImage?t.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${this.component.fillImage});\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n `):t.unsafeCSS(Is(this.component,!1));return t.unsafeCSS(`\n :host {\n opacity: 0;\n display: ${this.component.hidden?"none":"flex"};\n ${r};\n ${e?`backdrop-filter: blur(${e}px);`:""}\n ${Vs(this.component.position)}\n ${Ls(this.component)}\n ${Hs(this.component,this.scaleFactor,!1)}\n transition: transform .5s ease-in;\n }\n :host > *:not(:first-child) {\n ${a}: ${this.component.spacing?this.component.spacing*this.scaleFactor:0}px;\n }\n :host(:focus){\n ${Is(this.component,!0)}\n ${Hs(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${qs(this.component)}\n }\n :host > * {\n ${n}: 100%;\n }\n :host(.fade-in){\n opacity: 1;\n animation: fadeIn 0.5s ease-in\n }\n @keyframes fadeIn {\n 0% { opacity: 0; }\n 100% { opacity: 1; }\n }\n `)}},{key:"updated",value:function(){var e=this.contextProvider.state.currentGroupId;gE(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=this.contextProvider.state,n=i.mediaList,a=i.currentGroupId,r=i.selectedPaywall,o=i.formFactor,s=Nn(this.contextProvider.productDetails,null!==(e=null==r?void 0:r.sku_menus)&&void 0!==e?e:[],(null===(t=this.component)||void 0===t?void 0:t.subsetGroup)||a);return Vn(this.contextProvider,s,this.component,n).map(([e,t])=>(this.inFocusedState="television"==o?e:this.inFocusedState,t.map(e=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();Ae([ot({type:Object})],yE.prototype,"component",void 0),Ae([ot({type:Boolean})],yE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],yE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],yE.prototype,"minSDKVersion",void 0),yE=Ae([Fe("nami-product-container")],yE);var bE,wE,kE=e=>e,SE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e,i=this.component,n=i.imageCropping,a=i.alignment,r=i.height,o=i.width,s=i.rightMargin,u=i.spacing,l=i.hidden,d=i.blur,h="fit"===n,c=this.contextConsumer.state.formFactor,m=As(null!=r?r:"100%",this.scaleFactor),f=As(null!==(e="fitContent"==o?r:o)&&void 0!==e?e:"100%",this.scaleFactor),v="string"==typeof r&&r.includes("%")||void 0===r,p="phone"===c&&v?"max-height":"height";return t.unsafeCSS(`\n :host {\n display: ${"television"===c?"flex":"inline-block"};\n ${l?"display:none;":""}\n position: relative;\n ${p}: ${m};\n width: ${f};\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: ${h?"contain":"cover"};\n object-position: ${a} center;\n ${p}: ${m};\n width: ${f};\n margin-right: ${s||u||0}px;\n ${d?`filter: blur(${d}px);`:""}\n flex-shrink: ${"number"==typeof o?0:1};\n }\n `)}},{key:"render",value:function(){var e,i=this.component,n=i.url,a=i.alt,r=i.title,o=i.focusedBorderColor,s=i.focusedFillColor,u=i.fillColor;return n?(!o&&na(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t.html(bE||(bE=kE`<img src="${0}" alt="${0}" />`),n,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t.html(wE||(wE=kE``)))}}])}();Ae([ot({type:Object})],SE.prototype,"component",void 0),Ae([ot({type:Boolean})],SE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],SE.prototype,"scaleFactor",void 0),SE=Ae([Fe("nami-image")],SE);var EE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).fullscreen=!1,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"connectedCallback",value:function(){T(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 t.unsafeCSS("");var i=this.component,n=this.scaleFactor,a=this.contextConsumer.state.formFactor,r=i.backgroundBlur,o="vertical"===i.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n max-height: ${"television"===a?"100vh":""};\n display: ${i.hidden?"none":"flex"};\n flex-direction: column;\n overflow: hidden;\n ${_s(i)}\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=i.zIndex)&&void 0!==e?e:1};\n top: 0px;\n ${r?`backdrop-filter: blur(${r}px);`:""}\n ${Is(i,!1)}\n transition: all 0.3s;\n ${Os(i,n)}\n }\n :host(:focus){\n ${Is(i,!0)}\n }\n :host > *:not(:first-child) {\n ${o}: ${i.spacing?i.spacing*n: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=>Au(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],EE.prototype,"component",void 0),Ae([ot({type:Boolean})],EE.prototype,"fullscreen",void 0),Ae([ot({type:Boolean})],EE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],EE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],EE.prototype,"minSDKVersion",void 0),EE=Ae([Fe("nami-background-container")],EE);var PE,ME=e=>e,TE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).zIndex=2,t.inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e,i,n=this.contextConsumer,a=this.component,r=this.zIndex,o=this.scaleFactor;if(!n)return t.css(PE||(PE=ME``));var s=n.state.formFactor,u=a.backgroundBlur,l="phone"!==s?"width: 100%;":"",d=null!==(e=a.width)&&void 0!==e?e:a.fixedWidth,h=null!==(i=a.height)&&void 0!==i?i:a.fixedHeight,c="phone"===s?`max-width:100%;\n ${void 0!==d?`width: ${As(d,o)};`:""}\n ${void 0!==h?`height: ${As(h,o)};`:""}`:Ns(a,o),m="vertical"===a.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${a.hidden?"none":"flex"};\n position: relative;\n flex: 1;\n min-height: 0;\n ${Ls(a)}\n ${c}\n ${l}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?gs[n]:void 0,s=a?gs[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"),`${bs("align-items",t)}${bs("justify-content",i)}`}(a)}\n ${u?`backdrop-filter: blur(${u}px);`:""}\n z-index: ${r};\n transition: all 0.3s;\n overflow-y: ${"television"===s?"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 ${Os(a,o)}\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(${Ts(o,a.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${Is(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${Is(a,!0)}\n }\n :host > * {\n width: 100%;\n }\n :host > *:not(:first-child) {\n ${m}: ${a.spacing?a.spacing*o: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=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();Ae([ot({type:Object})],TE.prototype,"component",void 0),Ae([ot({type:Number})],TE.prototype,"zIndex",void 0),Ae([ot({type:Boolean})],TE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],TE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],TE.prototype,"minSDKVersion",void 0),TE=Ae([Fe("nami-content-container")],TE);var AE,DE=e=>e,xE=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleClick=e=>{e.preventDefault(),Mo({contextProvider:t.contextProvider,onTap:t.component.onTap})},t.addEventListener("click",t._handleClick),t}return y(e,ps),m(e,[{key:"styles",value:function(){var e,i,n=Ks("active",this.component.components[0]),a=Ks("inactive",this.component.components[0]);return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${Ls(this.component)}\n ${Is(this.component,!1)}\n ${Hs(this.component,this.scaleFactor,!1)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${Is(this.component,!0)}\n ${Hs(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${qs(this.component)}\n }\n .toggle{\n ${e=this.component,i=this.scaleFactor,`\n position: absolute;\n top: ${Ts(i,e.topPadding)}px;\n bottom: ${Ts(i,e.bottomPadding)}px;\n width: calc(50% - ${Ts(i,e.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${Xs(a,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${Xs(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 ${Is(n,!0)}\n ${Ys(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 ${Is(n,!0)}\n ${Ys(n,this.scaleFactor)}\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return t.html(AE||(AE=DE`${0}<div class="toggle"></div>`),e)}}])}();Ae([ot({type:Object})],xE.prototype,"component",void 0),Ae([ot({type:Boolean})],xE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],xE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],xE.prototype,"minSDKVersion",void 0),xE=Ae([Fe("nami-segment-picker")],xE);var CE,IE=e=>e,LE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{t._updateFormState(),t.requestUpdate("component")},t._handleHover=()=>{t.inFocusedState=!0},t}return y(e,ps),m(e,[{key:"connectedCallback",value:function(){T(e,"connectedCallback",this)([]),this._isActive=!!this.component.checked,this.classList.toggle("active",this._isActive),this.component.formId&&this._updateFormState(),this.addEventListener("click",this._handleClick),this.addEventListener("mouseover",this._handleHover),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("focus",this._handleFocus)}},{key:"disconnectedCallback",value:function(){T(e,"disconnectedCallback",this)([]),this.removeEventListener("click",this._handleClick),this.removeEventListener("mouseover",this._handleHover),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("focus",this._handleFocus)}},{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=gE(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,i,n=Ks("active",this.component),a=Ks("inactive",this.component);return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${this.component.hidden?"none":"inline-flex"};\n position: relative;\n ${Xs(v({},a,this.component),this.scaleFactor,this.inFocusedState)}\n ${Bs(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 ${Ys(v({},n,this.component),this.scaleFactor)}\n ${Bs(null!==(i=this.component.activeDropShadow)&&void 0!==i?i:this.component.dropShadow)}\n }\n\n input {\n visibility: hidden;\n position: absolute;\n top: 0;\n }\n `)}},{key:"render",value:function(){return this.tabIndex=0,this.role="tab",this.ariaSelected=`${this._isActive}`,this.ariaLabel=this.component.text||"",t.html(CE||(CE=IE`<input type="radio"
|
|
463
463
|
autocomplete="off"
|
|
464
464
|
id="${0}"
|
|
465
465
|
name="${0}"
|
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
`),e.map(e=>e.map(e=>(e.spacing&&(this.slideSpacing=2*e.spacing),t.html(LR||(LR=_R`
|
|
511
511
|
<div class="swiper-slide">
|
|
512
512
|
${0}
|
|
513
|
-
</div>`),Au(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}();Ae([ot({type:Object})],RR.prototype,"component",void 0),Ae([ot({type:Boolean})],RR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],RR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],RR.prototype,"minSDKVersion",void 0),RR=Ae([Fe("nami-carousel-container")],RR);var FR=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{Mo({contextProvider:t.contextProvider,onTap:t.muted?t.component.mutedOnTap:t.component.volumeOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return y(e,ps),m(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${Is(e,!1)}\n ${Ls(e)}\n ${Hs(e,i,!1)}\n }\n :host(:focus){\n ${Is(e,!0)}\n ${Hs(e,i,!0)}\n }\n :host(:focus-visible){\n ${qs(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;this.muted=null!==(e=null===(t=Po.instance)||void 0===t?void 0:t.muted)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});var i=this.muted?this.component.mutedComponents:this.component.volumeComponents;return null==i?void 0:i.map(e=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],FR.prototype,"component",void 0),Ae([ot({type:Boolean})],FR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],FR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],FR.prototype,"minSDKVersion",void 0),FR=Ae([Fe("nami-volume-button")],FR);var OR=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{Mo({contextProvider:t.contextProvider,onTap:t.playing?t.component.playingOnTap:t.component.pausedOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return y(e,ps),m(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${Is(e,!1)}\n ${Ls(e)}\n ${Hs(e,i,!1)}\n }\n :host(:focus){\n ${Is(e,!0)}\n ${Hs(e,i,!0)}\n }\n :host(:focus-visible){\n ${qs(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;return this.playing=null!==(e=null===(t=Po.instance)||void 0===t?void 0:t.playing)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0}),(this.playing?this.component.playingComponents:this.component.pausedComponents).map(e=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],OR.prototype,"component",void 0),Ae([ot({type:Boolean})],OR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],OR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],OR.prototype,"minSDKVersion",void 0),OR=Ae([Fe("nami-play-pause-button")],OR);var WR=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=e.fillImage?t.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):t.unsafeCSS(Is(e,!1));return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${Vs(e.position)}\n ${Ls(e)}\n ${Hs(e,i,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${Is(e,!0)}\n ${Hs(e,i,!0)}\n }\n :host(:focus-visible){\n ${qs(e)}\n }\n /* Overlapping children center on both axes like the other SDKs' ZStack;\n the flex center on :host doesn't reach absolutely-positioned boxes. */\n :host > *:not(nami-text) {\n position: absolute;\n inset: 0;\n margin: auto;\n }\n :host > * {\n ${Rs(n,o)}\n }\n :host > nami-text:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&na(a,n)||(this.tabIndex=0),(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Au(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],WR.prototype,"component",void 0),Ae([ot({type:Boolean})],WR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],WR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],WR.prototype,"minSDKVersion",void 0),WR=Ae([Fe("nami-stack")],WR);var $R,NR,jR=e=>e,BR="nami-disabled",zR=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).active=!0,e.timeSpentOnPaywall=0,e.activeTemplate=null,e}return y(i,t.LitElement),m(i,[{key:"connectedCallback",value:function(){T(i,"connectedCallback",this)([]),this.minSDKVersion=e.parseToSemver(this.paywall.template.min_sdk_version),this.contextProvider=ut.create(this.paywall,this.context,this.campaign),this.contextConsumer=new ss(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(BR),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}},{key:"disconnectedCallback",value:function(){T(i,"disconnectedCallback",this)([]),ut.remove(this.contextProvider),this.teardownEvent(),this.active&&Eo()}},{key:"userInteractionListener",value:function(e){this.classList.toggle(BR,!e.enabled)}},{key:"firstUpdated",value:function(){this.postImpression(),this.postPaywallScreenData(),this.updateActiveRenderRoot()}},{key:"updated",value:function(){this.updateActiveRenderRoot()}},{key:"updateActiveRenderRoot",value:function(){this.active&&this.activeTemplate&&(po(this.activeTemplate,this.contextProvider),function(e){if(Ba("setActivePageRenderRoot:enter",{hasRoot:!!e,rootType:e instanceof Element?Ua(e):e instanceof DocumentFragment?"document-fragment":String(e),activePageKey:va,activePageAnnounced:fa,activeElement:Ua(Ja())}),ma=e,e&&ha&&!fa){var t=Ja();if(t&&"contains"in e&&e.contains(t))go(t);else if(e instanceof DocumentFragment){var i=e.activeElement;i&&go(i)}}}(this.renderRoot))}},{key:"postImpression",value:function(){var t,i;null!==(t=this.paywall)&&void 0!==t&&t.id&&(t=>{var i,n,a;S(function(r){for(;;)switch(r.p=r.n){case 0:if(!e.isAnonymousMode()){r.n=1;break}return e.logger.info("Skipping paywall impression - anonymous mode"),r.a(2);case 1:return(i=e.storageService.getSessionId())&&(t.session=i),(n=e.storageService.getLaunchId())&&(t.launch_id=n),t.app_env="production",t.url_params=e.getUrlParams(),e.logger.info("Post paywall impression - segment ",t.segment),r.p=2,r.n=3,o(e.NamiAPI.instance.postImpression(t));case 3:r.n=5;break;case 4:r.p=4,a=r.v,e.logger.error("Error posting impression",a);case 5:return r.a(2)}},null,null,[[2,4]],Promise)})({segment:null===(i=this.campaign)||void 0===i?void 0:i.segment,call_to_action:this.paywall.id})}},{key:"postPaywallScreenData",value:function(){e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.SHOW_PAYWALL}))}},{key:"getTemplate",value:function(){var e,t,i,n;this.contextProvider.state.selectedPaywall===this.paywall?t=this.contextProvider.state.currentPage:t=null!==(i=null===(n=this.paywall.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.currentPage)&&void 0!==i?i:"page1";var a=null===(e=this.paywall.template)||void 0===e?void 0:e.pages.find(e=>e.name===t);if(!a)throw new Error(`Page with name ${t} not found in paywall template.`);return this.activeTemplate=a,this.active&&po(a,this.contextProvider),a}},{key:"render",value:function(){var i,n=this.getTemplate(),a=n.backgroundContainer,r=n.header,o=void 0===r?[]:r,s=n.footer,u=void 0===s?[]:s,l=n.contentContainer,d=null!==(i=this.contextProvider.state.fullScreenPresentation)&&void 0!==i&&i,h=this.contextProvider.getFormFactor(),c=e.getDeviceScaleFactor(h);return t.html($R||($R=jR`
|
|
513
|
+
</div>`),Au(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))))))}}])}();Ae([ot({type:Object})],RR.prototype,"component",void 0),Ae([ot({type:Boolean})],RR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],RR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],RR.prototype,"minSDKVersion",void 0),RR=Ae([Fe("nami-carousel-container")],RR);var FR=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{Mo({contextProvider:t.contextProvider,onTap:t.muted?t.component.mutedOnTap:t.component.volumeOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return y(e,ps),m(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${Is(e,!1)}\n ${Ls(e)}\n ${Hs(e,i,!1)}\n }\n :host(:focus){\n ${Is(e,!0)}\n ${Hs(e,i,!0)}\n }\n :host(:focus-visible){\n ${qs(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;this.muted=null!==(e=null===(t=Po.instance)||void 0===t?void 0:t.muted)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0});var i=this.muted?this.component.mutedComponents:this.component.volumeComponents;return null==i?void 0:i.map(e=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],FR.prototype,"component",void 0),Ae([ot({type:Boolean})],FR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],FR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],FR.prototype,"minSDKVersion",void 0),FR=Ae([Fe("nami-volume-button")],FR);var OR=function(){function e(){var t;return u(this,e),(t=s(this,e)).inFocusedState=!1,t.scaleFactor=1,t._handleFocus=()=>{t.inFocusedState=!0},t._handleBlur=()=>{t.inFocusedState=!1},t._handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key&&142!==e.keyCode&&195!==e.keyCode||t._handleClick()},t._handleClick=()=>{Mo({contextProvider:t.contextProvider,onTap:t.playing?t.component.playingOnTap:t.component.pausedOnTap}),t.requestUpdate()},t.addEventListener("click",t._handleClick,!1),t.addEventListener("focus",t._handleFocus,!1),t.addEventListener("blur",t._handleBlur,!1),t.addEventListener("keydown",t._handleKeyDown,!1),t}return y(e,ps),m(e,[{key:"updated",value:function(){var e;this.ariaLabel=this.component.screenreaderText||this.component.title||"",this.ariaDescription=null!==(e=this.component.screenreaderHint)&&void 0!==e?e:""}},{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n="vertical"===e.direction?"margin-top":"margin-left";return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n cursor: pointer;\n ${Is(e,!1)}\n ${Ls(e)}\n ${Hs(e,i,!1)}\n }\n :host(:focus){\n ${Is(e,!0)}\n ${Hs(e,i,!0)}\n }\n :host(:focus-visible){\n ${qs(e)}\n }\n :host > *:not(:first-child) {\n ${n}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t;return this.playing=null!==(e=null===(t=Po.instance)||void 0===t?void 0:t.playing)&&void 0!==e&&e,this.tabIndex=0,this.role="button",1==this.inFocusedState&&this.focus({preventScroll:!0}),(this.playing?this.component.playingComponents:this.component.pausedComponents).map(e=>Au(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))}}])}();Ae([ot({type:Object})],OR.prototype,"component",void 0),Ae([ot({type:Boolean})],OR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],OR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],OR.prototype,"minSDKVersion",void 0),OR=Ae([Fe("nami-play-pause-button")],OR);var WR=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,ps),m(e,[{key:"styles",value:function(){var e=this.component,i=this.scaleFactor,n=this.minSDKVersion,a=e.backgroundBlur,r="vertical"===e.direction,o=r?"width":"height",s=r?"margin-top":"margin-left",u=e.fillImage?t.unsafeCSS(`\n line-height: 1.5715;\n background-image: url(${e.fillImage});\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n height: 100%;\n width: 100%;\n `):t.unsafeCSS(Is(e,!1));return t.unsafeCSS(`\n :host {\n box-sizing: border-box;\n display: ${e.hidden?"none":"flex"};\n ${a?`backdrop-filter: blur(${a}px);`:""}\n ${u};\n ${Vs(e.position)}\n ${Ls(e)}\n ${Hs(e,i,!1)}\n display: ${e.hidden?"none":"flex"};\n align-items: center;\n justify-content: center;\n }\n :host(:focus){\n ${Is(e,!0)}\n ${Hs(e,i,!0)}\n }\n :host(:focus-visible){\n ${qs(e)}\n }\n /* Overlapping children center on both axes like the other SDKs' ZStack;\n the flex center on :host doesn't reach absolutely-positioned boxes. */\n :host > *:not(nami-text) {\n position: absolute;\n inset: 0;\n margin: auto;\n }\n :host > * {\n ${Rs(n,o)}\n }\n :host > nami-text:not(:first-child) {\n ${s}: ${e.spacing?e.spacing*i:0}px;\n }\n `)}},{key:"render",value:function(){var e,t=this.component,i=t.focusedBorderColor,n=t.focusedFillColor,a=t.fillColor;return!i&&na(a,n)||(this.tabIndex=0),(null!==(e=this.component.components)&&void 0!==e?e:[]).map(e=>Au(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],WR.prototype,"component",void 0),Ae([ot({type:Boolean})],WR.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],WR.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],WR.prototype,"minSDKVersion",void 0),WR=Ae([Fe("nami-stack")],WR);var $R,NR,jR=e=>e,BR="nami-disabled",zR=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).active=!0,e.timeSpentOnPaywall=0,e.activeTemplate=null,e}return y(i,t.LitElement),m(i,[{key:"connectedCallback",value:function(){T(i,"connectedCallback",this)([]),this.minSDKVersion=e.parseToSemver(this.paywall.template.min_sdk_version),this.contextProvider=ut.create(this.paywall,this.context,this.campaign),this.contextConsumer=new ss(this,this.contextProvider),this.flow&&this.contextProvider.setFlow(this.flow),this.contextProvider.setTimeSpentOnPaywall(this.timeSpentOnPaywall),this.contextProvider.state.userInteractionEnabled||this.classList.add(BR),this.teardownEvent=this.contextProvider.onEvent("user-interaction-changed",this.userInteractionListener.bind(this))}},{key:"disconnectedCallback",value:function(){var e;T(i,"disconnectedCallback",this)([]),ut.remove(this.contextProvider),this.teardownEvent(),null===(e=this.footerResizeObserver)||void 0===e||e.disconnect(),this.active&&Eo()}},{key:"userInteractionListener",value:function(e){this.classList.toggle(BR,!e.enabled)}},{key:"firstUpdated",value:function(){this.postImpression(),this.postPaywallScreenData(),this.updateActiveRenderRoot(),this.observeFooterHeight()}},{key:"updated",value:function(){this.updateActiveRenderRoot()}},{key:"updateActiveRenderRoot",value:function(){this.active&&this.activeTemplate&&(po(this.activeTemplate,this.contextProvider),function(e){if(Ba("setActivePageRenderRoot:enter",{hasRoot:!!e,rootType:e instanceof Element?Ua(e):e instanceof DocumentFragment?"document-fragment":String(e),activePageKey:va,activePageAnnounced:fa,activeElement:Ua(Ja())}),ma=e,e&&ha&&!fa){var t=Ja();if(t&&"contains"in e&&e.contains(t))go(t);else if(e instanceof DocumentFragment){var i=e.activeElement;i&&go(i)}}}(this.renderRoot))}},{key:"observeFooterHeight",value:function(){if("undefined"!=typeof ResizeObserver){var e=this.renderRoot.querySelector("nami-footer");e&&(this.footerResizeObserver=new ResizeObserver(e=>{var t,i,n=e[e.length-1];if(n){var a=null!==(t=null===(i=n.borderBoxSize)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.blockSize)&&void 0!==t?t:n.contentRect.height;this.style.setProperty("--nami-footer-height",`${a}px`)}}),this.footerResizeObserver.observe(e))}}},{key:"postImpression",value:function(){var t,i;null!==(t=this.paywall)&&void 0!==t&&t.id&&(t=>{var i,n,a;S(function(r){for(;;)switch(r.p=r.n){case 0:if(!e.isAnonymousMode()){r.n=1;break}return e.logger.info("Skipping paywall impression - anonymous mode"),r.a(2);case 1:return(i=e.storageService.getSessionId())&&(t.session=i),(n=e.storageService.getLaunchId())&&(t.launch_id=n),t.app_env="production",t.url_params=e.getUrlParams(),e.logger.info("Post paywall impression - segment ",t.segment),r.p=2,r.n=3,o(e.NamiAPI.instance.postImpression(t));case 3:r.n=5;break;case 4:r.p=4,a=r.v,e.logger.error("Error posting impression",a);case 5:return r.a(2)}},null,null,[[2,4]],Promise)})({segment:null===(i=this.campaign)||void 0===i?void 0:i.segment,call_to_action:this.paywall.id})}},{key:"postPaywallScreenData",value:function(){e.NamiEventEmitter.getInstance().emit(e.PAYWALL_ACTION_EVENT,v({},this.contextProvider.getPaywallActionEventData(),{action:e.NamiPaywallAction.SHOW_PAYWALL}))}},{key:"getTemplate",value:function(){var e,t,i,n;this.contextProvider.state.selectedPaywall===this.paywall?t=this.contextProvider.state.currentPage:t=null!==(i=null===(n=this.paywall.template)||void 0===n||null===(n=n.initialState)||void 0===n?void 0:n.currentPage)&&void 0!==i?i:"page1";var a=null===(e=this.paywall.template)||void 0===e?void 0:e.pages.find(e=>e.name===t);if(!a)throw new Error(`Page with name ${t} not found in paywall template.`);return this.activeTemplate=a,this.active&&po(a,this.contextProvider),a}},{key:"render",value:function(){var i,n=this.getTemplate(),a=n.backgroundContainer,r=n.header,o=void 0===r?[]:r,s=n.footer,u=void 0===s?[]:s,l=n.contentContainer,d=null!==(i=this.contextProvider.state.fullScreenPresentation)&&void 0!==i&&i,h=this.contextProvider.getFormFactor(),c=e.getDeviceScaleFactor(h);return t.html($R||($R=jR`
|
|
514
514
|
<nami-background-container
|
|
515
515
|
.component=${0}
|
|
516
516
|
.scaleFactor=${0}
|
package/dist/nami-web.d.ts
CHANGED
|
@@ -371,6 +371,7 @@ declare class NamiPaywallScreen extends LitElement {
|
|
|
371
371
|
flow?: NamiFlow;
|
|
372
372
|
private teardownEvent;
|
|
373
373
|
private activeTemplate;
|
|
374
|
+
private footerResizeObserver?;
|
|
374
375
|
static styles: lit.CSSResult;
|
|
375
376
|
connectedCallback(): void;
|
|
376
377
|
disconnectedCallback(): void;
|
|
@@ -378,6 +379,7 @@ declare class NamiPaywallScreen extends LitElement {
|
|
|
378
379
|
firstUpdated(): void;
|
|
379
380
|
protected updated(): void;
|
|
380
381
|
private updateActiveRenderRoot;
|
|
382
|
+
private observeFooterHeight;
|
|
381
383
|
private postImpression;
|
|
382
384
|
private postPaywallScreenData;
|
|
383
385
|
private getTemplate;
|