@namiml/web-sdk 3.4.10-dev.202608201913 → 3.4.10-dev.202608212120
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.
|
@@ -5,9 +5,25 @@ import type { TProductContainer } from '@namiml/sdk-core';
|
|
|
5
5
|
import type { TSemverObj } from '@namiml/sdk-core';
|
|
6
6
|
export declare class NamiContainer extends NamiElement {
|
|
7
7
|
component: TContainer | TProductContainer;
|
|
8
|
+
/**
|
|
9
|
+
* Focus *inherited from a focusable ancestor* — "the button I live inside is focused".
|
|
10
|
+
* This is the only value handed down to children (see `render`).
|
|
11
|
+
*
|
|
12
|
+
* NAM-3605: deliberately distinct from `focusWithin` below. Conflating the two made a
|
|
13
|
+
* container broadcast focus to every child whenever any one descendant was focused, which
|
|
14
|
+
* flipped sibling buttons' text to their `focusedFontColor` while CSS `:host(:focus)` left
|
|
15
|
+
* their fill in the resting state — dark text on a dark fill.
|
|
16
|
+
*/
|
|
8
17
|
inFocusedState: boolean;
|
|
9
18
|
scaleFactor: number;
|
|
10
19
|
minSDKVersion: TSemverObj;
|
|
20
|
+
/**
|
|
21
|
+
* Focus held by *some descendant* of this container — the `:focus-within` analogue. Drives
|
|
22
|
+
* only this container's own styling (the `nami-focus-within` class and `data-nami-focused`
|
|
23
|
+
* attribute, both consumed by CSS), so it is a plain field rather than reactive state: no
|
|
24
|
+
* template output depends on it and it must never reach children.
|
|
25
|
+
*/
|
|
26
|
+
private focusWithin;
|
|
11
27
|
private readonly handleFocusIn;
|
|
12
28
|
private readonly handleFocusOut;
|
|
13
29
|
private readonly handleFocusChanged;
|
package/dist/nami-web.cjs
CHANGED
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
`),e,e,e,function(e){return rh[e]||rh.CheckCircleOutlined}(e))}},{key:"render",value:function(){return this.renderSvgIcon(this.shouldRenderCurrentIcon()?this.component.name:this.previousSymbolName)}}])}();Ae([ot({type:Object})],Vk.prototype,"component",void 0),Ae([ot({type:Boolean})],Vk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Vk.prototype,"scaleFactor",void 0),Vk=Ae([Fe("nami-symbol")],Vk);var Kk=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),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 ${zk(e,i)}\n display: ${a?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${$s(e,n)}\n ${Uk(e,n)}\n font-size: ${(null!=r?r:jk)*i}px;\n text-align: ${o||"center"};\n ${qs("string"!=typeof s&&s)}\n ${Js(e.fontName)}\n ${eu(e,i,n)}\n ${Nk(e)}\n ${js(e)}\n ${function({alignment:e,horizontalAlignment:t}){return Ms("justify-content",t&&Ts[t]?Ts[t]:e&&Ts[e]?Ts[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 ${zk(e,i)}\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${$s(e,n)}\n ${Uk(e,n)}\n font-size: ${(null!=r?r:jk)*i}px;\n text-align: ${o||"center"};\n ${qs("string"!=typeof s&&s)}\n ${Js(e.fontName)}\n }\n ${Nk(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 ${zk(e,i)}\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(_k||(_k=$k``));var l=o.map(e=>e?t.html(Rk||(Rk=$k`<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(Fk||(Fk=$k`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),nd(e)):null);return t.html(Ok||(Ok=$k`${0}`),l)}}])}();Ae([ot({type:Object})],Kk.prototype,"component",void 0),Ae([ot({type:Boolean})],Kk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Kk.prototype,"scaleFactor",void 0),Kk=Ae([Fe("nami-text-list")],Kk);(()=>{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=nd.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 Xk=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,Es),m(e,[{key:"disconnectedCallback",value:function(){M(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=t.unsafeCSS(Ns(e)),l=Boolean(e.fillColor||e.fillImage),d=e.roundBorders,h=Array.isArray(d)&&d.length>0&&d.length<4,c=l&&h?"overflow: hidden;":"";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 ${c}\n ${iu(e.position)}\n ${js(e)}\n ${eu(e,i,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${$s(e,!0)}\n ${eu(e,i,!0)}\n }\n :host(:focus-visible){\n ${ou(e)}\n }\n :host > * {\n ${zs(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=>$u(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 Yk(e,t){return e===t||e!=e&&t!=t}function qk(e,t){for(var i=e.length;i--;)if(Yk(e[i][0],t))return i;return-1}Ae([ot({type:Object})],Xk.prototype,"component",void 0),Ae([ot({type:Boolean})],Xk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Xk.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],Xk.prototype,"minSDKVersion",void 0),Xk=Ae([Fe("nami-container")],Xk);var Jk=Array.prototype.splice;function Qk(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 Zk(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}Qk.prototype.clear=function(){this.__data__=[],this.size=0},Qk.prototype.delete=function(e){var t=this.__data__,i=qk(t,e);return!(i<0)&&(i==t.length-1?t.pop():Jk.call(t,i,1),--this.size,!0)},Qk.prototype.get=function(e){var t=this.__data__,i=qk(t,e);return i<0?void 0:t[i][1]},Qk.prototype.has=function(e){return qk(this.__data__,e)>-1},Qk.prototype.set=function(e,t){var i=this.__data__,n=qk(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function eS(e){if(!Zk(e))return!1;var t=Oi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var tS,iS=Ai["__core-js_shared__"],nS=(tS=/[^.]+$/.exec(iS&&iS.keys&&iS.keys.IE_PROTO||""))?"Symbol(src)_1."+tS:"";var aS=Function.prototype.toString;function rS(e){if(null!=e){try{return aS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var oS=/^\[object .+?Constructor\]$/,sS=Function.prototype,uS=Object.prototype,lS=sS.toString,dS=uS.hasOwnProperty,hS=RegExp("^"+lS.call(dS).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cS(e){return!(!Zk(e)||(t=e,nS&&nS in t))&&(eS(e)?hS:oS).test(rS(e));var t}function mS(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return cS(i)?i:void 0}var fS=mS(Ai,"Map"),vS=mS(Object,"create");var pS=Object.prototype.hasOwnProperty;var gS=Object.prototype.hasOwnProperty;function yS(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 bS(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 wS(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])}}yS.prototype.clear=function(){this.__data__=vS?vS(null):{},this.size=0},yS.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},yS.prototype.get=function(e){var t=this.__data__;if(vS){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return pS.call(t,e)?t[e]:void 0},yS.prototype.has=function(e){var t=this.__data__;return vS?void 0!==t[e]:gS.call(t,e)},yS.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=vS&&void 0===t?"__lodash_hash_undefined__":t,this},wS.prototype.clear=function(){this.size=0,this.__data__={hash:new yS,map:new(fS||Qk),string:new yS}},wS.prototype.delete=function(e){var t=bS(this,e).delete(e);return this.size-=t?1:0,t},wS.prototype.get=function(e){return bS(this,e).get(e)},wS.prototype.has=function(e){return bS(this,e).has(e)},wS.prototype.set=function(e,t){var i=bS(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function kS(e){var t=this.__data__=new Qk(e);this.size=t.size}kS.prototype.clear=function(){this.__data__=new Qk,this.size=0},kS.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},kS.prototype.get=function(e){return this.__data__.get(e)},kS.prototype.has=function(e){return this.__data__.has(e)},kS.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Qk){var n=i.__data__;if(!fS||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new wS(n)}return i.set(e,t),this.size=i.size,this};function SS(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new wS;++t<i;)this.add(e[t])}function ES(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}SS.prototype.add=SS.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},SS.prototype.has=function(e){return this.__data__.has(e)};function TS(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 SS: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(!ES(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 PS=Ai.Uint8Array;function MS(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function AS(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var DS=Di?Di.prototype:void 0,xS=DS?DS.valueOf:void 0;var CS=Object.prototype.propertyIsEnumerable,IS=Object.getOwnPropertySymbols,LS=IS?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}(IS(e),function(t){return CS.call(e,t)}))}:function(){return[]};function _S(e){return Wi(e)&&"[object Arguments]"==Oi(e)}var RS=Object.prototype,FS=RS.hasOwnProperty,OS=RS.propertyIsEnumerable,WS=_S(function(){return arguments}())?_S:function(e){return Wi(e)&&FS.call(e,"callee")&&!OS.call(e,"callee")};var $S="object"==typeof exports&&exports&&!exports.nodeType&&exports,NS=$S&&"object"==typeof module&&module&&!module.nodeType&&module,jS=NS&&NS.exports===$S?Ai.Buffer:void 0,BS=(jS?jS.isBuffer:void 0)||function(){return!1},zS=/^(?:0|[1-9]\d*)$/;function US(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&zS.test(e))&&e>-1&&e%1==0&&e<t}function HS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var GS={};GS["[object Float32Array]"]=GS["[object Float64Array]"]=GS["[object Int8Array]"]=GS["[object Int16Array]"]=GS["[object Int32Array]"]=GS["[object Uint8Array]"]=GS["[object Uint8ClampedArray]"]=GS["[object Uint16Array]"]=GS["[object Uint32Array]"]=!0,GS["[object Arguments]"]=GS["[object Array]"]=GS["[object ArrayBuffer]"]=GS["[object Boolean]"]=GS["[object DataView]"]=GS["[object Date]"]=GS["[object Error]"]=GS["[object Function]"]=GS["[object Map]"]=GS["[object Number]"]=GS["[object Object]"]=GS["[object RegExp]"]=GS["[object Set]"]=GS["[object String]"]=GS["[object WeakMap]"]=!1;var VS,KS="object"==typeof exports&&exports&&!exports.nodeType&&exports,XS=KS&&"object"==typeof module&&module&&!module.nodeType&&module,YS=XS&&XS.exports===KS&&Pi.process,qS=function(){try{var e=XS&&XS.require&&XS.require("util").types;return e||YS&&YS.binding&&YS.binding("util")}catch(e){}}(),JS=qS&&qS.isTypedArray,QS=JS?(VS=JS,function(e){return VS(e)}):function(e){return Wi(e)&&HS(e.length)&&!!GS[Oi(e)]},ZS=Object.prototype.hasOwnProperty;function eE(e,t){var i=xi(e),n=!i&&WS(e),a=!i&&!n&&BS(e),r=!i&&!n&&!a&&QS(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)!ZS.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||US(l,u))||s.push(l);return s}var tE=Object.prototype;var iE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),nE=Object.prototype.hasOwnProperty;function aE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||tE))return iE(e);var t,i,n=[];for(var a in Object(e))nE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function rE(e){return null!=(t=e)&&HS(t.length)&&!eS(t)?eE(e):aE(e);var t}function oE(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,rE,LS)}var sE=Object.prototype.hasOwnProperty;var uE=mS(Ai,"DataView"),lE=mS(Ai,"Promise"),dE=mS(Ai,"Set"),hE=mS(Ai,"WeakMap"),cE="[object Map]",mE="[object Promise]",fE="[object Set]",vE="[object WeakMap]",pE="[object DataView]",gE=rS(uE),yE=rS(fS),bE=rS(lE),wE=rS(dE),kE=rS(hE),SE=Oi;(uE&&SE(new uE(new ArrayBuffer(1)))!=pE||fS&&SE(new fS)!=cE||lE&&SE(lE.resolve())!=mE||dE&&SE(new dE)!=fE||hE&&SE(new hE)!=vE)&&(SE=function(e){var t=Oi(e),i="[object Object]"==t?e.constructor:void 0,n=i?rS(i):"";if(n)switch(n){case gE:return pE;case yE:return cE;case bE:return mE;case wE:return fE;case kE:return vE}return t});var EE="[object Arguments]",TE="[object Array]",PE="[object Object]",ME=Object.prototype.hasOwnProperty;function AE(e,t,i,n,a,r){var o=xi(e),s=xi(t),u=o?TE:SE(e),l=s?TE:SE(t),d=(u=u==EE?PE:u)==PE,h=(l=l==EE?PE:l)==PE,c=u==l;if(c&&BS(e)){if(!BS(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new kS),o||QS(e)?TS(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 PS(e),new PS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Yk(+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=MS;case"[object Set]":var u=1&n;if(s||(s=AS),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=TS(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(xS)return xS.call(e)==xS.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&ME.call(e,"__wrapped__"),f=h&&ME.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new kS),a(v,p,i,n,r)}}return!!c&&(r||(r=new kS),function(e,t,i,n,a,r){var o=1&i,s=oE(e),u=s.length;if(u!=oE(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:sE.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 DE(e,t,i,n,a){return e===t||(null==e||null==t||!Wi(e)&&!Wi(t)?e!=e&&t!=t:AE(e,t,i,n,DE,a))}function xE(e,t){return DE(e,t)}var CE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),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=t.unsafeCSS(Ns(this.component));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 ${iu(this.component.position)}\n ${js(this.component)}\n ${eu(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 ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(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;xE(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=Nn(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Xn(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();Ae([ot({type:Object})],CE.prototype,"component",void 0),Ae([ot({type:Boolean})],CE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],CE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],CE.prototype,"minSDKVersion",void 0),CE=Ae([Fe("nami-product-container")],CE);var IE,LE,_E=e=>e;function RE(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var FE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),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=Rs(null!=r?r:"100%",this.scaleFactor),f=Rs(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",g=RE(this.component.moveX)||RE(this.component.moveY);return t.unsafeCSS(`\n :host {\n display: ${"television"===c?"flex":"inline-block"};\n ${l?"display:none;":""}\n position: relative;\n ${g?Gs(this.component):""}\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&&oa(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t.html(IE||(IE=_E`<img src="${0}" alt="${0}" />`),n,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t.html(LE||(LE=_E``)))}}])}();Ae([ot({type:Object})],FE.prototype,"component",void 0),Ae([ot({type:Boolean})],FE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],FE.prototype,"scaleFactor",void 0),FE=Ae([Fe("nami-image")],FE);var OE=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,Es),m(e,[{key:"connectedCallback",value:function(){M(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 ${Bs(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 ${$s(i,!1)}\n transition: all 0.3s;\n ${Hs(i,n)}\n }\n :host(:focus){\n ${$s(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=>$u(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],OE.prototype,"component",void 0),Ae([ot({type:Boolean})],OE.prototype,"fullscreen",void 0),Ae([ot({type:Boolean})],OE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],OE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],OE.prototype,"minSDKVersion",void 0),OE=Ae([Fe("nami-background-container")],OE);var WE,$E=e=>e,NE=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,Es),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(WE||(WE=$E``));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: ${Rs(d,o)};`:""}\n ${void 0!==h?`height: ${Rs(h,o)};`:""}`:Ks(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 ${js(a)}\n ${c}\n ${l}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?Ts[n]:void 0,s=a?Ts[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"),`${Ms("align-items",t)}${Ms("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 ${Hs(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(${_s(o,a.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${$s(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${$s(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=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();Ae([ot({type:Object})],NE.prototype,"component",void 0),Ae([ot({type:Number})],NE.prototype,"zIndex",void 0),Ae([ot({type:Boolean})],NE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],NE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],NE.prototype,"minSDKVersion",void 0),NE=Ae([Fe("nami-content-container")],NE);var jE,BE=e=>e,zE=function(){function i(){var e;return u(this,i),(e=s(this,i)).inFocusedState=!1,e.scaleFactor=1,e._anyItemFocused=!1,e._handleClick=t=>{t.preventDefault(),Io({contextProvider:e.contextProvider,onTap:e.component.onTap})},e._handleFocusIn=t=>{var i;e._isTv&&("nami-segment-picker-item"===(null===(i=t.target.tagName)||void 0===i?void 0:i.toLowerCase())&&(e._anyItemFocused=!0))},e._handleFocusOut=t=>{var i;if(e._isTv){var n=t.relatedTarget;if("nami-segment-picker-item"!==(null==n||null===(i=n.tagName)||void 0===i?void 0:i.toLowerCase())){var a=e.shadowRoot;n&&null!=a&&a.contains(n)||(e._anyItemFocused=!1)}}},e.addEventListener("click",e._handleClick),e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"firstUpdated",value:function(e){var t,n;M(i,"firstUpdated",this)([e]),null===(t=this.shadowRoot)||void 0===t||t.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var e,t;M(i,"disconnectedCallback",this)([]),null===(e=this.shadowRoot)||void 0===e||e.removeEventListener("focusin",this._handleFocusIn),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusout",this._handleFocusOut)}},{key:"styles",value:function(){var e,i,n,a=nu("active",this.component.components[0]),r=nu("inactive",this.component.components[0]),o=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||a.fillColor,s=this._anyItemFocused;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 ${js(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 ${$s(this.component,!1)}\n ${eu(this.component,this.scaleFactor,s)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n .toggle{\n ${i=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${_s(n,i.topPadding)}px;\n bottom: ${_s(n,i.bottomPadding)}px;\n width: calc(50% - ${_s(n,i.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${au(r,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${au(a,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,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 ${o?`background-color: ${o} !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 ${o?`background-color: ${o} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return t.html(jE||(jE=BE`${0}<div class="toggle"></div>`),e)}}])}();Ae([ot({type:Object})],zE.prototype,"component",void 0),Ae([ot({type:Boolean})],zE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],zE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],zE.prototype,"minSDKVersion",void 0),Ae([st()],zE.prototype,"_anyItemFocused",void 0),zE=Ae([Fe("nami-segment-picker")],zE);var UE,HE=e=>e,GE=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e._isFocused=!1,e._handleFocus=()=>{e.inFocusedState=!0,e._isTv&&(e._isFocused=!0,e.classList.add("focused"))},e._handleBlur=()=>{e.inFocusedState=!1,e._isTv&&(e._isFocused=!1,e.classList.remove("focused"))},e._handleKeyDown=t=>{"Enter"===t.key||" "===t.key||142===t.keyCode||195===t.keyCode?e._handleClick():!e._isTv||"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(e._moveFocusToSibling("ArrowRight"===t.key?1:-1),t.preventDefault())},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"connectedCallback",value:function(){M(i,"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(){M(i,"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=xE(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=nu("active",this.component),a=nu("inactive",this.component),r=this.component.focusedFontColor||n.fontColor||a.fontColor||"";return t.unsafeCSS(`\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 ${au(v({},a,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${Ys(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 ${ru(v({},n,this.component),this.scaleFactor)}\n ${Ys(null!==(i=this.component.activeDropShadow)&&void 0!==i?i:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${r?Ws(r):""}\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||"",t.html(UE||(UE=HE`<input type="radio"
|
|
462
|
+
</nami-text-list-item-wrapper>`),this.component,this.scaleFactor,u&&t.html(Fk||(Fk=$k`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),u,this.scaleFactor),nd(e)):null);return t.html(Ok||(Ok=$k`${0}`),l)}}])}();Ae([ot({type:Object})],Kk.prototype,"component",void 0),Ae([ot({type:Boolean})],Kk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Kk.prototype,"scaleFactor",void 0),Kk=Ae([Fe("nami-text-list")],Kk);(()=>{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=nd.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 Xk=function(){function e(){var t;return u(this,e),(t=s(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 y(e,Es),m(e,[{key:"disconnectedCallback",value:function(){M(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=t.unsafeCSS(Ns(e)),l=Boolean(e.fillColor||e.fillImage),d=e.roundBorders,h=Array.isArray(d)&&d.length>0&&d.length<4,c=l&&h?"overflow: hidden;":"";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 ${c}\n ${iu(e.position)}\n ${js(e)}\n ${eu(e,i,!1)}\n }\n :host(:focus),\n :host(.nami-focus-within){\n ${$s(e,!0)}\n ${eu(e,i,!0)}\n }\n :host(:focus-visible){\n ${ou(e)}\n }\n :host > * {\n ${zs(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=>$u(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 Yk(e,t){return e===t||e!=e&&t!=t}function qk(e,t){for(var i=e.length;i--;)if(Yk(e[i][0],t))return i;return-1}Ae([ot({type:Object})],Xk.prototype,"component",void 0),Ae([ot({type:Boolean})],Xk.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],Xk.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],Xk.prototype,"minSDKVersion",void 0),Xk=Ae([Fe("nami-container")],Xk);var Jk=Array.prototype.splice;function Qk(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 Zk(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}Qk.prototype.clear=function(){this.__data__=[],this.size=0},Qk.prototype.delete=function(e){var t=this.__data__,i=qk(t,e);return!(i<0)&&(i==t.length-1?t.pop():Jk.call(t,i,1),--this.size,!0)},Qk.prototype.get=function(e){var t=this.__data__,i=qk(t,e);return i<0?void 0:t[i][1]},Qk.prototype.has=function(e){return qk(this.__data__,e)>-1},Qk.prototype.set=function(e,t){var i=this.__data__,n=qk(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function eS(e){if(!Zk(e))return!1;var t=Oi(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var tS,iS=Ai["__core-js_shared__"],nS=(tS=/[^.]+$/.exec(iS&&iS.keys&&iS.keys.IE_PROTO||""))?"Symbol(src)_1."+tS:"";var aS=Function.prototype.toString;function rS(e){if(null!=e){try{return aS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var oS=/^\[object .+?Constructor\]$/,sS=Function.prototype,uS=Object.prototype,lS=sS.toString,dS=uS.hasOwnProperty,hS=RegExp("^"+lS.call(dS).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cS(e){return!(!Zk(e)||(t=e,nS&&nS in t))&&(eS(e)?hS:oS).test(rS(e));var t}function mS(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return cS(i)?i:void 0}var fS=mS(Ai,"Map"),vS=mS(Object,"create");var pS=Object.prototype.hasOwnProperty;var gS=Object.prototype.hasOwnProperty;function yS(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 bS(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 wS(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])}}yS.prototype.clear=function(){this.__data__=vS?vS(null):{},this.size=0},yS.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},yS.prototype.get=function(e){var t=this.__data__;if(vS){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return pS.call(t,e)?t[e]:void 0},yS.prototype.has=function(e){var t=this.__data__;return vS?void 0!==t[e]:gS.call(t,e)},yS.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=vS&&void 0===t?"__lodash_hash_undefined__":t,this},wS.prototype.clear=function(){this.size=0,this.__data__={hash:new yS,map:new(fS||Qk),string:new yS}},wS.prototype.delete=function(e){var t=bS(this,e).delete(e);return this.size-=t?1:0,t},wS.prototype.get=function(e){return bS(this,e).get(e)},wS.prototype.has=function(e){return bS(this,e).has(e)},wS.prototype.set=function(e,t){var i=bS(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function kS(e){var t=this.__data__=new Qk(e);this.size=t.size}kS.prototype.clear=function(){this.__data__=new Qk,this.size=0},kS.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},kS.prototype.get=function(e){return this.__data__.get(e)},kS.prototype.has=function(e){return this.__data__.has(e)},kS.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Qk){var n=i.__data__;if(!fS||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new wS(n)}return i.set(e,t),this.size=i.size,this};function SS(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new wS;++t<i;)this.add(e[t])}function ES(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}SS.prototype.add=SS.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},SS.prototype.has=function(e){return this.__data__.has(e)};function TS(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 SS: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(!ES(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 PS=Ai.Uint8Array;function MS(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function AS(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var DS=Di?Di.prototype:void 0,xS=DS?DS.valueOf:void 0;var CS=Object.prototype.propertyIsEnumerable,IS=Object.getOwnPropertySymbols,LS=IS?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}(IS(e),function(t){return CS.call(e,t)}))}:function(){return[]};function _S(e){return Wi(e)&&"[object Arguments]"==Oi(e)}var RS=Object.prototype,FS=RS.hasOwnProperty,OS=RS.propertyIsEnumerable,WS=_S(function(){return arguments}())?_S:function(e){return Wi(e)&&FS.call(e,"callee")&&!OS.call(e,"callee")};var $S="object"==typeof exports&&exports&&!exports.nodeType&&exports,NS=$S&&"object"==typeof module&&module&&!module.nodeType&&module,jS=NS&&NS.exports===$S?Ai.Buffer:void 0,BS=(jS?jS.isBuffer:void 0)||function(){return!1},zS=/^(?:0|[1-9]\d*)$/;function US(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&zS.test(e))&&e>-1&&e%1==0&&e<t}function HS(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var GS={};GS["[object Float32Array]"]=GS["[object Float64Array]"]=GS["[object Int8Array]"]=GS["[object Int16Array]"]=GS["[object Int32Array]"]=GS["[object Uint8Array]"]=GS["[object Uint8ClampedArray]"]=GS["[object Uint16Array]"]=GS["[object Uint32Array]"]=!0,GS["[object Arguments]"]=GS["[object Array]"]=GS["[object ArrayBuffer]"]=GS["[object Boolean]"]=GS["[object DataView]"]=GS["[object Date]"]=GS["[object Error]"]=GS["[object Function]"]=GS["[object Map]"]=GS["[object Number]"]=GS["[object Object]"]=GS["[object RegExp]"]=GS["[object Set]"]=GS["[object String]"]=GS["[object WeakMap]"]=!1;var VS,KS="object"==typeof exports&&exports&&!exports.nodeType&&exports,XS=KS&&"object"==typeof module&&module&&!module.nodeType&&module,YS=XS&&XS.exports===KS&&Pi.process,qS=function(){try{var e=XS&&XS.require&&XS.require("util").types;return e||YS&&YS.binding&&YS.binding("util")}catch(e){}}(),JS=qS&&qS.isTypedArray,QS=JS?(VS=JS,function(e){return VS(e)}):function(e){return Wi(e)&&HS(e.length)&&!!GS[Oi(e)]},ZS=Object.prototype.hasOwnProperty;function eE(e,t){var i=xi(e),n=!i&&WS(e),a=!i&&!n&&BS(e),r=!i&&!n&&!a&&QS(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)!ZS.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||US(l,u))||s.push(l);return s}var tE=Object.prototype;var iE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),nE=Object.prototype.hasOwnProperty;function aE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||tE))return iE(e);var t,i,n=[];for(var a in Object(e))nE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function rE(e){return null!=(t=e)&&HS(t.length)&&!eS(t)?eE(e):aE(e);var t}function oE(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,rE,LS)}var sE=Object.prototype.hasOwnProperty;var uE=mS(Ai,"DataView"),lE=mS(Ai,"Promise"),dE=mS(Ai,"Set"),hE=mS(Ai,"WeakMap"),cE="[object Map]",mE="[object Promise]",fE="[object Set]",vE="[object WeakMap]",pE="[object DataView]",gE=rS(uE),yE=rS(fS),bE=rS(lE),wE=rS(dE),kE=rS(hE),SE=Oi;(uE&&SE(new uE(new ArrayBuffer(1)))!=pE||fS&&SE(new fS)!=cE||lE&&SE(lE.resolve())!=mE||dE&&SE(new dE)!=fE||hE&&SE(new hE)!=vE)&&(SE=function(e){var t=Oi(e),i="[object Object]"==t?e.constructor:void 0,n=i?rS(i):"";if(n)switch(n){case gE:return pE;case yE:return cE;case bE:return mE;case wE:return fE;case kE:return vE}return t});var EE="[object Arguments]",TE="[object Array]",PE="[object Object]",ME=Object.prototype.hasOwnProperty;function AE(e,t,i,n,a,r){var o=xi(e),s=xi(t),u=o?TE:SE(e),l=s?TE:SE(t),d=(u=u==EE?PE:u)==PE,h=(l=l==EE?PE:l)==PE,c=u==l;if(c&&BS(e)){if(!BS(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new kS),o||QS(e)?TS(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 PS(e),new PS(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Yk(+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=MS;case"[object Set]":var u=1&n;if(s||(s=AS),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=TS(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(xS)return xS.call(e)==xS.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&ME.call(e,"__wrapped__"),f=h&&ME.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new kS),a(v,p,i,n,r)}}return!!c&&(r||(r=new kS),function(e,t,i,n,a,r){var o=1&i,s=oE(e),u=s.length;if(u!=oE(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:sE.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 DE(e,t,i,n,a){return e===t||(null==e||null==t||!Wi(e)&&!Wi(t)?e!=e&&t!=t:AE(e,t,i,n,DE,a))}function xE(e,t){return DE(e,t)}var CE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),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=t.unsafeCSS(Ns(this.component));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 ${iu(this.component.position)}\n ${js(this.component)}\n ${eu(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 ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(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;xE(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=Nn(this.contextProvider.productDetails,null!==(i=null==o?void 0:o.sku_menus)&&void 0!==i?i:[],u);return Xn(this.contextProvider,l,this.component,a).map(([e,t])=>(this.inFocusedState="television"==s?e:this.inFocusedState,t.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion))))}}])}();Ae([ot({type:Object})],CE.prototype,"component",void 0),Ae([ot({type:Boolean})],CE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],CE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],CE.prototype,"minSDKVersion",void 0),CE=Ae([Fe("nami-product-container")],CE);var IE,LE,_E=e=>e;function RE(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var FE=function(){function e(){var t;return u(this,e),(t=s(this,e,arguments)).inFocusedState=!1,t.scaleFactor=1,t}return y(e,Es),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=Rs(null!=r?r:"100%",this.scaleFactor),f=Rs(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",g=RE(this.component.moveX)||RE(this.component.moveY);return t.unsafeCSS(`\n :host {\n display: ${"television"===c?"flex":"inline-block"};\n ${l?"display:none;":""}\n position: relative;\n ${g?Gs(this.component):""}\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&&oa(u,s)||(this.tabIndex=0),this.ariaLabel=null!==(e=null!=a?a:r)&&void 0!==e?e:"",t.html(IE||(IE=_E`<img src="${0}" alt="${0}" />`),n,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,t.html(LE||(LE=_E``)))}}])}();Ae([ot({type:Object})],FE.prototype,"component",void 0),Ae([ot({type:Boolean})],FE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],FE.prototype,"scaleFactor",void 0),FE=Ae([Fe("nami-image")],FE);var OE=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,Es),m(e,[{key:"connectedCallback",value:function(){M(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 ${Bs(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 ${$s(i,!1)}\n transition: all 0.3s;\n ${Hs(i,n)}\n }\n :host(:focus){\n ${$s(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=>$u(this.contextProvider,e,this.scaleFactor,void 0,this.minSDKVersion))}}])}();Ae([ot({type:Object})],OE.prototype,"component",void 0),Ae([ot({type:Boolean})],OE.prototype,"fullscreen",void 0),Ae([ot({type:Boolean})],OE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],OE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],OE.prototype,"minSDKVersion",void 0),OE=Ae([Fe("nami-background-container")],OE);var WE,$E=e=>e,NE=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,Es),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(WE||(WE=$E``));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: ${Rs(d,o)};`:""}\n ${void 0!==h?`height: ${Rs(h,o)};`:""}`:Ks(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 ${js(a)}\n ${c}\n ${l}\n ${function(e){var t,i,n=e.verticalAlignment,a=e.horizontalAlignment,r=e.direction,o=n?Ts[n]:void 0,s=a?Ts[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"),`${Ms("align-items",t)}${Ms("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 ${Hs(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(${_s(o,a.bottomPadding)}px + var(--nami-footer-height, 0px));\n ${$s(a,!1)}\n }\n :host::-webkit-scrollbar {\n display: none;\n }\n :host(:focus){\n ${$s(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=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion)))||[]}}])}();Ae([ot({type:Object})],NE.prototype,"component",void 0),Ae([ot({type:Number})],NE.prototype,"zIndex",void 0),Ae([ot({type:Boolean})],NE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],NE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],NE.prototype,"minSDKVersion",void 0),NE=Ae([Fe("nami-content-container")],NE);var jE,BE=e=>e,zE=function(){function i(){var e;return u(this,i),(e=s(this,i)).inFocusedState=!1,e.scaleFactor=1,e._anyItemFocused=!1,e._handleClick=t=>{t.preventDefault(),Io({contextProvider:e.contextProvider,onTap:e.component.onTap})},e._handleFocusIn=t=>{var i;e._isTv&&("nami-segment-picker-item"===(null===(i=t.target.tagName)||void 0===i?void 0:i.toLowerCase())&&(e._anyItemFocused=!0))},e._handleFocusOut=t=>{var i;if(e._isTv){var n=t.relatedTarget;if("nami-segment-picker-item"!==(null==n||null===(i=n.tagName)||void 0===i?void 0:i.toLowerCase())){var a=e.shadowRoot;n&&null!=a&&a.contains(n)||(e._anyItemFocused=!1)}}},e.addEventListener("click",e._handleClick),e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"firstUpdated",value:function(e){var t,n;M(i,"firstUpdated",this)([e]),null===(t=this.shadowRoot)||void 0===t||t.addEventListener("focusin",this._handleFocusIn),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("focusout",this._handleFocusOut)}},{key:"disconnectedCallback",value:function(){var e,t;M(i,"disconnectedCallback",this)([]),null===(e=this.shadowRoot)||void 0===e||e.removeEventListener("focusin",this._handleFocusIn),null===(t=this.shadowRoot)||void 0===t||t.removeEventListener("focusout",this._handleFocusOut)}},{key:"styles",value:function(){var e,i,n,a=nu("active",this.component.components[0]),r=nu("inactive",this.component.components[0]),o=(null===(e=this.component.components[0])||void 0===e?void 0:e.focusedFillColor)||a.fillColor,s=this._anyItemFocused;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 ${js(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 ${$s(this.component,!1)}\n ${eu(this.component,this.scaleFactor,s)}\n ${this.component.hidden?"display:none;":""}\n }\n :host(:focus){\n ${$s(this.component,!0)}\n ${eu(this.component,this.scaleFactor,!0)}\n }\n :host(:focus-visible){\n ${ou(this.component)}\n }\n .toggle{\n ${i=this.component,n=this.scaleFactor,`\n position: absolute;\n top: ${_s(n,i.topPadding)}px;\n bottom: ${_s(n,i.bottomPadding)}px;\n width: calc(50% - ${_s(n,i.leftPadding)/2}px) !important;\n `}\n transition: transform .5s cubic-bezier(.77, 0, .175, 1);\n ${au(r,this.scaleFactor,!1)}\n }\n\n :host(:focus) .toggle{\n ${au(a,this.scaleFactor,!0)}\n }\n\n nami-segment-picker-item:nth-of-type(1).active~.toggle {\n transform: translateX(0%);\n left: ${this.component.leftPadding?Number(this.component.leftPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,this.scaleFactor)}\n }\n\n nami-segment-picker-item:nth-of-type(2).active~.toggle {\n transform: translateX(100%);\n right: ${this.component.rightPadding?Number(this.component.rightPadding)*this.scaleFactor:0}px;\n ${$s(a,!0)}\n ${ru(a,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 ${o?`background-color: ${o} !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 ${o?`background-color: ${o} !important;`:""}\n }\n `)}},{key:"render",value:function(){this.role="tablist";var e=this.component.components.map(e=>$u(this.contextProvider,e,this.scaleFactor,this.inFocusedState,this.minSDKVersion));return t.html(jE||(jE=BE`${0}<div class="toggle"></div>`),e)}}])}();Ae([ot({type:Object})],zE.prototype,"component",void 0),Ae([ot({type:Boolean})],zE.prototype,"inFocusedState",void 0),Ae([ot({type:Number})],zE.prototype,"scaleFactor",void 0),Ae([ot({type:Object})],zE.prototype,"minSDKVersion",void 0),Ae([st()],zE.prototype,"_anyItemFocused",void 0),zE=Ae([Fe("nami-segment-picker")],zE);var UE,HE=e=>e,GE=function(){function i(){var e;return u(this,i),(e=s(this,i,arguments)).inFocusedState=!1,e.scaleFactor=1,e._isFocused=!1,e._handleFocus=()=>{e.inFocusedState=!0,e._isTv&&(e._isFocused=!0,e.classList.add("focused"))},e._handleBlur=()=>{e.inFocusedState=!1,e._isTv&&(e._isFocused=!1,e.classList.remove("focused"))},e._handleKeyDown=t=>{"Enter"===t.key||" "===t.key||142===t.keyCode||195===t.keyCode?e._handleClick():!e._isTv||"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(e._moveFocusToSibling("ArrowRight"===t.key?1:-1),t.preventDefault())},e._handleClick=()=>{e._updateFormState(),e.requestUpdate("component")},e._handleHover=()=>{e.inFocusedState=!0},e}return y(i,Es),m(i,[{key:"_isTv",get:function(){return"television"===e.getDeviceFormFactor()}},{key:"connectedCallback",value:function(){M(i,"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(){M(i,"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=xE(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=nu("active",this.component),a=nu("inactive",this.component),r=this.component.focusedFontColor||n.fontColor||a.fontColor||"";return t.unsafeCSS(`\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 ${au(v({},a,this.component),this.scaleFactor,!this._isTv&&this.inFocusedState)}\n ${Ys(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 ${ru(v({},n,this.component),this.scaleFactor)}\n ${Ys(null!==(i=this.component.activeDropShadow)&&void 0!==i?i:this.component.dropShadow)}\n }\n\n :host(.focused) {\n z-index: 2 !important;\n outline: none !important;\n ${r?Ws(r):""}\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||"",t.html(UE||(UE=HE`<input type="radio"
|
|
463
463
|
autocomplete="off"
|
|
464
464
|
id="${0}"
|
|
465
465
|
name="${0}"
|
package/dist/nami-web.d.ts
CHANGED
|
@@ -159,9 +159,25 @@ declare class NamiSymbol extends NamiElement {
|
|
|
159
159
|
|
|
160
160
|
declare class NamiContainer extends NamiElement {
|
|
161
161
|
component: TContainer | TProductContainer;
|
|
162
|
+
/**
|
|
163
|
+
* Focus *inherited from a focusable ancestor* — "the button I live inside is focused".
|
|
164
|
+
* This is the only value handed down to children (see `render`).
|
|
165
|
+
*
|
|
166
|
+
* NAM-3605: deliberately distinct from `focusWithin` below. Conflating the two made a
|
|
167
|
+
* container broadcast focus to every child whenever any one descendant was focused, which
|
|
168
|
+
* flipped sibling buttons' text to their `focusedFontColor` while CSS `:host(:focus)` left
|
|
169
|
+
* their fill in the resting state — dark text on a dark fill.
|
|
170
|
+
*/
|
|
162
171
|
inFocusedState: boolean;
|
|
163
172
|
scaleFactor: number;
|
|
164
173
|
minSDKVersion: TSemverObj;
|
|
174
|
+
/**
|
|
175
|
+
* Focus held by *some descendant* of this container — the `:focus-within` analogue. Drives
|
|
176
|
+
* only this container's own styling (the `nami-focus-within` class and `data-nami-focused`
|
|
177
|
+
* attribute, both consumed by CSS), so it is a plain field rather than reactive state: no
|
|
178
|
+
* template output depends on it and it must never reach children.
|
|
179
|
+
*/
|
|
180
|
+
private focusWithin;
|
|
165
181
|
private readonly handleFocusIn;
|
|
166
182
|
private readonly handleFocusOut;
|
|
167
183
|
private readonly handleFocusChanged;
|
package/dist/nami-web.mjs
CHANGED
|
@@ -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})],WS.prototype,"component",void 0),yt([Jt({type:Boolean})],WS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],WS.prototype,"scaleFactor",void 0),WS=yt([Pt("nami-symbol")],WS);var $S=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 ${_S(e,t)}\n display: ${n?"none":"grid"};\n overflow-wrap: anywhere;\n width: fit-content;\n ${xu(e,i)}\n ${RS(e,i)}\n font-size: ${(null!=a?a:IS)*t}px;\n text-align: ${r||"center"};\n ${Bu("string"!=typeof o&&o)}\n ${zu(e.fontName)}\n ${Gu(e,t,i)}\n ${CS(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 ${_S(e,t)}\n display: inline;\n overflow-wrap: anywhere;\n width: fit-content;\n ${xu(e,i)}\n ${RS(e,i)}\n font-size: ${(null!=a?a:IS)*t}px;\n text-align: ${r||"center"};\n ${Bu("string"!=typeof o&&o)}\n ${zu(e.fontName)}\n }\n ${CS(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 ${_S(e,t)}\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=xS``));var u=r.map(e=>e?z(TS||(TS=xS`<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,s&&z(PS||(PS=xS`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),s,this.scaleFactor),Xd(e)):null);return z(AS||(AS=xS`${0}`),u)}}])}();yt([Jt({type:Object})],$S.prototype,"component",void 0),yt([Jt({type:Boolean})],$S.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],$S.prototype,"scaleFactor",void 0),$S=yt([Pt("nami-text-list")],$S);(()=>{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 NS=function(){function e(){var t;return Z(this,e),(t=Q(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 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,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 jS(e,t){return e===t||e!=e&&t!=t}function BS(e,t){for(var i=e.length;i--;)if(jS(e[i][0],t))return i;return-1}yt([Jt({type:Object})],NS.prototype,"component",void 0),yt([Jt({type:Boolean})],NS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],NS.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],NS.prototype,"minSDKVersion",void 0),NS=yt([Pt("nami-container")],NS);var zS=Array.prototype.splice;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])}}function HS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}US.prototype.clear=function(){this.__data__=[],this.size=0},US.prototype.delete=function(e){var t=this.__data__,i=BS(t,e);return!(i<0)&&(i==t.length-1?t.pop():zS.call(t,i,1),--this.size,!0)},US.prototype.get=function(e){var t=this.__data__,i=BS(t,e);return i<0?void 0:t[i][1]},US.prototype.has=function(e){return BS(this.__data__,e)>-1},US.prototype.set=function(e,t){var i=this.__data__,n=BS(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function GS(e){if(!HS(e))return!1;var t=Dn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var VS,KS=bn["__core-js_shared__"],XS=(VS=/[^.]+$/.exec(KS&&KS.keys&&KS.keys.IE_PROTO||""))?"Symbol(src)_1."+VS:"";var YS=Function.prototype.toString;function qS(e){if(null!=e){try{return YS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var JS=/^\[object .+?Constructor\]$/,QS=Function.prototype,ZS=Object.prototype,eE=QS.toString,tE=ZS.hasOwnProperty,iE=RegExp("^"+eE.call(tE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nE(e){return!(!HS(e)||(t=e,XS&&XS in t))&&(GS(e)?iE:JS).test(qS(e));var t}function aE(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return nE(i)?i:void 0}var rE=aE(bn,"Map"),oE=aE(Object,"create");var sE=Object.prototype.hasOwnProperty;var uE=Object.prototype.hasOwnProperty;function lE(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 dE(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 hE(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])}}lE.prototype.clear=function(){this.__data__=oE?oE(null):{},this.size=0},lE.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},lE.prototype.get=function(e){var t=this.__data__;if(oE){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return sE.call(t,e)?t[e]:void 0},lE.prototype.has=function(e){var t=this.__data__;return oE?void 0!==t[e]:uE.call(t,e)},lE.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=oE&&void 0===t?"__lodash_hash_undefined__":t,this},hE.prototype.clear=function(){this.size=0,this.__data__={hash:new lE,map:new(rE||US),string:new lE}},hE.prototype.delete=function(e){var t=dE(this,e).delete(e);return this.size-=t?1:0,t},hE.prototype.get=function(e){return dE(this,e).get(e)},hE.prototype.has=function(e){return dE(this,e).has(e)},hE.prototype.set=function(e,t){var i=dE(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function cE(e){var t=this.__data__=new US(e);this.size=t.size}cE.prototype.clear=function(){this.__data__=new US,this.size=0},cE.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},cE.prototype.get=function(e){return this.__data__.get(e)},cE.prototype.has=function(e){return this.__data__.has(e)},cE.prototype.set=function(e,t){var i=this.__data__;if(i instanceof US){var n=i.__data__;if(!rE||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new hE(n)}return i.set(e,t),this.size=i.size,this};function mE(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new hE;++t<i;)this.add(e[t])}function fE(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}mE.prototype.add=mE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},mE.prototype.has=function(e){return this.__data__.has(e)};function vE(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 mE: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(!fE(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 pE=bn.Uint8Array;function gE(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function yE(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var bE=wn?wn.prototype:void 0,wE=bE?bE.valueOf:void 0;var kE=Object.prototype.propertyIsEnumerable,SE=Object.getOwnPropertySymbols,EE=SE?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}(SE(e),function(t){return kE.call(e,t)}))}:function(){return[]};function ME(e){return xn(e)&&"[object Arguments]"==Dn(e)}var TE=Object.prototype,PE=TE.hasOwnProperty,AE=TE.propertyIsEnumerable,DE=ME(function(){return arguments}())?ME:function(e){return xn(e)&&PE.call(e,"callee")&&!AE.call(e,"callee")};var xE="object"==typeof exports&&exports&&!exports.nodeType&&exports,CE=xE&&"object"==typeof module&&module&&!module.nodeType&&module,IE=CE&&CE.exports===xE?bn.Buffer:void 0,LE=(IE?IE.isBuffer:void 0)||function(){return!1},_E=/^(?:0|[1-9]\d*)$/;function RE(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&_E.test(e))&&e>-1&&e%1==0&&e<t}function FE(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var OE={};OE["[object Float32Array]"]=OE["[object Float64Array]"]=OE["[object Int8Array]"]=OE["[object Int16Array]"]=OE["[object Int32Array]"]=OE["[object Uint8Array]"]=OE["[object Uint8ClampedArray]"]=OE["[object Uint16Array]"]=OE["[object Uint32Array]"]=!0,OE["[object Arguments]"]=OE["[object Array]"]=OE["[object ArrayBuffer]"]=OE["[object Boolean]"]=OE["[object DataView]"]=OE["[object Date]"]=OE["[object Error]"]=OE["[object Function]"]=OE["[object Map]"]=OE["[object Number]"]=OE["[object Object]"]=OE["[object RegExp]"]=OE["[object Set]"]=OE["[object String]"]=OE["[object WeakMap]"]=!1;var WE,$E="object"==typeof exports&&exports&&!exports.nodeType&&exports,NE=$E&&"object"==typeof module&&module&&!module.nodeType&&module,jE=NE&&NE.exports===$E&&gn.process,BE=function(){try{var e=NE&&NE.require&&NE.require("util").types;return e||jE&&jE.binding&&jE.binding("util")}catch(e){}}(),zE=BE&&BE.isTypedArray,UE=zE?(WE=zE,function(e){return WE(e)}):function(e){return xn(e)&&FE(e.length)&&!!OE[Dn(e)]},HE=Object.prototype.hasOwnProperty;function GE(e,t){var i=kn(e),n=!i&&DE(e),a=!i&&!n&&LE(e),r=!i&&!n&&!a&&UE(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)!HE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||RE(l,u))||s.push(l);return s}var VE=Object.prototype;var KE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),XE=Object.prototype.hasOwnProperty;function YE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||VE))return KE(e);var t,i,n=[];for(var a in Object(e))XE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function qE(e){return null!=(t=e)&&FE(t.length)&&!GS(t)?GE(e):YE(e);var t}function JE(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,qE,EE)}var QE=Object.prototype.hasOwnProperty;var ZE=aE(bn,"DataView"),eM=aE(bn,"Promise"),tM=aE(bn,"Set"),iM=aE(bn,"WeakMap"),nM="[object Map]",aM="[object Promise]",rM="[object Set]",oM="[object WeakMap]",sM="[object DataView]",uM=qS(ZE),lM=qS(rE),dM=qS(eM),hM=qS(tM),cM=qS(iM),mM=Dn;(ZE&&mM(new ZE(new ArrayBuffer(1)))!=sM||rE&&mM(new rE)!=nM||eM&&mM(eM.resolve())!=aM||tM&&mM(new tM)!=rM||iM&&mM(new iM)!=oM)&&(mM=function(e){var t=Dn(e),i="[object Object]"==t?e.constructor:void 0,n=i?qS(i):"";if(n)switch(n){case uM:return sM;case lM:return nM;case dM:return aM;case hM:return rM;case cM:return oM}return t});var fM="[object Arguments]",vM="[object Array]",pM="[object Object]",gM=Object.prototype.hasOwnProperty;function yM(e,t,i,n,a,r){var o=kn(e),s=kn(t),u=o?vM:mM(e),l=s?vM:mM(t),d=(u=u==fM?pM:u)==pM,h=(l=l==fM?pM:l)==pM,c=u==l;if(c&&LE(e)){if(!LE(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new cE),o||UE(e)?vE(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 pE(e),new pE(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jS(+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=gE;case"[object Set]":var u=1&n;if(s||(s=yE),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=vE(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(wE)return wE.call(e)==wE.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&gM.call(e,"__wrapped__"),f=h&&gM.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new cE),a(v,p,i,n,r)}}return!!c&&(r||(r=new cE),function(e,t,i,n,a,r){var o=1&i,s=JE(e),u=s.length;if(u!=JE(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:QE.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 bM(e,t,i,n,a){return e===t||(null==e||null==t||!xn(e)&&!xn(t)?e!=e&&t!=t:yM(e,t,i,n,bM,a))}function wM(e,t){return bM(e,t)}var kM=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;wM(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})],kM.prototype,"component",void 0),yt([Jt({type:Boolean})],kM.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],kM.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],kM.prototype,"minSDKVersion",void 0),kM=yt([Pt("nami-product-container")],kM);var SM,EM,MM=e=>e;function TM(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var PM=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=Tu(null!=a?a:"100%",this.scaleFactor),m=Tu(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=TM(this.component.moveX)||TM(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(SM||(SM=MM`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,z(EM||(EM=MM``)))}}])}();yt([Jt({type:Object})],PM.prototype,"component",void 0),yt([Jt({type:Boolean})],PM.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],PM.prototype,"scaleFactor",void 0),PM=yt([Pt("nami-image")],PM);var AM=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})],AM.prototype,"component",void 0),yt([Jt({type:Boolean})],AM.prototype,"fullscreen",void 0),yt([Jt({type:Boolean})],AM.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],AM.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],AM.prototype,"minSDKVersion",void 0),AM=yt([Pt("nami-background-container")],AM);var DM,xM=e=>e,CM=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(DM||(DM=xM``));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: ${Tu(l,r)};`:""}\n ${void 0!==d?`height: ${Tu(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(${Mu(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})],CM.prototype,"component",void 0),yt([Jt({type:Number})],CM.prototype,"zIndex",void 0),yt([Jt({type:Boolean})],CM.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],CM.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],CM.prototype,"minSDKVersion",void 0),CM=yt([Pt("nami-content-container")],CM);var IM,LM=e=>e,_M=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;t._isTv&&("nami-segment-picker-item"===(null===(i=e.target.tagName)||void 0===i?void 0:i.toLowerCase())&&(t._anyItemFocused=!0))},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: ${Mu(i,t.topPadding)}px;\n bottom: ${Mu(i,t.bottomPadding)}px;\n width: calc(50% - ${Mu(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(IM||(IM=LM`${0}<div class="toggle"></div>`),e)}}])}();yt([Jt({type:Object})],_M.prototype,"component",void 0),yt([Jt({type:Boolean})],_M.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],_M.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],_M.prototype,"minSDKVersion",void 0),yt([Qt()],_M.prototype,"_anyItemFocused",void 0),_M=yt([Pt("nami-segment-picker")],_M);var RM,FM=e=>e,OM=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=wM(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(RM||(RM=FM`<input type="radio"
|
|
462
|
+
</nami-text-list-item-wrapper>`),this.component,this.scaleFactor,s&&z(PS||(PS=xS`<nami-symbol .component=${0} .scaleFactor=${0}></nami-symbol>`),s,this.scaleFactor),Xd(e)):null);return z(AS||(AS=xS`${0}`),u)}}])}();yt([Jt({type:Object})],$S.prototype,"component",void 0),yt([Jt({type:Boolean})],$S.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],$S.prototype,"scaleFactor",void 0),$S=yt([Pt("nami-text-list")],$S);(()=>{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 NS=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 jS(e,t){return e===t||e!=e&&t!=t}function BS(e,t){for(var i=e.length;i--;)if(jS(e[i][0],t))return i;return-1}yt([Jt({type:Object})],NS.prototype,"component",void 0),yt([Jt({type:Boolean})],NS.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],NS.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],NS.prototype,"minSDKVersion",void 0),NS=yt([Pt("nami-container")],NS);var zS=Array.prototype.splice;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])}}function HS(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}US.prototype.clear=function(){this.__data__=[],this.size=0},US.prototype.delete=function(e){var t=this.__data__,i=BS(t,e);return!(i<0)&&(i==t.length-1?t.pop():zS.call(t,i,1),--this.size,!0)},US.prototype.get=function(e){var t=this.__data__,i=BS(t,e);return i<0?void 0:t[i][1]},US.prototype.has=function(e){return BS(this.__data__,e)>-1},US.prototype.set=function(e,t){var i=this.__data__,n=BS(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function GS(e){if(!HS(e))return!1;var t=Dn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var VS,KS=bn["__core-js_shared__"],XS=(VS=/[^.]+$/.exec(KS&&KS.keys&&KS.keys.IE_PROTO||""))?"Symbol(src)_1."+VS:"";var YS=Function.prototype.toString;function qS(e){if(null!=e){try{return YS.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var JS=/^\[object .+?Constructor\]$/,QS=Function.prototype,ZS=Object.prototype,eE=QS.toString,tE=ZS.hasOwnProperty,iE=RegExp("^"+eE.call(tE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nE(e){return!(!HS(e)||(t=e,XS&&XS in t))&&(GS(e)?iE:JS).test(qS(e));var t}function aE(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return nE(i)?i:void 0}var rE=aE(bn,"Map"),oE=aE(Object,"create");var sE=Object.prototype.hasOwnProperty;var uE=Object.prototype.hasOwnProperty;function lE(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 dE(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 hE(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])}}lE.prototype.clear=function(){this.__data__=oE?oE(null):{},this.size=0},lE.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},lE.prototype.get=function(e){var t=this.__data__;if(oE){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return sE.call(t,e)?t[e]:void 0},lE.prototype.has=function(e){var t=this.__data__;return oE?void 0!==t[e]:uE.call(t,e)},lE.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=oE&&void 0===t?"__lodash_hash_undefined__":t,this},hE.prototype.clear=function(){this.size=0,this.__data__={hash:new lE,map:new(rE||US),string:new lE}},hE.prototype.delete=function(e){var t=dE(this,e).delete(e);return this.size-=t?1:0,t},hE.prototype.get=function(e){return dE(this,e).get(e)},hE.prototype.has=function(e){return dE(this,e).has(e)},hE.prototype.set=function(e,t){var i=dE(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function cE(e){var t=this.__data__=new US(e);this.size=t.size}cE.prototype.clear=function(){this.__data__=new US,this.size=0},cE.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},cE.prototype.get=function(e){return this.__data__.get(e)},cE.prototype.has=function(e){return this.__data__.has(e)},cE.prototype.set=function(e,t){var i=this.__data__;if(i instanceof US){var n=i.__data__;if(!rE||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new hE(n)}return i.set(e,t),this.size=i.size,this};function mE(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new hE;++t<i;)this.add(e[t])}function fE(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}mE.prototype.add=mE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},mE.prototype.has=function(e){return this.__data__.has(e)};function vE(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 mE: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(!fE(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 pE=bn.Uint8Array;function gE(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function yE(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}var bE=wn?wn.prototype:void 0,wE=bE?bE.valueOf:void 0;var kE=Object.prototype.propertyIsEnumerable,SE=Object.getOwnPropertySymbols,EE=SE?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}(SE(e),function(t){return kE.call(e,t)}))}:function(){return[]};function ME(e){return xn(e)&&"[object Arguments]"==Dn(e)}var TE=Object.prototype,PE=TE.hasOwnProperty,AE=TE.propertyIsEnumerable,DE=ME(function(){return arguments}())?ME:function(e){return xn(e)&&PE.call(e,"callee")&&!AE.call(e,"callee")};var xE="object"==typeof exports&&exports&&!exports.nodeType&&exports,CE=xE&&"object"==typeof module&&module&&!module.nodeType&&module,IE=CE&&CE.exports===xE?bn.Buffer:void 0,LE=(IE?IE.isBuffer:void 0)||function(){return!1},_E=/^(?:0|[1-9]\d*)$/;function RE(e,t){var i=typeof e;return!!(t=t??9007199254740991)&&("number"==i||"symbol"!=i&&_E.test(e))&&e>-1&&e%1==0&&e<t}function FE(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var OE={};OE["[object Float32Array]"]=OE["[object Float64Array]"]=OE["[object Int8Array]"]=OE["[object Int16Array]"]=OE["[object Int32Array]"]=OE["[object Uint8Array]"]=OE["[object Uint8ClampedArray]"]=OE["[object Uint16Array]"]=OE["[object Uint32Array]"]=!0,OE["[object Arguments]"]=OE["[object Array]"]=OE["[object ArrayBuffer]"]=OE["[object Boolean]"]=OE["[object DataView]"]=OE["[object Date]"]=OE["[object Error]"]=OE["[object Function]"]=OE["[object Map]"]=OE["[object Number]"]=OE["[object Object]"]=OE["[object RegExp]"]=OE["[object Set]"]=OE["[object String]"]=OE["[object WeakMap]"]=!1;var WE,$E="object"==typeof exports&&exports&&!exports.nodeType&&exports,NE=$E&&"object"==typeof module&&module&&!module.nodeType&&module,jE=NE&&NE.exports===$E&&gn.process,BE=function(){try{var e=NE&&NE.require&&NE.require("util").types;return e||jE&&jE.binding&&jE.binding("util")}catch(e){}}(),zE=BE&&BE.isTypedArray,UE=zE?(WE=zE,function(e){return WE(e)}):function(e){return xn(e)&&FE(e.length)&&!!OE[Dn(e)]},HE=Object.prototype.hasOwnProperty;function GE(e,t){var i=kn(e),n=!i&&DE(e),a=!i&&!n&&LE(e),r=!i&&!n&&!a&&UE(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)!HE.call(e,l)||o&&("length"==l||a&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||RE(l,u))||s.push(l);return s}var VE=Object.prototype;var KE=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),XE=Object.prototype.hasOwnProperty;function YE(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||VE))return KE(e);var t,i,n=[];for(var a in Object(e))XE.call(e,a)&&"constructor"!=a&&n.push(a);return n}function qE(e){return null!=(t=e)&&FE(t.length)&&!GS(t)?GE(e):YE(e);var t}function JE(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,qE,EE)}var QE=Object.prototype.hasOwnProperty;var ZE=aE(bn,"DataView"),eM=aE(bn,"Promise"),tM=aE(bn,"Set"),iM=aE(bn,"WeakMap"),nM="[object Map]",aM="[object Promise]",rM="[object Set]",oM="[object WeakMap]",sM="[object DataView]",uM=qS(ZE),lM=qS(rE),dM=qS(eM),hM=qS(tM),cM=qS(iM),mM=Dn;(ZE&&mM(new ZE(new ArrayBuffer(1)))!=sM||rE&&mM(new rE)!=nM||eM&&mM(eM.resolve())!=aM||tM&&mM(new tM)!=rM||iM&&mM(new iM)!=oM)&&(mM=function(e){var t=Dn(e),i="[object Object]"==t?e.constructor:void 0,n=i?qS(i):"";if(n)switch(n){case uM:return sM;case lM:return nM;case dM:return aM;case hM:return rM;case cM:return oM}return t});var fM="[object Arguments]",vM="[object Array]",pM="[object Object]",gM=Object.prototype.hasOwnProperty;function yM(e,t,i,n,a,r){var o=kn(e),s=kn(t),u=o?vM:mM(e),l=s?vM:mM(t),d=(u=u==fM?pM:u)==pM,h=(l=l==fM?pM:l)==pM,c=u==l;if(c&&LE(e)){if(!LE(t))return!1;o=!0,d=!1}if(c&&!d)return r||(r=new cE),o||UE(e)?vE(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 pE(e),new pE(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jS(+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=gE;case"[object Set]":var u=1&n;if(s||(s=yE),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=vE(s(e),s(t),n,a,r,o);return o.delete(e),d;case"[object Symbol]":if(wE)return wE.call(e)==wE.call(t)}return!1}(e,t,u,i,n,a,r);if(!(1&i)){var m=d&&gM.call(e,"__wrapped__"),f=h&&gM.call(t,"__wrapped__");if(m||f){var v=m?e.value():e,p=f?t.value():t;return r||(r=new cE),a(v,p,i,n,r)}}return!!c&&(r||(r=new cE),function(e,t,i,n,a,r){var o=1&i,s=JE(e),u=s.length;if(u!=JE(t).length&&!o)return!1;for(var l=u;l--;){var d=s[l];if(!(o?d in t:QE.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 bM(e,t,i,n,a){return e===t||(null==e||null==t||!xn(e)&&!xn(t)?e!=e&&t!=t:yM(e,t,i,n,bM,a))}function wM(e,t){return bM(e,t)}var kM=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;wM(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})],kM.prototype,"component",void 0),yt([Jt({type:Boolean})],kM.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],kM.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],kM.prototype,"minSDKVersion",void 0),kM=yt([Pt("nami-product-container")],kM);var SM,EM,MM=e=>e;function TM(e){if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=parseFloat(e);return!isNaN(t)&&0!==t}return!1}var PM=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=Tu(null!=a?a:"100%",this.scaleFactor),m=Tu(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=TM(this.component.moveX)||TM(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(SM||(SM=MM`<img src="${0}" alt="${0}" />`),i,this.ariaLabel)):(this.tabIndex=-1,this.ariaLabel=null,z(EM||(EM=MM``)))}}])}();yt([Jt({type:Object})],PM.prototype,"component",void 0),yt([Jt({type:Boolean})],PM.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],PM.prototype,"scaleFactor",void 0),PM=yt([Pt("nami-image")],PM);var AM=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})],AM.prototype,"component",void 0),yt([Jt({type:Boolean})],AM.prototype,"fullscreen",void 0),yt([Jt({type:Boolean})],AM.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],AM.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],AM.prototype,"minSDKVersion",void 0),AM=yt([Pt("nami-background-container")],AM);var DM,xM=e=>e,CM=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(DM||(DM=xM``));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: ${Tu(l,r)};`:""}\n ${void 0!==d?`height: ${Tu(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(${Mu(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})],CM.prototype,"component",void 0),yt([Jt({type:Number})],CM.prototype,"zIndex",void 0),yt([Jt({type:Boolean})],CM.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],CM.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],CM.prototype,"minSDKVersion",void 0),CM=yt([Pt("nami-content-container")],CM);var IM,LM=e=>e,_M=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;t._isTv&&("nami-segment-picker-item"===(null===(i=e.target.tagName)||void 0===i?void 0:i.toLowerCase())&&(t._anyItemFocused=!0))},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: ${Mu(i,t.topPadding)}px;\n bottom: ${Mu(i,t.bottomPadding)}px;\n width: calc(50% - ${Mu(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(IM||(IM=LM`${0}<div class="toggle"></div>`),e)}}])}();yt([Jt({type:Object})],_M.prototype,"component",void 0),yt([Jt({type:Boolean})],_M.prototype,"inFocusedState",void 0),yt([Jt({type:Number})],_M.prototype,"scaleFactor",void 0),yt([Jt({type:Object})],_M.prototype,"minSDKVersion",void 0),yt([Qt()],_M.prototype,"_anyItemFocused",void 0),_M=yt([Pt("nami-segment-picker")],_M);var RM,FM=e=>e,OM=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=wM(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(RM||(RM=FM`<input type="radio"
|
|
463
463
|
autocomplete="off"
|
|
464
464
|
id="${0}"
|
|
465
465
|
name="${0}"
|