From b5a0584bf804e27a0c5a918dc88739a256ecac28 Mon Sep 17 00:00:00 2001 From: Bozo Jovicic Date: Tue, 21 Jan 2025 15:37:59 +0100 Subject: [PATCH 1/7] MWPW-162026 [Milo][Sev2][Catalog] Group of checkboxes is missing FIELDSET element - filter checkboxes --- libs/deps/mas/mas.js | 9 ++++++ libs/deps/mas/merch-card.js | 31 ++++++++++++------- libs/deps/mas/merch-sidenav.js | 18 +++++------ libs/features/mas/dist/mas.js | 9 ++++++ libs/features/mas/src/global.css.js | 9 ++++++ .../sidenav/merch-sidenav-checkbox-group.js | 13 ++++++++ 6 files changed, 69 insertions(+), 20 deletions(-) diff --git a/libs/deps/mas/mas.js b/libs/deps/mas/mas.js index f03e59daf7..f4586c43a1 100644 --- a/libs/deps/mas/mas.js +++ b/libs/deps/mas/mas.js @@ -2079,6 +2079,15 @@ body.merch-modal { height: 100vh; } +.invisible-and-shrank { + top: 0; + left: -2px; + width: 1px; + height: 1px; + position: absolute; + overflow: hidden; +} + `;document.head.appendChild(Xo);var Vt;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(Vt||(Vt={}));var Fn;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Fn||(Fn={}));var Mt;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(Mt||(Mt={}));var Ue;(function(e){e.V2="UCv2",e.V3="UCv3"})(Ue||(Ue={}));var Z;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(Z||(Z={}));var Kn=function(e){var t;return(t=lc.get(e))!==null&&t!==void 0?t:e},lc=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var Wo=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qo=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function mt(e,t,r){var n,i;try{for(var o=Wo(Object.entries(e)),a=o.next();!a.done;a=o.next()){var s=qo(a.value,2),c=s[0],l=s[1],h=Kn(c);l!=null&&r.has(h)&&t.set(h,l)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Er(e){switch(e){case Vt.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Sr(e,t){var r,n;for(var i in e){var o=e[i];try{for(var a=(r=void 0,Wo(Object.entries(o))),s=a.next();!s.done;s=a.next()){var c=qo(s.value,2),l=c[0],h=c[1];if(h!=null){var d=Kn(l);t.set("items["+i+"]["+d+"]",h)}}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}}var hc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Zo(e){pc(e);var t=e.env,r=e.items,n=e.workflowStep,i=hc(e,["env","items","workflowStep"]),o=new URL(Er(t));return o.pathname=n+"/",Sr(r,o.searchParams),mt(i,o.searchParams,uc),o.toString()}var uc=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),mc=["env","workflowStep","clientId","country","items"];function pc(e){var t,r;try{for(var n=dc(mc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var fc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xc="p_draft_landscape",bc="/store/";function Yn(e){Ac(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,a=e.ot,s=e.offerType,c=e.pa,l=e.productArrangementCode,h=e.landscape,d=fc(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),u={marketSegment:o??i,offerType:s??a,productArrangementCode:l??c},m=new URL(Er(t));return m.pathname=""+bc+n,n!==Z.SEGMENTATION&&n!==Z.CHANGE_PLAN_TEAM_PLANS&&Sr(r,m.searchParams),n===Z.SEGMENTATION&&mt(u,m.searchParams,jn),mt(d,m.searchParams,jn),h===Mt.DRAFT&&mt({af:xc},m.searchParams,jn),m.toString()}var jn=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),vc=["env","workflowStep","clientId","country"];function Ac(e){var t,r;try{for(var n=gc(vc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==Z.SEGMENTATION&&e.workflowStep!==Z.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function Xn(e,t){switch(e){case Ue.V2:return Zo(t);case Ue.V3:return Yn(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),Yn(t)}}var Wn;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Wn||(Wn={}));var U;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(U||(U={}));var N;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(N||(N={}));var qn;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(qn||(qn={}));var Zn;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Zn||(Zn={}));var Jn;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(Jn||(Jn={}));var Qn;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Qn||(Qn={}));var Jo="tacocat.js";var yr=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),Qo=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function O(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let a=new URLSearchParams(window.location.search),s=pt(n)?n:e;o=a.get(s)}if(i&&o==null){let a=pt(i)?i:e;o=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&o==null){let a=Ec(pt(r)?r:e);o=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return o??t[e]}var ft=()=>{};var ea=e=>typeof e=="boolean",$t=e=>typeof e=="function",Tr=e=>typeof e=="number",ta=e=>e!=null&&typeof e=="object";var pt=e=>typeof e=="string",ei=e=>pt(e)&&e,gt=e=>Tr(e)&&Number.isFinite(e)&&e>0;function xt(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function y(e,t){if(ea(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Se(e,t,r){let n=Object.values(t);return n.find(i=>yr(i,e))??r??n[0]}function Ec(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function bt(e,t=1){return Tr(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Sc=Date.now(),ti=()=>`(+${Date.now()-Sc}ms)`,Lr=new Set,yc=y(O("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function ra(e){let t=`[${Jo}/${e}]`,r=(a,s,...c)=>a?!0:(i(s,...c),!1),n=yc?(a,...s)=>{console.debug(`${t} ${a}`,...s,ti())}:()=>{},i=(a,...s)=>{let c=`${t} ${a}`;Lr.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:i,warn:(a,...s)=>{let c=`${t} ${a}`;Lr.forEach(([,l])=>l(c,...s))}}}function Tc(e,t){let r=[e,t];return Lr.add(r),()=>{Lr.delete(r)}}Tc((e,...t)=>{console.error(e,...t,ti())},(e,...t)=>{console.warn(e,...t,ti())});var Lc="no promo",na="promo-tag",_c="yellow",wc="neutral",Pc=(e,t,r)=>{let n=o=>o||Lc,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Cc="cancel-context",Ht=(e,t)=>{let r=e===Cc,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,a=o?e||t:void 0;return{effectivePromoCode:a,overridenPromoCode:e,className:o?na:`${na} no-promo`,text:Pc(a,t,i),variant:o?_c:wc,isOverriden:i}};var ri="ABM",ni="PUF",ii="M2M",oi="PERPETUAL",ai="P3Y",Ic="TAX_INCLUSIVE_DETAILS",kc="TAX_EXCLUSIVE",ia={ABM:ri,PUF:ni,M2M:ii,PERPETUAL:oi,P3Y:ai},pm={[ri]:{commitment:U.YEAR,term:N.MONTHLY},[ni]:{commitment:U.YEAR,term:N.ANNUAL},[ii]:{commitment:U.MONTH,term:N.MONTHLY},[oi]:{commitment:U.PERPETUAL,term:void 0},[ai]:{commitment:U.THREE_MONTHS,term:N.P3Y}},oa="Value is not an offer",_r=e=>{if(typeof e!="object")return oa;let{commitment:t,term:r}=e,n=Nc(t,r);return{...e,planType:n}};var Nc=(e,t)=>{switch(e){case void 0:return oa;case"":return"";case U.YEAR:return t===N.MONTHLY?ri:t===N.ANNUAL?ni:"";case U.MONTH:return t===N.MONTHLY?ii:"";case U.PERPETUAL:return oi;case U.TERM_LICENSE:return t===N.P3Y?ai:"";default:return""}};function si(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:a}=t;if(a!==Ic)return e;let s={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:kc}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var ci=function(e,t){return ci=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ci(e,t)};function Ut(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ci(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var A=function(){return A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Vc,function(c,l,h,d,u,m){if(l)t.minimumIntegerDigits=h.length;else{if(d&&u)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(fa.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ha.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ha,function(c,l,h,d,u,m){return h==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:u&&m?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+m.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=A(A({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=A(A({},t),da(o)));continue}if(pa.test(i.stem)){t=A(A({},t),da(i.stem));continue}var a=ga(i.stem);a&&(t=A(A({},t),a));var s=Mc(i.stem);s&&(t=A(A({},t),s))}return t}var Bt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ba(e,t){for(var r="",n=0;n>1),c="a",l=$c(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function $c(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=Bt[n||""]||Bt[r||""]||Bt["".concat(r,"-001")]||Bt["001"];return i[0]}var di,Hc=new RegExp("^".concat(hi.source,"*")),Uc=new RegExp("".concat(hi.source,"*$"));function E(e,t){return{start:e,end:t}}var Dc=!!String.prototype.startsWith,Bc=!!String.fromCodePoint,Gc=!!Object.fromEntries,zc=!!String.prototype.codePointAt,Fc=!!String.prototype.trimStart,Kc=!!String.prototype.trimEnd,jc=!!Number.isSafeInteger,Yc=jc?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},mi=!0;try{va=ya("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),mi=((di=va.exec("a"))===null||di===void 0?void 0:di[0])==="a"}catch{mi=!1}var va,Aa=Dc?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},pi=Bc?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Ea=Gc?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},Xc=Fc?function(t){return t.trimStart()}:function(t){return t.replace(Hc,"")},Wc=Kc?function(t){return t.trimEnd()}:function(t){return t.replace(Uc,"")};function ya(e,t){return new RegExp(e,t)}var fi;mi?(ui=ya("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),fi=function(t,r){var n;ui.lastIndex=r;var i=ui.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):fi=function(t,r){for(var n=[];;){var i=Sa(t,r);if(i===void 0||La(i)||Jc(i))break;n.push(i),r+=i>=65536?2:1}return pi.apply(void 0,n)};var ui,Ta=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:P.pound,location:E(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(v.UNMATCHED_CLOSING_TAG,E(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&gi(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:P.literal,value:"<".concat(i,"/>"),location:E(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:P.tag,value:i,children:a,location:E(n,this.clonePosition())},err:null}:this.error(v.INVALID_TAG,E(s,this.clonePosition())))}else return this.error(v.UNCLOSED_TAG,E(n,this.clonePosition()))}else return this.error(v.INVALID_TAG,E(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Zc(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=E(n,this.clonePosition());return{val:{type:P.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!qc(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return pi.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),pi(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(v.EMPTY_ARGUMENT,E(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:E(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=fi(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),a=E(t,o);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(v.EXPECT_ARGUMENT_TYPE,E(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var u=Wc(d.val);if(u.length===0)return this.error(v.EXPECT_ARGUMENT_STYLE,E(this.clonePosition(),this.clonePosition()));var m=E(h,this.clonePosition());l={style:u,styleLocation:m}}var f=this.tryParseArgumentClose(i);if(f.err)return f;var g=E(i,this.clonePosition());if(l&&Aa(l?.style,"::",0)){var T=Xc(l.style.slice(2));if(s==="number"){var d=this.parseNumberSkeletonFromString(T,l.styleLocation);return d.err?d:{val:{type:P.number,value:n,location:g,style:d.val},err:null}}else{if(T.length===0)return this.error(v.EXPECT_DATE_TIME_SKELETON,g);var _=T;this.locale&&(_=ba(T,this.locale));var u={type:De.dateTime,pattern:_,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?ca(_):{}},b=s==="date"?P.date:P.time;return{val:{type:b,value:n,location:g,style:u},err:null}}}return{val:{type:s==="number"?P.number:s==="date"?P.date:P.time,value:n,location:g,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,E(S,A({},S)));this.bumpSpace();var k=this.parseIdentifierIfPossible(),R=0;if(s!=="select"&&k.value==="offset"){if(!this.bumpIf(":"))return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,E(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),k=this.parseIdentifierIfPossible(),R=d.val}var V=this.tryParsePluralOrSelectOptions(t,s,r,k);if(V.err)return V;var f=this.tryParseArgumentClose(i);if(f.err)return f;var H=E(i,this.clonePosition());return s==="select"?{val:{type:P.select,value:n,options:Ea(V.val),location:H},err:null}:{val:{type:P.plural,value:n,options:Ea(V.val),offset:R,pluralType:s==="plural"?"cardinal":"ordinal",location:H},err:null}}default:return this.error(v.INVALID_ARGUMENT_TYPE,E(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,E(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=ma(t)}catch{return this.error(v.INVALID_NUMBER_SKELETON,r)}return{val:{type:De.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?xa(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,a=!1,s=[],c=new Set,l=i.value,h=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=E(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?v.DUPLICATE_SELECT_ARGUMENT_SELECTOR:v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,E(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(t+1,r,n);if(f.err)return f;var g=this.tryParseArgumentClose(m);if(g.err)return g;s.push([l,{value:f.val,location:E(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR:v.EXPECT_PLURAL_ARGUMENT_SELECTOR,E(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(v.MISSING_OTHER_CLAUSE,E(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var c=E(i,this.clonePosition());return o?(a*=n,Yc(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Sa(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Aa(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&La(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function gi(e){return e>=97&&e<=122||e>=65&&e<=90}function qc(e){return gi(e)||e===47}function Zc(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function La(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Jc(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function xi(e){e.forEach(function(t){if(delete t.location,kr(t)||Nr(t))for(var r in t.options)delete t.options[r].location,xi(t.options[r].value);else Pr(t)&&Rr(t.style)||(Cr(t)||Ir(t))&&Dt(t.style)?delete t.style.location:Or(t)&&xi(t.children)})}function _a(e,t){t===void 0&&(t={}),t=A({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Ta(e,t).parse();if(r.err){var n=SyntaxError(v[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||xi(r.val),r.val}function Gt(e,t){var r=t&&t.cache?t.cache:il,n=t&&t.serializer?t.serializer:nl,i=t&&t.strategy?t.strategy:el;return i(e,{cache:r,serializer:n})}function Qc(e){return e==null||typeof e=="number"||typeof e=="boolean"}function wa(e,t,r,n){var i=Qc(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function Pa(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function bi(e,t,r,n,i){return r.bind(t,e,n,i)}function el(e,t){var r=e.length===1?wa:Pa;return bi(e,this,r,t.cache.create(),t.serializer)}function tl(e,t){return bi(e,this,Pa,t.cache.create(),t.serializer)}function rl(e,t){return bi(e,this,wa,t.cache.create(),t.serializer)}var nl=function(){return JSON.stringify(arguments)};function vi(){this.cache=Object.create(null)}vi.prototype.get=function(e){return this.cache[e]};vi.prototype.set=function(e,t){this.cache[e]=t};var il={create:function(){return new vi}},Vr={variadic:tl,monadic:rl};var Be;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Be||(Be={}));var zt=function(e){Ut(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Ai=function(e){Ut(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Be.INVALID_VALUE,o)||this}return t}(zt);var Ca=function(e){Ut(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Be.INVALID_VALUE,i)||this}return t}(zt);var Ia=function(e){Ut(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Be.MISSING_VALUE,n)||this}return t}(zt);var F;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(F||(F={}));function ol(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==F.literal||r.type!==F.literal?t.push(r):n.value+=r.value,t},[])}function al(e){return typeof e=="function"}function Ft(e,t,r,n,i,o,a){if(e.length===1&&li(e[0]))return[{type:F.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=_a,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Na=ka;var hl=/[0-9\-+#]/,dl=/[^\d\-+#]/g;function Oa(e){return e.search(hl)}function ul(e="#.##"){let t={},r=e.length,n=Oa(e);t.prefix=n>0?e.substring(0,n):"";let i=Oa(e.split("").reverse().join("")),o=r-i,a=e.substring(o,o+1),s=o+(a==="."||a===","?1:0);t.suffix=i>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(dl);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function ml(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=i.value.split(".");return(!s||s&&s.length<=o)&&(s=o<0?"":(+("0."+s)).toFixed(o+1).replace("0.","")),i.integer=a,i.fraction=s,pl(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function pl(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.length({accept:e,round:t}),bl=[Si(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Si(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Si(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],yi={[U.YEAR]:{[N.MONTHLY]:Kt.MONTH,[N.ANNUAL]:Kt.YEAR},[U.MONTH]:{[N.MONTHLY]:Kt.MONTH}},vl=(e,t)=>e.indexOf(`'${t}'`)===0,Al=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Da(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Sl(e)),r},El=e=>{let t=yl(e),r=vl(e,t),n=e.replace(/'.*?'/,""),i=$a.test(n)||Ha.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Ua=e=>e.replace($a,Ma).replace(Ha,Ma),Sl=e=>e.match(/#(.?)#/)?.[1]===Va?gl:Va,yl=e=>e.match(/'(.*?)'/)?.[1]??"",Da=e=>e.match(/0(.?)0/)?.[1]??"";function Mr({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=El(e),l=r?Da(e):"",h=Al(e,r),d=r?2:0,u=o(t,{currencySymbol:a}),m=n?u.toLocaleString("hi-IN",{minimumFractionDigits:d,maximumFractionDigits:d}):Ra(h,u),f=r?m.lastIndexOf(l):m.length,g=m.substring(0,f),T=m.substring(f+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,a),currencySymbol:a,decimals:T,decimalsDelimiter:l,hasCurrencySpace:c,integer:g,isCurrencyFirst:s,recurrenceTerm:i}}var Ba=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=xl[r]??1;return Mr(e,i>1?Kt.MONTH:yi[t]?.[r],o=>{let a={divisor:i,price:o,usePrecision:n},{round:s}=bl.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},Ga=({commitment:e,term:t,...r})=>Mr(r,yi[e]?.[t]),za=e=>{let{commitment:t,term:r}=e;return t===U.YEAR&&r===N.MONTHLY?Mr(e,Kt.YEAR,n=>n*12):Mr(e,yi[t]?.[r])};var Tl={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},Ll=ra("ConsonantTemplates/price"),_l=/<\/?[^>]+(>|$)/g,G={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},Ge={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},wl="TAX_EXCLUSIVE",Pl=e=>ta(e)?Object.entries(e).filter(([,t])=>pt(t)||Tr(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Qo(n)+'"'}`,""):"",j=(e,t,r,n=!1)=>`${n?Ua(t):t??""}`;function Cl(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},d={}){let u=j(G.currencySymbol,r),m=j(G.currencySpace,o?" ":""),f="";return s&&(f+=u+m),f+=j(G.integer,a),f+=j(G.decimalsDelimiter,i),f+=j(G.decimals,n),s||(f+=m+u),f+=j(G.recurrence,c,null,!0),f+=j(G.unitType,l,null,!0),f+=j(G.taxInclusivity,h,!0),j(e,f,{...d,"aria-label":t})}var W=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:i=!0,displayRecurrence:o=!0,displayPerUnit:a=!1,displayTax:s=!1,language:c,literals:l={}}={},{commitment:h,offerSelectorIds:d,formatString:u,price:m,priceWithoutDiscount:f,taxDisplay:g,taxTerm:T,term:_,usePrecision:b}={},S={})=>{Object.entries({country:n,formatString:u,language:c,price:m}).forEach(([ce,Yr])=>{if(Yr==null)throw new Error(`Argument "${ce}" is missing for osi ${d?.toString()}, country ${n}, language ${c}`)});let k={...Tl,...l},R=`${c.toLowerCase()}-${n.toUpperCase()}`;function V(ce,Yr){let Xr=k[ce];if(Xr==null)return"";try{return new Na(Xr.replace(_l,""),R).format(Yr)}catch{return Ll.error("Failed to format literal:",Xr),""}}let H=t&&f?f:m,ae=e?Ba:Ga;r&&(ae=za);let{accessiblePrice:Xe,recurrenceTerm:Le,...We}=ae({commitment:h,formatString:u,term:_,price:e?m:H,usePrecision:b,isIndianPrice:n==="IN"}),J=Xe,fe="";if(y(o)&&Le){let ce=V(Ge.recurrenceAriaLabel,{recurrenceTerm:Le});ce&&(J+=" "+ce),fe=V(Ge.recurrenceLabel,{recurrenceTerm:Le})}let se="";if(y(a)){se=V(Ge.perUnitLabel,{perUnit:"LICENSE"});let ce=V(Ge.perUnitAriaLabel,{perUnit:"LICENSE"});ce&&(J+=" "+ce)}let Q="";y(s)&&T&&(Q=V(g===wl?Ge.taxExclusiveLabel:Ge.taxInclusiveLabel,{taxTerm:T}),Q&&(J+=" "+Q)),t&&(J=V(Ge.strikethroughAriaLabel,{strikethroughPrice:J}));let _e=G.container;if(e&&(_e+=" "+G.containerOptical),t&&(_e+=" "+G.containerStrikethrough),r&&(_e+=" "+G.containerAnnual),y(i))return Cl(_e,{...We,accessibleLabel:J,recurrenceLabel:fe,perUnitLabel:se,taxInclusivityLabel:Q},S);let{currencySymbol:Yi,decimals:As,decimalsDelimiter:Es,hasCurrencySpace:Xi,integer:Ss,isCurrencyFirst:ys}=We,qe=[Ss,Es,As];ys?(qe.unshift(Xi?"\xA0":""),qe.unshift(Yi)):(qe.push(Xi?"\xA0":""),qe.push(Yi)),qe.push(fe,se,Q);let Ts=qe.join("");return j(_e,Ts,S)},Fa=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${W()(e,t,r)}${i?" "+W({displayStrikethrough:!0})(e,t,r):""}`},Ka=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?W({displayStrikethrough:!0})(n,t,r)+" ":""}${W()(e,t,r)}${j(G.containerAnnualPrefix," (")}${W({displayAnnual:!0})(n,t,r)}${j(G.containerAnnualSuffix,")")}`},ja=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${W()(e,t,r)}${j(G.containerAnnualPrefix," (")}${W({displayAnnual:!0})(n,t,r)}${j(G.containerAnnualSuffix,")")}`};var Ti=W(),Li=Fa(),_i=W({displayOptical:!0}),wi=W({displayStrikethrough:!0}),Pi=W({displayAnnual:!0}),Ci=ja(),Ii=Ka();var Il=(e,t)=>{if(!(!gt(e)||!gt(t)))return Math.floor((t-e)/t*100)},Ya=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=Il(r,n);return i===void 0?'':`${i}%`};var ki=Ya();var{freeze:jt}=Object,re=jt({...Ue}),ne=jt({...Z}),ze={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},Ni=jt({...U}),Oi=jt({...ia}),Ri=jt({...N});var Xa="mas-commerce-service";function Wa(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(Xa);i!==r&&(r=i,i&&e(i))}return document.addEventListener(it,n,{once:t}),Fe(n),()=>document.removeEventListener(it,n)}function Yt(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[a,s]=e;i=[a.language===o?a:s]}return r&&(i=i.map(si)),i}var Fe=e=>window.setTimeout(e);function vt(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(bt).filter(gt);return r.length||(r=[t]),r}function $r(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(ei)}function q(){return document.getElementsByTagName(Xa)?.[0]}var Ke={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},qa=1e3,Za=new Set;function kl(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function Ja(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Ke.serializableTypes.includes(r))return r}return e}function Nl(e,t){if(!Ke.ignoredProperties.includes(e))return Ja(t)}var Vi={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],i=[],o=t;r.forEach(l=>{l!=null&&(kl(l)?n:i).push(l)}),n.length&&(o+=" "+n.map(Ja).join(" "));let{pathname:a,search:s}=window.location,c=`${Ke.delimiter}page=${a}${s}`;c.length>qa&&(c=`${c.slice(0,qa)}`),o+=c,i.length&&(o+=`${Ke.delimiter}facts=`,o+=JSON.stringify(i,Nl)),Za.has(o)||(Za.add(o),window.lana?.log(o,Ke))}};function At(e){Object.assign(Ke,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Ke&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var L=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:re.V3,checkoutWorkflowStep:ne.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:ze.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:$e.PUBLISHED,wcsBufferLimit:1});var Mi=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Ol({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||L.language),t??(t=e?.split("_")?.[1]||L.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function $i(e={}){let{commerce:t={}}=e,r=ze.PRODUCTION,n=Dn,i=O("checkoutClientId",t)??L.checkoutClientId,o=Se(O("checkoutWorkflow",t),re,L.checkoutWorkflow),a=ne.CHECKOUT;o===re.V3&&(a=Se(O("checkoutWorkflowStep",t),ne,L.checkoutWorkflowStep));let s=y(O("displayOldPrice",t),L.displayOldPrice),c=y(O("displayPerUnit",t),L.displayPerUnit),l=y(O("displayRecurrence",t),L.displayRecurrence),h=y(O("displayTax",t),L.displayTax),d=y(O("entitlement",t),L.entitlement),u=y(O("modal",t),L.modal),m=y(O("forceTaxExclusive",t),L.forceTaxExclusive),f=O("promotionCode",t)??L.promotionCode,g=vt(O("quantity",t)),T=O("wcsApiKey",t)??L.wcsApiKey,_=t?.env==="stage",b=$e.PUBLISHED;["true",""].includes(t.allowOverride)&&(_=(O(Hn,t,{metadata:!1})?.toLowerCase()??t?.env)==="stage",b=Se(O(Un,t),$e,b)),_&&(r=ze.STAGE,n=Bn);let k=bt(O("wcsBufferDelay",t),L.wcsBufferDelay),R=bt(O("wcsBufferLimit",t),L.wcsBufferLimit);return{...Ol(e),displayOldPrice:s,checkoutClientId:i,checkoutWorkflow:o,checkoutWorkflowStep:a,displayPerUnit:c,displayRecurrence:l,displayTax:h,entitlement:d,extraOptions:L.extraOptions,modal:u,env:r,forceTaxExclusive:m,promotionCode:f,quantity:g,wcsApiKey:T,wcsBufferDelay:k,wcsBufferLimit:R,wcsURL:n,landscape:b}}var Hi={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Rl=Date.now(),Ui=new Set,Di=new Set,Qa=new Map,es={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},ts={filter:({level:e})=>e!==Hi.DEBUG},Vl={filter:()=>!1};function Ml(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){return n.length===1&&$t(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:i,timestamp:Date.now()-Rl}}function $l(e){[...Di].every(t=>t(e))&&Ui.forEach(t=>t(e))}function rs(e){let t=(Qa.get(e)??0)+1;Qa.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:i=>rs(`${n.namespace}/${i}`),updateConfig:At};return Object.values(Hi).forEach(i=>{n[i]=(o,...a)=>$l(Ml(i,o,e,a,r))}),Object.seal(n)}function Hr(...e){e.forEach(t=>{let{append:r,filter:n}=t;$t(n)&&Di.add(n),$t(r)&&Ui.add(r)})}function Hl(e={}){let{name:t}=e,r=y(O("commerce.debug",{search:!0,storage:!0}),t===Mi.LOCAL);return Hr(r?es:ts),t===Mi.PROD&&Hr(Vi),X}function Ul(){Ui.clear(),Di.clear()}var X={...rs($n),Level:Hi,Plugins:{consoleAppender:es,debugFilter:ts,quietFilter:Vl,lanaAppender:Vi},init:Hl,reset:Ul,use:Hr};var Dl={[he]:kn,[Ee]:Nn,[de]:On},Bl={[he]:Vn,[de]:Mn},Et=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",ft);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",Ee);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[he,Ee,de].forEach(t=>{this.wrapperElement.classList.toggle(Dl[t],t===this.state)})}notify(){(this.state===de||this.state===he)&&(this.state===de?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===he&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(Bl[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=Wa(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=ft}onceSettled(){let{error:t,promises:r,state:n}=this;return de===n?Promise.resolve(this.wrapperElement):he===n?Promise.reject(t):new Promise((i,o)=>{r.push({resolve:i,reject:o})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=de,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Fe(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=he,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),Fe(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Ee,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!q()||this.timer)return;let r=X.module("mas-element"),{error:n,options:i,state:o,value:a,version:s}=this;this.state=Ee,this.timer=Fe(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Ee&&this.version===s&&(this.state=o,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,i)}})}};function ns(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function Ur(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,ns(t)),i}function Dr(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,ns(t)),e):null}var Gl="download",zl="upgrade";function Br(e,t={},r=""){let n=q();if(!n)return null;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m,extraOptions:f}=n.collectCheckoutOptions(t),g=Ur(e,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m,extraOptions:f});return r&&(g.innerHTML=`${r}`),g}function Gr(e){return class extends e{constructor(){super(...arguments);p(this,"checkoutActionHandler");p(this,"masElement",new Et(this))}attributeChangedCallback(n,i,o){this.masElement.attributeChangedCallback(n,i,o)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let i=q();if(!i)return!1;this.dataset.imsCountry||i.imsCountryPromise.then(d=>{d&&(this.dataset.imsCountry=d)},ft),n.imsCountry=null;let o=i.collectCheckoutOptions(n,this);if(!o.wcsOsi.length)return!1;let a;try{a=JSON.parse(o.extraOptions??"{}")}catch(d){this.masElement.log?.error("cannot parse exta checkout options",d)}let s=this.masElement.togglePending(o);this.setCheckoutUrl("");let c=i.resolveOfferSelectors(o),l=await Promise.all(c);l=l.map(d=>Yt(d,o)),o.country=this.dataset.imsCountry||o.country;let h=await i.buildCheckoutAction?.(l.flat(),{...a,...o},this);return this.renderOffers(l.flat(),o,{},h,s)}renderOffers(n,i,o={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=q();if(!c)return!1;if(i={...JSON.parse(this.dataset.extraOptions??"null"),...i,...o},s??(s=this.masElement.togglePending(i)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(Gl,zl),this.masElement.toggleResolved(s,n,i);let{url:h,text:d,className:u,handler:m}=a;return h&&this.setCheckoutUrl(h),d&&(this.firstElementChild.innerHTML=d),u&&this.classList.add(...u.split(" ")),m&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=m.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,i)){let h=c.buildCheckoutURL(n,i);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${i?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,i))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let i=q();if(!i)return!1;let{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:f}=i.collectCheckoutOptions(n);return Dr(this,{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:f}),!0}}}var Xt=class Xt extends Gr(HTMLButtonElement){static createCheckoutButton(t={},r=""){return Br(Xt,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};p(Xt,"is","checkout-button"),p(Xt,"tag","button");var je=Xt;window.customElements.get(je.is)||window.customElements.define(je.is,je,{extends:je.tag});var Fl="#000000",Kl="#F8D904",jl=/(accent|primary|secondary)(-(outline|link))?/,Yl="mas:product_code/",Xl="daa-ll",zr="daa-lh",Wl=["XL","L","M","S"];function ql(e,t,r){e.mnemonicIcon?.map((i,o)=>({icon:i,alt:e.mnemonicAlt[o]??"",link:e.mnemonicLink[o]??""}))?.forEach(({icon:i,alt:o,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:i,size:r?.size??"l"};o&&(s.alt=o),a&&(s.href=a);let c=te("merch-icon",s);t.append(c)})}function Zl(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||Fl),t.setAttribute("badge-background-color",e.badgeBackgroundColor||Kl))}function Jl(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function Ql(e,t,r){e.cardTitle&&r&&t.append(te(r.tag,{slot:r.slot},e.cardTitle))}function eh(e,t,r){e.subtitle&&r&&t.append(te(r.tag,{slot:r.slot},e.subtitle))}function th(e,t,r){if(r?.tag&&e.backgroundImage){let n={loading:"lazy",src:e.backgroundImage};e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",t.append(te(r.tag,{slot:r.slot},te("img",n)))}r?.attribute&&t.setAttribute(r.attribute,e.backgroundImage)}function rh(e,t,r){if(e.prices&&r){let n=te(r.tag,{slot:r.slot},e.prices);t.append(n)}}function nh(e,t,r){if(e.description&&r){let n=te(r.tag,{slot:r.slot},e.description);t.append(n)}}function ih(e,t,r,n){let o=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);o.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||o.setAttribute(h.name,h.value);o.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=Wl.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),o.classList.add(...l),o}function oh(e,t,r,n){let i="fill";r&&(i="outline");let o=te("sp-button",{treatment:i,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return o.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),o}function ah(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function sh(e,t,r,n){if(e.ctas){let{slot:i}=r.ctas,o=te("div",{slot:i},e.ctas),a=[...o.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return ah(s,c);let l=jl.exec(s.className)?.[0]??"accent",h=l.includes("accent"),d=l.includes("primary"),u=l.includes("secondary"),m=l.includes("-outline");if(l.includes("-link"))return s;let g;return h||c?g="accent":d?g="primary":u&&(g="secondary"),t.spectrum==="swc"?oh(s,r,m,g):ih(s,r,m,g)});o.innerHTML="",o.append(...a),t.append(o)}}function ch(e,t){let{tags:r}=e,n=r?.find(i=>i.startsWith(Yl))?.split("/").pop();n&&(t.setAttribute(zr,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((i,o)=>{i.setAttribute(Xl,`${i.dataset.analyticsId}-${o+1}`)}))}function lh(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function is(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.id=e.id,t.querySelectorAll("[slot]").forEach(o=>{o.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(zr),t.variant=n,await t.updateComplete;let{aemFragmentMapping:i}=t.variantLayout;i&&(ql(r,t,i.mnemonics),Zl(r,t),Jl(r,t,i.allowedSizes),Ql(r,t,i.title),eh(r,t,i.subtitle),rh(r,t,i.prices),th(r,t,i.backgroundImage,n),nh(r,t,i.description),sh(r,t,i,n),ch(r,t),lh(t))}var hh="merch-card",dh=":start",uh=":ready",mh=1e4,os="merch-card:",qt,Bi,Wt=class extends ee{constructor(){super();K(this,qt);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=zn(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=zn(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let i of n){await i.onceSettled();let o=i.value?.[0]?.planType;if(!o)return;let a=this.stockOfferOsis[o];if(!a)return;let s=i.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),i.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let i of n)i.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(i=>{if(r){n[i].order=Math.min(n[i].order||2,2);return}let o=n[i].order;o===1||isNaN(o)||(n[i].order=Number(o)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${os}${r}${dh}`),this.addEventListener(xr,this.handleQuantitySelection),this.addEventListener(_n,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Me,this.handleAemFragmentEvents),this.addEventListener(Ve,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(xr,this.handleQuantitySelection),this.storageOptions?.removeEventListener(gr,this.handleStorageChange),this.removeEventListener(Me,this.handleAemFragmentEvents),this.removeEventListener(Ve,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Me&&ge(this,qt,Bi).call(this,"AEM fragment cannot be loaded"),r.type===Ve&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await is(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(o=>setTimeout(()=>o(!1),mh));if(await Promise.race([r,n])===!0){performance.mark(`${os}${this.id}${uh}`),this.dispatchEvent(new CustomEvent(Cn,{bubbles:!0,composed:!0}));return}ge(this,qt,Bi).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||this.dispatchEvent(new CustomEvent(wn,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(gr,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let i=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(i)}):n.replaceWith(i)}}};qt=new WeakSet,Bi=function(r){this.dispatchEvent(new CustomEvent(In,{detail:r,bubbles:!0,composed:!0}))},p(Wt,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,i,o]=r.split(",");return{PUF:n,ABM:i,M2M:o}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[i,o,a]=n.split(":"),s=Number(o);return[i,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:i,size:o}])=>[n,i,o].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:zr,reflect:!0}}),p(Wt,"styles",[Oo,Yo(),...Ro()]);customElements.define(hh,Wt);var St=class extends ee{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?x` diff --git a/libs/deps/mas/merch-card.js b/libs/deps/mas/merch-card.js index 805fee30e5..6b06142daa 100644 --- a/libs/deps/mas/merch-card.js +++ b/libs/deps/mas/merch-card.js @@ -1,4 +1,4 @@ -var ho=Object.defineProperty;var ir=e=>{throw TypeError(e)};var mo=(e,t,r)=>t in e?ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var u=(e,t,r)=>mo(e,typeof t!="symbol"?t+"":t,r),lt=(e,t,r)=>t.has(e)||ir("Cannot "+r);var ht=(e,t,r)=>(lt(e,t,"read from private field"),r?r.call(e):t.get(e)),Ie=(e,t,r)=>t.has(e)?ir("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ar=(e,t,r,n)=>(lt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),mt=(e,t,r)=>(lt(e,t,"access private method"),r);import{LitElement as Ta}from"../lit-all.min.js";import{LitElement as uo,html as sr,css as po}from"../lit-all.min.js";var m=class extends uo{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?sr` +var lo=Object.defineProperty;var ir=e=>{throw TypeError(e)};var mo=(e,t,r)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var u=(e,t,r)=>mo(e,typeof t!="symbol"?t+"":t,r),ht=(e,t,r)=>t.has(e)||ir("Cannot "+r);var lt=(e,t,r)=>(ht(e,t,"read from private field"),r?r.call(e):t.get(e)),Ie=(e,t,r)=>t.has(e)?ir("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ar=(e,t,r,n)=>(ht(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),mt=(e,t,r)=>(ht(e,t,"access private method"),r);import{LitElement as Ta}from"../lit-all.min.js";import{LitElement as uo,html as sr,css as po}from"../lit-all.min.js";var m=class extends uo{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?sr` ${this.alt} `:sr` ${this.alt}`}};u(m,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),u(m,"styles",po` :host { @@ -28,7 +28,7 @@ var ho=Object.defineProperty;var ir=e=>{throw TypeError(e)};var mo=(e,t,r)=>t in width: var(--mod-img-width, var(--img-width)); height: var(--mod-img-height, var(--img-height)); } - `);customElements.define("merch-icon",m);import{css as lr,unsafeCSS as cr}from"../lit-all.min.js";var F="(max-width: 767px)",ke="(max-width: 1199px)",T="(min-width: 768px)",A="(min-width: 1200px)",C="(min-width: 1600px)";var hr=lr` + `);customElements.define("merch-icon",m);import{css as hr,unsafeCSS as cr}from"../lit-all.min.js";var F="(max-width: 767px)",ke="(max-width: 1199px)",T="(min-width: 768px)",A="(min-width: 1200px)",C="(min-width: 1600px)";var lr=hr` :host { --consonant-merch-card-background-color: #fff; --consonant-merch-card-border: 1px solid var(--consonant-merch-card-border-color); @@ -250,7 +250,7 @@ var ho=Object.defineProperty;var ir=e=>{throw TypeError(e)};var mo=(e,t,r)=>t in ::slotted([slot='price']) { color: var(--consonant-merch-card-price-color); } -`,mr=()=>[lr` +`,mr=()=>[hr` /* Tablet */ @media screen and ${cr(T)} { :host([size='wide']), @@ -265,7 +265,7 @@ var ho=Object.defineProperty;var ir=e=>{throw TypeError(e)};var mo=(e,t,r)=>t in :host([size='wide']) { grid-column: span 2; } - `];import{html as Be}from"../lit-all.min.js";var te,ge=class ge{constructor(t){u(this,"card");Ie(this,te);this.card=t,this.insertVariantStyle()}getContainer(){return ar(this,te,ht(this,te)??this.card.closest('[class*="-merch-cards"]')??this.card.parentElement),ht(this,te)}insertVariantStyle(){if(!ge.styleMap[this.card.variant]){ge.styleMap[this.card.variant]=!0;let t=document.createElement("style");t.innerHTML=this.getGlobalCSS(),document.head.appendChild(t)}}updateCardElementMinHeight(t,r){if(!t)return;let n=`--consonant-merch-card-${this.card.variant}-${r}-height`,o=Math.max(0,parseInt(window.getComputedStyle(t).height)||0),i=parseInt(this.getContainer().style.getPropertyValue(n))||0;o>i&&this.getContainer().style.setProperty(n,`${o}px`)}get badge(){let t;if(!(!this.card.badgeBackgroundColor||!this.card.badgeColor||!this.card.badgeText))return this.evergreen&&(t=`border: 1px solid ${this.card.badgeBackgroundColor}; border-right: none;`),Be` + `];import{html as Be}from"../lit-all.min.js";var te,ge=class ge{constructor(t){u(this,"card");Ie(this,te);this.card=t,this.insertVariantStyle()}getContainer(){return ar(this,te,lt(this,te)??this.card.closest('[class*="-merch-cards"]')??this.card.parentElement),lt(this,te)}insertVariantStyle(){if(!ge.styleMap[this.card.variant]){ge.styleMap[this.card.variant]=!0;let t=document.createElement("style");t.innerHTML=this.getGlobalCSS(),document.head.appendChild(t)}}updateCardElementMinHeight(t,r){if(!t)return;let n=`--consonant-merch-card-${this.card.variant}-${r}-height`,o=Math.max(0,parseInt(window.getComputedStyle(t).height)||0),i=parseInt(this.getContainer().style.getPropertyValue(n))||0;o>i&&this.getContainer().style.setProperty(n,`${o}px`)}get badge(){let t;if(!(!this.card.badgeBackgroundColor||!this.card.badgeColor||!this.card.badgeText))return this.evergreen&&(t=`border: 1px solid ${this.card.badgeBackgroundColor}; border-right: none;`),Be`
- `}postCardUpdateHook(t){t.has("backgroundImage")&&this.styleBackgroundImage()}styleBackgroundImage(){if(this.card.classList.remove("thin-strip"),this.card.classList.remove("wide-strip"),!this.card.backgroundImage)return;let t=new Image;t.src=this.card.backgroundImage,t.onload=()=>{t.width>8?this.card.classList.add("wide-strip"):t.width===8&&this.card.classList.add("thin-strip")}}};u(le,"variantStyle",Lo` + `}postCardUpdateHook(t){t.has("backgroundImage")&&this.styleBackgroundImage()}styleBackgroundImage(){if(this.card.classList.remove("thin-strip"),this.card.classList.remove("wide-strip"),!this.card.backgroundImage)return;let t=new Image;t.src=this.card.backgroundImage,t.onload=()=>{t.width>8?this.card.classList.add("wide-strip"):t.width===8&&this.card.classList.add("thin-strip")}}};u(he,"variantStyle",Lo` :host([variant='ccd-suggested']) { --consonant-merch-card-background-color: rgb(245, 245, 245); --consonant-merch-card-body-xs-color: rgb(75, 75, 75); @@ -1572,7 +1572,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link { --consonant-merch-card-border-color:rgb(48, 48, 48); --consonant-merch-card-detail-s-color:rgb(235, 235, 235); } -`;var No={mnemonics:{size:"m"},backgroundImage:{tag:"div",slot:"image"},description:{tag:"div",slot:"body-s"},ctas:{slot:"footer",size:"S"},allowedSizes:["wide"]},he=class extends w{getGlobalCSS(){return kr}get aemFragmentMapping(){return No}renderLayout(){return Po`
+`;var No={mnemonics:{size:"m"},backgroundImage:{tag:"div",slot:"image"},description:{tag:"div",slot:"body-s"},ctas:{slot:"footer",size:"S"},allowedSizes:["wide"]},le=class extends w{getGlobalCSS(){return kr}get aemFragmentMapping(){return No}renderLayout(){return Po`
${this.badge} @@ -1581,7 +1581,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link {
- `}};u(he,"variantStyle",Ro` + `}};u(le,"variantStyle",Ro` :host([variant='ccd-slice']) { --consonant-merch-card-background-color: rgb(248, 248, 248); --consonant-merch-card-border-color: rgb(230, 230, 230); @@ -1684,7 +1684,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link { align-items: center; gap: 8px; } - `);var yt=(e,t=!1)=>{switch(e.variant){case"catalog":return new re(e);case"image":return new ze(e);case"inline-heading":return new Fe(e);case"mini-compare-chart":return new oe(e);case"plans":return new ie(e);case"product":return new W(e);case"segment":return new ae(e);case"special-offers":return new se(e);case"twp":return new ce(e);case"ccd-suggested":return new le(e);case"ccd-slice":return new he(e);default:return t?void 0:new W(e)}},Br=()=>{let e=[];return e.push(re.variantStyle),e.push(oe.variantStyle),e.push(W.variantStyle),e.push(ie.variantStyle),e.push(ae.variantStyle),e.push(se.variantStyle),e.push(ce.variantStyle),e.push(le.variantStyle),e.push(he.variantStyle),e};var Dr=document.createElement("style");Dr.innerHTML=` + `);var yt=(e,t=!1)=>{switch(e.variant){case"catalog":return new re(e);case"image":return new ze(e);case"inline-heading":return new Fe(e);case"mini-compare-chart":return new oe(e);case"plans":return new ie(e);case"product":return new W(e);case"segment":return new ae(e);case"special-offers":return new se(e);case"twp":return new ce(e);case"ccd-suggested":return new he(e);case"ccd-slice":return new le(e);default:return t?void 0:new W(e)}},Br=()=>{let e=[];return e.push(re.variantStyle),e.push(oe.variantStyle),e.push(W.variantStyle),e.push(ie.variantStyle),e.push(ae.variantStyle),e.push(se.variantStyle),e.push(ce.variantStyle),e.push(he.variantStyle),e.push(le.variantStyle),e};var Dr=document.createElement("style");Dr.innerHTML=` :root { --consonant-merch-card-detail-font-size: 12px; --consonant-merch-card-detail-font-weight: 500; @@ -2104,6 +2104,15 @@ body.merch-modal { height: 100vh; } -`;document.head.appendChild(Dr);var be;(function(e){e.V2="UCv2",e.V3="UCv3"})(be||(be={}));var ve;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(ve||(ve={}));var Et;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Et||(Et={}));var R;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(R||(R={}));var _;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(_||(_={}));var wt;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(wt||(wt={}));var St;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(St||(St={}));var At;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(At||(At={}));var Tt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Tt||(Tt={}));var Ur="tacocat.js";var Gr=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function me(e,t={},{metadata:r=!0,search:n=!0,storage:o=!0}={}){let i;if(n&&i==null){let a=new URLSearchParams(window.location.search),s=ye(n)?n:e;i=a.get(s)}if(o&&i==null){let a=ye(o)?o:e;i=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&i==null){let a=Oo(ye(r)?r:e);i=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return i??t[e]}var de=()=>{};var zr=e=>typeof e=="boolean",Ee=e=>typeof e=="function",_t=e=>typeof e=="number",Fr=e=>e!=null&&typeof e=="object";var ye=e=>typeof e=="string";var we=e=>_t(e)&&Number.isFinite(e)&&e>0;function H(e,t){if(zr(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Oo(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}var Ho=Date.now(),Lt=()=>`(+${Date.now()-Ho}ms)`,Ve=new Set,Mo=H(me("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function $r(e){let t=`[${Ur}/${e}]`,r=(a,s,...c)=>a?!0:(o(s,...c),!1),n=Mo?(a,...s)=>{console.debug(`${t} ${a}`,...s,Lt())}:()=>{},o=(a,...s)=>{let c=`${t} ${a}`;Ve.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:o,warn:(a,...s)=>{let c=`${t} ${a}`;Ve.forEach(([,l])=>l(c,...s))}}}function Io(e,t){let r=[e,t];return Ve.add(r),()=>{Ve.delete(r)}}Io((e,...t)=>{console.error(e,...t,Lt())},(e,...t)=>{console.warn(e,...t,Lt())});var Vr="ABM",jr="PUF",Yr="M2M",Wr="PERPETUAL",qr="P3Y",ko="TAX_INCLUSIVE_DETAILS",Bo="TAX_EXCLUSIVE",Xr={ABM:Vr,PUF:jr,M2M:Yr,PERPETUAL:Wr,P3Y:qr},th={[Vr]:{commitment:R.YEAR,term:_.MONTHLY},[jr]:{commitment:R.YEAR,term:_.ANNUAL},[Yr]:{commitment:R.MONTH,term:_.MONTHLY},[Wr]:{commitment:R.PERPETUAL,term:void 0},[qr]:{commitment:R.THREE_MONTHS,term:_.P3Y}};function Ct(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:o,priceWithoutDiscountAndTax:i,taxDisplay:a}=t;if(a!==ko)return e;let s={...e,priceDetails:{...t,price:o??r,priceWithoutDiscount:i??n,taxDisplay:Bo}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var Pt=function(e,t){return Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Pt(e,t)};function Se(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var b=function(){return b=Object.assign||function(t){for(var r,n=1,o=arguments.length;n0}),r=[],n=0,o=t;n1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(Go,function(c,l,h,f,p,g){if(l)t.minimumIntegerDigits=h.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(an.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(en.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(en,function(c,l,h,f,p,g){return h==="*"?t.minimumFractionDigits=l.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:p&&g?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+g.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?t=b(b({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=b(b({},t),tn(i)));continue}if(on.test(o.stem)){t=b(b({},t),tn(o.stem));continue}var a=sn(o.stem);a&&(t=b(b({},t),a));var s=zo(o.stem);s&&(t=b(b({},t),s))}return t}var Te={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ln(e,t){for(var r="",n=0;n>1),c="a",l=Fo(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else o==="J"?r+="H":r+=o}return r}function Fo(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var o=Te[n||""]||Te[r||""]||Te["".concat(r,"-001")]||Te["001"];return o[0]}var Ot,$o=new RegExp("^".concat(Nt.source,"*")),Vo=new RegExp("".concat(Nt.source,"*$"));function v(e,t){return{start:e,end:t}}var jo=!!String.prototype.startsWith,Yo=!!String.fromCodePoint,Wo=!!Object.fromEntries,qo=!!String.prototype.codePointAt,Xo=!!String.prototype.trimStart,Ko=!!String.prototype.trimEnd,Zo=!!Number.isSafeInteger,Qo=Zo?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Mt=!0;try{hn=pn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Mt=((Ot=hn.exec("a"))===null||Ot===void 0?void 0:Ot[0])==="a"}catch{Mt=!1}var hn,mn=jo?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},It=Yo?String.fromCodePoint:function(){for(var t=[],r=0;ri;){if(a=t[i++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},dn=Wo?Object.fromEntries:function(t){for(var r={},n=0,o=t;n=n)){var o=t.charCodeAt(r),i;return o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},Jo=Xo?function(t){return t.trimStart()}:function(t){return t.replace($o,"")},ei=Ko?function(t){return t.trimEnd()}:function(t){return t.replace(Vo,"")};function pn(e,t){return new RegExp(e,t)}var kt;Mt?(Ht=pn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),kt=function(t,r){var n;Ht.lastIndex=r;var o=Ht.exec(t);return(n=o[1])!==null&&n!==void 0?n:""}):kt=function(t,r){for(var n=[];;){var o=un(t,r);if(o===void 0||gn(o)||ni(o))break;n.push(o),r+=o>=65536?2:1}return It.apply(void 0,n)};var Ht,fn=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(t,n);if(a.err)return a;o.push(a.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),o.push({type:E.pound,location:v(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(x.UNMATCHED_CLOSING_TAG,v(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Bt(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;o.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;o.push(a.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:E.literal,value:"<".concat(o,"/>"),location:v(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:E.tag,value:o,children:a,location:v(n,this.clonePosition())},err:null}:this.error(x.INVALID_TAG,v(s,this.clonePosition())))}else return this.error(x.UNCLOSED_TAG,v(n,this.clonePosition()))}else return this.error(x.INVALID_TAG,v(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ri(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var a=this.tryParseUnquoted(t,r);if(a){o+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){o+=s;continue}break}var c=v(n,this.clonePosition());return{val:{type:E.literal,value:o,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!ti(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return It.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),It(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(x.EMPTY_ARGUMENT,v(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(x.MALFORMED_ARGUMENT,v(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:E.argument,value:o,location:v(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition())):this.parseArgumentOptions(t,r,o,n);default:return this.error(x.MALFORMED_ARGUMENT,v(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=kt(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),a=v(t,i);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,o){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(x.EXPECT_ARGUMENT_TYPE,v(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=ei(f.val);if(p.length===0)return this.error(x.EXPECT_ARGUMENT_STYLE,v(this.clonePosition(),this.clonePosition()));var g=v(h,this.clonePosition());l={style:p,styleLocation:g}}var y=this.tryParseArgumentClose(o);if(y.err)return y;var S=v(o,this.clonePosition());if(l&&mn(l?.style,"::",0)){var M=Jo(l.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(M,l.styleLocation);return f.err?f:{val:{type:E.number,value:n,location:S,style:f.val},err:null}}else{if(M.length===0)return this.error(x.EXPECT_DATE_TIME_SKELETON,S);var G=M;this.locale&&(G=ln(M,this.locale));var p={type:q.dateTime,pattern:G,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Qr(G):{}},z=s==="date"?E.date:E.time;return{val:{type:z,value:n,location:S,style:p},err:null}}}return{val:{type:s==="number"?E.number:s==="date"?E.date:E.time,value:n,location:S,style:(i=l?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS,v(O,b({},O)));this.bumpSpace();var j=this.parseIdentifierIfPossible(),D=0;if(s!=="select"&&j.value==="offset"){if(!this.bumpIf(":"))return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),j=this.parseIdentifierIfPossible(),D=f.val}var k=this.tryParsePluralOrSelectOptions(t,s,r,j);if(k.err)return k;var y=this.tryParseArgumentClose(o);if(y.err)return y;var Me=v(o,this.clonePosition());return s==="select"?{val:{type:E.select,value:n,options:dn(k.val),location:Me},err:null}:{val:{type:E.plural,value:n,options:dn(k.val),offset:D,pluralType:s==="plural"?"cardinal":"ordinal",location:Me},err:null}}default:return this.error(x.INVALID_ARGUMENT_TYPE,v(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(x.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,v(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=nn(t)}catch{return this.error(x.INVALID_NUMBER_SKELETON,r)}return{val:{type:q.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?cn(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,o){for(var i,a=!1,s=[],c=new Set,l=o.value,h=o.location;;){if(l.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR,x.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;h=v(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?x.DUPLICATE_SELECT_ARGUMENT_SELECTOR:x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:x.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,v(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,r,n);if(y.err)return y;var S=this.tryParseArgumentClose(g);if(S.err)return S;s.push([l,{value:y.val,location:v(g,this.clonePosition())}]),c.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,h=i.location}return s.length===0?this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR:x.EXPECT_PLURAL_ARGUMENT_SELECTOR,v(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(x.MISSING_OTHER_CLAUSE,v(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var c=v(o,this.clonePosition());return i?(a*=n,Qo(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=un(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(mn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&gn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Bt(e){return e>=97&&e<=122||e>=65&&e<=90}function ti(e){return Bt(e)||e===47}function ri(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function gn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ni(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Dt(e){e.forEach(function(t){if(delete t.location,Xe(t)||Ke(t))for(var r in t.options)delete t.options[r].location,Dt(t.options[r].value);else Ye(t)&&Qe(t.style)||(We(t)||qe(t))&&Ae(t.style)?delete t.style.location:Ze(t)&&Dt(t.children)})}function xn(e,t){t===void 0&&(t={}),t=b({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new fn(e,t).parse();if(r.err){var n=SyntaxError(x[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Dt(r.val),r.val}function _e(e,t){var r=t&&t.cache?t.cache:li,n=t&&t.serializer?t.serializer:ci,o=t&&t.strategy?t.strategy:ii;return o(e,{cache:r,serializer:n})}function oi(e){return e==null||typeof e=="number"||typeof e=="boolean"}function bn(e,t,r,n){var o=oi(n)?n:r(n),i=t.get(o);return typeof i>"u"&&(i=e.call(this,n),t.set(o,i)),i}function vn(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,n),t.set(o,i)),i}function Ut(e,t,r,n,o){return r.bind(t,e,n,o)}function ii(e,t){var r=e.length===1?bn:vn;return Ut(e,this,r,t.cache.create(),t.serializer)}function ai(e,t){return Ut(e,this,vn,t.cache.create(),t.serializer)}function si(e,t){return Ut(e,this,bn,t.cache.create(),t.serializer)}var ci=function(){return JSON.stringify(arguments)};function Gt(){this.cache=Object.create(null)}Gt.prototype.get=function(e){return this.cache[e]};Gt.prototype.set=function(e,t){this.cache[e]=t};var li={create:function(){return new Gt}},Je={variadic:ai,monadic:si};var X;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(X||(X={}));var Le=function(e){Se(t,e);function t(r,n,o){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var zt=function(e){Se(t,e);function t(r,n,o,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),X.INVALID_VALUE,i)||this}return t}(Le);var yn=function(e){Se(t,e);function t(r,n,o){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),X.INVALID_VALUE,o)||this}return t}(Le);var En=function(e){Se(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),X.MISSING_VALUE,n)||this}return t}(Le);var P;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(P||(P={}));function hi(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==P.literal||r.type!==P.literal?t.push(r):n.value+=r.value,t},[])}function mi(e){return typeof e=="function"}function Ce(e,t,r,n,o,i,a){if(e.length===1&&Rt(e[0]))return[{type:P.literal,value:e[0].value}];for(var s=[],c=0,l=e;c`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function me(e,t={},{metadata:r=!0,search:n=!0,storage:o=!0}={}){let i;if(n&&i==null){let a=new URLSearchParams(window.location.search),s=ye(n)?n:e;i=a.get(s)}if(o&&i==null){let a=ye(o)?o:e;i=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&i==null){let a=Oo(ye(r)?r:e);i=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return i??t[e]}var de=()=>{};var zr=e=>typeof e=="boolean",Ee=e=>typeof e=="function",_t=e=>typeof e=="number",Fr=e=>e!=null&&typeof e=="object";var ye=e=>typeof e=="string";var we=e=>_t(e)&&Number.isFinite(e)&&e>0;function H(e,t){if(zr(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Oo(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}var Ho=Date.now(),Lt=()=>`(+${Date.now()-Ho}ms)`,Ve=new Set,Mo=H(me("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function $r(e){let t=`[${Ur}/${e}]`,r=(a,s,...c)=>a?!0:(o(s,...c),!1),n=Mo?(a,...s)=>{console.debug(`${t} ${a}`,...s,Lt())}:()=>{},o=(a,...s)=>{let c=`${t} ${a}`;Ve.forEach(([h])=>h(c,...s))};return{assert:r,debug:n,error:o,warn:(a,...s)=>{let c=`${t} ${a}`;Ve.forEach(([,h])=>h(c,...s))}}}function Io(e,t){let r=[e,t];return Ve.add(r),()=>{Ve.delete(r)}}Io((e,...t)=>{console.error(e,...t,Lt())},(e,...t)=>{console.warn(e,...t,Lt())});var Vr="ABM",jr="PUF",Yr="M2M",Wr="PERPETUAL",qr="P3Y",ko="TAX_INCLUSIVE_DETAILS",Bo="TAX_EXCLUSIVE",Xr={ABM:Vr,PUF:jr,M2M:Yr,PERPETUAL:Wr,P3Y:qr},tl={[Vr]:{commitment:R.YEAR,term:_.MONTHLY},[jr]:{commitment:R.YEAR,term:_.ANNUAL},[Yr]:{commitment:R.MONTH,term:_.MONTHLY},[Wr]:{commitment:R.PERPETUAL,term:void 0},[qr]:{commitment:R.THREE_MONTHS,term:_.P3Y}};function Ct(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:o,priceWithoutDiscountAndTax:i,taxDisplay:a}=t;if(a!==ko)return e;let s={...e,priceDetails:{...t,price:o??r,priceWithoutDiscount:i??n,taxDisplay:Bo}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var Pt=function(e,t){return Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Pt(e,t)};function Se(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var b=function(){return b=Object.assign||function(t){for(var r,n=1,o=arguments.length;n0}),r=[],n=0,o=t;n1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(Go,function(c,h,l,f,p,g){if(h)t.minimumIntegerDigits=l.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(an.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(en.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(en,function(c,h,l,f,p,g){return l==="*"?t.minimumFractionDigits=h.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:p&&g?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+g.length):(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length),""});var i=o.options[0];i==="w"?t=b(b({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=b(b({},t),tn(i)));continue}if(on.test(o.stem)){t=b(b({},t),tn(o.stem));continue}var a=sn(o.stem);a&&(t=b(b({},t),a));var s=zo(o.stem);s&&(t=b(b({},t),s))}return t}var Te={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function hn(e,t){for(var r="",n=0;n>1),c="a",h=Fo(t);for((h=="H"||h=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=h+r}else o==="J"?r+="H":r+=o}return r}function Fo(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var o=Te[n||""]||Te[r||""]||Te["".concat(r,"-001")]||Te["001"];return o[0]}var Ot,$o=new RegExp("^".concat(Nt.source,"*")),Vo=new RegExp("".concat(Nt.source,"*$"));function v(e,t){return{start:e,end:t}}var jo=!!String.prototype.startsWith,Yo=!!String.fromCodePoint,Wo=!!Object.fromEntries,qo=!!String.prototype.codePointAt,Xo=!!String.prototype.trimStart,Ko=!!String.prototype.trimEnd,Zo=!!Number.isSafeInteger,Qo=Zo?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Mt=!0;try{ln=pn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Mt=((Ot=ln.exec("a"))===null||Ot===void 0?void 0:Ot[0])==="a"}catch{Mt=!1}var ln,mn=jo?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},It=Yo?String.fromCodePoint:function(){for(var t=[],r=0;ri;){if(a=t[i++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},dn=Wo?Object.fromEntries:function(t){for(var r={},n=0,o=t;n=n)){var o=t.charCodeAt(r),i;return o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},Jo=Xo?function(t){return t.trimStart()}:function(t){return t.replace($o,"")},ei=Ko?function(t){return t.trimEnd()}:function(t){return t.replace(Vo,"")};function pn(e,t){return new RegExp(e,t)}var kt;Mt?(Ht=pn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),kt=function(t,r){var n;Ht.lastIndex=r;var o=Ht.exec(t);return(n=o[1])!==null&&n!==void 0?n:""}):kt=function(t,r){for(var n=[];;){var o=un(t,r);if(o===void 0||gn(o)||ni(o))break;n.push(o),r+=o>=65536?2:1}return It.apply(void 0,n)};var Ht,fn=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(t,n);if(a.err)return a;o.push(a.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),o.push({type:E.pound,location:v(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(x.UNMATCHED_CLOSING_TAG,v(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Bt(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;o.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;o.push(a.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:E.literal,value:"<".concat(o,"/>"),location:v(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:E.tag,value:o,children:a,location:v(n,this.clonePosition())},err:null}:this.error(x.INVALID_TAG,v(s,this.clonePosition())))}else return this.error(x.UNCLOSED_TAG,v(n,this.clonePosition()))}else return this.error(x.INVALID_TAG,v(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ri(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var a=this.tryParseUnquoted(t,r);if(a){o+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){o+=s;continue}break}var c=v(n,this.clonePosition());return{val:{type:E.literal,value:o,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!ti(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return It.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),It(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(x.EMPTY_ARGUMENT,v(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(x.MALFORMED_ARGUMENT,v(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:E.argument,value:o,location:v(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition())):this.parseArgumentOptions(t,r,o,n);default:return this.error(x.MALFORMED_ARGUMENT,v(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=kt(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),a=v(t,i);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,o){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(x.EXPECT_ARGUMENT_TYPE,v(a,c));case"number":case"date":case"time":{this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=ei(f.val);if(p.length===0)return this.error(x.EXPECT_ARGUMENT_STYLE,v(this.clonePosition(),this.clonePosition()));var g=v(l,this.clonePosition());h={style:p,styleLocation:g}}var y=this.tryParseArgumentClose(o);if(y.err)return y;var S=v(o,this.clonePosition());if(h&&mn(h?.style,"::",0)){var M=Jo(h.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(M,h.styleLocation);return f.err?f:{val:{type:E.number,value:n,location:S,style:f.val},err:null}}else{if(M.length===0)return this.error(x.EXPECT_DATE_TIME_SKELETON,S);var G=M;this.locale&&(G=hn(M,this.locale));var p={type:q.dateTime,pattern:G,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?Qr(G):{}},z=s==="date"?E.date:E.time;return{val:{type:z,value:n,location:S,style:p},err:null}}}return{val:{type:s==="number"?E.number:s==="date"?E.date:E.time,value:n,location:S,style:(i=h?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS,v(O,b({},O)));this.bumpSpace();var j=this.parseIdentifierIfPossible(),D=0;if(s!=="select"&&j.value==="offset"){if(!this.bumpIf(":"))return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),j=this.parseIdentifierIfPossible(),D=f.val}var k=this.tryParsePluralOrSelectOptions(t,s,r,j);if(k.err)return k;var y=this.tryParseArgumentClose(o);if(y.err)return y;var Me=v(o,this.clonePosition());return s==="select"?{val:{type:E.select,value:n,options:dn(k.val),location:Me},err:null}:{val:{type:E.plural,value:n,options:dn(k.val),offset:D,pluralType:s==="plural"?"cardinal":"ordinal",location:Me},err:null}}default:return this.error(x.INVALID_ARGUMENT_TYPE,v(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(x.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,v(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=nn(t)}catch{return this.error(x.INVALID_NUMBER_SKELETON,r)}return{val:{type:q.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?cn(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,o){for(var i,a=!1,s=[],c=new Set,h=o.value,l=o.location;;){if(h.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR,x.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;l=v(f,this.clonePosition()),h=this.message.slice(f.offset,this.offset())}else break}if(c.has(h))return this.error(r==="select"?x.DUPLICATE_SELECT_ARGUMENT_SELECTOR:x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);h==="other"&&(a=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:x.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,v(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,r,n);if(y.err)return y;var S=this.tryParseArgumentClose(g);if(S.err)return S;s.push([h,{value:y.val,location:v(g,this.clonePosition())}]),c.add(h),this.bumpSpace(),i=this.parseIdentifierIfPossible(),h=i.value,l=i.location}return s.length===0?this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR:x.EXPECT_PLURAL_ARGUMENT_SELECTOR,v(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(x.MISSING_OTHER_CLAUSE,v(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var c=v(o,this.clonePosition());return i?(a*=n,Qo(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=un(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(mn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&gn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Bt(e){return e>=97&&e<=122||e>=65&&e<=90}function ti(e){return Bt(e)||e===47}function ri(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function gn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ni(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Dt(e){e.forEach(function(t){if(delete t.location,Xe(t)||Ke(t))for(var r in t.options)delete t.options[r].location,Dt(t.options[r].value);else Ye(t)&&Qe(t.style)||(We(t)||qe(t))&&Ae(t.style)?delete t.style.location:Ze(t)&&Dt(t.children)})}function xn(e,t){t===void 0&&(t={}),t=b({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new fn(e,t).parse();if(r.err){var n=SyntaxError(x[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Dt(r.val),r.val}function _e(e,t){var r=t&&t.cache?t.cache:hi,n=t&&t.serializer?t.serializer:ci,o=t&&t.strategy?t.strategy:ii;return o(e,{cache:r,serializer:n})}function oi(e){return e==null||typeof e=="number"||typeof e=="boolean"}function bn(e,t,r,n){var o=oi(n)?n:r(n),i=t.get(o);return typeof i>"u"&&(i=e.call(this,n),t.set(o,i)),i}function vn(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,n),t.set(o,i)),i}function Ut(e,t,r,n,o){return r.bind(t,e,n,o)}function ii(e,t){var r=e.length===1?bn:vn;return Ut(e,this,r,t.cache.create(),t.serializer)}function ai(e,t){return Ut(e,this,vn,t.cache.create(),t.serializer)}function si(e,t){return Ut(e,this,bn,t.cache.create(),t.serializer)}var ci=function(){return JSON.stringify(arguments)};function Gt(){this.cache=Object.create(null)}Gt.prototype.get=function(e){return this.cache[e]};Gt.prototype.set=function(e,t){this.cache[e]=t};var hi={create:function(){return new Gt}},Je={variadic:ai,monadic:si};var X;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(X||(X={}));var Le=function(e){Se(t,e);function t(r,n,o){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var zt=function(e){Se(t,e);function t(r,n,o,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),X.INVALID_VALUE,i)||this}return t}(Le);var yn=function(e){Se(t,e);function t(r,n,o){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),X.INVALID_VALUE,o)||this}return t}(Le);var En=function(e){Se(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),X.MISSING_VALUE,n)||this}return t}(Le);var P;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(P||(P={}));function li(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==P.literal||r.type!==P.literal?t.push(r):n.value+=r.value,t},[])}function mi(e){return typeof e=="function"}function Ce(e,t,r,n,o,i,a){if(e.length===1&&Rt(e[0]))return[{type:P.literal,value:e[0].value}];for(var s=[],c=0,h=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=xn,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Sn=wn;var fi=/[0-9\-+#]/,gi=/[^\d\-+#]/g;function An(e){return e.search(fi)}function xi(e="#.##"){let t={},r=e.length,n=An(e);t.prefix=n>0?e.substring(0,n):"";let o=An(e.split("").reverse().join("")),i=r-o,a=e.substring(i,i+1),s=i+(a==="."||a===","?1:0);t.suffix=o>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(gi);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function bi(e,t,r){let n=!1,o={value:e};e<0&&(n=!0,o.value=-o.value),o.sign=n?"-":"",o.value=Number(o.value).toFixed(t.fraction&&t.fraction.length),o.value=Number(o.value).toString();let i=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=o.value.split(".");return(!s||s&&s.length<=i)&&(s=i<0?"":(+("0."+s)).toFixed(i+1).replace("0.","")),o.integer=a,o.fraction=s,vi(o,t),(o.result==="0"||o.result==="")&&(n=!1,o.sign=""),!n&&t.maskHasPositiveSign?o.sign="+":n&&t.maskHasPositiveSign?o.sign="-":n&&(o.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),o}function vi(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),o=n&&n.indexOf("0");if(o>-1)for(;e.integer.length({accept:e,round:t}),Si=[$t(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),$t(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),$t(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Vt={[R.YEAR]:{[_.MONTHLY]:Pe.MONTH,[_.ANNUAL]:Pe.YEAR},[R.MONTH]:{[_.MONTHLY]:Pe.MONTH}},Ai=(e,t)=>e.indexOf(`'${t}'`)===0,Ti=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Nn(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Li(e)),r},_i=e=>{let t=Ci(e),r=Ai(e,t),n=e.replace(/'.*?'/,""),o=Cn.test(n)||Pn.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:o}},Rn=e=>e.replace(Cn,Ln).replace(Pn,Ln),Li=e=>e.match(/#(.?)#/)?.[1]===_n?Ei:_n,Ci=e=>e.match(/'(.*?)'/)?.[1]??"",Nn=e=>e.match(/0(.?)0/)?.[1]??"";function et({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},o,i=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=_i(e),l=r?Nn(e):"",h=Ti(e,r),f=r?2:0,p=i(t,{currencySymbol:a}),g=n?p.toLocaleString("hi-IN",{minimumFractionDigits:f,maximumFractionDigits:f}):Tn(h,p),y=r?g.lastIndexOf(l):g.length,S=g.substring(0,y),M=g.substring(y+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,g).replace(/SYMBOL/,a),currencySymbol:a,decimals:M,decimalsDelimiter:l,hasCurrencySpace:c,integer:S,isCurrencyFirst:s,recurrenceTerm:o}}var On=e=>{let{commitment:t,term:r,usePrecision:n}=e,o=wi[r]??1;return et(e,o>1?Pe.MONTH:Vt[t]?.[r],i=>{let a={divisor:o,price:i,usePrecision:n},{round:s}=Si.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},Hn=({commitment:e,term:t,...r})=>et(r,Vt[e]?.[t]),Mn=e=>{let{commitment:t,term:r}=e;return t===R.YEAR&&r===_.MONTHLY?et(e,Pe.YEAR,n=>n*12):et(e,Vt[t]?.[r])};var Pi={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},Ri=$r("ConsonantTemplates/price"),Ni=/<\/?[^>]+(>|$)/g,L={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},K={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Oi="TAX_EXCLUSIVE",Hi=e=>Fr(e)?Object.entries(e).filter(([,t])=>ye(t)||_t(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Gr(n)+'"'}`,""):"",N=(e,t,r,n=!1)=>`${n?Rn(t):t??""}`;function Mi(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:o,hasCurrencySpace:i,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},f={}){let p=N(L.currencySymbol,r),g=N(L.currencySpace,i?" ":""),y="";return s&&(y+=p+g),y+=N(L.integer,a),y+=N(L.decimalsDelimiter,o),y+=N(L.decimals,n),s||(y+=g+p),y+=N(L.recurrence,c,null,!0),y+=N(L.unitType,l,null,!0),y+=N(L.taxInclusivity,h,!0),N(e,y,{...f,"aria-label":t})}var I=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:o=!0,displayRecurrence:i=!0,displayPerUnit:a=!1,displayTax:s=!1,language:c,literals:l={}}={},{commitment:h,offerSelectorIds:f,formatString:p,price:g,priceWithoutDiscount:y,taxDisplay:S,taxTerm:M,term:G,usePrecision:z}={},O={})=>{Object.entries({country:n,formatString:p,language:c,price:g}).forEach(([U,st])=>{if(st==null)throw new Error(`Argument "${U}" is missing for osi ${f?.toString()}, country ${n}, language ${c}`)});let j={...Pi,...l},D=`${c.toLowerCase()}-${n.toUpperCase()}`;function k(U,st){let ct=j[U];if(ct==null)return"";try{return new Sn(ct.replace(Ni,""),D).format(st)}catch{return Ri.error("Failed to format literal:",ct),""}}let Me=t&&y?y:g,tr=e?On:Hn;r&&(tr=Mn);let{accessiblePrice:oo,recurrenceTerm:ot,...rr}=tr({commitment:h,formatString:p,term:G,price:e?g:Me,usePrecision:z,isIndianPrice:n==="IN"}),J=oo,it="";if(H(i)&&ot){let U=k(K.recurrenceAriaLabel,{recurrenceTerm:ot});U&&(J+=" "+U),it=k(K.recurrenceLabel,{recurrenceTerm:ot})}let at="";if(H(a)){at=k(K.perUnitLabel,{perUnit:"LICENSE"});let U=k(K.perUnitAriaLabel,{perUnit:"LICENSE"});U&&(J+=" "+U)}let pe="";H(s)&&M&&(pe=k(S===Oi?K.taxExclusiveLabel:K.taxInclusiveLabel,{taxTerm:M}),pe&&(J+=" "+pe)),t&&(J=k(K.strikethroughAriaLabel,{strikethroughPrice:J}));let fe=L.container;if(e&&(fe+=" "+L.containerOptical),t&&(fe+=" "+L.containerStrikethrough),r&&(fe+=" "+L.containerAnnual),H(o))return Mi(fe,{...rr,accessibleLabel:J,recurrenceLabel:it,perUnitLabel:at,taxInclusivityLabel:pe},O);let{currencySymbol:nr,decimals:io,decimalsDelimiter:ao,hasCurrencySpace:or,integer:so,isCurrencyFirst:co}=rr,ee=[so,ao,io];co?(ee.unshift(or?"\xA0":""),ee.unshift(nr)):(ee.push(or?"\xA0":""),ee.push(nr)),ee.push(it,at,pe);let lo=ee.join("");return N(fe,lo,O)},In=()=>(e,t,r)=>{let o=(e.displayOldPrice===void 0||H(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${I()(e,t,r)}${o?" "+I({displayStrikethrough:!0})(e,t,r):""}`},kn=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||H(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?I({displayStrikethrough:!0})(n,t,r)+" ":""}${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0})(n,t,r)}${N(L.containerAnnualSuffix,")")}`},Bn=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0})(n,t,r)}${N(L.containerAnnualSuffix,")")}`};var Ii=I(),ki=In(),Bi=I({displayOptical:!0}),Di=I({displayStrikethrough:!0}),Ui=I({displayAnnual:!0}),Gi=Bn(),zi=kn();var Fi=(e,t)=>{if(!(!we(e)||!we(t)))return Math.floor((t-e)/t*100)},Dn=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,o=Fi(r,n);return o===void 0?'':`${o}%`};var $i=Dn();var{freeze:Re}=Object,jt=Re({...be}),Yt=Re({...ve}),Wt={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},dd=Re({...R}),ud=Re({...Xr}),pd=Re({..._});var Gn="mas-commerce-service";function zn(e,{once:t=!1}={}){let r=null;function n(){let o=document.querySelector(Gn);o!==r&&(r=o,o&&e(o))}return document.addEventListener(dt,n,{once:t}),Ne(n),()=>document.removeEventListener(dt,n)}function Fn(e,{country:t,forceTaxExclusive:r,perpetual:n}){let o;if(e.length<2)o=e;else{let i=t==="GB"||n?"EN":"MULT",[a,s]=e;o=[a.language===i?a:s]}return r&&(o=o.map(Ct)),o}var Ne=e=>window.setTimeout(e);function Z(){return document.getElementsByTagName(Gn)?.[0]}var Q={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},$n=1e3,Vn=new Set;function Yi(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function jn(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:o,status:i}=e;return[n,i,o].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Q.serializableTypes.includes(r))return r}return e}function Wi(e,t){if(!Q.ignoredProperties.includes(e))return jn(t)}var qt={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],o=[],i=t;r.forEach(l=>{l!=null&&(Yi(l)?n:o).push(l)}),n.length&&(i+=" "+n.map(jn).join(" "));let{pathname:a,search:s}=window.location,c=`${Q.delimiter}page=${a}${s}`;c.length>$n&&(c=`${c.slice(0,$n)}`),i+=c,o.length&&(i+=`${Q.delimiter}facts=`,i+=JSON.stringify(o,Wi)),Vn.has(i)||(Vn.add(i),window.lana?.log(i,Q))}};function Yn(e){Object.assign(Q,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Q&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var qi=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:jt.V3,checkoutWorkflowStep:Yt.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Wt.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:ft.PUBLISHED,wcsBufferLimit:1});var Xt=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});var Kt={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Xi=Date.now(),Zt=new Set,Qt=new Set,Wn=new Map,qn={append({level:e,message:t,params:r,timestamp:n,source:o}){console[e](`${n}ms [${o}] %c${t}`,"font-weight: bold;",...r)}},Xn={filter:({level:e})=>e!==Kt.DEBUG},Ki={filter:()=>!1};function Zi(e,t,r,n,o){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Ee(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:o,timestamp:Date.now()-Xi}}function Qi(e){[...Qt].every(t=>t(e))&&Zt.forEach(t=>t(e))}function Kn(e){let t=(Wn.get(e)??0)+1;Wn.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:o=>Kn(`${n.namespace}/${o}`),updateConfig:Yn};return Object.values(Kt).forEach(o=>{n[o]=(i,...a)=>Qi(Zi(o,i,e,a,r))}),Object.seal(n)}function tt(...e){e.forEach(t=>{let{append:r,filter:n}=t;Ee(n)&&Qt.add(n),Ee(r)&&Zt.add(r)})}function Ji(e={}){let{name:t}=e,r=H(me("commerce.debug",{search:!0,storage:!0}),t===Xt.LOCAL);return tt(r?qn:Xn),t===Xt.PROD&&tt(qt),Jt}function ea(){Zt.clear(),Qt.clear()}var Jt={...Kn(Sr),Level:Kt,Plugins:{consoleAppender:qn,debugFilter:Xn,quietFilter:Ki,lanaAppender:qt},init:Ji,reset:ea,use:tt};var ta={[$]:br,[Y]:vr,[V]:yr},ra={[$]:Er,[V]:wr},rt=class{constructor(t){u(this,"changes",new Map);u(this,"connected",!1);u(this,"dispose",de);u(this,"error");u(this,"log");u(this,"options");u(this,"promises",[]);u(this,"state",Y);u(this,"timer",null);u(this,"value");u(this,"version",0);u(this,"wrapperElement");this.wrapperElement=t}update(){[$,Y,V].forEach(t=>{this.wrapperElement.classList.toggle(ta[t],t===this.state)})}notify(){(this.state===V||this.state===$)&&(this.state===V?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===$&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(ra[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=zn(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=de}onceSettled(){let{error:t,promises:r,state:n}=this;return V===n?Promise.resolve(this.wrapperElement):$===n?Promise.reject(t):new Promise((o,i)=>{r.push({resolve:o,reject:i})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=V,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Ne(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=$,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),Ne(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Y,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!Z()||this.timer)return;let r=Jt.module("mas-element"),{error:n,options:o,state:i,value:a,version:s}=this;this.state=Y,this.timer=Ne(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Y&&this.version===s&&(this.state=i,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,o)}})}};function Zn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function Qn(e,t={}){let{tag:r,is:n}=e,o=document.createElement(r,{is:n});return o.setAttribute("is",n),Object.assign(o.dataset,Zn(t)),o}function Jn(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,Zn(t)),e):null}var na="download",oa="upgrade";function eo(e,t={},r=""){let n=Z();if(!n)return null;let{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:f,quantity:p,wcsOsi:g,extraOptions:y}=n.collectCheckoutOptions(t),S=Qn(e,{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:f,quantity:p,wcsOsi:g,extraOptions:y});return r&&(S.innerHTML=`${r}`),S}function to(e){return class extends e{constructor(){super(...arguments);u(this,"checkoutActionHandler");u(this,"masElement",new rt(this))}attributeChangedCallback(n,o,i){this.masElement.attributeChangedCallback(n,o,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let o=Z();if(!o)return!1;this.dataset.imsCountry||o.imsCountryPromise.then(f=>{f&&(this.dataset.imsCountry=f)},de),n.imsCountry=null;let i=o.collectCheckoutOptions(n,this);if(!i.wcsOsi.length)return!1;let a;try{a=JSON.parse(i.extraOptions??"{}")}catch(f){this.masElement.log?.error("cannot parse exta checkout options",f)}let s=this.masElement.togglePending(i);this.setCheckoutUrl("");let c=o.resolveOfferSelectors(i),l=await Promise.all(c);l=l.map(f=>Fn(f,i)),i.country=this.dataset.imsCountry||i.country;let h=await o.buildCheckoutAction?.(l.flat(),{...a,...i},this);return this.renderOffers(l.flat(),i,{},h,s)}renderOffers(n,o,i={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=Z();if(!c)return!1;if(o={...JSON.parse(this.dataset.extraOptions??"null"),...o,...i},s??(s=this.masElement.togglePending(o)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(na,oa),this.masElement.toggleResolved(s,n,o);let{url:h,text:f,className:p,handler:g}=a;return h&&this.setCheckoutUrl(h),f&&(this.firstElementChild.innerHTML=f),p&&this.classList.add(...p.split(" ")),g&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=g.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,o)){let h=c.buildCheckoutURL(n,o);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,o))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let o=Z();if(!o)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:f,promotionCode:p,quantity:g,wcsOsi:y}=o.collectCheckoutOptions(n);return Jn(this,{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:f,promotionCode:p,quantity:g,wcsOsi:y}),!0}}}var Oe=class Oe extends to(HTMLButtonElement){static createCheckoutButton(t={},r=""){return eo(Oe,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};u(Oe,"is","checkout-button"),u(Oe,"tag","button");var ue=Oe;window.customElements.get(ue.is)||window.customElements.define(ue.is,ue,{extends:ue.tag});var ia="#000000",aa="#F8D904",sa=/(accent|primary|secondary)(-(outline|link))?/,ca="mas:product_code/",la="daa-ll",nt="daa-lh",ha=["XL","L","M","S"];function ma(e,t,r){e.mnemonicIcon?.map((o,i)=>({icon:o,alt:e.mnemonicAlt[i]??"",link:e.mnemonicLink[i]??""}))?.forEach(({icon:o,alt:i,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:o,size:r?.size??"l"};i&&(s.alt=i),a&&(s.href=a);let c=B("merch-icon",s);t.append(c)})}function da(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||ia),t.setAttribute("badge-background-color",e.badgeBackgroundColor||aa))}function ua(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function pa(e,t,r){e.cardTitle&&r&&t.append(B(r.tag,{slot:r.slot},e.cardTitle))}function fa(e,t,r){e.subtitle&&r&&t.append(B(r.tag,{slot:r.slot},e.subtitle))}function ga(e,t,r){if(r?.tag&&e.backgroundImage){let n={loading:"lazy",src:e.backgroundImage};e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",t.append(B(r.tag,{slot:r.slot},B("img",n)))}r?.attribute&&t.setAttribute(r.attribute,e.backgroundImage)}function xa(e,t,r){if(e.prices&&r){let n=B(r.tag,{slot:r.slot},e.prices);t.append(n)}}function ba(e,t,r){if(e.description&&r){let n=B(r.tag,{slot:r.slot},e.description);t.append(n)}}function va(e,t,r,n){let i=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);i.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||i.setAttribute(h.name,h.value);i.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=ha.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),i.classList.add(...l),i}function ya(e,t,r,n){let o="fill";r&&(o="outline");let i=B("sp-button",{treatment:o,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return i.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),i}function Ea(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function wa(e,t,r,n){if(e.ctas){let{slot:o}=r.ctas,i=B("div",{slot:o},e.ctas),a=[...i.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return Ea(s,c);let l=sa.exec(s.className)?.[0]??"accent",h=l.includes("accent"),f=l.includes("primary"),p=l.includes("secondary"),g=l.includes("-outline");if(l.includes("-link"))return s;let S;return h||c?S="accent":f?S="primary":p&&(S="secondary"),t.spectrum==="swc"?ya(s,r,g,S):va(s,r,g,S)});i.innerHTML="",i.append(...a),t.append(i)}}function Sa(e,t){let{tags:r}=e,n=r?.find(o=>o.startsWith(ca))?.split("/").pop();n&&(t.setAttribute(nt,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((o,i)=>{o.setAttribute(la,`${o.dataset.analyticsId}-${i+1}`)}))}function Aa(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function ro(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.id=e.id,t.querySelectorAll("[slot]").forEach(i=>{i.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(nt),t.variant=n,await t.updateComplete;let{aemFragmentMapping:o}=t.variantLayout;o&&(ma(r,t,o.mnemonics),da(r,t),ua(r,t,o.allowedSizes),pa(r,t,o.title),fa(r,t,o.subtitle),xa(r,t,o.prices),ga(r,t,o.backgroundImage,n),ba(r,t,o.description),wa(r,t,o,n),Sa(r,t),Aa(t))}var _a="merch-card",La=":start",Ca=":ready",Pa=1e4,no="merch-card:",He,er,d=class extends Ta{constructor(){super();Ie(this,He);u(this,"customerSegment");u(this,"marketSegment");u(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=yt(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=yt(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let o of n){await o.onceSettled();let i=o.value?.[0]?.planType;if(!i)return;let a=this.stockOfferOsis[i];if(!a)return;let s=o.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),o.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let o of n)o.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(o=>{if(r){n[o].order=Math.min(n[o].order||2,2);return}let i=n[o].order;i===1||isNaN(i)||(n[o].order=Number(i)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${no}${r}${La}`),this.addEventListener(pt,this.handleQuantitySelection),this.addEventListener(ur,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Ge,this.handleAemFragmentEvents),this.addEventListener(Ue,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(pt,this.handleQuantitySelection),this.storageOptions?.removeEventListener(ut,this.handleStorageChange),this.removeEventListener(Ge,this.handleAemFragmentEvents),this.removeEventListener(Ue,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Ge&&mt(this,He,er).call(this,"AEM fragment cannot be loaded"),r.type===Ue&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await ro(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(i=>i.onceSettled().catch(()=>i))).then(i=>i.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(i=>setTimeout(()=>i(!1),Pa));if(await Promise.race([r,n])===!0){performance.mark(`${no}${this.id}${Ca}`),this.dispatchEvent(new CustomEvent(gr,{bubbles:!0,composed:!0}));return}mt(this,He,er).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||this.dispatchEvent(new CustomEvent(pr,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(ut,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let o=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(o)}):n.replaceWith(o)}}};He=new WeakSet,er=function(r){this.dispatchEvent(new CustomEvent(xr,{detail:r,bubbles:!0,composed:!0}))},u(d,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,o,i]=r.split(",");return{PUF:n,ABM:o,M2M:i}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[o,i,a]=n.split(":"),s=Number(i);return[o,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:o,size:i}])=>[n,o,i].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:nt,reflect:!0}}),u(d,"styles",[hr,Br(),...mr()]);customElements.define(_a,d); +`,X.MISSING_INTL_API,a);var j=r.getPluralRules(t,{type:l.pluralType}).select(p-(l.offset||0));O=l.options[j]||l.options.other}if(!O)throw new zt(l.value,p,Object.keys(l.options),a);s.push.apply(s,Ce(O.value,t,r,n,o,p-(l.offset||0)));continue}}return li(s)}function di(e,t){return t?b(b(b({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=b(b({},e[n]),t[n]||{}),r},{})):e}function ui(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=di(e[n],t[n]),r},b({},e)):e}function Ft(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function pi(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:_e(function(){for(var t,r=[],n=0;n0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=xn,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Sn=wn;var fi=/[0-9\-+#]/,gi=/[^\d\-+#]/g;function An(e){return e.search(fi)}function xi(e="#.##"){let t={},r=e.length,n=An(e);t.prefix=n>0?e.substring(0,n):"";let o=An(e.split("").reverse().join("")),i=r-o,a=e.substring(i,i+1),s=i+(a==="."||a===","?1:0);t.suffix=o>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(gi);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function bi(e,t,r){let n=!1,o={value:e};e<0&&(n=!0,o.value=-o.value),o.sign=n?"-":"",o.value=Number(o.value).toFixed(t.fraction&&t.fraction.length),o.value=Number(o.value).toString();let i=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=o.value.split(".");return(!s||s&&s.length<=i)&&(s=i<0?"":(+("0."+s)).toFixed(i+1).replace("0.","")),o.integer=a,o.fraction=s,vi(o,t),(o.result==="0"||o.result==="")&&(n=!1,o.sign=""),!n&&t.maskHasPositiveSign?o.sign="+":n&&t.maskHasPositiveSign?o.sign="-":n&&(o.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),o}function vi(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),o=n&&n.indexOf("0");if(o>-1)for(;e.integer.length({accept:e,round:t}),Si=[$t(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),$t(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),$t(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Vt={[R.YEAR]:{[_.MONTHLY]:Pe.MONTH,[_.ANNUAL]:Pe.YEAR},[R.MONTH]:{[_.MONTHLY]:Pe.MONTH}},Ai=(e,t)=>e.indexOf(`'${t}'`)===0,Ti=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Nn(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Li(e)),r},_i=e=>{let t=Ci(e),r=Ai(e,t),n=e.replace(/'.*?'/,""),o=Cn.test(n)||Pn.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:o}},Rn=e=>e.replace(Cn,Ln).replace(Pn,Ln),Li=e=>e.match(/#(.?)#/)?.[1]===_n?Ei:_n,Ci=e=>e.match(/'(.*?)'/)?.[1]??"",Nn=e=>e.match(/0(.?)0/)?.[1]??"";function et({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},o,i=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=_i(e),h=r?Nn(e):"",l=Ti(e,r),f=r?2:0,p=i(t,{currencySymbol:a}),g=n?p.toLocaleString("hi-IN",{minimumFractionDigits:f,maximumFractionDigits:f}):Tn(l,p),y=r?g.lastIndexOf(h):g.length,S=g.substring(0,y),M=g.substring(y+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,g).replace(/SYMBOL/,a),currencySymbol:a,decimals:M,decimalsDelimiter:h,hasCurrencySpace:c,integer:S,isCurrencyFirst:s,recurrenceTerm:o}}var On=e=>{let{commitment:t,term:r,usePrecision:n}=e,o=wi[r]??1;return et(e,o>1?Pe.MONTH:Vt[t]?.[r],i=>{let a={divisor:o,price:i,usePrecision:n},{round:s}=Si.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},Hn=({commitment:e,term:t,...r})=>et(r,Vt[e]?.[t]),Mn=e=>{let{commitment:t,term:r}=e;return t===R.YEAR&&r===_.MONTHLY?et(e,Pe.YEAR,n=>n*12):et(e,Vt[t]?.[r])};var Pi={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},Ri=$r("ConsonantTemplates/price"),Ni=/<\/?[^>]+(>|$)/g,L={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},K={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Oi="TAX_EXCLUSIVE",Hi=e=>Fr(e)?Object.entries(e).filter(([,t])=>ye(t)||_t(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Gr(n)+'"'}`,""):"",N=(e,t,r,n=!1)=>`${n?Rn(t):t??""}`;function Mi(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:o,hasCurrencySpace:i,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:h,taxInclusivityLabel:l},f={}){let p=N(L.currencySymbol,r),g=N(L.currencySpace,i?" ":""),y="";return s&&(y+=p+g),y+=N(L.integer,a),y+=N(L.decimalsDelimiter,o),y+=N(L.decimals,n),s||(y+=g+p),y+=N(L.recurrence,c,null,!0),y+=N(L.unitType,h,null,!0),y+=N(L.taxInclusivity,l,!0),N(e,y,{...f,"aria-label":t})}var I=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:o=!0,displayRecurrence:i=!0,displayPerUnit:a=!1,displayTax:s=!1,language:c,literals:h={}}={},{commitment:l,offerSelectorIds:f,formatString:p,price:g,priceWithoutDiscount:y,taxDisplay:S,taxTerm:M,term:G,usePrecision:z}={},O={})=>{Object.entries({country:n,formatString:p,language:c,price:g}).forEach(([U,st])=>{if(st==null)throw new Error(`Argument "${U}" is missing for osi ${f?.toString()}, country ${n}, language ${c}`)});let j={...Pi,...h},D=`${c.toLowerCase()}-${n.toUpperCase()}`;function k(U,st){let ct=j[U];if(ct==null)return"";try{return new Sn(ct.replace(Ni,""),D).format(st)}catch{return Ri.error("Failed to format literal:",ct),""}}let Me=t&&y?y:g,tr=e?On:Hn;r&&(tr=Mn);let{accessiblePrice:oo,recurrenceTerm:ot,...rr}=tr({commitment:l,formatString:p,term:G,price:e?g:Me,usePrecision:z,isIndianPrice:n==="IN"}),J=oo,it="";if(H(i)&&ot){let U=k(K.recurrenceAriaLabel,{recurrenceTerm:ot});U&&(J+=" "+U),it=k(K.recurrenceLabel,{recurrenceTerm:ot})}let at="";if(H(a)){at=k(K.perUnitLabel,{perUnit:"LICENSE"});let U=k(K.perUnitAriaLabel,{perUnit:"LICENSE"});U&&(J+=" "+U)}let pe="";H(s)&&M&&(pe=k(S===Oi?K.taxExclusiveLabel:K.taxInclusiveLabel,{taxTerm:M}),pe&&(J+=" "+pe)),t&&(J=k(K.strikethroughAriaLabel,{strikethroughPrice:J}));let fe=L.container;if(e&&(fe+=" "+L.containerOptical),t&&(fe+=" "+L.containerStrikethrough),r&&(fe+=" "+L.containerAnnual),H(o))return Mi(fe,{...rr,accessibleLabel:J,recurrenceLabel:it,perUnitLabel:at,taxInclusivityLabel:pe},O);let{currencySymbol:nr,decimals:io,decimalsDelimiter:ao,hasCurrencySpace:or,integer:so,isCurrencyFirst:co}=rr,ee=[so,ao,io];co?(ee.unshift(or?"\xA0":""),ee.unshift(nr)):(ee.push(or?"\xA0":""),ee.push(nr)),ee.push(it,at,pe);let ho=ee.join("");return N(fe,ho,O)},In=()=>(e,t,r)=>{let o=(e.displayOldPrice===void 0||H(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${I()(e,t,r)}${o?" "+I({displayStrikethrough:!0})(e,t,r):""}`},kn=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||H(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?I({displayStrikethrough:!0})(n,t,r)+" ":""}${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0})(n,t,r)}${N(L.containerAnnualSuffix,")")}`},Bn=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0})(n,t,r)}${N(L.containerAnnualSuffix,")")}`};var Ii=I(),ki=In(),Bi=I({displayOptical:!0}),Di=I({displayStrikethrough:!0}),Ui=I({displayAnnual:!0}),Gi=Bn(),zi=kn();var Fi=(e,t)=>{if(!(!we(e)||!we(t)))return Math.floor((t-e)/t*100)},Dn=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,o=Fi(r,n);return o===void 0?'':`${o}%`};var $i=Dn();var{freeze:Re}=Object,jt=Re({...be}),Yt=Re({...ve}),Wt={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},dd=Re({...R}),ud=Re({...Xr}),pd=Re({..._});var Gn="mas-commerce-service";function zn(e,{once:t=!1}={}){let r=null;function n(){let o=document.querySelector(Gn);o!==r&&(r=o,o&&e(o))}return document.addEventListener(dt,n,{once:t}),Ne(n),()=>document.removeEventListener(dt,n)}function Fn(e,{country:t,forceTaxExclusive:r,perpetual:n}){let o;if(e.length<2)o=e;else{let i=t==="GB"||n?"EN":"MULT",[a,s]=e;o=[a.language===i?a:s]}return r&&(o=o.map(Ct)),o}var Ne=e=>window.setTimeout(e);function Z(){return document.getElementsByTagName(Gn)?.[0]}var Q={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},$n=1e3,Vn=new Set;function Yi(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function jn(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:o,status:i}=e;return[n,i,o].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Q.serializableTypes.includes(r))return r}return e}function Wi(e,t){if(!Q.ignoredProperties.includes(e))return jn(t)}var qt={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],o=[],i=t;r.forEach(h=>{h!=null&&(Yi(h)?n:o).push(h)}),n.length&&(i+=" "+n.map(jn).join(" "));let{pathname:a,search:s}=window.location,c=`${Q.delimiter}page=${a}${s}`;c.length>$n&&(c=`${c.slice(0,$n)}`),i+=c,o.length&&(i+=`${Q.delimiter}facts=`,i+=JSON.stringify(o,Wi)),Vn.has(i)||(Vn.add(i),window.lana?.log(i,Q))}};function Yn(e){Object.assign(Q,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Q&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var qi=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:jt.V3,checkoutWorkflowStep:Yt.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Wt.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:ft.PUBLISHED,wcsBufferLimit:1});var Xt=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});var Kt={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Xi=Date.now(),Zt=new Set,Qt=new Set,Wn=new Map,qn={append({level:e,message:t,params:r,timestamp:n,source:o}){console[e](`${n}ms [${o}] %c${t}`,"font-weight: bold;",...r)}},Xn={filter:({level:e})=>e!==Kt.DEBUG},Ki={filter:()=>!1};function Zi(e,t,r,n,o){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Ee(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:o,timestamp:Date.now()-Xi}}function Qi(e){[...Qt].every(t=>t(e))&&Zt.forEach(t=>t(e))}function Kn(e){let t=(Wn.get(e)??0)+1;Wn.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:o=>Kn(`${n.namespace}/${o}`),updateConfig:Yn};return Object.values(Kt).forEach(o=>{n[o]=(i,...a)=>Qi(Zi(o,i,e,a,r))}),Object.seal(n)}function tt(...e){e.forEach(t=>{let{append:r,filter:n}=t;Ee(n)&&Qt.add(n),Ee(r)&&Zt.add(r)})}function Ji(e={}){let{name:t}=e,r=H(me("commerce.debug",{search:!0,storage:!0}),t===Xt.LOCAL);return tt(r?qn:Xn),t===Xt.PROD&&tt(qt),Jt}function ea(){Zt.clear(),Qt.clear()}var Jt={...Kn(Sr),Level:Kt,Plugins:{consoleAppender:qn,debugFilter:Xn,quietFilter:Ki,lanaAppender:qt},init:Ji,reset:ea,use:tt};var ta={[$]:br,[Y]:vr,[V]:yr},ra={[$]:Er,[V]:wr},rt=class{constructor(t){u(this,"changes",new Map);u(this,"connected",!1);u(this,"dispose",de);u(this,"error");u(this,"log");u(this,"options");u(this,"promises",[]);u(this,"state",Y);u(this,"timer",null);u(this,"value");u(this,"version",0);u(this,"wrapperElement");this.wrapperElement=t}update(){[$,Y,V].forEach(t=>{this.wrapperElement.classList.toggle(ta[t],t===this.state)})}notify(){(this.state===V||this.state===$)&&(this.state===V?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===$&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(ra[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=zn(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=de}onceSettled(){let{error:t,promises:r,state:n}=this;return V===n?Promise.resolve(this.wrapperElement):$===n?Promise.reject(t):new Promise((o,i)=>{r.push({resolve:o,reject:i})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=V,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Ne(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=$,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),Ne(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Y,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!Z()||this.timer)return;let r=Jt.module("mas-element"),{error:n,options:o,state:i,value:a,version:s}=this;this.state=Y,this.timer=Ne(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Y&&this.version===s&&(this.state=i,this.error=n,this.value=a,this.update(),this.notify())}catch(h){r.error("Failed to render mas-element: ",h),this.toggleFailed(this.version,h,o)}})}};function Zn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function Qn(e,t={}){let{tag:r,is:n}=e,o=document.createElement(r,{is:n});return o.setAttribute("is",n),Object.assign(o.dataset,Zn(t)),o}function Jn(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,Zn(t)),e):null}var na="download",oa="upgrade";function eo(e,t={},r=""){let n=Z();if(!n)return null;let{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:h,perpetual:l,promotionCode:f,quantity:p,wcsOsi:g,extraOptions:y}=n.collectCheckoutOptions(t),S=Qn(e,{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:h,perpetual:l,promotionCode:f,quantity:p,wcsOsi:g,extraOptions:y});return r&&(S.innerHTML=`${r}`),S}function to(e){return class extends e{constructor(){super(...arguments);u(this,"checkoutActionHandler");u(this,"masElement",new rt(this))}attributeChangedCallback(n,o,i){this.masElement.attributeChangedCallback(n,o,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let o=Z();if(!o)return!1;this.dataset.imsCountry||o.imsCountryPromise.then(f=>{f&&(this.dataset.imsCountry=f)},de),n.imsCountry=null;let i=o.collectCheckoutOptions(n,this);if(!i.wcsOsi.length)return!1;let a;try{a=JSON.parse(i.extraOptions??"{}")}catch(f){this.masElement.log?.error("cannot parse exta checkout options",f)}let s=this.masElement.togglePending(i);this.setCheckoutUrl("");let c=o.resolveOfferSelectors(i),h=await Promise.all(c);h=h.map(f=>Fn(f,i)),i.country=this.dataset.imsCountry||i.country;let l=await o.buildCheckoutAction?.(h.flat(),{...a,...i},this);return this.renderOffers(h.flat(),i,{},l,s)}renderOffers(n,o,i={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=Z();if(!c)return!1;if(o={...JSON.parse(this.dataset.extraOptions??"null"),...o,...i},s??(s=this.masElement.togglePending(o)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(na,oa),this.masElement.toggleResolved(s,n,o);let{url:l,text:f,className:p,handler:g}=a;return l&&this.setCheckoutUrl(l),f&&(this.firstElementChild.innerHTML=f),p&&this.classList.add(...p.split(" ")),g&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=g.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,o)){let l=c.buildCheckoutURL(n,o);return this.setCheckoutUrl(l),!0}}else{let l=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,l,o))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let o=Z();if(!o)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:h,modal:l,perpetual:f,promotionCode:p,quantity:g,wcsOsi:y}=o.collectCheckoutOptions(n);return Jn(this,{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:h,modal:l,perpetual:f,promotionCode:p,quantity:g,wcsOsi:y}),!0}}}var Oe=class Oe extends to(HTMLButtonElement){static createCheckoutButton(t={},r=""){return eo(Oe,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};u(Oe,"is","checkout-button"),u(Oe,"tag","button");var ue=Oe;window.customElements.get(ue.is)||window.customElements.define(ue.is,ue,{extends:ue.tag});var ia="#000000",aa="#F8D904",sa=/(accent|primary|secondary)(-(outline|link))?/,ca="mas:product_code/",ha="daa-ll",nt="daa-lh",la=["XL","L","M","S"];function ma(e,t,r){e.mnemonicIcon?.map((o,i)=>({icon:o,alt:e.mnemonicAlt[i]??"",link:e.mnemonicLink[i]??""}))?.forEach(({icon:o,alt:i,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:o,size:r?.size??"l"};i&&(s.alt=i),a&&(s.href=a);let c=B("merch-icon",s);t.append(c)})}function da(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||ia),t.setAttribute("badge-background-color",e.badgeBackgroundColor||aa))}function ua(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function pa(e,t,r){e.cardTitle&&r&&t.append(B(r.tag,{slot:r.slot},e.cardTitle))}function fa(e,t,r){e.subtitle&&r&&t.append(B(r.tag,{slot:r.slot},e.subtitle))}function ga(e,t,r){if(r?.tag&&e.backgroundImage){let n={loading:"lazy",src:e.backgroundImage};e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",t.append(B(r.tag,{slot:r.slot},B("img",n)))}r?.attribute&&t.setAttribute(r.attribute,e.backgroundImage)}function xa(e,t,r){if(e.prices&&r){let n=B(r.tag,{slot:r.slot},e.prices);t.append(n)}}function ba(e,t,r){if(e.description&&r){let n=B(r.tag,{slot:r.slot},e.description);t.append(n)}}function va(e,t,r,n){let i=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);i.setAttribute("tabindex",0);for(let l of e.attributes)["class","is"].includes(l.name)||i.setAttribute(l.name,l.value);i.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=la.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",h=["spectrum-Button",s,c];return r&&h.push("spectrum-Button--outline"),i.classList.add(...h),i}function ya(e,t,r,n){let o="fill";r&&(o="outline");let i=B("sp-button",{treatment:o,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return i.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),i}function Ea(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function wa(e,t,r,n){if(e.ctas){let{slot:o}=r.ctas,i=B("div",{slot:o},e.ctas),a=[...i.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return Ea(s,c);let h=sa.exec(s.className)?.[0]??"accent",l=h.includes("accent"),f=h.includes("primary"),p=h.includes("secondary"),g=h.includes("-outline");if(h.includes("-link"))return s;let S;return l||c?S="accent":f?S="primary":p&&(S="secondary"),t.spectrum==="swc"?ya(s,r,g,S):va(s,r,g,S)});i.innerHTML="",i.append(...a),t.append(i)}}function Sa(e,t){let{tags:r}=e,n=r?.find(o=>o.startsWith(ca))?.split("/").pop();n&&(t.setAttribute(nt,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((o,i)=>{o.setAttribute(ha,`${o.dataset.analyticsId}-${i+1}`)}))}function Aa(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function ro(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.id=e.id,t.querySelectorAll("[slot]").forEach(i=>{i.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(nt),t.variant=n,await t.updateComplete;let{aemFragmentMapping:o}=t.variantLayout;o&&(ma(r,t,o.mnemonics),da(r,t),ua(r,t,o.allowedSizes),pa(r,t,o.title),fa(r,t,o.subtitle),xa(r,t,o.prices),ga(r,t,o.backgroundImage,n),ba(r,t,o.description),wa(r,t,o,n),Sa(r,t),Aa(t))}var _a="merch-card",La=":start",Ca=":ready",Pa=1e4,no="merch-card:",He,er,d=class extends Ta{constructor(){super();Ie(this,He);u(this,"customerSegment");u(this,"marketSegment");u(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=yt(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=yt(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let o of n){await o.onceSettled();let i=o.value?.[0]?.planType;if(!i)return;let a=this.stockOfferOsis[i];if(!a)return;let s=o.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),o.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let o of n)o.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(o=>{if(r){n[o].order=Math.min(n[o].order||2,2);return}let i=n[o].order;i===1||isNaN(i)||(n[o].order=Number(i)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${no}${r}${La}`),this.addEventListener(pt,this.handleQuantitySelection),this.addEventListener(ur,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Ge,this.handleAemFragmentEvents),this.addEventListener(Ue,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(pt,this.handleQuantitySelection),this.storageOptions?.removeEventListener(ut,this.handleStorageChange),this.removeEventListener(Ge,this.handleAemFragmentEvents),this.removeEventListener(Ue,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Ge&&mt(this,He,er).call(this,"AEM fragment cannot be loaded"),r.type===Ue&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await ro(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(i=>i.onceSettled().catch(()=>i))).then(i=>i.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(i=>setTimeout(()=>i(!1),Pa));if(await Promise.race([r,n])===!0){performance.mark(`${no}${this.id}${Ca}`),this.dispatchEvent(new CustomEvent(gr,{bubbles:!0,composed:!0}));return}mt(this,He,er).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||this.dispatchEvent(new CustomEvent(pr,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(ut,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let o=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(o)}):n.replaceWith(o)}}};He=new WeakSet,er=function(r){this.dispatchEvent(new CustomEvent(xr,{detail:r,bubbles:!0,composed:!0}))},u(d,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,o,i]=r.split(",");return{PUF:n,ABM:o,M2M:i}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[o,i,a]=n.split(":"),s=Number(i);return[o,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:o,size:i}])=>[n,o,i].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:nt,reflect:!0}}),u(d,"styles",[lr,Br(),...mr()]);customElements.define(_a,d); diff --git a/libs/deps/mas/merch-sidenav.js b/libs/deps/mas/merch-sidenav.js index 13f40f2b2b..bcaac90e2b 100644 --- a/libs/deps/mas/merch-sidenav.js +++ b/libs/deps/mas/merch-sidenav.js @@ -1,4 +1,4 @@ -var I=Object.defineProperty;var v=o=>{throw TypeError(o)};var V=(o,e,t)=>e in o?I(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>V(o,typeof e!="symbol"?e+"":e,t),g=(o,e,t)=>e.has(o)||v("Cannot "+t);var S=(o,e,t)=>(g(o,e,"read from private field"),t?t.call(o):e.get(o)),b=(o,e,t)=>e.has(o)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),C=(o,e,t,s)=>(g(o,e,"write to private field"),s?s.call(o,t):e.set(o,t),t);import{html as M,css as K,LitElement as W}from"/libs/deps/lit-all.min.js";var c=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};import{css as P}from"/libs/deps/lit-all.min.js";var u=P` +var P=Object.defineProperty;var v=o=>{throw TypeError(o)};var H=(o,e,t)=>e in o?P(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var n=(o,e,t)=>H(o,typeof e!="symbol"?e+"":e,t),g=(o,e,t)=>e.has(o)||v("Cannot "+t);var b=(o,e,t)=>(g(o,e,"read from private field"),t?t.call(o):e.get(o)),S=(o,e,t)=>e.has(o)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),A=(o,e,t,s)=>(g(o,e,"write to private field"),s?s.call(o,t):e.set(o,t),t);import{html as M,css as j,LitElement as z}from"/libs/deps/lit-all.min.js";var l=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};import{css as F}from"/libs/deps/lit-all.min.js";var u=F` h2 { font-size: 11px; font-style: normal; @@ -9,13 +9,13 @@ var I=Object.defineProperty;var v=o=>{throw TypeError(o)};var V=(o,e,t)=>e in o? line-height: 32px; color: #747474; } -`;import{html as F,LitElement as U}from"/libs/deps/lit-all.min.js";function E(o,e){let t;return function(){let s=this,n=arguments;clearTimeout(t),t=setTimeout(()=>o.apply(s,n),e)}}var T="merch-search:change";var A="merch-sidenav:select";var y="hashchange";function r(o=window.location.hash){let e=[],t=o.replace(/^#/,"").split("&");for(let s of t){let[n,m=""]=s.split("=");n&&e.push([n,decodeURIComponent(m.replace(/\+/g," "))])}return Object.fromEntries(e)}function a(o,e){if(o.deeplink){let t={};t[o.deeplink]=e,H(t)}}function H(o){let e=new URLSearchParams(window.location.hash.slice(1));Object.entries(o).forEach(([n,m])=>{m?e.set(n,m):e.delete(n)}),e.sort();let t=e.toString();if(t===window.location.hash)return;let s=window.scrollY||document.documentElement.scrollTop;window.location.hash=t,window.scrollTo(0,s)}function w(o){let e=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let t=r(window.location.hash);o(t)};return e(),window.addEventListener(y,e),()=>{window.removeEventListener(y,e)}}var f=class extends U{get search(){return this.querySelector("sp-search")}constructor(){super(),this.handleInput=()=>{a(this,this.search.value),this.search.value&&this.dispatchEvent(new CustomEvent(T,{bubbles:!0,composed:!0,detail:{type:"search",value:this.search.value}}))},this.handleInputDebounced=E(this.handleInput.bind(this))}connectedCallback(){super.connectedCallback(),this.search&&(this.search.addEventListener("input",this.handleInputDebounced),this.search.addEventListener("submit",this.handleInputSubmit),this.updateComplete.then(()=>{this.setStateFromURL()}),this.startDeeplink())}disconnectedCallback(){super.disconnectedCallback(),this.search.removeEventListener("input",this.handleInputDebounced),this.search.removeEventListener("submit",this.handleInputSubmit),this.stopDeeplink?.()}setStateFromURL(){let t=r()[this.deeplink];t&&(this.search.value=t)}startDeeplink(){this.stopDeeplink=w(({search:e})=>{this.search.value=e??""})}handleInputSubmit(e){e.preventDefault()}render(){return F``}};i(f,"properties",{deeplink:{type:String}});customElements.define("merch-search",f);import{html as R,LitElement as B,css as G}from"/libs/deps/lit-all.min.js";var l=class extends B{constructor(){super(),this.handleClickDebounced=E(this.handleClick.bind(this))}selectElement(e,t=!0){e.parentNode.tagName==="SP-SIDENAV-ITEM"&&this.selectElement(e.parentNode,!1),t&&(this.selectedElement=e,this.selectedText=e.label,this.selectedValue=e.value,setTimeout(()=>{e.selected=!0},1),this.dispatchEvent(new CustomEvent(A,{bubbles:!0,composed:!0,detail:{type:"sidenav",value:this.selectedValue,elt:this.selectedElement}})))}setStateFromURL(){let t=r()[this.deeplink]??"all";if(t){let s=this.querySelector(`sp-sidenav-item[value="${t}"]`);if(!s)return;this.updateComplete.then(()=>{s.firstElementChild?.tagName==="SP-SIDENAV-ITEM"&&(s.expanded=!0),this.selectElement(s)})}}handleClick({target:e}){let{value:t,parentNode:s}=e;this.selectElement(e),s&&s.tagName==="SP-SIDENAV"&&(a(this,t),e.selected=!0,s.querySelectorAll("sp-sidenav-item[expanded],sp-sidenav-item[selected]").forEach(n=>{n.value!==t&&(n.expanded=!1,n.selected=!1)}))}selectionChanged({target:{value:e,parentNode:t}}){this.selectElement(this.querySelector(`sp-sidenav-item[value="${e}"]`)),a(this,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClickDebounced),this.updateComplete.then(()=>{this.setStateFromURL()})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClickDebounced)}render(){return R`
o.apply(s,i),e)}}function C(o,e={},t=null,s=null){let i=s?document.createElement(o,{is:s}):document.createElement(o);t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t;for(let[c,V]of Object.entries(e))i.setAttribute(c,V);return i}var T="merch-search:change";var y="merch-sidenav:select";var w="hashchange";function r(o=window.location.hash){let e=[],t=o.replace(/^#/,"").split("&");for(let s of t){let[i,c=""]=s.split("=");i&&e.push([i,decodeURIComponent(c.replace(/\+/g," "))])}return Object.fromEntries(e)}function a(o,e){if(o.deeplink){let t={};t[o.deeplink]=e,U(t)}}function U(o){let e=new URLSearchParams(window.location.hash.slice(1));Object.entries(o).forEach(([i,c])=>{c?e.set(i,c):e.delete(i)}),e.sort();let t=e.toString();if(t===window.location.hash)return;let s=window.scrollY||document.documentElement.scrollTop;window.location.hash=t,window.scrollTo(0,s)}function R(o){let e=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let t=r(window.location.hash);o(t)};return e(),window.addEventListener(w,e),()=>{window.removeEventListener(w,e)}}var f=class extends G{get search(){return this.querySelector("sp-search")}constructor(){super(),this.handleInput=()=>{a(this,this.search.value),this.search.value&&this.dispatchEvent(new CustomEvent(T,{bubbles:!0,composed:!0,detail:{type:"search",value:this.search.value}}))},this.handleInputDebounced=E(this.handleInput.bind(this))}connectedCallback(){super.connectedCallback(),this.search&&(this.search.addEventListener("input",this.handleInputDebounced),this.search.addEventListener("submit",this.handleInputSubmit),this.updateComplete.then(()=>{this.setStateFromURL()}),this.startDeeplink())}disconnectedCallback(){super.disconnectedCallback(),this.search.removeEventListener("input",this.handleInputDebounced),this.search.removeEventListener("submit",this.handleInputSubmit),this.stopDeeplink?.()}setStateFromURL(){let t=r()[this.deeplink];t&&(this.search.value=t)}startDeeplink(){this.stopDeeplink=R(({search:e})=>{this.search.value=e??""})}handleInputSubmit(e){e.preventDefault()}render(){return B``}};n(f,"properties",{deeplink:{type:String}});customElements.define("merch-search",f);import{html as L,LitElement as $,css as q}from"/libs/deps/lit-all.min.js";var d=class extends ${constructor(){super(),this.handleClickDebounced=E(this.handleClick.bind(this))}selectElement(e,t=!0){e.parentNode.tagName==="SP-SIDENAV-ITEM"&&this.selectElement(e.parentNode,!1),t&&(this.selectedElement=e,this.selectedText=e.label,this.selectedValue=e.value,setTimeout(()=>{e.selected=!0},1),this.dispatchEvent(new CustomEvent(y,{bubbles:!0,composed:!0,detail:{type:"sidenav",value:this.selectedValue,elt:this.selectedElement}})))}setStateFromURL(){let t=r()[this.deeplink]??"all";if(t){let s=this.querySelector(`sp-sidenav-item[value="${t}"]`);if(!s)return;this.updateComplete.then(()=>{s.firstElementChild?.tagName==="SP-SIDENAV-ITEM"&&(s.expanded=!0),this.selectElement(s)})}}handleClick({target:e}){let{value:t,parentNode:s}=e;this.selectElement(e),s&&s.tagName==="SP-SIDENAV"&&(a(this,t),e.selected=!0,s.querySelectorAll("sp-sidenav-item[expanded],sp-sidenav-item[selected]").forEach(i=>{i.value!==t&&(i.expanded=!1,i.selected=!1)}))}selectionChanged({target:{value:e,parentNode:t}}){this.selectElement(this.querySelector(`sp-sidenav-item[value="${e}"]`)),a(this,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClickDebounced),this.updateComplete.then(()=>{this.setStateFromURL()})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClickDebounced)}render(){return L`
- ${this.sidenavListTitle?R`

${this.sidenavListTitle}

`:""} + ${this.sidenavListTitle?L`

${this.sidenavListTitle}

`:""} -
`}};i(l,"properties",{sidenavListTitle:{type:String},label:{type:String},deeplink:{type:String,attribute:"deeplink"},selectedText:{type:String,reflect:!0,attribute:"selected-text"},selectedValue:{type:String,reflect:!0,attribute:"selected-value"}}),i(l,"styles",[G` +
`}};n(d,"properties",{sidenavListTitle:{type:String},label:{type:String},deeplink:{type:String,attribute:"deeplink"},selectedText:{type:String,reflect:!0,attribute:"selected-text"},selectedValue:{type:String,reflect:!0,attribute:"selected-value"}}),n(d,"styles",[q` :host { display: block; contain: content; @@ -36,7 +36,7 @@ var I=Object.defineProperty;var v=o=>{throw TypeError(o)};var V=(o,e,t)=>e in o? ) ); } - `,u]);customElements.define("merch-sidenav-list",l);import{html as $,LitElement as q,css as Y}from"/libs/deps/lit-all.min.js";var d=class extends q{setStateFromURL(){this.selectedValues=[];let{types:e}=r();e&&(this.selectedValues=e.split(","),this.selectedValues.forEach(t=>{let s=this.querySelector(`sp-checkbox[name=${t}]`);s&&(s.checked=!0)}))}selectionChanged(e){let{target:t}=e,s=t.getAttribute("name");if(s){let n=this.selectedValues.indexOf(s);t.checked&&n===-1?this.selectedValues.push(s):!t.checked&&n>=0&&this.selectedValues.splice(n,1)}a(this,this.selectedValues.join(","))}connectedCallback(){super.connectedCallback(),this.updateComplete.then(async()=>{this.setStateFromURL()})}render(){return $`
+ `,u]);customElements.define("merch-sidenav-list",d);import{html as Y,LitElement as K,css as W}from"/libs/deps/lit-all.min.js";var h=class extends K{setStateFromURL(){this.selectedValues=[];let{types:e}=r();e&&(this.selectedValues=e.split(","),this.selectedValues.forEach(t=>{let s=this.querySelector(`sp-checkbox[name=${t}]`);s&&(s.checked=!0)}))}selectionChanged(e){let{target:t}=e,s=t.getAttribute("name");if(s){let i=this.selectedValues.indexOf(s);t.checked&&i===-1?this.selectedValues.push(s):!t.checked&&i>=0&&this.selectedValues.splice(i,1)}a(this,this.selectedValues.join(","))}addAccessibilityAttributes(){let e="sidenav-checkbox-group-title",t=C("div",{class:"invisible-and-shrank",id:e});t.textContent=this.sidenavCheckboxTitle,this.append(t),this.querySelectorAll("sp-checkbox").forEach(s=>{s.setAttribute("role","group"),s.setAttribute("aria-labelledby",e)})}connectedCallback(){super.connectedCallback(),this.updateComplete.then(async()=>{this.setStateFromURL(),this.addAccessibilityAttributes()})}render(){return Y`

${this.sidenavCheckboxTitle}

{throw TypeError(o)};var V=(o,e,t)=>e in o? >
-
`}};i(d,"properties",{sidenavCheckboxTitle:{type:String},label:{type:String},deeplink:{type:String},selectedValues:{type:Array,reflect:!0},value:{type:String}}),i(d,"styles",Y` +
`}};n(h,"properties",{sidenavCheckboxTitle:{type:String},label:{type:String},deeplink:{type:String},selectedValues:{type:Array,reflect:!0},value:{type:String}}),n(h,"styles",W` :host { display: block; contain: content; @@ -66,7 +66,7 @@ var I=Object.defineProperty;var v=o=>{throw TypeError(o)};var V=(o,e,t)=>e in o? display: flex; flex-direction: column; } - `);customElements.define("merch-sidenav-checkbox-group",d);var L="(max-width: 700px)";var N="(max-width: 1199px)";var D=/iP(ad|hone|od)/.test(window?.navigator?.platform)||window?.navigator?.platform==="MacIntel"&&window.navigator.maxTouchPoints>1,_=!1,x,k=o=>{o&&(D?(document.body.style.position="fixed",o.ontouchmove=e=>{e.targetTouches.length===1&&e.stopPropagation()},_||(document.addEventListener("touchmove",e=>e.preventDefault()),_=!0)):(x=document.body.style.overflow,document.body.style.overflow="hidden"))},O=o=>{o&&(D?(o.ontouchstart=null,o.ontouchmove=null,document.body.style.position="",document.removeEventListener("touchmove",e=>e.preventDefault()),_=!1):x!==void 0&&(document.body.style.overflow=x,x=void 0))};var p,h=class extends W{constructor(){super();b(this,p);i(this,"mobileDevice",new c(this,L));i(this,"mobileAndTablet",new c(this,N));this.modal=!1}get filters(){return this.querySelector("merch-sidenav-list")}get search(){return this.querySelector("merch-search")}render(){return this.mobileAndTablet.matches?this.asDialog:this.asAside}get asDialog(){if(this.modal)return M` + `);customElements.define("merch-sidenav-checkbox-group",h);var N="(max-width: 700px)";var D="(max-width: 1199px)";var k=/iP(ad|hone|od)/.test(window?.navigator?.platform)||window?.navigator?.platform==="MacIntel"&&window.navigator.maxTouchPoints>1,_=!1,x,O=o=>{o&&(k?(document.body.style.position="fixed",o.ontouchmove=e=>{e.targetTouches.length===1&&e.stopPropagation()},_||(document.addEventListener("touchmove",e=>e.preventDefault()),_=!0)):(x=document.body.style.overflow,document.body.style.overflow="hidden"))},I=o=>{o&&(k?(o.ontouchstart=null,o.ontouchmove=null,document.body.style.position="",document.removeEventListener("touchmove",e=>e.preventDefault()),_=!1):x!==void 0&&(document.body.style.overflow=x,x=void 0))};var m,p=class extends z{constructor(){super();S(this,m);n(this,"mobileDevice",new l(this,N));n(this,"mobileAndTablet",new l(this,D));this.modal=!1}get filters(){return this.querySelector("merch-sidenav-list")}get search(){return this.querySelector("merch-search")}render(){return this.mobileAndTablet.matches?this.asDialog:this.asAside}get asDialog(){if(this.modal)return M` {throw TypeError(o)};var V=(o,e,t)=>e in o? `}get asAside(){return M`

${this.sidenavTitle}

`}get dialog(){return this.shadowRoot.querySelector("sp-dialog-base")}closeModal(t){t.preventDefault(),this.dialog?.close(),document.body.classList.remove("merch-modal")}openModal(){this.updateComplete.then(async()=>{k(this.dialog),document.body.classList.add("merch-modal");let t={trigger:S(this,p),notImmediatelyClosable:!0,type:"auto"},s=await window.__merch__spectrum_Overlay.open(this.dialog,t);s.addEventListener("close",()=>{this.modal=!1,document.body.classList.remove("merch-modal"),O(this.dialog)}),this.shadowRoot.querySelector("sp-theme").append(s)})}updated(){this.modal&&this.openModal()}showModal({target:t}){C(this,p,t),this.modal=!0}};p=new WeakMap,i(h,"properties",{sidenavTitle:{type:String},closeText:{type:String,attribute:"close-text"},modal:{type:Boolean,attribute:"modal",reflect:!0}}),i(h,"styles",[K` + >
`}get dialog(){return this.shadowRoot.querySelector("sp-dialog-base")}closeModal(t){t.preventDefault(),this.dialog?.close(),document.body.classList.remove("merch-modal")}openModal(){this.updateComplete.then(async()=>{O(this.dialog),document.body.classList.add("merch-modal");let t={trigger:b(this,m),notImmediatelyClosable:!0,type:"auto"},s=await window.__merch__spectrum_Overlay.open(this.dialog,t);s.addEventListener("close",()=>{this.modal=!1,document.body.classList.remove("merch-modal"),I(this.dialog)}),this.shadowRoot.querySelector("sp-theme").append(s)})}updated(){this.modal&&this.openModal()}showModal({target:t}){A(this,m,t),this.modal=!0}};m=new WeakMap,n(p,"properties",{sidenavTitle:{type:String},closeText:{type:String,attribute:"close-text"},modal:{type:Boolean,attribute:"modal",reflect:!0}}),n(p,"styles",[j` :host { display: block; z-index: 2; @@ -139,4 +139,4 @@ var I=Object.defineProperty;var v=o=>{throw TypeError(o)};var V=(o,e,t)=>e in o? top: 16px; right: 16px; } - `,u]);customElements.define("merch-sidenav",h);export{h as MerchSideNav}; + `,u]);customElements.define("merch-sidenav",p);export{p as MerchSideNav}; diff --git a/libs/features/mas/dist/mas.js b/libs/features/mas/dist/mas.js index f03e59daf7..f4586c43a1 100644 --- a/libs/features/mas/dist/mas.js +++ b/libs/features/mas/dist/mas.js @@ -2079,6 +2079,15 @@ body.merch-modal { height: 100vh; } +.invisible-and-shrank { + top: 0; + left: -2px; + width: 1px; + height: 1px; + position: absolute; + overflow: hidden; +} + `;document.head.appendChild(Xo);var Vt;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(Vt||(Vt={}));var Fn;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Fn||(Fn={}));var Mt;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(Mt||(Mt={}));var Ue;(function(e){e.V2="UCv2",e.V3="UCv3"})(Ue||(Ue={}));var Z;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(Z||(Z={}));var Kn=function(e){var t;return(t=lc.get(e))!==null&&t!==void 0?t:e},lc=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var Wo=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qo=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function mt(e,t,r){var n,i;try{for(var o=Wo(Object.entries(e)),a=o.next();!a.done;a=o.next()){var s=qo(a.value,2),c=s[0],l=s[1],h=Kn(c);l!=null&&r.has(h)&&t.set(h,l)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Er(e){switch(e){case Vt.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Sr(e,t){var r,n;for(var i in e){var o=e[i];try{for(var a=(r=void 0,Wo(Object.entries(o))),s=a.next();!s.done;s=a.next()){var c=qo(s.value,2),l=c[0],h=c[1];if(h!=null){var d=Kn(l);t.set("items["+i+"]["+d+"]",h)}}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}}var hc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Zo(e){pc(e);var t=e.env,r=e.items,n=e.workflowStep,i=hc(e,["env","items","workflowStep"]),o=new URL(Er(t));return o.pathname=n+"/",Sr(r,o.searchParams),mt(i,o.searchParams,uc),o.toString()}var uc=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),mc=["env","workflowStep","clientId","country","items"];function pc(e){var t,r;try{for(var n=dc(mc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var fc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xc="p_draft_landscape",bc="/store/";function Yn(e){Ac(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,a=e.ot,s=e.offerType,c=e.pa,l=e.productArrangementCode,h=e.landscape,d=fc(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),u={marketSegment:o??i,offerType:s??a,productArrangementCode:l??c},m=new URL(Er(t));return m.pathname=""+bc+n,n!==Z.SEGMENTATION&&n!==Z.CHANGE_PLAN_TEAM_PLANS&&Sr(r,m.searchParams),n===Z.SEGMENTATION&&mt(u,m.searchParams,jn),mt(d,m.searchParams,jn),h===Mt.DRAFT&&mt({af:xc},m.searchParams,jn),m.toString()}var jn=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),vc=["env","workflowStep","clientId","country"];function Ac(e){var t,r;try{for(var n=gc(vc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==Z.SEGMENTATION&&e.workflowStep!==Z.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function Xn(e,t){switch(e){case Ue.V2:return Zo(t);case Ue.V3:return Yn(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),Yn(t)}}var Wn;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Wn||(Wn={}));var U;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(U||(U={}));var N;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(N||(N={}));var qn;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(qn||(qn={}));var Zn;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Zn||(Zn={}));var Jn;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(Jn||(Jn={}));var Qn;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Qn||(Qn={}));var Jo="tacocat.js";var yr=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),Qo=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function O(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let a=new URLSearchParams(window.location.search),s=pt(n)?n:e;o=a.get(s)}if(i&&o==null){let a=pt(i)?i:e;o=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&o==null){let a=Ec(pt(r)?r:e);o=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return o??t[e]}var ft=()=>{};var ea=e=>typeof e=="boolean",$t=e=>typeof e=="function",Tr=e=>typeof e=="number",ta=e=>e!=null&&typeof e=="object";var pt=e=>typeof e=="string",ei=e=>pt(e)&&e,gt=e=>Tr(e)&&Number.isFinite(e)&&e>0;function xt(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function y(e,t){if(ea(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Se(e,t,r){let n=Object.values(t);return n.find(i=>yr(i,e))??r??n[0]}function Ec(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function bt(e,t=1){return Tr(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Sc=Date.now(),ti=()=>`(+${Date.now()-Sc}ms)`,Lr=new Set,yc=y(O("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function ra(e){let t=`[${Jo}/${e}]`,r=(a,s,...c)=>a?!0:(i(s,...c),!1),n=yc?(a,...s)=>{console.debug(`${t} ${a}`,...s,ti())}:()=>{},i=(a,...s)=>{let c=`${t} ${a}`;Lr.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:i,warn:(a,...s)=>{let c=`${t} ${a}`;Lr.forEach(([,l])=>l(c,...s))}}}function Tc(e,t){let r=[e,t];return Lr.add(r),()=>{Lr.delete(r)}}Tc((e,...t)=>{console.error(e,...t,ti())},(e,...t)=>{console.warn(e,...t,ti())});var Lc="no promo",na="promo-tag",_c="yellow",wc="neutral",Pc=(e,t,r)=>{let n=o=>o||Lc,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Cc="cancel-context",Ht=(e,t)=>{let r=e===Cc,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,a=o?e||t:void 0;return{effectivePromoCode:a,overridenPromoCode:e,className:o?na:`${na} no-promo`,text:Pc(a,t,i),variant:o?_c:wc,isOverriden:i}};var ri="ABM",ni="PUF",ii="M2M",oi="PERPETUAL",ai="P3Y",Ic="TAX_INCLUSIVE_DETAILS",kc="TAX_EXCLUSIVE",ia={ABM:ri,PUF:ni,M2M:ii,PERPETUAL:oi,P3Y:ai},pm={[ri]:{commitment:U.YEAR,term:N.MONTHLY},[ni]:{commitment:U.YEAR,term:N.ANNUAL},[ii]:{commitment:U.MONTH,term:N.MONTHLY},[oi]:{commitment:U.PERPETUAL,term:void 0},[ai]:{commitment:U.THREE_MONTHS,term:N.P3Y}},oa="Value is not an offer",_r=e=>{if(typeof e!="object")return oa;let{commitment:t,term:r}=e,n=Nc(t,r);return{...e,planType:n}};var Nc=(e,t)=>{switch(e){case void 0:return oa;case"":return"";case U.YEAR:return t===N.MONTHLY?ri:t===N.ANNUAL?ni:"";case U.MONTH:return t===N.MONTHLY?ii:"";case U.PERPETUAL:return oi;case U.TERM_LICENSE:return t===N.P3Y?ai:"";default:return""}};function si(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:a}=t;if(a!==Ic)return e;let s={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:kc}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var ci=function(e,t){return ci=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ci(e,t)};function Ut(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ci(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var A=function(){return A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Vc,function(c,l,h,d,u,m){if(l)t.minimumIntegerDigits=h.length;else{if(d&&u)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(fa.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ha.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ha,function(c,l,h,d,u,m){return h==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:u&&m?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+m.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=A(A({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=A(A({},t),da(o)));continue}if(pa.test(i.stem)){t=A(A({},t),da(i.stem));continue}var a=ga(i.stem);a&&(t=A(A({},t),a));var s=Mc(i.stem);s&&(t=A(A({},t),s))}return t}var Bt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ba(e,t){for(var r="",n=0;n>1),c="a",l=$c(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function $c(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=Bt[n||""]||Bt[r||""]||Bt["".concat(r,"-001")]||Bt["001"];return i[0]}var di,Hc=new RegExp("^".concat(hi.source,"*")),Uc=new RegExp("".concat(hi.source,"*$"));function E(e,t){return{start:e,end:t}}var Dc=!!String.prototype.startsWith,Bc=!!String.fromCodePoint,Gc=!!Object.fromEntries,zc=!!String.prototype.codePointAt,Fc=!!String.prototype.trimStart,Kc=!!String.prototype.trimEnd,jc=!!Number.isSafeInteger,Yc=jc?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},mi=!0;try{va=ya("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),mi=((di=va.exec("a"))===null||di===void 0?void 0:di[0])==="a"}catch{mi=!1}var va,Aa=Dc?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},pi=Bc?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Ea=Gc?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},Xc=Fc?function(t){return t.trimStart()}:function(t){return t.replace(Hc,"")},Wc=Kc?function(t){return t.trimEnd()}:function(t){return t.replace(Uc,"")};function ya(e,t){return new RegExp(e,t)}var fi;mi?(ui=ya("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),fi=function(t,r){var n;ui.lastIndex=r;var i=ui.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):fi=function(t,r){for(var n=[];;){var i=Sa(t,r);if(i===void 0||La(i)||Jc(i))break;n.push(i),r+=i>=65536?2:1}return pi.apply(void 0,n)};var ui,Ta=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:P.pound,location:E(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(v.UNMATCHED_CLOSING_TAG,E(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&gi(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:P.literal,value:"<".concat(i,"/>"),location:E(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:P.tag,value:i,children:a,location:E(n,this.clonePosition())},err:null}:this.error(v.INVALID_TAG,E(s,this.clonePosition())))}else return this.error(v.UNCLOSED_TAG,E(n,this.clonePosition()))}else return this.error(v.INVALID_TAG,E(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Zc(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=E(n,this.clonePosition());return{val:{type:P.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!qc(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return pi.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),pi(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(v.EMPTY_ARGUMENT,E(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:E(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=fi(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),a=E(t,o);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(v.EXPECT_ARGUMENT_TYPE,E(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var u=Wc(d.val);if(u.length===0)return this.error(v.EXPECT_ARGUMENT_STYLE,E(this.clonePosition(),this.clonePosition()));var m=E(h,this.clonePosition());l={style:u,styleLocation:m}}var f=this.tryParseArgumentClose(i);if(f.err)return f;var g=E(i,this.clonePosition());if(l&&Aa(l?.style,"::",0)){var T=Xc(l.style.slice(2));if(s==="number"){var d=this.parseNumberSkeletonFromString(T,l.styleLocation);return d.err?d:{val:{type:P.number,value:n,location:g,style:d.val},err:null}}else{if(T.length===0)return this.error(v.EXPECT_DATE_TIME_SKELETON,g);var _=T;this.locale&&(_=ba(T,this.locale));var u={type:De.dateTime,pattern:_,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?ca(_):{}},b=s==="date"?P.date:P.time;return{val:{type:b,value:n,location:g,style:u},err:null}}}return{val:{type:s==="number"?P.number:s==="date"?P.date:P.time,value:n,location:g,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,E(S,A({},S)));this.bumpSpace();var k=this.parseIdentifierIfPossible(),R=0;if(s!=="select"&&k.value==="offset"){if(!this.bumpIf(":"))return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,E(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),k=this.parseIdentifierIfPossible(),R=d.val}var V=this.tryParsePluralOrSelectOptions(t,s,r,k);if(V.err)return V;var f=this.tryParseArgumentClose(i);if(f.err)return f;var H=E(i,this.clonePosition());return s==="select"?{val:{type:P.select,value:n,options:Ea(V.val),location:H},err:null}:{val:{type:P.plural,value:n,options:Ea(V.val),offset:R,pluralType:s==="plural"?"cardinal":"ordinal",location:H},err:null}}default:return this.error(v.INVALID_ARGUMENT_TYPE,E(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,E(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=ma(t)}catch{return this.error(v.INVALID_NUMBER_SKELETON,r)}return{val:{type:De.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?xa(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,a=!1,s=[],c=new Set,l=i.value,h=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=E(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?v.DUPLICATE_SELECT_ARGUMENT_SELECTOR:v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,E(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(t+1,r,n);if(f.err)return f;var g=this.tryParseArgumentClose(m);if(g.err)return g;s.push([l,{value:f.val,location:E(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR:v.EXPECT_PLURAL_ARGUMENT_SELECTOR,E(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(v.MISSING_OTHER_CLAUSE,E(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var c=E(i,this.clonePosition());return o?(a*=n,Yc(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Sa(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Aa(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&La(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function gi(e){return e>=97&&e<=122||e>=65&&e<=90}function qc(e){return gi(e)||e===47}function Zc(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function La(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Jc(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function xi(e){e.forEach(function(t){if(delete t.location,kr(t)||Nr(t))for(var r in t.options)delete t.options[r].location,xi(t.options[r].value);else Pr(t)&&Rr(t.style)||(Cr(t)||Ir(t))&&Dt(t.style)?delete t.style.location:Or(t)&&xi(t.children)})}function _a(e,t){t===void 0&&(t={}),t=A({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Ta(e,t).parse();if(r.err){var n=SyntaxError(v[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||xi(r.val),r.val}function Gt(e,t){var r=t&&t.cache?t.cache:il,n=t&&t.serializer?t.serializer:nl,i=t&&t.strategy?t.strategy:el;return i(e,{cache:r,serializer:n})}function Qc(e){return e==null||typeof e=="number"||typeof e=="boolean"}function wa(e,t,r,n){var i=Qc(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function Pa(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function bi(e,t,r,n,i){return r.bind(t,e,n,i)}function el(e,t){var r=e.length===1?wa:Pa;return bi(e,this,r,t.cache.create(),t.serializer)}function tl(e,t){return bi(e,this,Pa,t.cache.create(),t.serializer)}function rl(e,t){return bi(e,this,wa,t.cache.create(),t.serializer)}var nl=function(){return JSON.stringify(arguments)};function vi(){this.cache=Object.create(null)}vi.prototype.get=function(e){return this.cache[e]};vi.prototype.set=function(e,t){this.cache[e]=t};var il={create:function(){return new vi}},Vr={variadic:tl,monadic:rl};var Be;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Be||(Be={}));var zt=function(e){Ut(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Ai=function(e){Ut(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Be.INVALID_VALUE,o)||this}return t}(zt);var Ca=function(e){Ut(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Be.INVALID_VALUE,i)||this}return t}(zt);var Ia=function(e){Ut(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Be.MISSING_VALUE,n)||this}return t}(zt);var F;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(F||(F={}));function ol(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==F.literal||r.type!==F.literal?t.push(r):n.value+=r.value,t},[])}function al(e){return typeof e=="function"}function Ft(e,t,r,n,i,o,a){if(e.length===1&&li(e[0]))return[{type:F.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=_a,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Na=ka;var hl=/[0-9\-+#]/,dl=/[^\d\-+#]/g;function Oa(e){return e.search(hl)}function ul(e="#.##"){let t={},r=e.length,n=Oa(e);t.prefix=n>0?e.substring(0,n):"";let i=Oa(e.split("").reverse().join("")),o=r-i,a=e.substring(o,o+1),s=o+(a==="."||a===","?1:0);t.suffix=i>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(dl);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function ml(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=i.value.split(".");return(!s||s&&s.length<=o)&&(s=o<0?"":(+("0."+s)).toFixed(o+1).replace("0.","")),i.integer=a,i.fraction=s,pl(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function pl(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.length({accept:e,round:t}),bl=[Si(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Si(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Si(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],yi={[U.YEAR]:{[N.MONTHLY]:Kt.MONTH,[N.ANNUAL]:Kt.YEAR},[U.MONTH]:{[N.MONTHLY]:Kt.MONTH}},vl=(e,t)=>e.indexOf(`'${t}'`)===0,Al=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Da(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Sl(e)),r},El=e=>{let t=yl(e),r=vl(e,t),n=e.replace(/'.*?'/,""),i=$a.test(n)||Ha.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Ua=e=>e.replace($a,Ma).replace(Ha,Ma),Sl=e=>e.match(/#(.?)#/)?.[1]===Va?gl:Va,yl=e=>e.match(/'(.*?)'/)?.[1]??"",Da=e=>e.match(/0(.?)0/)?.[1]??"";function Mr({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=El(e),l=r?Da(e):"",h=Al(e,r),d=r?2:0,u=o(t,{currencySymbol:a}),m=n?u.toLocaleString("hi-IN",{minimumFractionDigits:d,maximumFractionDigits:d}):Ra(h,u),f=r?m.lastIndexOf(l):m.length,g=m.substring(0,f),T=m.substring(f+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,a),currencySymbol:a,decimals:T,decimalsDelimiter:l,hasCurrencySpace:c,integer:g,isCurrencyFirst:s,recurrenceTerm:i}}var Ba=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=xl[r]??1;return Mr(e,i>1?Kt.MONTH:yi[t]?.[r],o=>{let a={divisor:i,price:o,usePrecision:n},{round:s}=bl.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},Ga=({commitment:e,term:t,...r})=>Mr(r,yi[e]?.[t]),za=e=>{let{commitment:t,term:r}=e;return t===U.YEAR&&r===N.MONTHLY?Mr(e,Kt.YEAR,n=>n*12):Mr(e,yi[t]?.[r])};var Tl={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},Ll=ra("ConsonantTemplates/price"),_l=/<\/?[^>]+(>|$)/g,G={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},Ge={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},wl="TAX_EXCLUSIVE",Pl=e=>ta(e)?Object.entries(e).filter(([,t])=>pt(t)||Tr(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Qo(n)+'"'}`,""):"",j=(e,t,r,n=!1)=>`${n?Ua(t):t??""}`;function Cl(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},d={}){let u=j(G.currencySymbol,r),m=j(G.currencySpace,o?" ":""),f="";return s&&(f+=u+m),f+=j(G.integer,a),f+=j(G.decimalsDelimiter,i),f+=j(G.decimals,n),s||(f+=m+u),f+=j(G.recurrence,c,null,!0),f+=j(G.unitType,l,null,!0),f+=j(G.taxInclusivity,h,!0),j(e,f,{...d,"aria-label":t})}var W=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:i=!0,displayRecurrence:o=!0,displayPerUnit:a=!1,displayTax:s=!1,language:c,literals:l={}}={},{commitment:h,offerSelectorIds:d,formatString:u,price:m,priceWithoutDiscount:f,taxDisplay:g,taxTerm:T,term:_,usePrecision:b}={},S={})=>{Object.entries({country:n,formatString:u,language:c,price:m}).forEach(([ce,Yr])=>{if(Yr==null)throw new Error(`Argument "${ce}" is missing for osi ${d?.toString()}, country ${n}, language ${c}`)});let k={...Tl,...l},R=`${c.toLowerCase()}-${n.toUpperCase()}`;function V(ce,Yr){let Xr=k[ce];if(Xr==null)return"";try{return new Na(Xr.replace(_l,""),R).format(Yr)}catch{return Ll.error("Failed to format literal:",Xr),""}}let H=t&&f?f:m,ae=e?Ba:Ga;r&&(ae=za);let{accessiblePrice:Xe,recurrenceTerm:Le,...We}=ae({commitment:h,formatString:u,term:_,price:e?m:H,usePrecision:b,isIndianPrice:n==="IN"}),J=Xe,fe="";if(y(o)&&Le){let ce=V(Ge.recurrenceAriaLabel,{recurrenceTerm:Le});ce&&(J+=" "+ce),fe=V(Ge.recurrenceLabel,{recurrenceTerm:Le})}let se="";if(y(a)){se=V(Ge.perUnitLabel,{perUnit:"LICENSE"});let ce=V(Ge.perUnitAriaLabel,{perUnit:"LICENSE"});ce&&(J+=" "+ce)}let Q="";y(s)&&T&&(Q=V(g===wl?Ge.taxExclusiveLabel:Ge.taxInclusiveLabel,{taxTerm:T}),Q&&(J+=" "+Q)),t&&(J=V(Ge.strikethroughAriaLabel,{strikethroughPrice:J}));let _e=G.container;if(e&&(_e+=" "+G.containerOptical),t&&(_e+=" "+G.containerStrikethrough),r&&(_e+=" "+G.containerAnnual),y(i))return Cl(_e,{...We,accessibleLabel:J,recurrenceLabel:fe,perUnitLabel:se,taxInclusivityLabel:Q},S);let{currencySymbol:Yi,decimals:As,decimalsDelimiter:Es,hasCurrencySpace:Xi,integer:Ss,isCurrencyFirst:ys}=We,qe=[Ss,Es,As];ys?(qe.unshift(Xi?"\xA0":""),qe.unshift(Yi)):(qe.push(Xi?"\xA0":""),qe.push(Yi)),qe.push(fe,se,Q);let Ts=qe.join("");return j(_e,Ts,S)},Fa=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${W()(e,t,r)}${i?" "+W({displayStrikethrough:!0})(e,t,r):""}`},Ka=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?W({displayStrikethrough:!0})(n,t,r)+" ":""}${W()(e,t,r)}${j(G.containerAnnualPrefix," (")}${W({displayAnnual:!0})(n,t,r)}${j(G.containerAnnualSuffix,")")}`},ja=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${W()(e,t,r)}${j(G.containerAnnualPrefix," (")}${W({displayAnnual:!0})(n,t,r)}${j(G.containerAnnualSuffix,")")}`};var Ti=W(),Li=Fa(),_i=W({displayOptical:!0}),wi=W({displayStrikethrough:!0}),Pi=W({displayAnnual:!0}),Ci=ja(),Ii=Ka();var Il=(e,t)=>{if(!(!gt(e)||!gt(t)))return Math.floor((t-e)/t*100)},Ya=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=Il(r,n);return i===void 0?'':`${i}%`};var ki=Ya();var{freeze:jt}=Object,re=jt({...Ue}),ne=jt({...Z}),ze={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},Ni=jt({...U}),Oi=jt({...ia}),Ri=jt({...N});var Xa="mas-commerce-service";function Wa(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(Xa);i!==r&&(r=i,i&&e(i))}return document.addEventListener(it,n,{once:t}),Fe(n),()=>document.removeEventListener(it,n)}function Yt(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[a,s]=e;i=[a.language===o?a:s]}return r&&(i=i.map(si)),i}var Fe=e=>window.setTimeout(e);function vt(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(bt).filter(gt);return r.length||(r=[t]),r}function $r(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(ei)}function q(){return document.getElementsByTagName(Xa)?.[0]}var Ke={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},qa=1e3,Za=new Set;function kl(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function Ja(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Ke.serializableTypes.includes(r))return r}return e}function Nl(e,t){if(!Ke.ignoredProperties.includes(e))return Ja(t)}var Vi={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],i=[],o=t;r.forEach(l=>{l!=null&&(kl(l)?n:i).push(l)}),n.length&&(o+=" "+n.map(Ja).join(" "));let{pathname:a,search:s}=window.location,c=`${Ke.delimiter}page=${a}${s}`;c.length>qa&&(c=`${c.slice(0,qa)}`),o+=c,i.length&&(o+=`${Ke.delimiter}facts=`,o+=JSON.stringify(i,Nl)),Za.has(o)||(Za.add(o),window.lana?.log(o,Ke))}};function At(e){Object.assign(Ke,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Ke&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var L=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:re.V3,checkoutWorkflowStep:ne.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:ze.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:$e.PUBLISHED,wcsBufferLimit:1});var Mi=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Ol({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||L.language),t??(t=e?.split("_")?.[1]||L.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function $i(e={}){let{commerce:t={}}=e,r=ze.PRODUCTION,n=Dn,i=O("checkoutClientId",t)??L.checkoutClientId,o=Se(O("checkoutWorkflow",t),re,L.checkoutWorkflow),a=ne.CHECKOUT;o===re.V3&&(a=Se(O("checkoutWorkflowStep",t),ne,L.checkoutWorkflowStep));let s=y(O("displayOldPrice",t),L.displayOldPrice),c=y(O("displayPerUnit",t),L.displayPerUnit),l=y(O("displayRecurrence",t),L.displayRecurrence),h=y(O("displayTax",t),L.displayTax),d=y(O("entitlement",t),L.entitlement),u=y(O("modal",t),L.modal),m=y(O("forceTaxExclusive",t),L.forceTaxExclusive),f=O("promotionCode",t)??L.promotionCode,g=vt(O("quantity",t)),T=O("wcsApiKey",t)??L.wcsApiKey,_=t?.env==="stage",b=$e.PUBLISHED;["true",""].includes(t.allowOverride)&&(_=(O(Hn,t,{metadata:!1})?.toLowerCase()??t?.env)==="stage",b=Se(O(Un,t),$e,b)),_&&(r=ze.STAGE,n=Bn);let k=bt(O("wcsBufferDelay",t),L.wcsBufferDelay),R=bt(O("wcsBufferLimit",t),L.wcsBufferLimit);return{...Ol(e),displayOldPrice:s,checkoutClientId:i,checkoutWorkflow:o,checkoutWorkflowStep:a,displayPerUnit:c,displayRecurrence:l,displayTax:h,entitlement:d,extraOptions:L.extraOptions,modal:u,env:r,forceTaxExclusive:m,promotionCode:f,quantity:g,wcsApiKey:T,wcsBufferDelay:k,wcsBufferLimit:R,wcsURL:n,landscape:b}}var Hi={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Rl=Date.now(),Ui=new Set,Di=new Set,Qa=new Map,es={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},ts={filter:({level:e})=>e!==Hi.DEBUG},Vl={filter:()=>!1};function Ml(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){return n.length===1&&$t(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:i,timestamp:Date.now()-Rl}}function $l(e){[...Di].every(t=>t(e))&&Ui.forEach(t=>t(e))}function rs(e){let t=(Qa.get(e)??0)+1;Qa.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:i=>rs(`${n.namespace}/${i}`),updateConfig:At};return Object.values(Hi).forEach(i=>{n[i]=(o,...a)=>$l(Ml(i,o,e,a,r))}),Object.seal(n)}function Hr(...e){e.forEach(t=>{let{append:r,filter:n}=t;$t(n)&&Di.add(n),$t(r)&&Ui.add(r)})}function Hl(e={}){let{name:t}=e,r=y(O("commerce.debug",{search:!0,storage:!0}),t===Mi.LOCAL);return Hr(r?es:ts),t===Mi.PROD&&Hr(Vi),X}function Ul(){Ui.clear(),Di.clear()}var X={...rs($n),Level:Hi,Plugins:{consoleAppender:es,debugFilter:ts,quietFilter:Vl,lanaAppender:Vi},init:Hl,reset:Ul,use:Hr};var Dl={[he]:kn,[Ee]:Nn,[de]:On},Bl={[he]:Vn,[de]:Mn},Et=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",ft);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",Ee);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[he,Ee,de].forEach(t=>{this.wrapperElement.classList.toggle(Dl[t],t===this.state)})}notify(){(this.state===de||this.state===he)&&(this.state===de?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===he&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(Bl[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=Wa(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=ft}onceSettled(){let{error:t,promises:r,state:n}=this;return de===n?Promise.resolve(this.wrapperElement):he===n?Promise.reject(t):new Promise((i,o)=>{r.push({resolve:i,reject:o})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=de,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Fe(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=he,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),Fe(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Ee,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!q()||this.timer)return;let r=X.module("mas-element"),{error:n,options:i,state:o,value:a,version:s}=this;this.state=Ee,this.timer=Fe(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Ee&&this.version===s&&(this.state=o,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,i)}})}};function ns(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function Ur(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,ns(t)),i}function Dr(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,ns(t)),e):null}var Gl="download",zl="upgrade";function Br(e,t={},r=""){let n=q();if(!n)return null;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m,extraOptions:f}=n.collectCheckoutOptions(t),g=Ur(e,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m,extraOptions:f});return r&&(g.innerHTML=`${r}`),g}function Gr(e){return class extends e{constructor(){super(...arguments);p(this,"checkoutActionHandler");p(this,"masElement",new Et(this))}attributeChangedCallback(n,i,o){this.masElement.attributeChangedCallback(n,i,o)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let i=q();if(!i)return!1;this.dataset.imsCountry||i.imsCountryPromise.then(d=>{d&&(this.dataset.imsCountry=d)},ft),n.imsCountry=null;let o=i.collectCheckoutOptions(n,this);if(!o.wcsOsi.length)return!1;let a;try{a=JSON.parse(o.extraOptions??"{}")}catch(d){this.masElement.log?.error("cannot parse exta checkout options",d)}let s=this.masElement.togglePending(o);this.setCheckoutUrl("");let c=i.resolveOfferSelectors(o),l=await Promise.all(c);l=l.map(d=>Yt(d,o)),o.country=this.dataset.imsCountry||o.country;let h=await i.buildCheckoutAction?.(l.flat(),{...a,...o},this);return this.renderOffers(l.flat(),o,{},h,s)}renderOffers(n,i,o={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=q();if(!c)return!1;if(i={...JSON.parse(this.dataset.extraOptions??"null"),...i,...o},s??(s=this.masElement.togglePending(i)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(Gl,zl),this.masElement.toggleResolved(s,n,i);let{url:h,text:d,className:u,handler:m}=a;return h&&this.setCheckoutUrl(h),d&&(this.firstElementChild.innerHTML=d),u&&this.classList.add(...u.split(" ")),m&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=m.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,i)){let h=c.buildCheckoutURL(n,i);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${i?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,i))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let i=q();if(!i)return!1;let{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:f}=i.collectCheckoutOptions(n);return Dr(this,{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:f}),!0}}}var Xt=class Xt extends Gr(HTMLButtonElement){static createCheckoutButton(t={},r=""){return Br(Xt,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};p(Xt,"is","checkout-button"),p(Xt,"tag","button");var je=Xt;window.customElements.get(je.is)||window.customElements.define(je.is,je,{extends:je.tag});var Fl="#000000",Kl="#F8D904",jl=/(accent|primary|secondary)(-(outline|link))?/,Yl="mas:product_code/",Xl="daa-ll",zr="daa-lh",Wl=["XL","L","M","S"];function ql(e,t,r){e.mnemonicIcon?.map((i,o)=>({icon:i,alt:e.mnemonicAlt[o]??"",link:e.mnemonicLink[o]??""}))?.forEach(({icon:i,alt:o,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:i,size:r?.size??"l"};o&&(s.alt=o),a&&(s.href=a);let c=te("merch-icon",s);t.append(c)})}function Zl(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||Fl),t.setAttribute("badge-background-color",e.badgeBackgroundColor||Kl))}function Jl(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function Ql(e,t,r){e.cardTitle&&r&&t.append(te(r.tag,{slot:r.slot},e.cardTitle))}function eh(e,t,r){e.subtitle&&r&&t.append(te(r.tag,{slot:r.slot},e.subtitle))}function th(e,t,r){if(r?.tag&&e.backgroundImage){let n={loading:"lazy",src:e.backgroundImage};e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",t.append(te(r.tag,{slot:r.slot},te("img",n)))}r?.attribute&&t.setAttribute(r.attribute,e.backgroundImage)}function rh(e,t,r){if(e.prices&&r){let n=te(r.tag,{slot:r.slot},e.prices);t.append(n)}}function nh(e,t,r){if(e.description&&r){let n=te(r.tag,{slot:r.slot},e.description);t.append(n)}}function ih(e,t,r,n){let o=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);o.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||o.setAttribute(h.name,h.value);o.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=Wl.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),o.classList.add(...l),o}function oh(e,t,r,n){let i="fill";r&&(i="outline");let o=te("sp-button",{treatment:i,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return o.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),o}function ah(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function sh(e,t,r,n){if(e.ctas){let{slot:i}=r.ctas,o=te("div",{slot:i},e.ctas),a=[...o.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return ah(s,c);let l=jl.exec(s.className)?.[0]??"accent",h=l.includes("accent"),d=l.includes("primary"),u=l.includes("secondary"),m=l.includes("-outline");if(l.includes("-link"))return s;let g;return h||c?g="accent":d?g="primary":u&&(g="secondary"),t.spectrum==="swc"?oh(s,r,m,g):ih(s,r,m,g)});o.innerHTML="",o.append(...a),t.append(o)}}function ch(e,t){let{tags:r}=e,n=r?.find(i=>i.startsWith(Yl))?.split("/").pop();n&&(t.setAttribute(zr,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((i,o)=>{i.setAttribute(Xl,`${i.dataset.analyticsId}-${o+1}`)}))}function lh(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function is(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.id=e.id,t.querySelectorAll("[slot]").forEach(o=>{o.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(zr),t.variant=n,await t.updateComplete;let{aemFragmentMapping:i}=t.variantLayout;i&&(ql(r,t,i.mnemonics),Zl(r,t),Jl(r,t,i.allowedSizes),Ql(r,t,i.title),eh(r,t,i.subtitle),rh(r,t,i.prices),th(r,t,i.backgroundImage,n),nh(r,t,i.description),sh(r,t,i,n),ch(r,t),lh(t))}var hh="merch-card",dh=":start",uh=":ready",mh=1e4,os="merch-card:",qt,Bi,Wt=class extends ee{constructor(){super();K(this,qt);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=zn(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=zn(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let i of n){await i.onceSettled();let o=i.value?.[0]?.planType;if(!o)return;let a=this.stockOfferOsis[o];if(!a)return;let s=i.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),i.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let i of n)i.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(i=>{if(r){n[i].order=Math.min(n[i].order||2,2);return}let o=n[i].order;o===1||isNaN(o)||(n[i].order=Number(o)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${os}${r}${dh}`),this.addEventListener(xr,this.handleQuantitySelection),this.addEventListener(_n,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Me,this.handleAemFragmentEvents),this.addEventListener(Ve,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(xr,this.handleQuantitySelection),this.storageOptions?.removeEventListener(gr,this.handleStorageChange),this.removeEventListener(Me,this.handleAemFragmentEvents),this.removeEventListener(Ve,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Me&&ge(this,qt,Bi).call(this,"AEM fragment cannot be loaded"),r.type===Ve&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await is(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(o=>setTimeout(()=>o(!1),mh));if(await Promise.race([r,n])===!0){performance.mark(`${os}${this.id}${uh}`),this.dispatchEvent(new CustomEvent(Cn,{bubbles:!0,composed:!0}));return}ge(this,qt,Bi).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||this.dispatchEvent(new CustomEvent(wn,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(gr,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let i=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(i)}):n.replaceWith(i)}}};qt=new WeakSet,Bi=function(r){this.dispatchEvent(new CustomEvent(In,{detail:r,bubbles:!0,composed:!0}))},p(Wt,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,i,o]=r.split(",");return{PUF:n,ABM:i,M2M:o}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[i,o,a]=n.split(":"),s=Number(o);return[i,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:i,size:o}])=>[n,i,o].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:zr,reflect:!0}}),p(Wt,"styles",[Oo,Yo(),...Ro()]);customElements.define(hh,Wt);var St=class extends ee{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?x` diff --git a/libs/features/mas/src/global.css.js b/libs/features/mas/src/global.css.js index c3b86de89d..a96d96685b 100644 --- a/libs/features/mas/src/global.css.js +++ b/libs/features/mas/src/global.css.js @@ -420,5 +420,14 @@ body.merch-modal { height: 100vh; } +.invisible-and-shrank { + top: 0; + left: -2px; + width: 1px; + height: 1px; + position: absolute; + overflow: hidden; +} + `; document.head.appendChild(styles); diff --git a/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js b/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js index 027515a132..5015d6ddb9 100644 --- a/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js +++ b/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js @@ -1,5 +1,6 @@ import { html, LitElement, css } from 'lit'; import { parseState, pushStateFromComponent } from '../deeplink.js'; +import { createTag } from '../utils.js'; export class MerchSidenavCheckboxGroup extends LitElement { static properties = { @@ -69,10 +70,22 @@ export class MerchSidenavCheckboxGroup extends LitElement { pushStateFromComponent(this, this.selectedValues.join(',')); } + addAccessibilityAttributes() { + const id = 'sidenav-checkbox-group-title'; + const groupIdEl = createTag('div', { class: 'invisible-and-shrank', id }); + groupIdEl.textContent = this.sidenavCheckboxTitle; + this.append(groupIdEl); + this.querySelectorAll('sp-checkbox').forEach((checkboxEl) => { + checkboxEl.setAttribute('role', 'group'); + checkboxEl.setAttribute('aria-labelledby', id); + }); + } + connectedCallback() { super.connectedCallback(); this.updateComplete.then(async () => { this.setStateFromURL(); + this.addAccessibilityAttributes(); }); } From 7a9cd521831264fad71612280c372faeae840037 Mon Sep 17 00:00:00 2001 From: Bozo Jovicic Date: Tue, 21 Jan 2025 15:46:24 +0100 Subject: [PATCH 2/7] Trigger Build From 311f4880bc44251e901f4011a69f3134ad2a70fc Mon Sep 17 00:00:00 2001 From: Bozo Jovicic Date: Tue, 21 Jan 2025 16:25:15 +0100 Subject: [PATCH 3/7] Trigger Build From b5211124fdf6855764542685ee106956f22da8b5 Mon Sep 17 00:00:00 2001 From: Bozo Jovicic Date: Mon, 27 Jan 2025 14:57:58 +0100 Subject: [PATCH 4/7] MWPW-162026 [Milo][Sev2][Catalog] Group of checkboxes is missing FIELDSET element - filter checkboxes --- libs/features/mas/src/global.css.js | 17 +++++----- .../sidenav/merch-sidenav-checkbox-group.js | 31 +++++++------------ 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/libs/features/mas/src/global.css.js b/libs/features/mas/src/global.css.js index a96d96685b..75a23305f1 100644 --- a/libs/features/mas/src/global.css.js +++ b/libs/features/mas/src/global.css.js @@ -420,13 +420,16 @@ body.merch-modal { height: 100vh; } -.invisible-and-shrank { - top: 0; - left: -2px; - width: 1px; - height: 1px; - position: absolute; - overflow: hidden; +merch-sidenav-checkbox-group h3 { + font-size: 14px; + font-style: normal; + font-weight: 700; + height: 32px; + letter-spacing: 0px; + padding: 0px; + line-height: 18.2px; + color: var(--color-gray-600); + margin: 0px; } `; diff --git a/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js b/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js index 5015d6ddb9..3670eece4a 100644 --- a/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js +++ b/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js @@ -18,17 +18,6 @@ export class MerchSidenavCheckboxGroup extends LitElement { border-top: 1px solid var(--color-gray-200); padding: 12px; } - h3 { - font-size: 14px; - font-style: normal; - font-weight: 700; - height: 32px; - letter-spacing: 0px; - padding: 0px; - line-height: 18.2px; - color: var(--color-gray-600); - margin: 0px; - } .checkbox-group { display: flex; flex-direction: column; @@ -70,14 +59,17 @@ export class MerchSidenavCheckboxGroup extends LitElement { pushStateFromComponent(this, this.selectedValues.join(',')); } - addAccessibilityAttributes() { + addGroupTitle() { const id = 'sidenav-checkbox-group-title'; - const groupIdEl = createTag('div', { class: 'invisible-and-shrank', id }); - groupIdEl.textContent = this.sidenavCheckboxTitle; - this.append(groupIdEl); - this.querySelectorAll('sp-checkbox').forEach((checkboxEl) => { - checkboxEl.setAttribute('role', 'group'); - checkboxEl.setAttribute('aria-labelledby', id); + const h3El = createTag('h3', { id }); + h3El.textContent = this.sidenavCheckboxTitle; + this.prepend(h3El); + + this.childNodes.forEach(el => { + if (el.id !== id) { + el.setAttribute('role', 'group'); + el.setAttribute('aria-labelledby', id); + } }); } @@ -85,13 +77,12 @@ export class MerchSidenavCheckboxGroup extends LitElement { super.connectedCallback(); this.updateComplete.then(async () => { this.setStateFromURL(); - this.addAccessibilityAttributes(); + this.addGroupTitle(); }); } render() { return html`
-

${this.sidenavCheckboxTitle}

Date: Mon, 27 Jan 2025 15:01:34 +0100 Subject: [PATCH 5/7] Rebuild mas --- libs/deps/mas/mas.js | 12 ++++++++ libs/deps/mas/merch-card.js | 12 ++++++++ libs/deps/mas/merch-sidenav.js | 28 ++++++------------- libs/features/mas/dist/mas.js | 12 ++++++++ .../sidenav/merch-sidenav-checkbox-group.js | 2 +- 5 files changed, 45 insertions(+), 21 deletions(-) diff --git a/libs/deps/mas/mas.js b/libs/deps/mas/mas.js index 700157154d..887a623edb 100644 --- a/libs/deps/mas/mas.js +++ b/libs/deps/mas/mas.js @@ -2094,6 +2094,18 @@ body.merch-modal { height: 100vh; } +merch-sidenav-checkbox-group h3 { + font-size: 14px; + font-style: normal; + font-weight: 700; + height: 32px; + letter-spacing: 0px; + padding: 0px; + line-height: 18.2px; + color: var(--color-gray-600); + margin: 0px; +} + `;document.head.appendChild(na);var Ut;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(Ut||(Ut={}));var Zn;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Zn||(Zn={}));var Dt;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(Dt||(Dt={}));var $e;(function(e){e.V2="UCv2",e.V3="UCv3"})($e||($e={}));var Q;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(Q||(Q={}));var Jn=function(e){var t;return(t=fc.get(e))!==null&&t!==void 0?t:e},fc=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var ia=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},oa=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function dt(e,t,r){var n,i;try{for(var o=ia(Object.entries(e)),a=o.next();!a.done;a=o.next()){var s=oa(a.value,2),c=s[0],l=s[1],h=Jn(c);l!=null&&r.has(h)&&t.set(h,l)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Tr(e){switch(e){case Ut.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Lr(e,t){var r,n;for(var i in e){var o=e[i];try{for(var a=(r=void 0,ia(Object.entries(o))),s=a.next();!s.done;s=a.next()){var c=oa(s.value,2),l=c[0],h=c[1];if(h!=null){var d=Jn(l);t.set("items["+i+"]["+d+"]",h)}}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}}var gc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function aa(e){Ac(e);var t=e.env,r=e.items,n=e.workflowStep,i=gc(e,["env","items","workflowStep"]),o=new URL(Tr(t));return o.pathname=n+"/",Lr(r,o.searchParams),dt(i,o.searchParams,bc),o.toString()}var bc=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),vc=["env","workflowStep","clientId","country","items"];function Ac(e){var t,r;try{for(var n=xc(vc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var Ec=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},yc="p_draft_landscape",Tc="/store/";function ei(e){_c(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,a=e.ot,s=e.offerType,c=e.pa,l=e.productArrangementCode,h=e.landscape,d=Ec(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),u={marketSegment:o??i,offerType:s??a,productArrangementCode:l??c},m=new URL(Tr(t));return m.pathname=""+Tc+n,n!==Q.SEGMENTATION&&n!==Q.CHANGE_PLAN_TEAM_PLANS&&Lr(r,m.searchParams),n===Q.SEGMENTATION&&dt(u,m.searchParams,Qn),dt(d,m.searchParams,Qn),h===Dt.DRAFT&&dt({af:yc},m.searchParams,Qn),m.toString()}var Qn=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),Lc=["env","workflowStep","clientId","country"];function _c(e){var t,r;try{for(var n=Sc(Lc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==Q.SEGMENTATION&&e.workflowStep!==Q.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function ti(e,t){switch(e){case $e.V2:return aa(t);case $e.V3:return ei(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),ei(t)}}var ri;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(ri||(ri={}));var H;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(H||(H={}));var N;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(N||(N={}));var ni;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(ni||(ni={}));var ii;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(ii||(ii={}));var oi;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(oi||(oi={}));var ai;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(ai||(ai={}));var sa="tacocat.js";var _r=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),ca=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function O(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let a=new URLSearchParams(window.location.search),s=ut(n)?n:e;o=a.get(s)}if(i&&o==null){let a=ut(i)?i:e;o=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&o==null){let a=wc(ut(r)?r:e);o=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return o??t[e]}var mt=()=>{};var la=e=>typeof e=="boolean",Bt=e=>typeof e=="function",wr=e=>typeof e=="number",ha=e=>e!=null&&typeof e=="object";var ut=e=>typeof e=="string",si=e=>ut(e)&&e,pt=e=>wr(e)&&Number.isFinite(e)&&e>0;function ft(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function y(e,t){if(la(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Se(e,t,r){let n=Object.values(t);return n.find(i=>_r(i,e))??r??n[0]}function wc(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function gt(e,t=1){return wr(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Pc=Date.now(),ci=()=>`(+${Date.now()-Pc}ms)`,Pr=new Set,Cc=y(O("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function da(e){let t=`[${sa}/${e}]`,r=(a,s,...c)=>a?!0:(i(s,...c),!1),n=Cc?(a,...s)=>{console.debug(`${t} ${a}`,...s,ci())}:()=>{},i=(a,...s)=>{let c=`${t} ${a}`;Pr.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:i,warn:(a,...s)=>{let c=`${t} ${a}`;Pr.forEach(([,l])=>l(c,...s))}}}function Ic(e,t){let r=[e,t];return Pr.add(r),()=>{Pr.delete(r)}}Ic((e,...t)=>{console.error(e,...t,ci())},(e,...t)=>{console.warn(e,...t,ci())});var kc="no promo",ua="promo-tag",Nc="yellow",Oc="neutral",Rc=(e,t,r)=>{let n=o=>o||kc,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Mc="cancel-context",Gt=(e,t)=>{let r=e===Mc,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,a=o?e||t:void 0;return{effectivePromoCode:a,overridenPromoCode:e,className:o?ua:`${ua} no-promo`,text:Rc(a,t,i),variant:o?Nc:Oc,isOverriden:i}};var li="ABM",hi="PUF",di="M2M",ui="PERPETUAL",mi="P3Y",Vc="TAX_INCLUSIVE_DETAILS",$c="TAX_EXCLUSIVE",ma={ABM:li,PUF:hi,M2M:di,PERPETUAL:ui,P3Y:mi},Am={[li]:{commitment:H.YEAR,term:N.MONTHLY},[hi]:{commitment:H.YEAR,term:N.ANNUAL},[di]:{commitment:H.MONTH,term:N.MONTHLY},[ui]:{commitment:H.PERPETUAL,term:void 0},[mi]:{commitment:H.THREE_MONTHS,term:N.P3Y}},pa="Value is not an offer",Cr=e=>{if(typeof e!="object")return pa;let{commitment:t,term:r}=e,n=Hc(t,r);return{...e,planType:n}};var Hc=(e,t)=>{switch(e){case void 0:return pa;case"":return"";case H.YEAR:return t===N.MONTHLY?li:t===N.ANNUAL?hi:"";case H.MONTH:return t===N.MONTHLY?di:"";case H.PERPETUAL:return ui;case H.TERM_LICENSE:return t===N.P3Y?mi:"";default:return""}};function pi(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:a}=t;if(a!==Vc)return e;let s={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:$c}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var fi=function(e,t){return fi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},fi(e,t)};function zt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");fi(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var A=function(){return A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Bc,function(c,l,h,d,u,m){if(l)t.minimumIntegerDigits=h.length;else{if(d&&u)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ta.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(va.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(va,function(c,l,h,d,u,m){return h==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:u&&m?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+m.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=A(A({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=A(A({},t),Aa(o)));continue}if(ya.test(i.stem)){t=A(A({},t),Aa(i.stem));continue}var a=La(i.stem);a&&(t=A(A({},t),a));var s=Gc(i.stem);s&&(t=A(A({},t),s))}return t}var Kt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function wa(e,t){for(var r="",n=0;n>1),c="a",l=zc(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function zc(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=Kt[n||""]||Kt[r||""]||Kt["".concat(r,"-001")]||Kt["001"];return i[0]}var bi,Fc=new RegExp("^".concat(xi.source,"*")),Kc=new RegExp("".concat(xi.source,"*$"));function E(e,t){return{start:e,end:t}}var jc=!!String.prototype.startsWith,Yc=!!String.fromCodePoint,Xc=!!Object.fromEntries,Wc=!!String.prototype.codePointAt,qc=!!String.prototype.trimStart,Zc=!!String.prototype.trimEnd,Jc=!!Number.isSafeInteger,Qc=Jc?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ai=!0;try{Pa=Na("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ai=((bi=Pa.exec("a"))===null||bi===void 0?void 0:bi[0])==="a"}catch{Ai=!1}var Pa,Ca=jc?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Ei=Yc?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Ia=Xc?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},el=qc?function(t){return t.trimStart()}:function(t){return t.replace(Fc,"")},tl=Zc?function(t){return t.trimEnd()}:function(t){return t.replace(Kc,"")};function Na(e,t){return new RegExp(e,t)}var Si;Ai?(vi=Na("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Si=function(t,r){var n;vi.lastIndex=r;var i=vi.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):Si=function(t,r){for(var n=[];;){var i=ka(t,r);if(i===void 0||Ra(i)||il(i))break;n.push(i),r+=i>=65536?2:1}return Ei.apply(void 0,n)};var vi,Oa=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:P.pound,location:E(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(v.UNMATCHED_CLOSING_TAG,E(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&yi(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:P.literal,value:"<".concat(i,"/>"),location:E(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:P.tag,value:i,children:a,location:E(n,this.clonePosition())},err:null}:this.error(v.INVALID_TAG,E(s,this.clonePosition())))}else return this.error(v.UNCLOSED_TAG,E(n,this.clonePosition()))}else return this.error(v.INVALID_TAG,E(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&nl(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=E(n,this.clonePosition());return{val:{type:P.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!rl(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Ei.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Ei(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(v.EMPTY_ARGUMENT,E(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:E(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Si(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),a=E(t,o);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(v.EXPECT_ARGUMENT_TYPE,E(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var u=tl(d.val);if(u.length===0)return this.error(v.EXPECT_ARGUMENT_STYLE,E(this.clonePosition(),this.clonePosition()));var m=E(h,this.clonePosition());l={style:u,styleLocation:m}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var f=E(i,this.clonePosition());if(l&&Ca(l?.style,"::",0)){var T=el(l.style.slice(2));if(s==="number"){var d=this.parseNumberSkeletonFromString(T,l.styleLocation);return d.err?d:{val:{type:P.number,value:n,location:f,style:d.val},err:null}}else{if(T.length===0)return this.error(v.EXPECT_DATE_TIME_SKELETON,f);var _=T;this.locale&&(_=wa(T,this.locale));var u={type:He.dateTime,pattern:_,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?xa(_):{}},b=s==="date"?P.date:P.time;return{val:{type:b,value:n,location:f,style:u},err:null}}}return{val:{type:s==="number"?P.number:s==="date"?P.date:P.time,value:n,location:f,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,E(S,A({},S)));this.bumpSpace();var k=this.parseIdentifierIfPossible(),R=0;if(s!=="select"&&k.value==="offset"){if(!this.bumpIf(":"))return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,E(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),k=this.parseIdentifierIfPossible(),R=d.val}var U=this.tryParsePluralOrSelectOptions(t,s,r,k);if(U.err)return U;var g=this.tryParseArgumentClose(i);if(g.err)return g;var $=E(i,this.clonePosition());return s==="select"?{val:{type:P.select,value:n,options:Ia(U.val),location:$},err:null}:{val:{type:P.plural,value:n,options:Ia(U.val),offset:R,pluralType:s==="plural"?"cardinal":"ordinal",location:$},err:null}}default:return this.error(v.INVALID_ARGUMENT_TYPE,E(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,E(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Sa(t)}catch{return this.error(v.INVALID_NUMBER_SKELETON,r)}return{val:{type:He.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?_a(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,a=!1,s=[],c=new Set,l=i.value,h=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=E(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?v.DUPLICATE_SELECT_ARGUMENT_SELECTOR:v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,E(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,r,n);if(g.err)return g;var f=this.tryParseArgumentClose(m);if(f.err)return f;s.push([l,{value:g.val,location:E(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR:v.EXPECT_PLURAL_ARGUMENT_SELECTOR,E(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(v.MISSING_OTHER_CLAUSE,E(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var c=E(i,this.clonePosition());return o?(a*=n,Qc(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=ka(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ca(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ra(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function yi(e){return e>=97&&e<=122||e>=65&&e<=90}function rl(e){return yi(e)||e===47}function nl(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ra(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function il(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Ti(e){e.forEach(function(t){if(delete t.location,Rr(t)||Mr(t))for(var r in t.options)delete t.options[r].location,Ti(t.options[r].value);else kr(t)&&$r(t.style)||(Nr(t)||Or(t))&&Ft(t.style)?delete t.style.location:Vr(t)&&Ti(t.children)})}function Ma(e,t){t===void 0&&(t={}),t=A({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Oa(e,t).parse();if(r.err){var n=SyntaxError(v[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Ti(r.val),r.val}function jt(e,t){var r=t&&t.cache?t.cache:hl,n=t&&t.serializer?t.serializer:ll,i=t&&t.strategy?t.strategy:al;return i(e,{cache:r,serializer:n})}function ol(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Va(e,t,r,n){var i=ol(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function $a(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function Li(e,t,r,n,i){return r.bind(t,e,n,i)}function al(e,t){var r=e.length===1?Va:$a;return Li(e,this,r,t.cache.create(),t.serializer)}function sl(e,t){return Li(e,this,$a,t.cache.create(),t.serializer)}function cl(e,t){return Li(e,this,Va,t.cache.create(),t.serializer)}var ll=function(){return JSON.stringify(arguments)};function _i(){this.cache=Object.create(null)}_i.prototype.get=function(e){return this.cache[e]};_i.prototype.set=function(e,t){this.cache[e]=t};var hl={create:function(){return new _i}},Hr={variadic:sl,monadic:cl};var Ue;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ue||(Ue={}));var Yt=function(e){zt(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var wi=function(e){zt(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Ue.INVALID_VALUE,o)||this}return t}(Yt);var Ha=function(e){zt(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Ue.INVALID_VALUE,i)||this}return t}(Yt);var Ua=function(e){zt(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Ue.MISSING_VALUE,n)||this}return t}(Yt);var z;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(z||(z={}));function dl(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==z.literal||r.type!==z.literal?t.push(r):n.value+=r.value,t},[])}function ul(e){return typeof e=="function"}function Xt(e,t,r,n,i,o,a){if(e.length===1&&gi(e[0]))return[{type:z.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Ma,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Ba=Da;var gl=/[0-9\-+#]/,xl=/[^\d\-+#]/g;function Ga(e){return e.search(gl)}function bl(e="#.##"){let t={},r=e.length,n=Ga(e);t.prefix=n>0?e.substring(0,n):"";let i=Ga(e.split("").reverse().join("")),o=r-i,a=e.substring(o,o+1),s=o+(a==="."||a===","?1:0);t.suffix=i>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(xl);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function vl(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=i.value.split(".");return(!s||s&&s.length<=o)&&(s=o<0?"":(+("0."+s)).toFixed(o+1).replace("0.","")),i.integer=a,i.fraction=s,Al(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function Al(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.lengthe*12,Xa=(e,t)=>{let{start:r,end:n,displaySummary:{amount:i,duration:o,minProductQuantity:a,outcomeType:s}={}}=e;if(!(i&&o&&s&&a))return!1;let c=t?new Date(t):new Date;if(!r||!n)return!1;let l=new Date(r),h=new Date(n);return c>=l&&c<=h},De={MONTH:"MONTH",YEAR:"YEAR"},yl={[N.ANNUAL]:12,[N.MONTHLY]:1,[N.THREE_YEARS]:36,[N.TWO_YEARS]:24},Ii=(e,t)=>({accept:e,round:t}),Tl=[Ii(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Ii(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Ii(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],ki={[H.YEAR]:{[N.MONTHLY]:De.MONTH,[N.ANNUAL]:De.YEAR},[H.MONTH]:{[N.MONTHLY]:De.MONTH}},Ll=(e,t)=>e.indexOf(`'${t}'`)===0,_l=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=qa(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Pl(e)),r},wl=e=>{let t=Cl(e),r=Ll(e,t),n=e.replace(/'.*?'/,""),i=ja.test(n)||Ya.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Wa=e=>e.replace(ja,Ka).replace(Ya,Ka),Pl=e=>e.match(/#(.?)#/)?.[1]===Fa?Sl:Fa,Cl=e=>e.match(/'(.*?)'/)?.[1]??"",qa=e=>e.match(/0(.?)0/)?.[1]??"";function xt({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=wl(e),l=r?qa(e):"",h=_l(e,r),d=r?2:0,u=o(t,{currencySymbol:a}),m=n?u.toLocaleString("hi-IN",{minimumFractionDigits:d,maximumFractionDigits:d}):za(h,u),g=r?m.lastIndexOf(l):m.length,f=m.substring(0,g),T=m.substring(g+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,a),currencySymbol:a,decimals:T,decimalsDelimiter:l,hasCurrencySpace:c,integer:f,isCurrencyFirst:s,recurrenceTerm:i}}var Za=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=yl[r]??1;return xt(e,i>1?De.MONTH:ki[t]?.[r],o=>{let a={divisor:i,price:o,usePrecision:n},{round:s}=Tl.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},Ja=({commitment:e,term:t,...r})=>xt(r,ki[e]?.[t]),Qa=e=>{let{commitment:t,instant:r,price:n,originalPrice:i,priceWithoutDiscount:o,promotion:a,quantity:s=1,term:c}=e;if(t===H.YEAR&&c===N.MONTHLY){if(!a)return xt(e,De.YEAR,Ci);let{displaySummary:{outcomeType:l,duration:h,minProductQuantity:d=1}={}}=a;switch(l){case"PERCENTAGE_DISCOUNT":if(s>=d&&Xa(a,r)){let u=parseInt(h.replace("P","").replace("M",""));if(isNaN(u))return Ci(n);let m=s*i*u,g=s*o*(12-u),f=Math.floor((m+g)*100)/100;return xt({...e,price:f},De.YEAR)}default:return xt(e,De.YEAR,()=>Ci(o??n))}}return xt(e,ki[t]?.[c])};var Il={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},kl=da("ConsonantTemplates/price"),Nl=/<\/?[^>]+(>|$)/g,G={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},Be={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Ol="TAX_EXCLUSIVE",Rl=e=>ha(e)?Object.entries(e).filter(([,t])=>ut(t)||wr(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+ca(n)+'"'}`,""):"",K=(e,t,r,n=!1)=>`${n?Wa(t):t??""}`;function Ml(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},d={}){let u=K(G.currencySymbol,r),m=K(G.currencySpace,o?" ":""),g="";return s&&(g+=u+m),g+=K(G.integer,a),g+=K(G.decimalsDelimiter,i),g+=K(G.decimals,n),s||(g+=m+u),g+=K(G.recurrence,c,null,!0),g+=K(G.unitType,l,null,!0),g+=K(G.taxInclusivity,h,!0),K(e,g,{...d,"aria-label":t})}var W=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1,instant:n=void 0}={})=>({country:i,displayFormatted:o=!0,displayRecurrence:a=!0,displayPerUnit:s=!1,displayTax:c=!1,language:l,literals:h={},quantity:d=1}={},{commitment:u,offerSelectorIds:m,formatString:g,price:f,priceWithoutDiscount:T,taxDisplay:_,taxTerm:b,term:S,usePrecision:k,promotion:R}={},U={})=>{Object.entries({country:i,formatString:g,language:l,price:f}).forEach(([ae,qr])=>{if(qr==null)throw new Error(`Argument "${ae}" is missing for osi ${m?.toString()}, country ${i}, language ${l}`)});let $={...Il,...h},me=`${l.toLowerCase()}-${i.toUpperCase()}`;function Z(ae,qr){let Zr=$[ae];if(Zr==null)return"";try{return new Ba(Zr.replace(Nl,""),me).format(qr)}catch{return kl.error("Failed to format literal:",Zr),""}}let yt=t&&T?T:f,Ye=e?Za:Ja;r&&(Ye=Qa);let{accessiblePrice:Tt,recurrenceTerm:pe,...fe}=Ye({commitment:u,formatString:g,instant:n,isIndianPrice:i==="IN",originalPrice:f,priceWithoutDiscount:T,price:e?f:yt,promotion:R,quantity:d,term:S,usePrecision:k}),J=Tt,Lt="";if(y(a)&&pe){let ae=Z(Be.recurrenceAriaLabel,{recurrenceTerm:pe});ae&&(J+=" "+ae),Lt=Z(Be.recurrenceLabel,{recurrenceTerm:pe})}let Wr="";if(y(s)){Wr=Z(Be.perUnitLabel,{perUnit:"LICENSE"});let ae=Z(Be.perUnitAriaLabel,{perUnit:"LICENSE"});ae&&(J+=" "+ae)}let _t="";y(c)&&b&&(_t=Z(_===Ol?Be.taxExclusiveLabel:Be.taxInclusiveLabel,{taxTerm:b}),_t&&(J+=" "+_t)),t&&(J=Z(Be.strikethroughAriaLabel,{strikethroughPrice:J}));let wt=G.container;if(e&&(wt+=" "+G.containerOptical),t&&(wt+=" "+G.containerStrikethrough),r&&(wt+=" "+G.containerAnnual),y(o))return Ml(wt,{...fe,accessibleLabel:J,recurrenceLabel:Lt,perUnitLabel:Wr,taxInclusivityLabel:_t},U);let{currencySymbol:to,decimals:Is,decimalsDelimiter:ks,hasCurrencySpace:ro,integer:Ns,isCurrencyFirst:Os}=fe,Xe=[Ns,ks,Is];Os?(Xe.unshift(ro?"\xA0":""),Xe.unshift(to)):(Xe.push(ro?"\xA0":""),Xe.push(to)),Xe.push(Lt,Wr,_t);let Rs=Xe.join("");return K(wt,Rs,U)},es=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${W()(e,t,r)}${i?" "+W({displayStrikethrough:!0})(e,t,r):""}`},ts=()=>(e,t,r)=>{let{instant:n}=e;try{n||(n=new URLSearchParams(document.location.search).get("instant")),n&&(n=new Date(n))}catch{n=void 0}let i={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?W({displayStrikethrough:!0})(i,t,r)+" ":""}${W()(e,t,r)}${K(G.containerAnnualPrefix," (")}${W({displayAnnual:!0,instant:n})(i,t,r)}${K(G.containerAnnualSuffix,")")}`},rs=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${W()(e,t,r)}${K(G.containerAnnualPrefix," (")}${W({displayAnnual:!0})(n,t,r)}${K(G.containerAnnualSuffix,")")}`};var Ni=W(),Oi=es(),Ri=W({displayOptical:!0}),Mi=W({displayStrikethrough:!0}),Vi=W({displayAnnual:!0}),$i=rs(),Hi=ts();var Vl=(e,t)=>{if(!(!pt(e)||!pt(t)))return Math.floor((t-e)/t*100)},ns=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=Vl(r,n);return i===void 0?'':`${i}%`};var Ui=ns();var{freeze:Wt}=Object,re=Wt({...$e}),ne=Wt({...Q}),Ge={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},Di=Wt({...H}),Bi=Wt({...ma}),Gi=Wt({...N});var is="mas-commerce-service";function os(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(is);i!==r&&(r=i,i&&e(i))}return document.addEventListener(rt,n,{once:t}),ze(n),()=>document.removeEventListener(rt,n)}function qt(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[a,s]=e;i=[a.language===o?a:s]}return r&&(i=i.map(pi)),i}var ze=e=>window.setTimeout(e);function bt(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(gt).filter(pt);return r.length||(r=[t]),r}function Ur(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(si)}function q(){return document.getElementsByTagName(is)?.[0]}var Fe={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},as=1e3,ss=new Set;function $l(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function cs(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Fe.serializableTypes.includes(r))return r}return e}function Hl(e,t){if(!Fe.ignoredProperties.includes(e))return cs(t)}var zi={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],i=[],o=t;r.forEach(l=>{l!=null&&($l(l)?n:i).push(l)}),n.length&&(o+=" "+n.map(cs).join(" "));let{pathname:a,search:s}=window.location,c=`${Fe.delimiter}page=${a}${s}`;c.length>as&&(c=`${c.slice(0,as)}`),o+=c,i.length&&(o+=`${Fe.delimiter}facts=`,o+=JSON.stringify(i,Hl)),ss.has(o)||(ss.add(o),window.lana?.log(o,Fe))}};function vt(e){Object.assign(Fe,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Fe&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var L=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:re.V3,checkoutWorkflowStep:ne.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Ge.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:Me.PUBLISHED,wcsBufferLimit:1});var Fi=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Ul({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||L.language),t??(t=e?.split("_")?.[1]||L.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function Ki(e={}){let{commerce:t={}}=e,r=Ge.PRODUCTION,n=zn,i=O("checkoutClientId",t)??L.checkoutClientId,o=Se(O("checkoutWorkflow",t),re,L.checkoutWorkflow),a=ne.CHECKOUT;o===re.V3&&(a=Se(O("checkoutWorkflowStep",t),ne,L.checkoutWorkflowStep));let s=y(O("displayOldPrice",t),L.displayOldPrice),c=y(O("displayPerUnit",t),L.displayPerUnit),l=y(O("displayRecurrence",t),L.displayRecurrence),h=y(O("displayTax",t),L.displayTax),d=y(O("entitlement",t),L.entitlement),u=y(O("modal",t),L.modal),m=y(O("forceTaxExclusive",t),L.forceTaxExclusive),g=O("promotionCode",t)??L.promotionCode,f=bt(O("quantity",t)),T=O("wcsApiKey",t)??L.wcsApiKey,_=t?.env==="stage",b=Me.PUBLISHED;["true",""].includes(t.allowOverride)&&(_=(O(Bn,t,{metadata:!1})?.toLowerCase()??t?.env)==="stage",b=Se(O(Gn,t),Me,b)),_&&(r=Ge.STAGE,n=Fn);let k=gt(O("wcsBufferDelay",t),L.wcsBufferDelay),R=gt(O("wcsBufferLimit",t),L.wcsBufferLimit);return{...Ul(e),displayOldPrice:s,checkoutClientId:i,checkoutWorkflow:o,checkoutWorkflowStep:a,displayPerUnit:c,displayRecurrence:l,displayTax:h,entitlement:d,extraOptions:L.extraOptions,modal:u,env:r,forceTaxExclusive:m,promotionCode:g,quantity:f,wcsApiKey:T,wcsBufferDelay:k,wcsBufferLimit:R,wcsURL:n,landscape:b}}var ji={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Dl=Date.now(),Yi=new Set,Xi=new Set,ls=new Map,hs={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},ds={filter:({level:e})=>e!==ji.DEBUG},Bl={filter:()=>!1};function Gl(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Bt(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:i,timestamp:Date.now()-Dl}}function zl(e){[...Xi].every(t=>t(e))&&Yi.forEach(t=>t(e))}function us(e){let t=(ls.get(e)??0)+1;ls.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:i=>us(`${n.namespace}/${i}`),updateConfig:vt};return Object.values(ji).forEach(i=>{n[i]=(o,...a)=>zl(Gl(i,o,e,a,r))}),Object.seal(n)}function Dr(...e){e.forEach(t=>{let{append:r,filter:n}=t;Bt(n)&&Xi.add(n),Bt(r)&&Yi.add(r)})}function Fl(e={}){let{name:t}=e,r=y(O("commerce.debug",{search:!0,storage:!0}),t===Fi.LOCAL);return Dr(r?hs:ds),t===Fi.PROD&&Dr(zi),Y}function Kl(){Yi.clear(),Xi.clear()}var Y={...us(Dn),Level:ji,Plugins:{consoleAppender:hs,debugFilter:ds,quietFilter:Bl,lanaAppender:zi},init:Fl,reset:Kl,use:Dr};var jl={[ce]:Rn,[Ee]:Mn,[le]:Vn},Yl={[ce]:Hn,[le]:Un},At=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",mt);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",Ee);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[ce,Ee,le].forEach(t=>{this.wrapperElement.classList.toggle(jl[t],t===this.state)})}notify(){(this.state===le||this.state===ce)&&(this.state===le?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===ce&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(Yl[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=os(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=mt}onceSettled(){let{error:t,promises:r,state:n}=this;return le===n?Promise.resolve(this.wrapperElement):ce===n?Promise.reject(t):new Promise((i,o)=>{r.push({resolve:i,reject:o})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=le,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),ze(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=ce,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),ze(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Ee,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!q()||this.timer)return;let r=Y.module("mas-element"),{error:n,options:i,state:o,value:a,version:s}=this;this.state=Ee,this.timer=ze(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Ee&&this.version===s&&(this.state=o,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,i)}})}};function ms(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function Br(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,ms(t)),i}function Gr(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,ms(t)),e):null}var Xl="download",Wl="upgrade";function zr(e,t={},r=""){let n=q();if(!n)return null;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m,extraOptions:g}=n.collectCheckoutOptions(t),f=Br(e,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m,extraOptions:g});return r&&(f.innerHTML=`${r}`),f}function Fr(e){return class extends e{constructor(){super(...arguments);p(this,"checkoutActionHandler");p(this,"masElement",new At(this))}attributeChangedCallback(n,i,o){this.masElement.attributeChangedCallback(n,i,o)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let i=q();if(!i)return!1;this.dataset.imsCountry||i.imsCountryPromise.then(d=>{d&&(this.dataset.imsCountry=d)},mt),n.imsCountry=null;let o=i.collectCheckoutOptions(n,this);if(!o.wcsOsi.length)return!1;let a;try{a=JSON.parse(o.extraOptions??"{}")}catch(d){this.masElement.log?.error("cannot parse exta checkout options",d)}let s=this.masElement.togglePending(o);this.setCheckoutUrl("");let c=i.resolveOfferSelectors(o),l=await Promise.all(c);l=l.map(d=>qt(d,o)),o.country=this.dataset.imsCountry||o.country;let h=await i.buildCheckoutAction?.(l.flat(),{...a,...o},this);return this.renderOffers(l.flat(),o,{},h,s)}renderOffers(n,i,o={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=q();if(!c)return!1;if(i={...JSON.parse(this.dataset.extraOptions??"null"),...i,...o},s??(s=this.masElement.togglePending(i)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(Xl,Wl),this.masElement.toggleResolved(s,n,i);let{url:h,text:d,className:u,handler:m}=a;return h&&this.setCheckoutUrl(h),d&&(this.firstElementChild.innerHTML=d),u&&this.classList.add(...u.split(" ")),m&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=m.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,i)){let h=c.buildCheckoutURL(n,i);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${i?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,i))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let i=q();if(!i)return!1;let{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:g}=i.collectCheckoutOptions(n);return Gr(this,{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:g}),!0}}}var Zt=class Zt extends Fr(HTMLButtonElement){static createCheckoutButton(t={},r=""){return zr(Zt,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};p(Zt,"is","checkout-button"),p(Zt,"tag","button");var Ke=Zt;window.customElements.get(Ke.is)||window.customElements.define(Ke.is,Ke,{extends:Ke.tag});var ql="#000000",Zl="#F8D904",Jl=/(accent|primary|secondary)(-(outline|link))?/,Ql="mas:product_code/",eh="daa-ll",Kr="daa-lh",th=["XL","L","M","S"];function rh(e,t,r){e.mnemonicIcon?.map((i,o)=>({icon:i,alt:e.mnemonicAlt[o]??"",link:e.mnemonicLink[o]??""}))?.forEach(({icon:i,alt:o,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:i,loading:t.loading,size:r?.size??"l"};o&&(s.alt=o),a&&(s.href=a);let c=te("merch-icon",s);t.append(c)})}function nh(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||ql),t.setAttribute("badge-background-color",e.badgeBackgroundColor||Zl))}function ih(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function oh(e,t,r){e.cardTitle&&r&&t.append(te(r.tag,{slot:r.slot},e.cardTitle))}function ah(e,t,r){e.subtitle&&r&&t.append(te(r.tag,{slot:r.slot},e.subtitle))}function sh(e,t,r){if(e.backgroundImage){let n={loading:t.loading??"lazy",src:e.backgroundImage};if(e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",!r)return;if(r?.attribute){t.setAttribute(r.attribute,e.backgroundImage);return}t.append(te(r.tag,{slot:r.slot},te("img",n)))}}function ch(e,t,r){if(e.prices&&r){let n=te(r.tag,{slot:r.slot},e.prices);t.append(n)}}function lh(e,t,r){if(e.description&&r){let n=te(r.tag,{slot:r.slot},e.description);t.append(n)}}function hh(e,t,r,n){let o=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);o.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||o.setAttribute(h.name,h.value);o.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=th.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),o.classList.add(...l),o}function dh(e,t,r,n){let i="fill";r&&(i="outline");let o=te("sp-button",{treatment:i,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return o.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),o}function uh(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function mh(e,t,r,n){if(e.ctas){let{slot:i}=r.ctas,o=te("div",{slot:i},e.ctas),a=[...o.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return uh(s,c);let l=Jl.exec(s.className)?.[0]??"accent",h=l.includes("accent"),d=l.includes("primary"),u=l.includes("secondary"),m=l.includes("-outline");if(l.includes("-link"))return s;let f;return h||c?f="accent":d?f="primary":u&&(f="secondary"),t.spectrum==="swc"?dh(s,r,m,f):hh(s,r,m,f)});o.innerHTML="",o.append(...a),t.append(o)}}function ph(e,t){let{tags:r}=e,n=r?.find(i=>i.startsWith(Ql))?.split("/").pop();n&&(t.setAttribute(Kr,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((i,o)=>{i.setAttribute(eh,`${i.dataset.analyticsId}-${o+1}`)}))}function fh(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function ps(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.querySelectorAll("[slot]").forEach(o=>{o.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(Kr),t.variant=n,await t.updateComplete;let{aemFragmentMapping:i}=t.variantLayout;i&&(rh(r,t,i.mnemonics),nh(r,t),ih(r,t,i.size),oh(r,t,i.title),ah(r,t,i.subtitle),ch(r,t,i.prices),sh(r,t,i.backgroundImage),lh(r,t,i.description),mh(r,t,i,n),ph(r,t),fh(t))}var gh="merch-card",xh=":start",bh=":ready",vh=1e4,fs="merch-card:",Qt,Wi,Jt=class extends ee{constructor(){super();F(this,Qt);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}static getFragmentMapping(r){return ta[r]}firstUpdated(){this.variantLayout=qn(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=qn(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let i of n){await i.onceSettled();let o=i.value?.[0]?.planType;if(!o)return;let a=this.stockOfferOsis[o];if(!a)return;let s=i.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),i.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let i of n)i.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(i=>{if(r){n[i].order=Math.min(n[i].order||2,2);return}let o=n[i].order;o===1||isNaN(o)||(n[i].order=Number(o)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${fs}${r}${xh}`),this.addEventListener(Ar,this.handleQuantitySelection),this.addEventListener(Cn,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Re,this.handleAemFragmentEvents),this.addEventListener(Oe,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(Ar,this.handleQuantitySelection),this.storageOptions?.removeEventListener(vr,this.handleStorageChange),this.removeEventListener(Re,this.handleAemFragmentEvents),this.removeEventListener(Oe,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Re&&ge(this,Qt,Wi).call(this,"AEM fragment cannot be loaded"),r.type===Oe&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await ps(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(o=>setTimeout(()=>o(!1),vh));if(await Promise.race([r,n])===!0){performance.mark(`${fs}${this.id}${bh}`),this.dispatchEvent(new CustomEvent(Nn,{bubbles:!0,composed:!0}));return}ge(this,Qt,Wi).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let r=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll('a[is="checkout-link"].con-button')).length===2&&r&&r.parentElement.classList.add("footer-column")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||(this.dispatchEvent(new CustomEvent(In,{bubbles:!0})),this.displayFooterElementsInColumn())}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(vr,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let i=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(i)}):n.replaceWith(i)}}};Qt=new WeakSet,Wi=function(r){this.dispatchEvent(new CustomEvent(On,{detail:r,bubbles:!0,composed:!0}))},p(Jt,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,i,o]=r.split(",");return{PUF:n,ABM:i,M2M:o}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[i,o,a]=n.split(":"),s=Number(o);return[i,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:i,size:o}])=>[n,i,o].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:Kr,reflect:!0},loading:{type:String}}),p(Jt,"styles",[Bo,ra(),...Go()]);customElements.define(gh,Jt);var Et=class extends ee{constructor(){super(),this.size="m",this.alt="",this.loading="lazy"}render(){let{href:t}=this;return t?x` diff --git a/libs/deps/mas/merch-card.js b/libs/deps/mas/merch-card.js index 4216ad432c..9283a5acd3 100644 --- a/libs/deps/mas/merch-card.js +++ b/libs/deps/mas/merch-card.js @@ -2119,6 +2119,18 @@ body.merch-modal { height: 100vh; } +merch-sidenav-checkbox-group h3 { + font-size: 14px; + font-style: normal; + font-weight: 700; + height: 32px; + letter-spacing: 0px; + padding: 0px; + line-height: 18.2px; + color: var(--color-gray-600); + margin: 0px; +} + `;document.head.appendChild(jr);var Ee;(function(e){e.V2="UCv2",e.V3="UCv3"})(Ee||(Ee={}));var we;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(we||(we={}));var _t;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(_t||(_t={}));var P;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(P||(P={}));var _;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(_||(_={}));var Lt;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Lt||(Lt={}));var Ct;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Ct||(Ct={}));var Pt;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(Pt||(Pt={}));var Nt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Nt||(Nt={}));var Yr="tacocat.js";var Wr=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function ue(e,t={},{metadata:r=!0,search:n=!0,storage:o=!0}={}){let i;if(n&&i==null){let a=new URLSearchParams(window.location.search),s=Se(n)?n:e;i=a.get(s)}if(o&&i==null){let a=Se(o)?o:e;i=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&i==null){let a=Do(Se(r)?r:e);i=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return i??t[e]}var pe=()=>{};var qr=e=>typeof e=="boolean",Ae=e=>typeof e=="function",Rt=e=>typeof e=="number",Xr=e=>e!=null&&typeof e=="object";var Se=e=>typeof e=="string";var Te=e=>Rt(e)&&Number.isFinite(e)&&e>0;function O(e,t){if(qr(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Do(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}var Uo=Date.now(),Ot=()=>`(+${Date.now()-Uo}ms)`,Ye=new Set,Go=O(ue("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function Kr(e){let t=`[${Yr}/${e}]`,r=(a,s,...c)=>a?!0:(o(s,...c),!1),n=Go?(a,...s)=>{console.debug(`${t} ${a}`,...s,Ot())}:()=>{},o=(a,...s)=>{let c=`${t} ${a}`;Ye.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:o,warn:(a,...s)=>{let c=`${t} ${a}`;Ye.forEach(([,l])=>l(c,...s))}}}function zo(e,t){let r=[e,t];return Ye.add(r),()=>{Ye.delete(r)}}zo((e,...t)=>{console.error(e,...t,Ot())},(e,...t)=>{console.warn(e,...t,Ot())});var Zr="ABM",Qr="PUF",Jr="M2M",en="PERPETUAL",tn="P3Y",Fo="TAX_INCLUSIVE_DETAILS",$o="TAX_EXCLUSIVE",rn={ABM:Zr,PUF:Qr,M2M:Jr,PERPETUAL:en,P3Y:tn},sh={[Zr]:{commitment:P.YEAR,term:_.MONTHLY},[Qr]:{commitment:P.YEAR,term:_.ANNUAL},[Jr]:{commitment:P.MONTH,term:_.MONTHLY},[en]:{commitment:P.PERPETUAL,term:void 0},[tn]:{commitment:P.THREE_MONTHS,term:_.P3Y}};function Ht(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:o,priceWithoutDiscountAndTax:i,taxDisplay:a}=t;if(a!==Fo)return e;let s={...e,priceDetails:{...t,price:o??r,priceWithoutDiscount:i??n,taxDisplay:$o}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var Mt=function(e,t){return Mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Mt(e,t)};function _e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Mt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var v=function(){return v=Object.assign||function(t){for(var r,n=1,o=arguments.length;n0}),r=[],n=0,o=t;n1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(Yo,function(c,l,h,f,u,g){if(l)t.minimumIntegerDigits=h.length;else{if(f&&u)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(un.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(cn.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(cn,function(c,l,h,f,u,g){return h==="*"?t.minimumFractionDigits=l.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:u&&g?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+g.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?t=v(v({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=v(v({},t),ln(i)));continue}if(dn.test(o.stem)){t=v(v({},t),ln(o.stem));continue}var a=pn(o.stem);a&&(t=v(v({},t),a));var s=Wo(o.stem);s&&(t=v(v({},t),s))}return t}var Ce={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function gn(e,t){for(var r="",n=0;n>1),c="a",l=qo(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else o==="J"?r+="H":r+=o}return r}function qo(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var o=Ce[n||""]||Ce[r||""]||Ce["".concat(r,"-001")]||Ce["001"];return o[0]}var Bt,Xo=new RegExp("^".concat(kt.source,"*")),Ko=new RegExp("".concat(kt.source,"*$"));function y(e,t){return{start:e,end:t}}var Zo=!!String.prototype.startsWith,Qo=!!String.fromCodePoint,Jo=!!Object.fromEntries,ei=!!String.prototype.codePointAt,ti=!!String.prototype.trimStart,ri=!!String.prototype.trimEnd,ni=!!Number.isSafeInteger,oi=ni?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ut=!0;try{xn=En("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ut=((Bt=xn.exec("a"))===null||Bt===void 0?void 0:Bt[0])==="a"}catch{Ut=!1}var xn,bn=Zo?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Gt=Qo?String.fromCodePoint:function(){for(var t=[],r=0;ri;){if(a=t[i++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},vn=Jo?Object.fromEntries:function(t){for(var r={},n=0,o=t;n=n)){var o=t.charCodeAt(r),i;return o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},ii=ti?function(t){return t.trimStart()}:function(t){return t.replace(Xo,"")},ai=ri?function(t){return t.trimEnd()}:function(t){return t.replace(Ko,"")};function En(e,t){return new RegExp(e,t)}var zt;Ut?(Dt=En("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),zt=function(t,r){var n;Dt.lastIndex=r;var o=Dt.exec(t);return(n=o[1])!==null&&n!==void 0?n:""}):zt=function(t,r){for(var n=[];;){var o=yn(t,r);if(o===void 0||Sn(o)||li(o))break;n.push(o),r+=o>=65536?2:1}return Gt.apply(void 0,n)};var Dt,wn=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(t,n);if(a.err)return a;o.push(a.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),o.push({type:w.pound,location:y(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(x.UNMATCHED_CLOSING_TAG,y(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Ft(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;o.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;o.push(a.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:w.literal,value:"<".concat(o,"/>"),location:y(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:w.tag,value:o,children:a,location:y(n,this.clonePosition())},err:null}:this.error(x.INVALID_TAG,y(s,this.clonePosition())))}else return this.error(x.UNCLOSED_TAG,y(n,this.clonePosition()))}else return this.error(x.INVALID_TAG,y(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ci(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var a=this.tryParseUnquoted(t,r);if(a){o+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){o+=s;continue}break}var c=y(n,this.clonePosition());return{val:{type:w.literal,value:o,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!si(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Gt.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Gt(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(x.EMPTY_ARGUMENT,y(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(x.MALFORMED_ARGUMENT,y(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:w.argument,value:o,location:y(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition())):this.parseArgumentOptions(t,r,o,n);default:return this.error(x.MALFORMED_ARGUMENT,y(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=zt(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),a=y(t,i);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,o){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(x.EXPECT_ARGUMENT_TYPE,y(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var u=ai(f.val);if(u.length===0)return this.error(x.EXPECT_ARGUMENT_STYLE,y(this.clonePosition(),this.clonePosition()));var g=y(h,this.clonePosition());l={style:u,styleLocation:g}}var b=this.tryParseArgumentClose(o);if(b.err)return b;var E=y(o,this.clonePosition());if(l&&bn(l?.style,"::",0)){var R=ii(l.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(R,l.styleLocation);return f.err?f:{val:{type:w.number,value:n,location:E,style:f.val},err:null}}else{if(R.length===0)return this.error(x.EXPECT_DATE_TIME_SKELETON,E);var G=R;this.locale&&(G=gn(R,this.locale));var u={type:q.dateTime,pattern:G,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?an(G):{}},B=s==="date"?w.date:w.time;return{val:{type:B,value:n,location:E,style:u},err:null}}}return{val:{type:s==="number"?w.number:s==="date"?w.date:w.time,value:n,location:E,style:(i=l?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS,y(H,v({},H)));this.bumpSpace();var V=this.parseIdentifierIfPossible(),D=0;if(s!=="select"&&V.value==="offset"){if(!this.bumpIf(":"))return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,y(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),V=this.parseIdentifierIfPossible(),D=f.val}var j=this.tryParsePluralOrSelectOptions(t,s,r,V);if(j.err)return j;var b=this.tryParseArgumentClose(o);if(b.err)return b;var ke=y(o,this.clonePosition());return s==="select"?{val:{type:w.select,value:n,options:vn(j.val),location:ke},err:null}:{val:{type:w.plural,value:n,options:vn(j.val),offset:D,pluralType:s==="plural"?"cardinal":"ordinal",location:ke},err:null}}default:return this.error(x.INVALID_ARGUMENT_TYPE,y(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(x.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,y(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=mn(t)}catch{return this.error(x.INVALID_NUMBER_SKELETON,r)}return{val:{type:q.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?fn(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,o){for(var i,a=!1,s=[],c=new Set,l=o.value,h=o.location;;){if(l.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR,x.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=y(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?x.DUPLICATE_SELECT_ARGUMENT_SELECTOR:x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:x.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,y(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,r,n);if(b.err)return b;var E=this.tryParseArgumentClose(g);if(E.err)return E;s.push([l,{value:b.val,location:y(g,this.clonePosition())}]),c.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,h=i.location}return s.length===0?this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR:x.EXPECT_PLURAL_ARGUMENT_SELECTOR,y(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(x.MISSING_OTHER_CLAUSE,y(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var c=y(o,this.clonePosition());return i?(a*=n,oi(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=yn(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(bn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Sn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Ft(e){return e>=97&&e<=122||e>=65&&e<=90}function si(e){return Ft(e)||e===47}function ci(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Sn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function li(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function $t(e){e.forEach(function(t){if(delete t.location,Ze(t)||Qe(t))for(var r in t.options)delete t.options[r].location,$t(t.options[r].value);else qe(t)&&et(t.style)||(Xe(t)||Ke(t))&&Le(t.style)?delete t.style.location:Je(t)&&$t(t.children)})}function An(e,t){t===void 0&&(t={}),t=v({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new wn(e,t).parse();if(r.err){var n=SyntaxError(x[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||$t(r.val),r.val}function Pe(e,t){var r=t&&t.cache?t.cache:fi,n=t&&t.serializer?t.serializer:pi,o=t&&t.strategy?t.strategy:mi;return o(e,{cache:r,serializer:n})}function hi(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Tn(e,t,r,n){var o=hi(n)?n:r(n),i=t.get(o);return typeof i>"u"&&(i=e.call(this,n),t.set(o,i)),i}function _n(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,n),t.set(o,i)),i}function Vt(e,t,r,n,o){return r.bind(t,e,n,o)}function mi(e,t){var r=e.length===1?Tn:_n;return Vt(e,this,r,t.cache.create(),t.serializer)}function di(e,t){return Vt(e,this,_n,t.cache.create(),t.serializer)}function ui(e,t){return Vt(e,this,Tn,t.cache.create(),t.serializer)}var pi=function(){return JSON.stringify(arguments)};function jt(){this.cache=Object.create(null)}jt.prototype.get=function(e){return this.cache[e]};jt.prototype.set=function(e,t){this.cache[e]=t};var fi={create:function(){return new jt}},tt={variadic:di,monadic:ui};var X;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(X||(X={}));var Ne=function(e){_e(t,e);function t(r,n,o){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Yt=function(e){_e(t,e);function t(r,n,o,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),X.INVALID_VALUE,i)||this}return t}(Ne);var Ln=function(e){_e(t,e);function t(r,n,o){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),X.INVALID_VALUE,o)||this}return t}(Ne);var Cn=function(e){_e(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),X.MISSING_VALUE,n)||this}return t}(Ne);var C;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(C||(C={}));function gi(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==C.literal||r.type!==C.literal?t.push(r):n.value+=r.value,t},[])}function xi(e){return typeof e=="function"}function Re(e,t,r,n,o,i,a){if(e.length===1&&It(e[0]))return[{type:C.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=An,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Nn=Pn;var Ei=/[0-9\-+#]/,wi=/[^\d\-+#]/g;function Rn(e){return e.search(Ei)}function Si(e="#.##"){let t={},r=e.length,n=Rn(e);t.prefix=n>0?e.substring(0,n):"";let o=Rn(e.split("").reverse().join("")),i=r-o,a=e.substring(i,i+1),s=i+(a==="."||a===","?1:0);t.suffix=o>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(wi);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function Ai(e,t,r){let n=!1,o={value:e};e<0&&(n=!0,o.value=-o.value),o.sign=n?"-":"",o.value=Number(o.value).toFixed(t.fraction&&t.fraction.length),o.value=Number(o.value).toString();let i=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=o.value.split(".");return(!s||s&&s.length<=i)&&(s=i<0?"":(+("0."+s)).toFixed(i+1).replace("0.","")),o.integer=a,o.fraction=s,Ti(o,t),(o.result==="0"||o.result==="")&&(n=!1,o.sign=""),!n&&t.maskHasPositiveSign?o.sign="+":n&&t.maskHasPositiveSign?o.sign="-":n&&(o.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),o}function Ti(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),o=n&&n.indexOf("0");if(o>-1)for(;e.integer.lengthe*12,Bn=(e,t)=>{let{start:r,end:n,displaySummary:{amount:o,duration:i,minProductQuantity:a,outcomeType:s}={}}=e;if(!(o&&i&&s&&a))return!1;let c=t?new Date(t):new Date;if(!r||!n)return!1;let l=new Date(r),h=new Date(n);return c>=l&&c<=h},K={MONTH:"MONTH",YEAR:"YEAR"},Ci={[_.ANNUAL]:12,[_.MONTHLY]:1,[_.THREE_YEARS]:36,[_.TWO_YEARS]:24},Xt=(e,t)=>({accept:e,round:t}),Pi=[Xt(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Xt(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Xt(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Kt={[P.YEAR]:{[_.MONTHLY]:K.MONTH,[_.ANNUAL]:K.YEAR},[P.MONTH]:{[_.MONTHLY]:K.MONTH}},Ni=(e,t)=>e.indexOf(`'${t}'`)===0,Ri=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Un(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Hi(e)),r},Oi=e=>{let t=Mi(e),r=Ni(e,t),n=e.replace(/'.*?'/,""),o=In.test(n)||kn.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:o}},Dn=e=>e.replace(In,Mn).replace(kn,Mn),Hi=e=>e.match(/#(.?)#/)?.[1]===Hn?Li:Hn,Mi=e=>e.match(/'(.*?)'/)?.[1]??"",Un=e=>e.match(/0(.?)0/)?.[1]??"";function fe({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},o,i=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=Oi(e),l=r?Un(e):"",h=Ri(e,r),f=r?2:0,u=i(t,{currencySymbol:a}),g=n?u.toLocaleString("hi-IN",{minimumFractionDigits:f,maximumFractionDigits:f}):On(h,u),b=r?g.lastIndexOf(l):g.length,E=g.substring(0,b),R=g.substring(b+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,g).replace(/SYMBOL/,a),currencySymbol:a,decimals:R,decimalsDelimiter:l,hasCurrencySpace:c,integer:E,isCurrencyFirst:s,recurrenceTerm:o}}var Gn=e=>{let{commitment:t,term:r,usePrecision:n}=e,o=Ci[r]??1;return fe(e,o>1?K.MONTH:Kt[t]?.[r],i=>{let a={divisor:o,price:i,usePrecision:n},{round:s}=Pi.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},zn=({commitment:e,term:t,...r})=>fe(r,Kt[e]?.[t]),Fn=e=>{let{commitment:t,instant:r,price:n,originalPrice:o,priceWithoutDiscount:i,promotion:a,quantity:s=1,term:c}=e;if(t===P.YEAR&&c===_.MONTHLY){if(!a)return fe(e,K.YEAR,qt);let{displaySummary:{outcomeType:l,duration:h,minProductQuantity:f=1}={}}=a;switch(l){case"PERCENTAGE_DISCOUNT":if(s>=f&&Bn(a,r)){let u=parseInt(h.replace("P","").replace("M",""));if(isNaN(u))return qt(n);let g=s*o*u,b=s*i*(12-u),E=Math.floor((g+b)*100)/100;return fe({...e,price:E},K.YEAR)}default:return fe(e,K.YEAR,()=>qt(i??n))}}return fe(e,Kt[t]?.[c])};var Ii={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},ki=Kr("ConsonantTemplates/price"),Bi=/<\/?[^>]+(>|$)/g,L={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},Z={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Di="TAX_EXCLUSIVE",Ui=e=>Xr(e)?Object.entries(e).filter(([,t])=>Se(t)||Rt(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Wr(n)+'"'}`,""):"",N=(e,t,r,n=!1)=>`${n?Dn(t):t??""}`;function Gi(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:o,hasCurrencySpace:i,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},f={}){let u=N(L.currencySymbol,r),g=N(L.currencySpace,i?" ":""),b="";return s&&(b+=u+g),b+=N(L.integer,a),b+=N(L.decimalsDelimiter,o),b+=N(L.decimals,n),s||(b+=g+u),b+=N(L.recurrence,c,null,!0),b+=N(L.unitType,l,null,!0),b+=N(L.taxInclusivity,h,!0),N(e,b,{...f,"aria-label":t})}var I=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1,instant:n=void 0}={})=>({country:o,displayFormatted:i=!0,displayRecurrence:a=!0,displayPerUnit:s=!1,displayTax:c=!1,language:l,literals:h={},quantity:f=1}={},{commitment:u,offerSelectorIds:g,formatString:b,price:E,priceWithoutDiscount:R,taxDisplay:G,taxTerm:B,term:H,usePrecision:V,promotion:D}={},j={})=>{Object.entries({country:o,formatString:b,language:l,price:E}).forEach(([U,ct])=>{if(ct==null)throw new Error(`Argument "${U}" is missing for osi ${g?.toString()}, country ${o}, language ${l}`)});let ke={...Ii,...h},uo=`${l.toLowerCase()}-${o.toUpperCase()}`;function ee(U,ct){let lt=ke[U];if(lt==null)return"";try{return new Nn(lt.replace(Bi,""),uo).format(ct)}catch{return ki.error("Failed to format literal:",lt),""}}let po=t&&R?R:E,sr=e?Gn:zn;r&&(sr=Fn);let{accessiblePrice:fo,recurrenceTerm:it,...cr}=sr({commitment:u,formatString:b,instant:n,isIndianPrice:o==="IN",originalPrice:E,priceWithoutDiscount:R,price:e?E:po,promotion:D,quantity:f,term:H,usePrecision:V}),te=fo,at="";if(O(a)&&it){let U=ee(Z.recurrenceAriaLabel,{recurrenceTerm:it});U&&(te+=" "+U),at=ee(Z.recurrenceLabel,{recurrenceTerm:it})}let st="";if(O(s)){st=ee(Z.perUnitLabel,{perUnit:"LICENSE"});let U=ee(Z.perUnitAriaLabel,{perUnit:"LICENSE"});U&&(te+=" "+U)}let xe="";O(c)&&B&&(xe=ee(G===Di?Z.taxExclusiveLabel:Z.taxInclusiveLabel,{taxTerm:B}),xe&&(te+=" "+xe)),t&&(te=ee(Z.strikethroughAriaLabel,{strikethroughPrice:te}));let be=L.container;if(e&&(be+=" "+L.containerOptical),t&&(be+=" "+L.containerStrikethrough),r&&(be+=" "+L.containerAnnual),O(i))return Gi(be,{...cr,accessibleLabel:te,recurrenceLabel:at,perUnitLabel:st,taxInclusivityLabel:xe},j);let{currencySymbol:lr,decimals:go,decimalsDelimiter:xo,hasCurrencySpace:hr,integer:bo,isCurrencyFirst:vo}=cr,re=[bo,xo,go];vo?(re.unshift(hr?"\xA0":""),re.unshift(lr)):(re.push(hr?"\xA0":""),re.push(lr)),re.push(at,st,xe);let yo=re.join("");return N(be,yo,j)},$n=()=>(e,t,r)=>{let o=(e.displayOldPrice===void 0||O(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${I()(e,t,r)}${o?" "+I({displayStrikethrough:!0})(e,t,r):""}`},Vn=()=>(e,t,r)=>{let{instant:n}=e;try{n||(n=new URLSearchParams(document.location.search).get("instant")),n&&(n=new Date(n))}catch{n=void 0}let o={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||O(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?I({displayStrikethrough:!0})(o,t,r)+" ":""}${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0,instant:n})(o,t,r)}${N(L.containerAnnualSuffix,")")}`},jn=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0})(n,t,r)}${N(L.containerAnnualSuffix,")")}`};var zi=I(),Fi=$n(),$i=I({displayOptical:!0}),Vi=I({displayStrikethrough:!0}),ji=I({displayAnnual:!0}),Yi=jn(),Wi=Vn();var qi=(e,t)=>{if(!(!Te(e)||!Te(t)))return Math.floor((t-e)/t*100)},Yn=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,o=qi(r,n);return o===void 0?'':`${o}%`};var Xi=Yn();var{freeze:Oe}=Object,Zt=Oe({...Ee}),Qt=Oe({...we}),Jt={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},vd=Oe({...P}),yd=Oe({...rn}),Ed=Oe({..._});var qn="mas-commerce-service";function Xn(e,{once:t=!1}={}){let r=null;function n(){let o=document.querySelector(qn);o!==r&&(r=o,o&&e(o))}return document.addEventListener(ut,n,{once:t}),He(n),()=>document.removeEventListener(ut,n)}function Kn(e,{country:t,forceTaxExclusive:r,perpetual:n}){let o;if(e.length<2)o=e;else{let i=t==="GB"||n?"EN":"MULT",[a,s]=e;o=[a.language===i?a:s]}return r&&(o=o.map(Ht)),o}var He=e=>window.setTimeout(e);function Q(){return document.getElementsByTagName(qn)?.[0]}var J={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},Zn=1e3,Qn=new Set;function Qi(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function Jn(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:o,status:i}=e;return[n,i,o].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!J.serializableTypes.includes(r))return r}return e}function Ji(e,t){if(!J.ignoredProperties.includes(e))return Jn(t)}var er={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],o=[],i=t;r.forEach(l=>{l!=null&&(Qi(l)?n:o).push(l)}),n.length&&(i+=" "+n.map(Jn).join(" "));let{pathname:a,search:s}=window.location,c=`${J.delimiter}page=${a}${s}`;c.length>Zn&&(c=`${c.slice(0,Zn)}`),i+=c,o.length&&(i+=`${J.delimiter}facts=`,i+=JSON.stringify(o,Ji)),Qn.has(i)||(Qn.add(i),window.lana?.log(i,J))}};function eo(e){Object.assign(J,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in J&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var ea=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:Zt.V3,checkoutWorkflowStep:Qt.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Jt.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:gt.PUBLISHED,wcsBufferLimit:1});var tr=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});var rr={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},ta=Date.now(),nr=new Set,or=new Set,to=new Map,ro={append({level:e,message:t,params:r,timestamp:n,source:o}){console[e](`${n}ms [${o}] %c${t}`,"font-weight: bold;",...r)}},no={filter:({level:e})=>e!==rr.DEBUG},ra={filter:()=>!1};function na(e,t,r,n,o){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Ae(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:o,timestamp:Date.now()-ta}}function oa(e){[...or].every(t=>t(e))&&nr.forEach(t=>t(e))}function oo(e){let t=(to.get(e)??0)+1;to.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:o=>oo(`${n.namespace}/${o}`),updateConfig:eo};return Object.values(rr).forEach(o=>{n[o]=(i,...a)=>oa(na(o,i,e,a,r))}),Object.seal(n)}function rt(...e){e.forEach(t=>{let{append:r,filter:n}=t;Ae(n)&&or.add(n),Ae(r)&&nr.add(r)})}function ia(e={}){let{name:t}=e,r=O(ue("commerce.debug",{search:!0,storage:!0}),t===tr.LOCAL);return rt(r?ro:no),t===tr.PROD&&rt(er),ir}function aa(){nr.clear(),or.clear()}var ir={...oo(Pr),Level:rr,Plugins:{consoleAppender:ro,debugFilter:no,quietFilter:ra,lanaAppender:er},init:ia,reset:aa,use:rt};var sa={[F]:Ar,[Y]:Tr,[$]:_r},ca={[F]:Lr,[$]:Cr},nt=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",pe);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",Y);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[F,Y,$].forEach(t=>{this.wrapperElement.classList.toggle(sa[t],t===this.state)})}notify(){(this.state===$||this.state===F)&&(this.state===$?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===F&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(ca[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=Xn(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=pe}onceSettled(){let{error:t,promises:r,state:n}=this;return $===n?Promise.resolve(this.wrapperElement):F===n?Promise.reject(t):new Promise((o,i)=>{r.push({resolve:o,reject:i})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=$,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),He(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=F,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),He(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Y,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!Q()||this.timer)return;let r=ir.module("mas-element"),{error:n,options:o,state:i,value:a,version:s}=this;this.state=Y,this.timer=He(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Y&&this.version===s&&(this.state=i,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,o)}})}};function io(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function ao(e,t={}){let{tag:r,is:n}=e,o=document.createElement(r,{is:n});return o.setAttribute("is",n),Object.assign(o.dataset,io(t)),o}function so(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,io(t)),e):null}var la="download",ha="upgrade";function co(e,t={},r=""){let n=Q();if(!n)return null;let{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:f,quantity:u,wcsOsi:g,extraOptions:b}=n.collectCheckoutOptions(t),E=ao(e,{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:f,quantity:u,wcsOsi:g,extraOptions:b});return r&&(E.innerHTML=`${r}`),E}function lo(e){return class extends e{constructor(){super(...arguments);p(this,"checkoutActionHandler");p(this,"masElement",new nt(this))}attributeChangedCallback(n,o,i){this.masElement.attributeChangedCallback(n,o,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let o=Q();if(!o)return!1;this.dataset.imsCountry||o.imsCountryPromise.then(f=>{f&&(this.dataset.imsCountry=f)},pe),n.imsCountry=null;let i=o.collectCheckoutOptions(n,this);if(!i.wcsOsi.length)return!1;let a;try{a=JSON.parse(i.extraOptions??"{}")}catch(f){this.masElement.log?.error("cannot parse exta checkout options",f)}let s=this.masElement.togglePending(i);this.setCheckoutUrl("");let c=o.resolveOfferSelectors(i),l=await Promise.all(c);l=l.map(f=>Kn(f,i)),i.country=this.dataset.imsCountry||i.country;let h=await o.buildCheckoutAction?.(l.flat(),{...a,...i},this);return this.renderOffers(l.flat(),i,{},h,s)}renderOffers(n,o,i={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=Q();if(!c)return!1;if(o={...JSON.parse(this.dataset.extraOptions??"null"),...o,...i},s??(s=this.masElement.togglePending(o)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(la,ha),this.masElement.toggleResolved(s,n,o);let{url:h,text:f,className:u,handler:g}=a;return h&&this.setCheckoutUrl(h),f&&(this.firstElementChild.innerHTML=f),u&&this.classList.add(...u.split(" ")),g&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=g.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,o)){let h=c.buildCheckoutURL(n,o);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,o))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let o=Q();if(!o)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:f,promotionCode:u,quantity:g,wcsOsi:b}=o.collectCheckoutOptions(n);return so(this,{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:f,promotionCode:u,quantity:g,wcsOsi:b}),!0}}}var Me=class Me extends lo(HTMLButtonElement){static createCheckoutButton(t={},r=""){return co(Me,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};p(Me,"is","checkout-button"),p(Me,"tag","button");var ge=Me;window.customElements.get(ge.is)||window.customElements.define(ge.is,ge,{extends:ge.tag});var ma="#000000",da="#F8D904",ua=/(accent|primary|secondary)(-(outline|link))?/,pa="mas:product_code/",fa="daa-ll",ot="daa-lh",ga=["XL","L","M","S"];function xa(e,t,r){e.mnemonicIcon?.map((o,i)=>({icon:o,alt:e.mnemonicAlt[i]??"",link:e.mnemonicLink[i]??""}))?.forEach(({icon:o,alt:i,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:o,loading:t.loading,size:r?.size??"l"};i&&(s.alt=i),a&&(s.href=a);let c=k("merch-icon",s);t.append(c)})}function ba(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||ma),t.setAttribute("badge-background-color",e.badgeBackgroundColor||da))}function va(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function ya(e,t,r){e.cardTitle&&r&&t.append(k(r.tag,{slot:r.slot},e.cardTitle))}function Ea(e,t,r){e.subtitle&&r&&t.append(k(r.tag,{slot:r.slot},e.subtitle))}function wa(e,t,r){if(e.backgroundImage){let n={loading:t.loading??"lazy",src:e.backgroundImage};if(e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",!r)return;if(r?.attribute){t.setAttribute(r.attribute,e.backgroundImage);return}t.append(k(r.tag,{slot:r.slot},k("img",n)))}}function Sa(e,t,r){if(e.prices&&r){let n=k(r.tag,{slot:r.slot},e.prices);t.append(n)}}function Aa(e,t,r){if(e.description&&r){let n=k(r.tag,{slot:r.slot},e.description);t.append(n)}}function Ta(e,t,r,n){let i=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);i.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||i.setAttribute(h.name,h.value);i.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=ga.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),i.classList.add(...l),i}function _a(e,t,r,n){let o="fill";r&&(o="outline");let i=k("sp-button",{treatment:o,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return i.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),i}function La(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function Ca(e,t,r,n){if(e.ctas){let{slot:o}=r.ctas,i=k("div",{slot:o},e.ctas),a=[...i.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return La(s,c);let l=ua.exec(s.className)?.[0]??"accent",h=l.includes("accent"),f=l.includes("primary"),u=l.includes("secondary"),g=l.includes("-outline");if(l.includes("-link"))return s;let E;return h||c?E="accent":f?E="primary":u&&(E="secondary"),t.spectrum==="swc"?_a(s,r,g,E):Ta(s,r,g,E)});i.innerHTML="",i.append(...a),t.append(i)}}function Pa(e,t){let{tags:r}=e,n=r?.find(o=>o.startsWith(pa))?.split("/").pop();n&&(t.setAttribute(ot,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((o,i)=>{o.setAttribute(fa,`${o.dataset.analyticsId}-${i+1}`)}))}function Na(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function ho(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.querySelectorAll("[slot]").forEach(i=>{i.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(ot),t.variant=n,await t.updateComplete;let{aemFragmentMapping:o}=t.variantLayout;o&&(xa(r,t,o.mnemonics),ba(r,t),va(r,t,o.size),ya(r,t,o.title),Ea(r,t,o.subtitle),Sa(r,t,o.prices),wa(r,t,o.backgroundImage),Aa(r,t,o.description),Ca(r,t,o,n),Pa(r,t),Na(t))}var Oa="merch-card",Ha=":start",Ma=":ready",Ia=1e4,mo="merch-card:",Ie,ar,d=class extends Ra{constructor(){super();Be(this,Ie);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}static getFragmentMapping(r){return $r[r]}firstUpdated(){this.variantLayout=Tt(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=Tt(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let o of n){await o.onceSettled();let i=o.value?.[0]?.planType;if(!i)return;let a=this.stockOfferOsis[i];if(!a)return;let s=o.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),o.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let o of n)o.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(o=>{if(r){n[o].order=Math.min(n[o].order||2,2);return}let i=n[o].order;i===1||isNaN(i)||(n[o].order=Number(i)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${mo}${r}${Ha}`),this.addEventListener(ft,this.handleQuantitySelection),this.addEventListener(vr,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Fe,this.handleAemFragmentEvents),this.addEventListener(ze,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(ft,this.handleQuantitySelection),this.storageOptions?.removeEventListener(pt,this.handleStorageChange),this.removeEventListener(Fe,this.handleAemFragmentEvents),this.removeEventListener(ze,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Fe&&dt(this,Ie,ar).call(this,"AEM fragment cannot be loaded"),r.type===ze&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await ho(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(i=>i.onceSettled().catch(()=>i))).then(i=>i.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(i=>setTimeout(()=>i(!1),Ia));if(await Promise.race([r,n])===!0){performance.mark(`${mo}${this.id}${Ma}`),this.dispatchEvent(new CustomEvent(wr,{bubbles:!0,composed:!0}));return}dt(this,Ie,ar).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let r=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll('a[is="checkout-link"].con-button')).length===2&&r&&r.parentElement.classList.add("footer-column")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||(this.dispatchEvent(new CustomEvent(yr,{bubbles:!0})),this.displayFooterElementsInColumn())}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(pt,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let o=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(o)}):n.replaceWith(o)}}};Ie=new WeakSet,ar=function(r){this.dispatchEvent(new CustomEvent(Sr,{detail:r,bubbles:!0,composed:!0}))},p(d,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,o,i]=r.split(",");return{PUF:n,ABM:o,M2M:i}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[o,i,a]=n.split(":"),s=Number(i);return[o,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:o,size:i}])=>[n,o,i].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:ot,reflect:!0},loading:{type:String}}),p(d,"styles",[gr,Vr(),...xr()]);customElements.define(Oa,d); diff --git a/libs/deps/mas/merch-sidenav.js b/libs/deps/mas/merch-sidenav.js index ce761e0ee1..e39ec1187f 100644 --- a/libs/deps/mas/merch-sidenav.js +++ b/libs/deps/mas/merch-sidenav.js @@ -1,4 +1,4 @@ -var P=Object.defineProperty;var v=o=>{throw TypeError(o)};var H=(o,e,t)=>e in o?P(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var n=(o,e,t)=>H(o,typeof e!="symbol"?e+"":e,t),g=(o,e,t)=>e.has(o)||v("Cannot "+t);var b=(o,e,t)=>(g(o,e,"read from private field"),t?t.call(o):e.get(o)),S=(o,e,t)=>e.has(o)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),A=(o,e,t,s)=>(g(o,e,"write to private field"),s?s.call(o,t):e.set(o,t),t);import{html as M,css as j,LitElement as z}from"/libs/deps/lit-all.min.js";var l=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};import{css as F}from"/libs/deps/lit-all.min.js";var u=F` +var P=Object.defineProperty;var v=o=>{throw TypeError(o)};var H=(o,e,t)=>e in o?P(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>H(o,typeof e!="symbol"?e+"":e,t),g=(o,e,t)=>e.has(o)||v("Cannot "+t);var S=(o,e,t)=>(g(o,e,"read from private field"),t?t.call(o):e.get(o)),b=(o,e,t)=>e.has(o)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),C=(o,e,t,s)=>(g(o,e,"write to private field"),s?s.call(o,t):e.set(o,t),t);import{html as I,css as j,LitElement as z}from"/libs/deps/lit-all.min.js";var l=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};import{css as F}from"/libs/deps/lit-all.min.js";var u=F` h2 { font-size: 11px; font-style: normal; @@ -9,13 +9,13 @@ var P=Object.defineProperty;var v=o=>{throw TypeError(o)};var H=(o,e,t)=>e in o? line-height: 32px; color: #737373; } -`;import{html as B,LitElement as G}from"/libs/deps/lit-all.min.js";function E(o,e){let t;return function(){let s=this,i=arguments;clearTimeout(t),t=setTimeout(()=>o.apply(s,i),e)}}function C(o,e={},t=null,s=null){let i=s?document.createElement(o,{is:s}):document.createElement(o);t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t;for(let[c,V]of Object.entries(e))i.setAttribute(c,V);return i}var T="merch-search:change";var y="merch-sidenav:select";var w="hashchange";function r(o=window.location.hash){let e=[],t=o.replace(/^#/,"").split("&");for(let s of t){let[i,c=""]=s.split("=");i&&e.push([i,decodeURIComponent(c.replace(/\+/g," "))])}return Object.fromEntries(e)}function a(o,e){if(o.deeplink){let t={};t[o.deeplink]=e,U(t)}}function U(o){let e=new URLSearchParams(window.location.hash.slice(1));Object.entries(o).forEach(([i,c])=>{c?e.set(i,c):e.delete(i)}),e.sort();let t=e.toString();if(t===window.location.hash)return;let s=window.scrollY||document.documentElement.scrollTop;window.location.hash=t,window.scrollTo(0,s)}function R(o){let e=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let t=r(window.location.hash);o(t)};return e(),window.addEventListener(w,e),()=>{window.removeEventListener(w,e)}}var f=class extends G{get search(){return this.querySelector("sp-search")}constructor(){super(),this.handleInput=()=>{a(this,this.search.value),this.search.value&&this.dispatchEvent(new CustomEvent(T,{bubbles:!0,composed:!0,detail:{type:"search",value:this.search.value}}))},this.handleInputDebounced=E(this.handleInput.bind(this))}connectedCallback(){super.connectedCallback(),this.search&&(this.search.addEventListener("input",this.handleInputDebounced),this.search.addEventListener("submit",this.handleInputSubmit),this.updateComplete.then(()=>{this.setStateFromURL()}),this.startDeeplink())}disconnectedCallback(){super.disconnectedCallback(),this.search.removeEventListener("input",this.handleInputDebounced),this.search.removeEventListener("submit",this.handleInputSubmit),this.stopDeeplink?.()}setStateFromURL(){let t=r()[this.deeplink];t&&(this.search.value=t)}startDeeplink(){this.stopDeeplink=R(({search:e})=>{this.search.value=e??""})}handleInputSubmit(e){e.preventDefault()}render(){return B``}};n(f,"properties",{deeplink:{type:String}});customElements.define("merch-search",f);import{html as L,LitElement as $,css as q}from"/libs/deps/lit-all.min.js";var d=class extends ${constructor(){super(),this.handleClickDebounced=E(this.handleClick.bind(this))}selectElement(e,t=!0){e.parentNode.tagName==="SP-SIDENAV-ITEM"&&this.selectElement(e.parentNode,!1),t&&(this.selectedElement=e,this.selectedText=e.label,this.selectedValue=e.value,setTimeout(()=>{e.selected=!0},1),this.dispatchEvent(new CustomEvent(y,{bubbles:!0,composed:!0,detail:{type:"sidenav",value:this.selectedValue,elt:this.selectedElement}})))}setStateFromURL(){let t=r()[this.deeplink]??"all";if(t){let s=this.querySelector(`sp-sidenav-item[value="${t}"]`);if(!s)return;this.updateComplete.then(()=>{s.firstElementChild?.tagName==="SP-SIDENAV-ITEM"&&(s.expanded=!0),this.selectElement(s)})}}handleClick({target:e}){let{value:t,parentNode:s}=e;this.selectElement(e),s&&s.tagName==="SP-SIDENAV"&&(a(this,t),e.selected=!0,s.querySelectorAll("sp-sidenav-item[expanded],sp-sidenav-item[selected]").forEach(i=>{i.value!==t&&(i.expanded=!1,i.selected=!1)}))}selectionChanged({target:{value:e,parentNode:t}}){this.selectElement(this.querySelector(`sp-sidenav-item[value="${e}"]`)),a(this,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClickDebounced),this.updateComplete.then(()=>{this.setStateFromURL()})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClickDebounced)}render(){return L`
o.apply(s,n),e)}}function T(o,e={},t=null,s=null){let n=s?document.createElement(o,{is:s}):document.createElement(o);t instanceof HTMLElement?n.appendChild(t):n.innerHTML=t;for(let[c,V]of Object.entries(e))n.setAttribute(c,V);return n}var A="merch-search:change";var y="merch-sidenav:select";var w="hashchange";function r(o=window.location.hash){let e=[],t=o.replace(/^#/,"").split("&");for(let s of t){let[n,c=""]=s.split("=");n&&e.push([n,decodeURIComponent(c.replace(/\+/g," "))])}return Object.fromEntries(e)}function a(o,e){if(o.deeplink){let t={};t[o.deeplink]=e,U(t)}}function U(o){let e=new URLSearchParams(window.location.hash.slice(1));Object.entries(o).forEach(([n,c])=>{c?e.set(n,c):e.delete(n)}),e.sort();let t=e.toString();if(t===window.location.hash)return;let s=window.scrollY||document.documentElement.scrollTop;window.location.hash=t,window.scrollTo(0,s)}function R(o){let e=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let t=r(window.location.hash);o(t)};return e(),window.addEventListener(w,e),()=>{window.removeEventListener(w,e)}}var f=class extends B{get search(){return this.querySelector("sp-search")}constructor(){super(),this.handleInput=()=>{a(this,this.search.value),this.search.value&&this.dispatchEvent(new CustomEvent(A,{bubbles:!0,composed:!0,detail:{type:"search",value:this.search.value}}))},this.handleInputDebounced=E(this.handleInput.bind(this))}connectedCallback(){super.connectedCallback(),this.search&&(this.search.addEventListener("input",this.handleInputDebounced),this.search.addEventListener("submit",this.handleInputSubmit),this.updateComplete.then(()=>{this.setStateFromURL()}),this.startDeeplink())}disconnectedCallback(){super.disconnectedCallback(),this.search.removeEventListener("input",this.handleInputDebounced),this.search.removeEventListener("submit",this.handleInputSubmit),this.stopDeeplink?.()}setStateFromURL(){let t=r()[this.deeplink];t&&(this.search.value=t)}startDeeplink(){this.stopDeeplink=R(({search:e})=>{this.search.value=e??""})}handleInputSubmit(e){e.preventDefault()}render(){return G``}};i(f,"properties",{deeplink:{type:String}});customElements.define("merch-search",f);import{html as L,LitElement as $,css as q}from"/libs/deps/lit-all.min.js";var d=class extends ${constructor(){super(),this.handleClickDebounced=E(this.handleClick.bind(this))}selectElement(e,t=!0){e.parentNode.tagName==="SP-SIDENAV-ITEM"&&this.selectElement(e.parentNode,!1),t&&(this.selectedElement=e,this.selectedText=e.label,this.selectedValue=e.value,setTimeout(()=>{e.selected=!0},1),this.dispatchEvent(new CustomEvent(y,{bubbles:!0,composed:!0,detail:{type:"sidenav",value:this.selectedValue,elt:this.selectedElement}})))}setStateFromURL(){let t=r()[this.deeplink]??"all";if(t){let s=this.querySelector(`sp-sidenav-item[value="${t}"]`);if(!s)return;this.updateComplete.then(()=>{s.firstElementChild?.tagName==="SP-SIDENAV-ITEM"&&(s.expanded=!0),this.selectElement(s)})}}handleClick({target:e}){let{value:t,parentNode:s}=e;this.selectElement(e),s&&s.tagName==="SP-SIDENAV"&&(a(this,t),e.selected=!0,s.querySelectorAll("sp-sidenav-item[expanded],sp-sidenav-item[selected]").forEach(n=>{n.value!==t&&(n.expanded=!1,n.selected=!1)}))}selectionChanged({target:{value:e,parentNode:t}}){this.selectElement(this.querySelector(`sp-sidenav-item[value="${e}"]`)),a(this,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClickDebounced),this.updateComplete.then(()=>{this.setStateFromURL()})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClickDebounced)}render(){return L`
${this.sidenavListTitle?L`

${this.sidenavListTitle}

`:""} -
`}};n(d,"properties",{sidenavListTitle:{type:String},label:{type:String},deeplink:{type:String,attribute:"deeplink"},selectedText:{type:String,reflect:!0,attribute:"selected-text"},selectedValue:{type:String,reflect:!0,attribute:"selected-value"}}),n(d,"styles",[q` +
`}};i(d,"properties",{sidenavListTitle:{type:String},label:{type:String},deeplink:{type:String,attribute:"deeplink"},selectedText:{type:String,reflect:!0,attribute:"selected-text"},selectedValue:{type:String,reflect:!0,attribute:"selected-value"}}),i(d,"styles",[q` :host { display: block; contain: content; @@ -36,37 +36,25 @@ var P=Object.defineProperty;var v=o=>{throw TypeError(o)};var H=(o,e,t)=>e in o? ) ); } - `,u]);customElements.define("merch-sidenav-list",d);import{html as Y,LitElement as K,css as W}from"/libs/deps/lit-all.min.js";var h=class extends K{setStateFromURL(){this.selectedValues=[];let{types:e}=r();e&&(this.selectedValues=e.split(","),this.selectedValues.forEach(t=>{let s=this.querySelector(`sp-checkbox[name=${t}]`);s&&(s.checked=!0)}))}selectionChanged(e){let{target:t}=e,s=t.getAttribute("name");if(s){let i=this.selectedValues.indexOf(s);t.checked&&i===-1?this.selectedValues.push(s):!t.checked&&i>=0&&this.selectedValues.splice(i,1)}a(this,this.selectedValues.join(","))}addAccessibilityAttributes(){let e="sidenav-checkbox-group-title",t=C("div",{class:"invisible-and-shrank",id:e});t.textContent=this.sidenavCheckboxTitle,this.append(t),this.querySelectorAll("sp-checkbox").forEach(s=>{s.setAttribute("role","group"),s.setAttribute("aria-labelledby",e)})}connectedCallback(){super.connectedCallback(),this.updateComplete.then(async()=>{this.setStateFromURL(),this.addAccessibilityAttributes()})}render(){return Y`
-

${this.sidenavCheckboxTitle}

+ `,u]);customElements.define("merch-sidenav-list",d);import{html as Y,LitElement as K,css as W}from"/libs/deps/lit-all.min.js";var h=class extends K{setStateFromURL(){this.selectedValues=[];let{types:e}=r();e&&(this.selectedValues=e.split(","),this.selectedValues.forEach(t=>{let s=this.querySelector(`sp-checkbox[name=${t}]`);s&&(s.checked=!0)}))}selectionChanged(e){let{target:t}=e,s=t.getAttribute("name");if(s){let n=this.selectedValues.indexOf(s);t.checked&&n===-1?this.selectedValues.push(s):!t.checked&&n>=0&&this.selectedValues.splice(n,1)}a(this,this.selectedValues.join(","))}addGroupTitle(){let e="sidenav-checkbox-group-title",t=T("h3",{id:e});t.textContent=this.sidenavCheckboxTitle,this.prepend(t),this.childNodes.forEach(s=>{s.id!==e&&(s.setAttribute("role","group"),s.setAttribute("aria-labelledby",e))})}connectedCallback(){super.connectedCallback(),this.updateComplete.then(async()=>{this.setStateFromURL(),this.addGroupTitle()})}render(){return Y`
-
`}};n(h,"properties",{sidenavCheckboxTitle:{type:String},label:{type:String},deeplink:{type:String},selectedValues:{type:Array,reflect:!0},value:{type:String}}),n(h,"styles",W` +
`}};i(h,"properties",{sidenavCheckboxTitle:{type:String},label:{type:String},deeplink:{type:String},selectedValues:{type:Array,reflect:!0},value:{type:String}}),i(h,"styles",W` :host { display: block; contain: content; border-top: 1px solid var(--color-gray-200); padding: 12px; } - h3 { - font-size: 14px; - font-style: normal; - font-weight: 700; - height: 32px; - letter-spacing: 0px; - padding: 0px; - line-height: 18.2px; - color: var(--color-gray-600); - margin: 0px; - } .checkbox-group { display: flex; flex-direction: column; } - `);customElements.define("merch-sidenav-checkbox-group",h);var N="(max-width: 700px)";var D="(max-width: 1199px)";var k=/iP(ad|hone|od)/.test(window?.navigator?.platform)||window?.navigator?.platform==="MacIntel"&&window.navigator.maxTouchPoints>1,_=!1,x,O=o=>{o&&(k?(document.body.style.position="fixed",o.ontouchmove=e=>{e.targetTouches.length===1&&e.stopPropagation()},_||(document.addEventListener("touchmove",e=>e.preventDefault()),_=!0)):(x=document.body.style.overflow,document.body.style.overflow="hidden"))},I=o=>{o&&(k?(o.ontouchstart=null,o.ontouchmove=null,document.body.style.position="",document.removeEventListener("touchmove",e=>e.preventDefault()),_=!1):x!==void 0&&(document.body.style.overflow=x,x=void 0))};var m,p=class extends z{constructor(){super();S(this,m);n(this,"mobileDevice",new l(this,N));n(this,"mobileAndTablet",new l(this,D));this.modal=!1}get filters(){return this.querySelector("merch-sidenav-list")}get search(){return this.querySelector("merch-search")}render(){return this.mobileAndTablet.matches?this.asDialog:this.asAside}get asDialog(){if(this.modal)return M` + `);customElements.define("merch-sidenav-checkbox-group",h);var N="(max-width: 700px)";var D="(max-width: 1199px)";var k=/iP(ad|hone|od)/.test(window?.navigator?.platform)||window?.navigator?.platform==="MacIntel"&&window.navigator.maxTouchPoints>1,_=!1,x,O=o=>{o&&(k?(document.body.style.position="fixed",o.ontouchmove=e=>{e.targetTouches.length===1&&e.stopPropagation()},_||(document.addEventListener("touchmove",e=>e.preventDefault()),_=!0)):(x=document.body.style.overflow,document.body.style.overflow="hidden"))},M=o=>{o&&(k?(o.ontouchstart=null,o.ontouchmove=null,document.body.style.position="",document.removeEventListener("touchmove",e=>e.preventDefault()),_=!1):x!==void 0&&(document.body.style.overflow=x,x=void 0))};var m,p=class extends z{constructor(){super();b(this,m);i(this,"mobileDevice",new l(this,N));i(this,"mobileAndTablet",new l(this,D));this.modal=!1}get filters(){return this.querySelector("merch-sidenav-list")}get search(){return this.querySelector("merch-search")}render(){return this.mobileAndTablet.matches?this.asDialog:this.asAside}get asDialog(){if(this.modal)return I` {throw TypeError(o)};var H=(o,e,t)=>e in o?
- `}get asAside(){return M`

${this.sidenavTitle}

`}get dialog(){return this.shadowRoot.querySelector("sp-dialog-base")}closeModal(t){t.preventDefault(),this.dialog?.close(),document.body.classList.remove("merch-modal")}openModal(){this.updateComplete.then(async()=>{O(this.dialog),document.body.classList.add("merch-modal");let t={trigger:b(this,m),notImmediatelyClosable:!0,type:"auto"},s=await window.__merch__spectrum_Overlay.open(this.dialog,t);s.addEventListener("close",()=>{this.modal=!1,document.body.classList.remove("merch-modal"),I(this.dialog)}),this.shadowRoot.querySelector("sp-theme").append(s)})}updated(){this.modal&&this.openModal()}showModal({target:t}){A(this,m,t),this.modal=!0}};m=new WeakMap,n(p,"properties",{sidenavTitle:{type:String},closeText:{type:String,attribute:"close-text"},modal:{type:Boolean,attribute:"modal",reflect:!0}}),n(p,"styles",[j` + >`}get dialog(){return this.shadowRoot.querySelector("sp-dialog-base")}closeModal(t){t.preventDefault(),this.dialog?.close(),document.body.classList.remove("merch-modal")}openModal(){this.updateComplete.then(async()=>{O(this.dialog),document.body.classList.add("merch-modal");let t={trigger:S(this,m),notImmediatelyClosable:!0,type:"auto"},s=await window.__merch__spectrum_Overlay.open(this.dialog,t);s.addEventListener("close",()=>{this.modal=!1,document.body.classList.remove("merch-modal"),M(this.dialog)}),this.shadowRoot.querySelector("sp-theme").append(s)})}updated(){this.modal&&this.openModal()}showModal({target:t}){C(this,m,t),this.modal=!0}};m=new WeakMap,i(p,"properties",{sidenavTitle:{type:String},closeText:{type:String,attribute:"close-text"},modal:{type:Boolean,attribute:"modal",reflect:!0}}),i(p,"styles",[j` :host { display: block; z-index: 2; diff --git a/libs/features/mas/dist/mas.js b/libs/features/mas/dist/mas.js index 700157154d..887a623edb 100644 --- a/libs/features/mas/dist/mas.js +++ b/libs/features/mas/dist/mas.js @@ -2094,6 +2094,18 @@ body.merch-modal { height: 100vh; } +merch-sidenav-checkbox-group h3 { + font-size: 14px; + font-style: normal; + font-weight: 700; + height: 32px; + letter-spacing: 0px; + padding: 0px; + line-height: 18.2px; + color: var(--color-gray-600); + margin: 0px; +} + `;document.head.appendChild(na);var Ut;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(Ut||(Ut={}));var Zn;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Zn||(Zn={}));var Dt;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(Dt||(Dt={}));var $e;(function(e){e.V2="UCv2",e.V3="UCv3"})($e||($e={}));var Q;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(Q||(Q={}));var Jn=function(e){var t;return(t=fc.get(e))!==null&&t!==void 0?t:e},fc=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var ia=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},oa=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function dt(e,t,r){var n,i;try{for(var o=ia(Object.entries(e)),a=o.next();!a.done;a=o.next()){var s=oa(a.value,2),c=s[0],l=s[1],h=Jn(c);l!=null&&r.has(h)&&t.set(h,l)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Tr(e){switch(e){case Ut.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Lr(e,t){var r,n;for(var i in e){var o=e[i];try{for(var a=(r=void 0,ia(Object.entries(o))),s=a.next();!s.done;s=a.next()){var c=oa(s.value,2),l=c[0],h=c[1];if(h!=null){var d=Jn(l);t.set("items["+i+"]["+d+"]",h)}}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}}var gc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function aa(e){Ac(e);var t=e.env,r=e.items,n=e.workflowStep,i=gc(e,["env","items","workflowStep"]),o=new URL(Tr(t));return o.pathname=n+"/",Lr(r,o.searchParams),dt(i,o.searchParams,bc),o.toString()}var bc=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),vc=["env","workflowStep","clientId","country","items"];function Ac(e){var t,r;try{for(var n=xc(vc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var Ec=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},yc="p_draft_landscape",Tc="/store/";function ei(e){_c(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,a=e.ot,s=e.offerType,c=e.pa,l=e.productArrangementCode,h=e.landscape,d=Ec(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),u={marketSegment:o??i,offerType:s??a,productArrangementCode:l??c},m=new URL(Tr(t));return m.pathname=""+Tc+n,n!==Q.SEGMENTATION&&n!==Q.CHANGE_PLAN_TEAM_PLANS&&Lr(r,m.searchParams),n===Q.SEGMENTATION&&dt(u,m.searchParams,Qn),dt(d,m.searchParams,Qn),h===Dt.DRAFT&&dt({af:yc},m.searchParams,Qn),m.toString()}var Qn=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),Lc=["env","workflowStep","clientId","country"];function _c(e){var t,r;try{for(var n=Sc(Lc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==Q.SEGMENTATION&&e.workflowStep!==Q.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function ti(e,t){switch(e){case $e.V2:return aa(t);case $e.V3:return ei(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),ei(t)}}var ri;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(ri||(ri={}));var H;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(H||(H={}));var N;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(N||(N={}));var ni;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(ni||(ni={}));var ii;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(ii||(ii={}));var oi;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(oi||(oi={}));var ai;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(ai||(ai={}));var sa="tacocat.js";var _r=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),ca=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function O(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let a=new URLSearchParams(window.location.search),s=ut(n)?n:e;o=a.get(s)}if(i&&o==null){let a=ut(i)?i:e;o=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&o==null){let a=wc(ut(r)?r:e);o=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return o??t[e]}var mt=()=>{};var la=e=>typeof e=="boolean",Bt=e=>typeof e=="function",wr=e=>typeof e=="number",ha=e=>e!=null&&typeof e=="object";var ut=e=>typeof e=="string",si=e=>ut(e)&&e,pt=e=>wr(e)&&Number.isFinite(e)&&e>0;function ft(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function y(e,t){if(la(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Se(e,t,r){let n=Object.values(t);return n.find(i=>_r(i,e))??r??n[0]}function wc(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function gt(e,t=1){return wr(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Pc=Date.now(),ci=()=>`(+${Date.now()-Pc}ms)`,Pr=new Set,Cc=y(O("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function da(e){let t=`[${sa}/${e}]`,r=(a,s,...c)=>a?!0:(i(s,...c),!1),n=Cc?(a,...s)=>{console.debug(`${t} ${a}`,...s,ci())}:()=>{},i=(a,...s)=>{let c=`${t} ${a}`;Pr.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:i,warn:(a,...s)=>{let c=`${t} ${a}`;Pr.forEach(([,l])=>l(c,...s))}}}function Ic(e,t){let r=[e,t];return Pr.add(r),()=>{Pr.delete(r)}}Ic((e,...t)=>{console.error(e,...t,ci())},(e,...t)=>{console.warn(e,...t,ci())});var kc="no promo",ua="promo-tag",Nc="yellow",Oc="neutral",Rc=(e,t,r)=>{let n=o=>o||kc,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Mc="cancel-context",Gt=(e,t)=>{let r=e===Mc,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,a=o?e||t:void 0;return{effectivePromoCode:a,overridenPromoCode:e,className:o?ua:`${ua} no-promo`,text:Rc(a,t,i),variant:o?Nc:Oc,isOverriden:i}};var li="ABM",hi="PUF",di="M2M",ui="PERPETUAL",mi="P3Y",Vc="TAX_INCLUSIVE_DETAILS",$c="TAX_EXCLUSIVE",ma={ABM:li,PUF:hi,M2M:di,PERPETUAL:ui,P3Y:mi},Am={[li]:{commitment:H.YEAR,term:N.MONTHLY},[hi]:{commitment:H.YEAR,term:N.ANNUAL},[di]:{commitment:H.MONTH,term:N.MONTHLY},[ui]:{commitment:H.PERPETUAL,term:void 0},[mi]:{commitment:H.THREE_MONTHS,term:N.P3Y}},pa="Value is not an offer",Cr=e=>{if(typeof e!="object")return pa;let{commitment:t,term:r}=e,n=Hc(t,r);return{...e,planType:n}};var Hc=(e,t)=>{switch(e){case void 0:return pa;case"":return"";case H.YEAR:return t===N.MONTHLY?li:t===N.ANNUAL?hi:"";case H.MONTH:return t===N.MONTHLY?di:"";case H.PERPETUAL:return ui;case H.TERM_LICENSE:return t===N.P3Y?mi:"";default:return""}};function pi(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:a}=t;if(a!==Vc)return e;let s={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:$c}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var fi=function(e,t){return fi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},fi(e,t)};function zt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");fi(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var A=function(){return A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Bc,function(c,l,h,d,u,m){if(l)t.minimumIntegerDigits=h.length;else{if(d&&u)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ta.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(va.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(va,function(c,l,h,d,u,m){return h==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:u&&m?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+m.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=A(A({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=A(A({},t),Aa(o)));continue}if(ya.test(i.stem)){t=A(A({},t),Aa(i.stem));continue}var a=La(i.stem);a&&(t=A(A({},t),a));var s=Gc(i.stem);s&&(t=A(A({},t),s))}return t}var Kt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function wa(e,t){for(var r="",n=0;n>1),c="a",l=zc(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function zc(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=Kt[n||""]||Kt[r||""]||Kt["".concat(r,"-001")]||Kt["001"];return i[0]}var bi,Fc=new RegExp("^".concat(xi.source,"*")),Kc=new RegExp("".concat(xi.source,"*$"));function E(e,t){return{start:e,end:t}}var jc=!!String.prototype.startsWith,Yc=!!String.fromCodePoint,Xc=!!Object.fromEntries,Wc=!!String.prototype.codePointAt,qc=!!String.prototype.trimStart,Zc=!!String.prototype.trimEnd,Jc=!!Number.isSafeInteger,Qc=Jc?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ai=!0;try{Pa=Na("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ai=((bi=Pa.exec("a"))===null||bi===void 0?void 0:bi[0])==="a"}catch{Ai=!1}var Pa,Ca=jc?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Ei=Yc?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Ia=Xc?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},el=qc?function(t){return t.trimStart()}:function(t){return t.replace(Fc,"")},tl=Zc?function(t){return t.trimEnd()}:function(t){return t.replace(Kc,"")};function Na(e,t){return new RegExp(e,t)}var Si;Ai?(vi=Na("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Si=function(t,r){var n;vi.lastIndex=r;var i=vi.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):Si=function(t,r){for(var n=[];;){var i=ka(t,r);if(i===void 0||Ra(i)||il(i))break;n.push(i),r+=i>=65536?2:1}return Ei.apply(void 0,n)};var vi,Oa=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:P.pound,location:E(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(v.UNMATCHED_CLOSING_TAG,E(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&yi(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:P.literal,value:"<".concat(i,"/>"),location:E(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:P.tag,value:i,children:a,location:E(n,this.clonePosition())},err:null}:this.error(v.INVALID_TAG,E(s,this.clonePosition())))}else return this.error(v.UNCLOSED_TAG,E(n,this.clonePosition()))}else return this.error(v.INVALID_TAG,E(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&nl(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=E(n,this.clonePosition());return{val:{type:P.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!rl(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Ei.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Ei(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(v.EMPTY_ARGUMENT,E(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:E(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Si(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),a=E(t,o);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(v.EXPECT_ARGUMENT_TYPE,E(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var u=tl(d.val);if(u.length===0)return this.error(v.EXPECT_ARGUMENT_STYLE,E(this.clonePosition(),this.clonePosition()));var m=E(h,this.clonePosition());l={style:u,styleLocation:m}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var f=E(i,this.clonePosition());if(l&&Ca(l?.style,"::",0)){var T=el(l.style.slice(2));if(s==="number"){var d=this.parseNumberSkeletonFromString(T,l.styleLocation);return d.err?d:{val:{type:P.number,value:n,location:f,style:d.val},err:null}}else{if(T.length===0)return this.error(v.EXPECT_DATE_TIME_SKELETON,f);var _=T;this.locale&&(_=wa(T,this.locale));var u={type:He.dateTime,pattern:_,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?xa(_):{}},b=s==="date"?P.date:P.time;return{val:{type:b,value:n,location:f,style:u},err:null}}}return{val:{type:s==="number"?P.number:s==="date"?P.date:P.time,value:n,location:f,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,E(S,A({},S)));this.bumpSpace();var k=this.parseIdentifierIfPossible(),R=0;if(s!=="select"&&k.value==="offset"){if(!this.bumpIf(":"))return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,E(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),k=this.parseIdentifierIfPossible(),R=d.val}var U=this.tryParsePluralOrSelectOptions(t,s,r,k);if(U.err)return U;var g=this.tryParseArgumentClose(i);if(g.err)return g;var $=E(i,this.clonePosition());return s==="select"?{val:{type:P.select,value:n,options:Ia(U.val),location:$},err:null}:{val:{type:P.plural,value:n,options:Ia(U.val),offset:R,pluralType:s==="plural"?"cardinal":"ordinal",location:$},err:null}}default:return this.error(v.INVALID_ARGUMENT_TYPE,E(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,E(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Sa(t)}catch{return this.error(v.INVALID_NUMBER_SKELETON,r)}return{val:{type:He.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?_a(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,a=!1,s=[],c=new Set,l=i.value,h=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=E(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?v.DUPLICATE_SELECT_ARGUMENT_SELECTOR:v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,E(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,r,n);if(g.err)return g;var f=this.tryParseArgumentClose(m);if(f.err)return f;s.push([l,{value:g.val,location:E(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR:v.EXPECT_PLURAL_ARGUMENT_SELECTOR,E(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(v.MISSING_OTHER_CLAUSE,E(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var c=E(i,this.clonePosition());return o?(a*=n,Qc(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=ka(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ca(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ra(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function yi(e){return e>=97&&e<=122||e>=65&&e<=90}function rl(e){return yi(e)||e===47}function nl(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ra(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function il(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Ti(e){e.forEach(function(t){if(delete t.location,Rr(t)||Mr(t))for(var r in t.options)delete t.options[r].location,Ti(t.options[r].value);else kr(t)&&$r(t.style)||(Nr(t)||Or(t))&&Ft(t.style)?delete t.style.location:Vr(t)&&Ti(t.children)})}function Ma(e,t){t===void 0&&(t={}),t=A({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Oa(e,t).parse();if(r.err){var n=SyntaxError(v[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Ti(r.val),r.val}function jt(e,t){var r=t&&t.cache?t.cache:hl,n=t&&t.serializer?t.serializer:ll,i=t&&t.strategy?t.strategy:al;return i(e,{cache:r,serializer:n})}function ol(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Va(e,t,r,n){var i=ol(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function $a(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function Li(e,t,r,n,i){return r.bind(t,e,n,i)}function al(e,t){var r=e.length===1?Va:$a;return Li(e,this,r,t.cache.create(),t.serializer)}function sl(e,t){return Li(e,this,$a,t.cache.create(),t.serializer)}function cl(e,t){return Li(e,this,Va,t.cache.create(),t.serializer)}var ll=function(){return JSON.stringify(arguments)};function _i(){this.cache=Object.create(null)}_i.prototype.get=function(e){return this.cache[e]};_i.prototype.set=function(e,t){this.cache[e]=t};var hl={create:function(){return new _i}},Hr={variadic:sl,monadic:cl};var Ue;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ue||(Ue={}));var Yt=function(e){zt(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var wi=function(e){zt(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Ue.INVALID_VALUE,o)||this}return t}(Yt);var Ha=function(e){zt(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Ue.INVALID_VALUE,i)||this}return t}(Yt);var Ua=function(e){zt(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Ue.MISSING_VALUE,n)||this}return t}(Yt);var z;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(z||(z={}));function dl(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==z.literal||r.type!==z.literal?t.push(r):n.value+=r.value,t},[])}function ul(e){return typeof e=="function"}function Xt(e,t,r,n,i,o,a){if(e.length===1&&gi(e[0]))return[{type:z.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Ma,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Ba=Da;var gl=/[0-9\-+#]/,xl=/[^\d\-+#]/g;function Ga(e){return e.search(gl)}function bl(e="#.##"){let t={},r=e.length,n=Ga(e);t.prefix=n>0?e.substring(0,n):"";let i=Ga(e.split("").reverse().join("")),o=r-i,a=e.substring(o,o+1),s=o+(a==="."||a===","?1:0);t.suffix=i>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(xl);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function vl(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=i.value.split(".");return(!s||s&&s.length<=o)&&(s=o<0?"":(+("0."+s)).toFixed(o+1).replace("0.","")),i.integer=a,i.fraction=s,Al(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function Al(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.lengthe*12,Xa=(e,t)=>{let{start:r,end:n,displaySummary:{amount:i,duration:o,minProductQuantity:a,outcomeType:s}={}}=e;if(!(i&&o&&s&&a))return!1;let c=t?new Date(t):new Date;if(!r||!n)return!1;let l=new Date(r),h=new Date(n);return c>=l&&c<=h},De={MONTH:"MONTH",YEAR:"YEAR"},yl={[N.ANNUAL]:12,[N.MONTHLY]:1,[N.THREE_YEARS]:36,[N.TWO_YEARS]:24},Ii=(e,t)=>({accept:e,round:t}),Tl=[Ii(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Ii(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Ii(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],ki={[H.YEAR]:{[N.MONTHLY]:De.MONTH,[N.ANNUAL]:De.YEAR},[H.MONTH]:{[N.MONTHLY]:De.MONTH}},Ll=(e,t)=>e.indexOf(`'${t}'`)===0,_l=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=qa(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Pl(e)),r},wl=e=>{let t=Cl(e),r=Ll(e,t),n=e.replace(/'.*?'/,""),i=ja.test(n)||Ya.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Wa=e=>e.replace(ja,Ka).replace(Ya,Ka),Pl=e=>e.match(/#(.?)#/)?.[1]===Fa?Sl:Fa,Cl=e=>e.match(/'(.*?)'/)?.[1]??"",qa=e=>e.match(/0(.?)0/)?.[1]??"";function xt({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=wl(e),l=r?qa(e):"",h=_l(e,r),d=r?2:0,u=o(t,{currencySymbol:a}),m=n?u.toLocaleString("hi-IN",{minimumFractionDigits:d,maximumFractionDigits:d}):za(h,u),g=r?m.lastIndexOf(l):m.length,f=m.substring(0,g),T=m.substring(g+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,a),currencySymbol:a,decimals:T,decimalsDelimiter:l,hasCurrencySpace:c,integer:f,isCurrencyFirst:s,recurrenceTerm:i}}var Za=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=yl[r]??1;return xt(e,i>1?De.MONTH:ki[t]?.[r],o=>{let a={divisor:i,price:o,usePrecision:n},{round:s}=Tl.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},Ja=({commitment:e,term:t,...r})=>xt(r,ki[e]?.[t]),Qa=e=>{let{commitment:t,instant:r,price:n,originalPrice:i,priceWithoutDiscount:o,promotion:a,quantity:s=1,term:c}=e;if(t===H.YEAR&&c===N.MONTHLY){if(!a)return xt(e,De.YEAR,Ci);let{displaySummary:{outcomeType:l,duration:h,minProductQuantity:d=1}={}}=a;switch(l){case"PERCENTAGE_DISCOUNT":if(s>=d&&Xa(a,r)){let u=parseInt(h.replace("P","").replace("M",""));if(isNaN(u))return Ci(n);let m=s*i*u,g=s*o*(12-u),f=Math.floor((m+g)*100)/100;return xt({...e,price:f},De.YEAR)}default:return xt(e,De.YEAR,()=>Ci(o??n))}}return xt(e,ki[t]?.[c])};var Il={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},kl=da("ConsonantTemplates/price"),Nl=/<\/?[^>]+(>|$)/g,G={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},Be={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Ol="TAX_EXCLUSIVE",Rl=e=>ha(e)?Object.entries(e).filter(([,t])=>ut(t)||wr(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+ca(n)+'"'}`,""):"",K=(e,t,r,n=!1)=>`${n?Wa(t):t??""}`;function Ml(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},d={}){let u=K(G.currencySymbol,r),m=K(G.currencySpace,o?" ":""),g="";return s&&(g+=u+m),g+=K(G.integer,a),g+=K(G.decimalsDelimiter,i),g+=K(G.decimals,n),s||(g+=m+u),g+=K(G.recurrence,c,null,!0),g+=K(G.unitType,l,null,!0),g+=K(G.taxInclusivity,h,!0),K(e,g,{...d,"aria-label":t})}var W=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1,instant:n=void 0}={})=>({country:i,displayFormatted:o=!0,displayRecurrence:a=!0,displayPerUnit:s=!1,displayTax:c=!1,language:l,literals:h={},quantity:d=1}={},{commitment:u,offerSelectorIds:m,formatString:g,price:f,priceWithoutDiscount:T,taxDisplay:_,taxTerm:b,term:S,usePrecision:k,promotion:R}={},U={})=>{Object.entries({country:i,formatString:g,language:l,price:f}).forEach(([ae,qr])=>{if(qr==null)throw new Error(`Argument "${ae}" is missing for osi ${m?.toString()}, country ${i}, language ${l}`)});let $={...Il,...h},me=`${l.toLowerCase()}-${i.toUpperCase()}`;function Z(ae,qr){let Zr=$[ae];if(Zr==null)return"";try{return new Ba(Zr.replace(Nl,""),me).format(qr)}catch{return kl.error("Failed to format literal:",Zr),""}}let yt=t&&T?T:f,Ye=e?Za:Ja;r&&(Ye=Qa);let{accessiblePrice:Tt,recurrenceTerm:pe,...fe}=Ye({commitment:u,formatString:g,instant:n,isIndianPrice:i==="IN",originalPrice:f,priceWithoutDiscount:T,price:e?f:yt,promotion:R,quantity:d,term:S,usePrecision:k}),J=Tt,Lt="";if(y(a)&&pe){let ae=Z(Be.recurrenceAriaLabel,{recurrenceTerm:pe});ae&&(J+=" "+ae),Lt=Z(Be.recurrenceLabel,{recurrenceTerm:pe})}let Wr="";if(y(s)){Wr=Z(Be.perUnitLabel,{perUnit:"LICENSE"});let ae=Z(Be.perUnitAriaLabel,{perUnit:"LICENSE"});ae&&(J+=" "+ae)}let _t="";y(c)&&b&&(_t=Z(_===Ol?Be.taxExclusiveLabel:Be.taxInclusiveLabel,{taxTerm:b}),_t&&(J+=" "+_t)),t&&(J=Z(Be.strikethroughAriaLabel,{strikethroughPrice:J}));let wt=G.container;if(e&&(wt+=" "+G.containerOptical),t&&(wt+=" "+G.containerStrikethrough),r&&(wt+=" "+G.containerAnnual),y(o))return Ml(wt,{...fe,accessibleLabel:J,recurrenceLabel:Lt,perUnitLabel:Wr,taxInclusivityLabel:_t},U);let{currencySymbol:to,decimals:Is,decimalsDelimiter:ks,hasCurrencySpace:ro,integer:Ns,isCurrencyFirst:Os}=fe,Xe=[Ns,ks,Is];Os?(Xe.unshift(ro?"\xA0":""),Xe.unshift(to)):(Xe.push(ro?"\xA0":""),Xe.push(to)),Xe.push(Lt,Wr,_t);let Rs=Xe.join("");return K(wt,Rs,U)},es=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${W()(e,t,r)}${i?" "+W({displayStrikethrough:!0})(e,t,r):""}`},ts=()=>(e,t,r)=>{let{instant:n}=e;try{n||(n=new URLSearchParams(document.location.search).get("instant")),n&&(n=new Date(n))}catch{n=void 0}let i={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?W({displayStrikethrough:!0})(i,t,r)+" ":""}${W()(e,t,r)}${K(G.containerAnnualPrefix," (")}${W({displayAnnual:!0,instant:n})(i,t,r)}${K(G.containerAnnualSuffix,")")}`},rs=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${W()(e,t,r)}${K(G.containerAnnualPrefix," (")}${W({displayAnnual:!0})(n,t,r)}${K(G.containerAnnualSuffix,")")}`};var Ni=W(),Oi=es(),Ri=W({displayOptical:!0}),Mi=W({displayStrikethrough:!0}),Vi=W({displayAnnual:!0}),$i=rs(),Hi=ts();var Vl=(e,t)=>{if(!(!pt(e)||!pt(t)))return Math.floor((t-e)/t*100)},ns=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=Vl(r,n);return i===void 0?'':`${i}%`};var Ui=ns();var{freeze:Wt}=Object,re=Wt({...$e}),ne=Wt({...Q}),Ge={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},Di=Wt({...H}),Bi=Wt({...ma}),Gi=Wt({...N});var is="mas-commerce-service";function os(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(is);i!==r&&(r=i,i&&e(i))}return document.addEventListener(rt,n,{once:t}),ze(n),()=>document.removeEventListener(rt,n)}function qt(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[a,s]=e;i=[a.language===o?a:s]}return r&&(i=i.map(pi)),i}var ze=e=>window.setTimeout(e);function bt(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(gt).filter(pt);return r.length||(r=[t]),r}function Ur(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(si)}function q(){return document.getElementsByTagName(is)?.[0]}var Fe={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},as=1e3,ss=new Set;function $l(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function cs(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Fe.serializableTypes.includes(r))return r}return e}function Hl(e,t){if(!Fe.ignoredProperties.includes(e))return cs(t)}var zi={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],i=[],o=t;r.forEach(l=>{l!=null&&($l(l)?n:i).push(l)}),n.length&&(o+=" "+n.map(cs).join(" "));let{pathname:a,search:s}=window.location,c=`${Fe.delimiter}page=${a}${s}`;c.length>as&&(c=`${c.slice(0,as)}`),o+=c,i.length&&(o+=`${Fe.delimiter}facts=`,o+=JSON.stringify(i,Hl)),ss.has(o)||(ss.add(o),window.lana?.log(o,Fe))}};function vt(e){Object.assign(Fe,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Fe&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var L=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:re.V3,checkoutWorkflowStep:ne.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Ge.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:Me.PUBLISHED,wcsBufferLimit:1});var Fi=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Ul({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||L.language),t??(t=e?.split("_")?.[1]||L.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function Ki(e={}){let{commerce:t={}}=e,r=Ge.PRODUCTION,n=zn,i=O("checkoutClientId",t)??L.checkoutClientId,o=Se(O("checkoutWorkflow",t),re,L.checkoutWorkflow),a=ne.CHECKOUT;o===re.V3&&(a=Se(O("checkoutWorkflowStep",t),ne,L.checkoutWorkflowStep));let s=y(O("displayOldPrice",t),L.displayOldPrice),c=y(O("displayPerUnit",t),L.displayPerUnit),l=y(O("displayRecurrence",t),L.displayRecurrence),h=y(O("displayTax",t),L.displayTax),d=y(O("entitlement",t),L.entitlement),u=y(O("modal",t),L.modal),m=y(O("forceTaxExclusive",t),L.forceTaxExclusive),g=O("promotionCode",t)??L.promotionCode,f=bt(O("quantity",t)),T=O("wcsApiKey",t)??L.wcsApiKey,_=t?.env==="stage",b=Me.PUBLISHED;["true",""].includes(t.allowOverride)&&(_=(O(Bn,t,{metadata:!1})?.toLowerCase()??t?.env)==="stage",b=Se(O(Gn,t),Me,b)),_&&(r=Ge.STAGE,n=Fn);let k=gt(O("wcsBufferDelay",t),L.wcsBufferDelay),R=gt(O("wcsBufferLimit",t),L.wcsBufferLimit);return{...Ul(e),displayOldPrice:s,checkoutClientId:i,checkoutWorkflow:o,checkoutWorkflowStep:a,displayPerUnit:c,displayRecurrence:l,displayTax:h,entitlement:d,extraOptions:L.extraOptions,modal:u,env:r,forceTaxExclusive:m,promotionCode:g,quantity:f,wcsApiKey:T,wcsBufferDelay:k,wcsBufferLimit:R,wcsURL:n,landscape:b}}var ji={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Dl=Date.now(),Yi=new Set,Xi=new Set,ls=new Map,hs={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},ds={filter:({level:e})=>e!==ji.DEBUG},Bl={filter:()=>!1};function Gl(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Bt(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:i,timestamp:Date.now()-Dl}}function zl(e){[...Xi].every(t=>t(e))&&Yi.forEach(t=>t(e))}function us(e){let t=(ls.get(e)??0)+1;ls.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:i=>us(`${n.namespace}/${i}`),updateConfig:vt};return Object.values(ji).forEach(i=>{n[i]=(o,...a)=>zl(Gl(i,o,e,a,r))}),Object.seal(n)}function Dr(...e){e.forEach(t=>{let{append:r,filter:n}=t;Bt(n)&&Xi.add(n),Bt(r)&&Yi.add(r)})}function Fl(e={}){let{name:t}=e,r=y(O("commerce.debug",{search:!0,storage:!0}),t===Fi.LOCAL);return Dr(r?hs:ds),t===Fi.PROD&&Dr(zi),Y}function Kl(){Yi.clear(),Xi.clear()}var Y={...us(Dn),Level:ji,Plugins:{consoleAppender:hs,debugFilter:ds,quietFilter:Bl,lanaAppender:zi},init:Fl,reset:Kl,use:Dr};var jl={[ce]:Rn,[Ee]:Mn,[le]:Vn},Yl={[ce]:Hn,[le]:Un},At=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",mt);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",Ee);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[ce,Ee,le].forEach(t=>{this.wrapperElement.classList.toggle(jl[t],t===this.state)})}notify(){(this.state===le||this.state===ce)&&(this.state===le?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===ce&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(Yl[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=os(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=mt}onceSettled(){let{error:t,promises:r,state:n}=this;return le===n?Promise.resolve(this.wrapperElement):ce===n?Promise.reject(t):new Promise((i,o)=>{r.push({resolve:i,reject:o})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=le,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),ze(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=ce,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),ze(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Ee,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!q()||this.timer)return;let r=Y.module("mas-element"),{error:n,options:i,state:o,value:a,version:s}=this;this.state=Ee,this.timer=ze(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Ee&&this.version===s&&(this.state=o,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,i)}})}};function ms(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function Br(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,ms(t)),i}function Gr(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,ms(t)),e):null}var Xl="download",Wl="upgrade";function zr(e,t={},r=""){let n=q();if(!n)return null;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m,extraOptions:g}=n.collectCheckoutOptions(t),f=Br(e,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m,extraOptions:g});return r&&(f.innerHTML=`${r}`),f}function Fr(e){return class extends e{constructor(){super(...arguments);p(this,"checkoutActionHandler");p(this,"masElement",new At(this))}attributeChangedCallback(n,i,o){this.masElement.attributeChangedCallback(n,i,o)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let i=q();if(!i)return!1;this.dataset.imsCountry||i.imsCountryPromise.then(d=>{d&&(this.dataset.imsCountry=d)},mt),n.imsCountry=null;let o=i.collectCheckoutOptions(n,this);if(!o.wcsOsi.length)return!1;let a;try{a=JSON.parse(o.extraOptions??"{}")}catch(d){this.masElement.log?.error("cannot parse exta checkout options",d)}let s=this.masElement.togglePending(o);this.setCheckoutUrl("");let c=i.resolveOfferSelectors(o),l=await Promise.all(c);l=l.map(d=>qt(d,o)),o.country=this.dataset.imsCountry||o.country;let h=await i.buildCheckoutAction?.(l.flat(),{...a,...o},this);return this.renderOffers(l.flat(),o,{},h,s)}renderOffers(n,i,o={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=q();if(!c)return!1;if(i={...JSON.parse(this.dataset.extraOptions??"null"),...i,...o},s??(s=this.masElement.togglePending(i)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(Xl,Wl),this.masElement.toggleResolved(s,n,i);let{url:h,text:d,className:u,handler:m}=a;return h&&this.setCheckoutUrl(h),d&&(this.firstElementChild.innerHTML=d),u&&this.classList.add(...u.split(" ")),m&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=m.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,i)){let h=c.buildCheckoutURL(n,i);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${i?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,i))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let i=q();if(!i)return!1;let{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:g}=i.collectCheckoutOptions(n);return Gr(this,{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:g}),!0}}}var Zt=class Zt extends Fr(HTMLButtonElement){static createCheckoutButton(t={},r=""){return zr(Zt,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};p(Zt,"is","checkout-button"),p(Zt,"tag","button");var Ke=Zt;window.customElements.get(Ke.is)||window.customElements.define(Ke.is,Ke,{extends:Ke.tag});var ql="#000000",Zl="#F8D904",Jl=/(accent|primary|secondary)(-(outline|link))?/,Ql="mas:product_code/",eh="daa-ll",Kr="daa-lh",th=["XL","L","M","S"];function rh(e,t,r){e.mnemonicIcon?.map((i,o)=>({icon:i,alt:e.mnemonicAlt[o]??"",link:e.mnemonicLink[o]??""}))?.forEach(({icon:i,alt:o,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:i,loading:t.loading,size:r?.size??"l"};o&&(s.alt=o),a&&(s.href=a);let c=te("merch-icon",s);t.append(c)})}function nh(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||ql),t.setAttribute("badge-background-color",e.badgeBackgroundColor||Zl))}function ih(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function oh(e,t,r){e.cardTitle&&r&&t.append(te(r.tag,{slot:r.slot},e.cardTitle))}function ah(e,t,r){e.subtitle&&r&&t.append(te(r.tag,{slot:r.slot},e.subtitle))}function sh(e,t,r){if(e.backgroundImage){let n={loading:t.loading??"lazy",src:e.backgroundImage};if(e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",!r)return;if(r?.attribute){t.setAttribute(r.attribute,e.backgroundImage);return}t.append(te(r.tag,{slot:r.slot},te("img",n)))}}function ch(e,t,r){if(e.prices&&r){let n=te(r.tag,{slot:r.slot},e.prices);t.append(n)}}function lh(e,t,r){if(e.description&&r){let n=te(r.tag,{slot:r.slot},e.description);t.append(n)}}function hh(e,t,r,n){let o=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);o.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||o.setAttribute(h.name,h.value);o.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=th.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),o.classList.add(...l),o}function dh(e,t,r,n){let i="fill";r&&(i="outline");let o=te("sp-button",{treatment:i,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return o.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),o}function uh(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function mh(e,t,r,n){if(e.ctas){let{slot:i}=r.ctas,o=te("div",{slot:i},e.ctas),a=[...o.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return uh(s,c);let l=Jl.exec(s.className)?.[0]??"accent",h=l.includes("accent"),d=l.includes("primary"),u=l.includes("secondary"),m=l.includes("-outline");if(l.includes("-link"))return s;let f;return h||c?f="accent":d?f="primary":u&&(f="secondary"),t.spectrum==="swc"?dh(s,r,m,f):hh(s,r,m,f)});o.innerHTML="",o.append(...a),t.append(o)}}function ph(e,t){let{tags:r}=e,n=r?.find(i=>i.startsWith(Ql))?.split("/").pop();n&&(t.setAttribute(Kr,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((i,o)=>{i.setAttribute(eh,`${i.dataset.analyticsId}-${o+1}`)}))}function fh(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function ps(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.querySelectorAll("[slot]").forEach(o=>{o.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(Kr),t.variant=n,await t.updateComplete;let{aemFragmentMapping:i}=t.variantLayout;i&&(rh(r,t,i.mnemonics),nh(r,t),ih(r,t,i.size),oh(r,t,i.title),ah(r,t,i.subtitle),ch(r,t,i.prices),sh(r,t,i.backgroundImage),lh(r,t,i.description),mh(r,t,i,n),ph(r,t),fh(t))}var gh="merch-card",xh=":start",bh=":ready",vh=1e4,fs="merch-card:",Qt,Wi,Jt=class extends ee{constructor(){super();F(this,Qt);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}static getFragmentMapping(r){return ta[r]}firstUpdated(){this.variantLayout=qn(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=qn(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let i of n){await i.onceSettled();let o=i.value?.[0]?.planType;if(!o)return;let a=this.stockOfferOsis[o];if(!a)return;let s=i.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),i.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let i of n)i.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(i=>{if(r){n[i].order=Math.min(n[i].order||2,2);return}let o=n[i].order;o===1||isNaN(o)||(n[i].order=Number(o)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${fs}${r}${xh}`),this.addEventListener(Ar,this.handleQuantitySelection),this.addEventListener(Cn,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Re,this.handleAemFragmentEvents),this.addEventListener(Oe,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(Ar,this.handleQuantitySelection),this.storageOptions?.removeEventListener(vr,this.handleStorageChange),this.removeEventListener(Re,this.handleAemFragmentEvents),this.removeEventListener(Oe,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Re&&ge(this,Qt,Wi).call(this,"AEM fragment cannot be loaded"),r.type===Oe&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await ps(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(o=>setTimeout(()=>o(!1),vh));if(await Promise.race([r,n])===!0){performance.mark(`${fs}${this.id}${bh}`),this.dispatchEvent(new CustomEvent(Nn,{bubbles:!0,composed:!0}));return}ge(this,Qt,Wi).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let r=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll('a[is="checkout-link"].con-button')).length===2&&r&&r.parentElement.classList.add("footer-column")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||(this.dispatchEvent(new CustomEvent(In,{bubbles:!0})),this.displayFooterElementsInColumn())}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(vr,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let i=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(i)}):n.replaceWith(i)}}};Qt=new WeakSet,Wi=function(r){this.dispatchEvent(new CustomEvent(On,{detail:r,bubbles:!0,composed:!0}))},p(Jt,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,i,o]=r.split(",");return{PUF:n,ABM:i,M2M:o}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[i,o,a]=n.split(":"),s=Number(o);return[i,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:i,size:o}])=>[n,i,o].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:Kr,reflect:!0},loading:{type:String}}),p(Jt,"styles",[Bo,ra(),...Go()]);customElements.define(gh,Jt);var Et=class extends ee{constructor(){super(),this.size="m",this.alt="",this.loading="lazy"}render(){let{href:t}=this;return t?x`
diff --git a/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js b/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js index 3670eece4a..4e5f046f1d 100644 --- a/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js +++ b/libs/features/mas/src/sidenav/merch-sidenav-checkbox-group.js @@ -65,7 +65,7 @@ export class MerchSidenavCheckboxGroup extends LitElement { h3El.textContent = this.sidenavCheckboxTitle; this.prepend(h3El); - this.childNodes.forEach(el => { + this.childNodes.forEach((el) => { if (el.id !== id) { el.setAttribute('role', 'group'); el.setAttribute('aria-labelledby', id); From 83887b84efd1372a76a69f8d71f68903af6a05ac Mon Sep 17 00:00:00 2001 From: Bozo Jovicic Date: Mon, 27 Jan 2025 16:01:57 +0100 Subject: [PATCH 6/7] Rebuild mas --- libs/deps/mas/merch-card.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/deps/mas/merch-card.js b/libs/deps/mas/merch-card.js index 2f79edbafb..1287533c64 100644 --- a/libs/deps/mas/merch-card.js +++ b/libs/deps/mas/merch-card.js @@ -2120,6 +2120,18 @@ body.merch-modal { height: 100vh; } +merch-sidenav-checkbox-group h3 { + font-size: 14px; + font-style: normal; + font-weight: 700; + height: 32px; + letter-spacing: 0px; + padding: 0px; + line-height: 18.2px; + color: var(--color-gray-600); + margin: 0px; +} + `;document.head.appendChild(jr);var Ee;(function(e){e.V2="UCv2",e.V3="UCv3"})(Ee||(Ee={}));var we;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(we||(we={}));var _t;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(_t||(_t={}));var P;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(P||(P={}));var _;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(_||(_={}));var Lt;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Lt||(Lt={}));var Ct;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Ct||(Ct={}));var Pt;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(Pt||(Pt={}));var Nt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Nt||(Nt={}));var Yr="tacocat.js";var Wr=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function ue(e,t={},{metadata:r=!0,search:n=!0,storage:o=!0}={}){let i;if(n&&i==null){let a=new URLSearchParams(window.location.search),s=Se(n)?n:e;i=a.get(s)}if(o&&i==null){let a=Se(o)?o:e;i=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&i==null){let a=Do(Se(r)?r:e);i=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return i??t[e]}var pe=()=>{};var qr=e=>typeof e=="boolean",Ae=e=>typeof e=="function",Rt=e=>typeof e=="number",Xr=e=>e!=null&&typeof e=="object";var Se=e=>typeof e=="string";var Te=e=>Rt(e)&&Number.isFinite(e)&&e>0;function O(e,t){if(qr(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Do(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}var Uo=Date.now(),Ot=()=>`(+${Date.now()-Uo}ms)`,Ye=new Set,Go=O(ue("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function Kr(e){let t=`[${Yr}/${e}]`,r=(a,s,...c)=>a?!0:(o(s,...c),!1),n=Go?(a,...s)=>{console.debug(`${t} ${a}`,...s,Ot())}:()=>{},o=(a,...s)=>{let c=`${t} ${a}`;Ye.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:o,warn:(a,...s)=>{let c=`${t} ${a}`;Ye.forEach(([,l])=>l(c,...s))}}}function zo(e,t){let r=[e,t];return Ye.add(r),()=>{Ye.delete(r)}}zo((e,...t)=>{console.error(e,...t,Ot())},(e,...t)=>{console.warn(e,...t,Ot())});var Zr="ABM",Qr="PUF",Jr="M2M",en="PERPETUAL",tn="P3Y",Fo="TAX_INCLUSIVE_DETAILS",$o="TAX_EXCLUSIVE",rn={ABM:Zr,PUF:Qr,M2M:Jr,PERPETUAL:en,P3Y:tn},sh={[Zr]:{commitment:P.YEAR,term:_.MONTHLY},[Qr]:{commitment:P.YEAR,term:_.ANNUAL},[Jr]:{commitment:P.MONTH,term:_.MONTHLY},[en]:{commitment:P.PERPETUAL,term:void 0},[tn]:{commitment:P.THREE_MONTHS,term:_.P3Y}};function Mt(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:o,priceWithoutDiscountAndTax:i,taxDisplay:a}=t;if(a!==Fo)return e;let s={...e,priceDetails:{...t,price:o??r,priceWithoutDiscount:i??n,taxDisplay:$o}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var Ht=function(e,t){return Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Ht(e,t)};function _e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ht(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var v=function(){return v=Object.assign||function(t){for(var r,n=1,o=arguments.length;n0}),r=[],n=0,o=t;n1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(Yo,function(c,l,h,f,u,g){if(l)t.minimumIntegerDigits=h.length;else{if(f&&u)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(un.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(cn.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(cn,function(c,l,h,f,u,g){return h==="*"?t.minimumFractionDigits=l.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:u&&g?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+g.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?t=v(v({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=v(v({},t),ln(i)));continue}if(dn.test(o.stem)){t=v(v({},t),ln(o.stem));continue}var a=pn(o.stem);a&&(t=v(v({},t),a));var s=Wo(o.stem);s&&(t=v(v({},t),s))}return t}var Ce={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function gn(e,t){for(var r="",n=0;n>1),c="a",l=qo(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else o==="J"?r+="H":r+=o}return r}function qo(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var o=Ce[n||""]||Ce[r||""]||Ce["".concat(r,"-001")]||Ce["001"];return o[0]}var Bt,Xo=new RegExp("^".concat(kt.source,"*")),Ko=new RegExp("".concat(kt.source,"*$"));function y(e,t){return{start:e,end:t}}var Zo=!!String.prototype.startsWith,Qo=!!String.fromCodePoint,Jo=!!Object.fromEntries,ei=!!String.prototype.codePointAt,ti=!!String.prototype.trimStart,ri=!!String.prototype.trimEnd,ni=!!Number.isSafeInteger,oi=ni?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ut=!0;try{xn=En("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ut=((Bt=xn.exec("a"))===null||Bt===void 0?void 0:Bt[0])==="a"}catch{Ut=!1}var xn,bn=Zo?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Gt=Qo?String.fromCodePoint:function(){for(var t=[],r=0;ri;){if(a=t[i++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},vn=Jo?Object.fromEntries:function(t){for(var r={},n=0,o=t;n=n)){var o=t.charCodeAt(r),i;return o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},ii=ti?function(t){return t.trimStart()}:function(t){return t.replace(Xo,"")},ai=ri?function(t){return t.trimEnd()}:function(t){return t.replace(Ko,"")};function En(e,t){return new RegExp(e,t)}var zt;Ut?(Dt=En("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),zt=function(t,r){var n;Dt.lastIndex=r;var o=Dt.exec(t);return(n=o[1])!==null&&n!==void 0?n:""}):zt=function(t,r){for(var n=[];;){var o=yn(t,r);if(o===void 0||Sn(o)||li(o))break;n.push(o),r+=o>=65536?2:1}return Gt.apply(void 0,n)};var Dt,wn=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(t,n);if(a.err)return a;o.push(a.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),o.push({type:w.pound,location:y(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(x.UNMATCHED_CLOSING_TAG,y(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Ft(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;o.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;o.push(a.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:w.literal,value:"<".concat(o,"/>"),location:y(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:w.tag,value:o,children:a,location:y(n,this.clonePosition())},err:null}:this.error(x.INVALID_TAG,y(s,this.clonePosition())))}else return this.error(x.UNCLOSED_TAG,y(n,this.clonePosition()))}else return this.error(x.INVALID_TAG,y(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ci(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var a=this.tryParseUnquoted(t,r);if(a){o+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){o+=s;continue}break}var c=y(n,this.clonePosition());return{val:{type:w.literal,value:o,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!si(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Gt.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Gt(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(x.EMPTY_ARGUMENT,y(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(x.MALFORMED_ARGUMENT,y(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:w.argument,value:o,location:y(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition())):this.parseArgumentOptions(t,r,o,n);default:return this.error(x.MALFORMED_ARGUMENT,y(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=zt(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),a=y(t,i);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,o){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(x.EXPECT_ARGUMENT_TYPE,y(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var u=ai(f.val);if(u.length===0)return this.error(x.EXPECT_ARGUMENT_STYLE,y(this.clonePosition(),this.clonePosition()));var g=y(h,this.clonePosition());l={style:u,styleLocation:g}}var b=this.tryParseArgumentClose(o);if(b.err)return b;var E=y(o,this.clonePosition());if(l&&bn(l?.style,"::",0)){var R=ii(l.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(R,l.styleLocation);return f.err?f:{val:{type:w.number,value:n,location:E,style:f.val},err:null}}else{if(R.length===0)return this.error(x.EXPECT_DATE_TIME_SKELETON,E);var G=R;this.locale&&(G=gn(R,this.locale));var u={type:q.dateTime,pattern:G,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?an(G):{}},B=s==="date"?w.date:w.time;return{val:{type:B,value:n,location:E,style:u},err:null}}}return{val:{type:s==="number"?w.number:s==="date"?w.date:w.time,value:n,location:E,style:(i=l?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var M=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS,y(M,v({},M)));this.bumpSpace();var V=this.parseIdentifierIfPossible(),D=0;if(s!=="select"&&V.value==="offset"){if(!this.bumpIf(":"))return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,y(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),V=this.parseIdentifierIfPossible(),D=f.val}var j=this.tryParsePluralOrSelectOptions(t,s,r,V);if(j.err)return j;var b=this.tryParseArgumentClose(o);if(b.err)return b;var ke=y(o,this.clonePosition());return s==="select"?{val:{type:w.select,value:n,options:vn(j.val),location:ke},err:null}:{val:{type:w.plural,value:n,options:vn(j.val),offset:D,pluralType:s==="plural"?"cardinal":"ordinal",location:ke},err:null}}default:return this.error(x.INVALID_ARGUMENT_TYPE,y(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(x.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,y(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=mn(t)}catch{return this.error(x.INVALID_NUMBER_SKELETON,r)}return{val:{type:q.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?fn(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,o){for(var i,a=!1,s=[],c=new Set,l=o.value,h=o.location;;){if(l.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR,x.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=y(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?x.DUPLICATE_SELECT_ARGUMENT_SELECTOR:x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:x.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,y(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,r,n);if(b.err)return b;var E=this.tryParseArgumentClose(g);if(E.err)return E;s.push([l,{value:b.val,location:y(g,this.clonePosition())}]),c.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,h=i.location}return s.length===0?this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR:x.EXPECT_PLURAL_ARGUMENT_SELECTOR,y(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(x.MISSING_OTHER_CLAUSE,y(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var c=y(o,this.clonePosition());return i?(a*=n,oi(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=yn(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(bn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Sn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Ft(e){return e>=97&&e<=122||e>=65&&e<=90}function si(e){return Ft(e)||e===47}function ci(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Sn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function li(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function $t(e){e.forEach(function(t){if(delete t.location,Ze(t)||Qe(t))for(var r in t.options)delete t.options[r].location,$t(t.options[r].value);else qe(t)&&et(t.style)||(Xe(t)||Ke(t))&&Le(t.style)?delete t.style.location:Je(t)&&$t(t.children)})}function An(e,t){t===void 0&&(t={}),t=v({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new wn(e,t).parse();if(r.err){var n=SyntaxError(x[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||$t(r.val),r.val}function Pe(e,t){var r=t&&t.cache?t.cache:fi,n=t&&t.serializer?t.serializer:pi,o=t&&t.strategy?t.strategy:mi;return o(e,{cache:r,serializer:n})}function hi(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Tn(e,t,r,n){var o=hi(n)?n:r(n),i=t.get(o);return typeof i>"u"&&(i=e.call(this,n),t.set(o,i)),i}function _n(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,n),t.set(o,i)),i}function Vt(e,t,r,n,o){return r.bind(t,e,n,o)}function mi(e,t){var r=e.length===1?Tn:_n;return Vt(e,this,r,t.cache.create(),t.serializer)}function di(e,t){return Vt(e,this,_n,t.cache.create(),t.serializer)}function ui(e,t){return Vt(e,this,Tn,t.cache.create(),t.serializer)}var pi=function(){return JSON.stringify(arguments)};function jt(){this.cache=Object.create(null)}jt.prototype.get=function(e){return this.cache[e]};jt.prototype.set=function(e,t){this.cache[e]=t};var fi={create:function(){return new jt}},tt={variadic:di,monadic:ui};var X;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(X||(X={}));var Ne=function(e){_e(t,e);function t(r,n,o){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Yt=function(e){_e(t,e);function t(r,n,o,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),X.INVALID_VALUE,i)||this}return t}(Ne);var Ln=function(e){_e(t,e);function t(r,n,o){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),X.INVALID_VALUE,o)||this}return t}(Ne);var Cn=function(e){_e(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),X.MISSING_VALUE,n)||this}return t}(Ne);var C;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(C||(C={}));function gi(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==C.literal||r.type!==C.literal?t.push(r):n.value+=r.value,t},[])}function xi(e){return typeof e=="function"}function Re(e,t,r,n,o,i,a){if(e.length===1&&It(e[0]))return[{type:C.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=An,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Nn=Pn;var Ei=/[0-9\-+#]/,wi=/[^\d\-+#]/g;function Rn(e){return e.search(Ei)}function Si(e="#.##"){let t={},r=e.length,n=Rn(e);t.prefix=n>0?e.substring(0,n):"";let o=Rn(e.split("").reverse().join("")),i=r-o,a=e.substring(i,i+1),s=i+(a==="."||a===","?1:0);t.suffix=o>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(wi);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function Ai(e,t,r){let n=!1,o={value:e};e<0&&(n=!0,o.value=-o.value),o.sign=n?"-":"",o.value=Number(o.value).toFixed(t.fraction&&t.fraction.length),o.value=Number(o.value).toString();let i=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=o.value.split(".");return(!s||s&&s.length<=i)&&(s=i<0?"":(+("0."+s)).toFixed(i+1).replace("0.","")),o.integer=a,o.fraction=s,Ti(o,t),(o.result==="0"||o.result==="")&&(n=!1,o.sign=""),!n&&t.maskHasPositiveSign?o.sign="+":n&&t.maskHasPositiveSign?o.sign="-":n&&(o.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),o}function Ti(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),o=n&&n.indexOf("0");if(o>-1)for(;e.integer.lengthe*12,Bn=(e,t)=>{let{start:r,end:n,displaySummary:{amount:o,duration:i,minProductQuantity:a,outcomeType:s}={}}=e;if(!(o&&i&&s&&a))return!1;let c=t?new Date(t):new Date;if(!r||!n)return!1;let l=new Date(r),h=new Date(n);return c>=l&&c<=h},K={MONTH:"MONTH",YEAR:"YEAR"},Ci={[_.ANNUAL]:12,[_.MONTHLY]:1,[_.THREE_YEARS]:36,[_.TWO_YEARS]:24},Xt=(e,t)=>({accept:e,round:t}),Pi=[Xt(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Xt(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Xt(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Kt={[P.YEAR]:{[_.MONTHLY]:K.MONTH,[_.ANNUAL]:K.YEAR},[P.MONTH]:{[_.MONTHLY]:K.MONTH}},Ni=(e,t)=>e.indexOf(`'${t}'`)===0,Ri=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Un(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Mi(e)),r},Oi=e=>{let t=Hi(e),r=Ni(e,t),n=e.replace(/'.*?'/,""),o=In.test(n)||kn.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:o}},Dn=e=>e.replace(In,Hn).replace(kn,Hn),Mi=e=>e.match(/#(.?)#/)?.[1]===Mn?Li:Mn,Hi=e=>e.match(/'(.*?)'/)?.[1]??"",Un=e=>e.match(/0(.?)0/)?.[1]??"";function fe({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},o,i=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=Oi(e),l=r?Un(e):"",h=Ri(e,r),f=r?2:0,u=i(t,{currencySymbol:a}),g=n?u.toLocaleString("hi-IN",{minimumFractionDigits:f,maximumFractionDigits:f}):On(h,u),b=r?g.lastIndexOf(l):g.length,E=g.substring(0,b),R=g.substring(b+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,g).replace(/SYMBOL/,a),currencySymbol:a,decimals:R,decimalsDelimiter:l,hasCurrencySpace:c,integer:E,isCurrencyFirst:s,recurrenceTerm:o}}var Gn=e=>{let{commitment:t,term:r,usePrecision:n}=e,o=Ci[r]??1;return fe(e,o>1?K.MONTH:Kt[t]?.[r],i=>{let a={divisor:o,price:i,usePrecision:n},{round:s}=Pi.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},zn=({commitment:e,term:t,...r})=>fe(r,Kt[e]?.[t]),Fn=e=>{let{commitment:t,instant:r,price:n,originalPrice:o,priceWithoutDiscount:i,promotion:a,quantity:s=1,term:c}=e;if(t===P.YEAR&&c===_.MONTHLY){if(!a)return fe(e,K.YEAR,qt);let{displaySummary:{outcomeType:l,duration:h,minProductQuantity:f=1}={}}=a;switch(l){case"PERCENTAGE_DISCOUNT":if(s>=f&&Bn(a,r)){let u=parseInt(h.replace("P","").replace("M",""));if(isNaN(u))return qt(n);let g=s*o*u,b=s*i*(12-u),E=Math.floor((g+b)*100)/100;return fe({...e,price:E},K.YEAR)}default:return fe(e,K.YEAR,()=>qt(i??n))}}return fe(e,Kt[t]?.[c])};var Ii={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},ki=Kr("ConsonantTemplates/price"),Bi=/<\/?[^>]+(>|$)/g,L={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},Z={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Di="TAX_EXCLUSIVE",Ui=e=>Xr(e)?Object.entries(e).filter(([,t])=>Se(t)||Rt(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Wr(n)+'"'}`,""):"",N=(e,t,r,n=!1)=>`${n?Dn(t):t??""}`;function Gi(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:o,hasCurrencySpace:i,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},f={}){let u=N(L.currencySymbol,r),g=N(L.currencySpace,i?" ":""),b="";return s&&(b+=u+g),b+=N(L.integer,a),b+=N(L.decimalsDelimiter,o),b+=N(L.decimals,n),s||(b+=g+u),b+=N(L.recurrence,c,null,!0),b+=N(L.unitType,l,null,!0),b+=N(L.taxInclusivity,h,!0),N(e,b,{...f,"aria-label":t})}var I=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1,instant:n=void 0}={})=>({country:o,displayFormatted:i=!0,displayRecurrence:a=!0,displayPerUnit:s=!1,displayTax:c=!1,language:l,literals:h={},quantity:f=1}={},{commitment:u,offerSelectorIds:g,formatString:b,price:E,priceWithoutDiscount:R,taxDisplay:G,taxTerm:B,term:M,usePrecision:V,promotion:D}={},j={})=>{Object.entries({country:o,formatString:b,language:l,price:E}).forEach(([U,ct])=>{if(ct==null)throw new Error(`Argument "${U}" is missing for osi ${g?.toString()}, country ${o}, language ${l}`)});let ke={...Ii,...h},uo=`${l.toLowerCase()}-${o.toUpperCase()}`;function ee(U,ct){let lt=ke[U];if(lt==null)return"";try{return new Nn(lt.replace(Bi,""),uo).format(ct)}catch{return ki.error("Failed to format literal:",lt),""}}let po=t&&R?R:E,sr=e?Gn:zn;r&&(sr=Fn);let{accessiblePrice:fo,recurrenceTerm:it,...cr}=sr({commitment:u,formatString:b,instant:n,isIndianPrice:o==="IN",originalPrice:E,priceWithoutDiscount:R,price:e?E:po,promotion:D,quantity:f,term:M,usePrecision:V}),te=fo,at="";if(O(a)&&it){let U=ee(Z.recurrenceAriaLabel,{recurrenceTerm:it});U&&(te+=" "+U),at=ee(Z.recurrenceLabel,{recurrenceTerm:it})}let st="";if(O(s)){st=ee(Z.perUnitLabel,{perUnit:"LICENSE"});let U=ee(Z.perUnitAriaLabel,{perUnit:"LICENSE"});U&&(te+=" "+U)}let xe="";O(c)&&B&&(xe=ee(G===Di?Z.taxExclusiveLabel:Z.taxInclusiveLabel,{taxTerm:B}),xe&&(te+=" "+xe)),t&&(te=ee(Z.strikethroughAriaLabel,{strikethroughPrice:te}));let be=L.container;if(e&&(be+=" "+L.containerOptical),t&&(be+=" "+L.containerStrikethrough),r&&(be+=" "+L.containerAnnual),O(i))return Gi(be,{...cr,accessibleLabel:te,recurrenceLabel:at,perUnitLabel:st,taxInclusivityLabel:xe},j);let{currencySymbol:lr,decimals:go,decimalsDelimiter:xo,hasCurrencySpace:hr,integer:bo,isCurrencyFirst:vo}=cr,re=[bo,xo,go];vo?(re.unshift(hr?"\xA0":""),re.unshift(lr)):(re.push(hr?"\xA0":""),re.push(lr)),re.push(at,st,xe);let yo=re.join("");return N(be,yo,j)},$n=()=>(e,t,r)=>{let o=(e.displayOldPrice===void 0||O(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${I()(e,t,r)}${o?" "+I({displayStrikethrough:!0})(e,t,r):""}`},Vn=()=>(e,t,r)=>{let{instant:n}=e;try{n||(n=new URLSearchParams(document.location.search).get("instant")),n&&(n=new Date(n))}catch{n=void 0}let o={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||O(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?I({displayStrikethrough:!0})(o,t,r)+" ":""}${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0,instant:n})(o,t,r)}${N(L.containerAnnualSuffix,")")}`},jn=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0})(n,t,r)}${N(L.containerAnnualSuffix,")")}`};var zi=I(),Fi=$n(),$i=I({displayOptical:!0}),Vi=I({displayStrikethrough:!0}),ji=I({displayAnnual:!0}),Yi=jn(),Wi=Vn();var qi=(e,t)=>{if(!(!Te(e)||!Te(t)))return Math.floor((t-e)/t*100)},Yn=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,o=qi(r,n);return o===void 0?'':`${o}%`};var Xi=Yn();var{freeze:Oe}=Object,Zt=Oe({...Ee}),Qt=Oe({...we}),Jt={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},vd=Oe({...P}),yd=Oe({...rn}),Ed=Oe({..._});var qn="mas-commerce-service";function Xn(e,{once:t=!1}={}){let r=null;function n(){let o=document.querySelector(qn);o!==r&&(r=o,o&&e(o))}return document.addEventListener(ut,n,{once:t}),Me(n),()=>document.removeEventListener(ut,n)}function Kn(e,{country:t,forceTaxExclusive:r,perpetual:n}){let o;if(e.length<2)o=e;else{let i=t==="GB"||n?"EN":"MULT",[a,s]=e;o=[a.language===i?a:s]}return r&&(o=o.map(Mt)),o}var Me=e=>window.setTimeout(e);function Q(){return document.getElementsByTagName(qn)?.[0]}var J={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},Zn=1e3,Qn=new Set;function Qi(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function Jn(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:o,status:i}=e;return[n,i,o].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!J.serializableTypes.includes(r))return r}return e}function Ji(e,t){if(!J.ignoredProperties.includes(e))return Jn(t)}var er={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],o=[],i=t;r.forEach(l=>{l!=null&&(Qi(l)?n:o).push(l)}),n.length&&(i+=" "+n.map(Jn).join(" "));let{pathname:a,search:s}=window.location,c=`${J.delimiter}page=${a}${s}`;c.length>Zn&&(c=`${c.slice(0,Zn)}`),i+=c,o.length&&(i+=`${J.delimiter}facts=`,i+=JSON.stringify(o,Ji)),Qn.has(i)||(Qn.add(i),window.lana?.log(i,J))}};function eo(e){Object.assign(J,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in J&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var ea=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:Zt.V3,checkoutWorkflowStep:Qt.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Jt.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:gt.PUBLISHED,wcsBufferLimit:1});var tr=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});var rr={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},ta=Date.now(),nr=new Set,or=new Set,to=new Map,ro={append({level:e,message:t,params:r,timestamp:n,source:o}){console[e](`${n}ms [${o}] %c${t}`,"font-weight: bold;",...r)}},no={filter:({level:e})=>e!==rr.DEBUG},ra={filter:()=>!1};function na(e,t,r,n,o){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Ae(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:o,timestamp:Date.now()-ta}}function oa(e){[...or].every(t=>t(e))&&nr.forEach(t=>t(e))}function oo(e){let t=(to.get(e)??0)+1;to.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:o=>oo(`${n.namespace}/${o}`),updateConfig:eo};return Object.values(rr).forEach(o=>{n[o]=(i,...a)=>oa(na(o,i,e,a,r))}),Object.seal(n)}function rt(...e){e.forEach(t=>{let{append:r,filter:n}=t;Ae(n)&&or.add(n),Ae(r)&&nr.add(r)})}function ia(e={}){let{name:t}=e,r=O(ue("commerce.debug",{search:!0,storage:!0}),t===tr.LOCAL);return rt(r?ro:no),t===tr.PROD&&rt(er),ir}function aa(){nr.clear(),or.clear()}var ir={...oo(Pr),Level:rr,Plugins:{consoleAppender:ro,debugFilter:no,quietFilter:ra,lanaAppender:er},init:ia,reset:aa,use:rt};var sa={[F]:Ar,[Y]:Tr,[$]:_r},ca={[F]:Lr,[$]:Cr},nt=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",pe);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",Y);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[F,Y,$].forEach(t=>{this.wrapperElement.classList.toggle(sa[t],t===this.state)})}notify(){(this.state===$||this.state===F)&&(this.state===$?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===F&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(ca[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=Xn(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=pe}onceSettled(){let{error:t,promises:r,state:n}=this;return $===n?Promise.resolve(this.wrapperElement):F===n?Promise.reject(t):new Promise((o,i)=>{r.push({resolve:o,reject:i})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=$,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Me(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=F,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),Me(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Y,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!Q()||this.timer)return;let r=ir.module("mas-element"),{error:n,options:o,state:i,value:a,version:s}=this;this.state=Y,this.timer=Me(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Y&&this.version===s&&(this.state=i,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,o)}})}};function io(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function ao(e,t={}){let{tag:r,is:n}=e,o=document.createElement(r,{is:n});return o.setAttribute("is",n),Object.assign(o.dataset,io(t)),o}function so(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,io(t)),e):null}var la="download",ha="upgrade";function co(e,t={},r=""){let n=Q();if(!n)return null;let{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:f,quantity:u,wcsOsi:g,extraOptions:b}=n.collectCheckoutOptions(t),E=ao(e,{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:f,quantity:u,wcsOsi:g,extraOptions:b});return r&&(E.innerHTML=`${r}`),E}function lo(e){return class extends e{constructor(){super(...arguments);p(this,"checkoutActionHandler");p(this,"masElement",new nt(this))}attributeChangedCallback(n,o,i){this.masElement.attributeChangedCallback(n,o,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let o=Q();if(!o)return!1;this.dataset.imsCountry||o.imsCountryPromise.then(f=>{f&&(this.dataset.imsCountry=f)},pe),n.imsCountry=null;let i=o.collectCheckoutOptions(n,this);if(!i.wcsOsi.length)return!1;let a;try{a=JSON.parse(i.extraOptions??"{}")}catch(f){this.masElement.log?.error("cannot parse exta checkout options",f)}let s=this.masElement.togglePending(i);this.setCheckoutUrl("");let c=o.resolveOfferSelectors(i),l=await Promise.all(c);l=l.map(f=>Kn(f,i)),i.country=this.dataset.imsCountry||i.country;let h=await o.buildCheckoutAction?.(l.flat(),{...a,...i},this);return this.renderOffers(l.flat(),i,{},h,s)}renderOffers(n,o,i={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=Q();if(!c)return!1;if(o={...JSON.parse(this.dataset.extraOptions??"null"),...o,...i},s??(s=this.masElement.togglePending(o)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(la,ha),this.masElement.toggleResolved(s,n,o);let{url:h,text:f,className:u,handler:g}=a;return h&&this.setCheckoutUrl(h),f&&(this.firstElementChild.innerHTML=f),u&&this.classList.add(...u.split(" ")),g&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=g.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,o)){let h=c.buildCheckoutURL(n,o);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,o))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let o=Q();if(!o)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:f,promotionCode:u,quantity:g,wcsOsi:b}=o.collectCheckoutOptions(n);return so(this,{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:f,promotionCode:u,quantity:g,wcsOsi:b}),!0}}}var He=class He extends lo(HTMLButtonElement){static createCheckoutButton(t={},r=""){return co(He,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};p(He,"is","checkout-button"),p(He,"tag","button");var ge=He;window.customElements.get(ge.is)||window.customElements.define(ge.is,ge,{extends:ge.tag});var ma="#000000",da="#F8D904",ua=/(accent|primary|secondary)(-(outline|link))?/,pa="mas:product_code/",fa="daa-ll",ot="daa-lh",ga=["XL","L","M","S"];function xa(e,t,r){e.mnemonicIcon?.map((o,i)=>({icon:o,alt:e.mnemonicAlt[i]??"",link:e.mnemonicLink[i]??""}))?.forEach(({icon:o,alt:i,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:o,loading:t.loading,size:r?.size??"l"};i&&(s.alt=i),a&&(s.href=a);let c=k("merch-icon",s);t.append(c)})}function ba(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||ma),t.setAttribute("badge-background-color",e.badgeBackgroundColor||da))}function va(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function ya(e,t,r){e.cardTitle&&r&&t.append(k(r.tag,{slot:r.slot},e.cardTitle))}function Ea(e,t,r){e.subtitle&&r&&t.append(k(r.tag,{slot:r.slot},e.subtitle))}function wa(e,t,r){if(e.backgroundImage){let n={loading:t.loading??"lazy",src:e.backgroundImage};if(e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",!r)return;if(r?.attribute){t.setAttribute(r.attribute,e.backgroundImage);return}t.append(k(r.tag,{slot:r.slot},k("img",n)))}}function Sa(e,t,r){if(e.prices&&r){let n=k(r.tag,{slot:r.slot},e.prices);t.append(n)}}function Aa(e,t,r){if(e.description&&r){let n=k(r.tag,{slot:r.slot},e.description);t.append(n)}}function Ta(e,t,r,n){let i=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);i.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||i.setAttribute(h.name,h.value);i.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=ga.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),i.classList.add(...l),i}function _a(e,t,r,n){let o="fill";r&&(o="outline");let i=k("sp-button",{treatment:o,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return i.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),i}function La(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function Ca(e,t,r,n){if(e.ctas){let{slot:o}=r.ctas,i=k("div",{slot:o},e.ctas),a=[...i.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return La(s,c);let l=ua.exec(s.className)?.[0]??"accent",h=l.includes("accent"),f=l.includes("primary"),u=l.includes("secondary"),g=l.includes("-outline");if(l.includes("-link"))return s;let E;return h||c?E="accent":f?E="primary":u&&(E="secondary"),t.spectrum==="swc"?_a(s,r,g,E):Ta(s,r,g,E)});i.innerHTML="",i.append(...a),t.append(i)}}function Pa(e,t){let{tags:r}=e,n=r?.find(o=>o.startsWith(pa))?.split("/").pop();n&&(t.setAttribute(ot,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((o,i)=>{o.setAttribute(fa,`${o.dataset.analyticsId}-${i+1}`)}))}function Na(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function ho(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.querySelectorAll("[slot]").forEach(i=>{i.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(ot),t.variant=n,await t.updateComplete;let{aemFragmentMapping:o}=t.variantLayout;o&&(xa(r,t,o.mnemonics),ba(r,t),va(r,t,o.size),ya(r,t,o.title),Ea(r,t,o.subtitle),Sa(r,t,o.prices),wa(r,t,o.backgroundImage),Aa(r,t,o.description),Ca(r,t,o,n),Pa(r,t),Na(t))}var Oa="merch-card",Ma=":start",Ha=":ready",Ia=1e4,mo="merch-card:",Ie,ar,d=class extends Ra{constructor(){super();Be(this,Ie);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}static getFragmentMapping(r){return $r[r]}firstUpdated(){this.variantLayout=Tt(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=Tt(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let o of n){await o.onceSettled();let i=o.value?.[0]?.planType;if(!i)return;let a=this.stockOfferOsis[i];if(!a)return;let s=o.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),o.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let o of n)o.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(o=>{if(r){n[o].order=Math.min(n[o].order||2,2);return}let i=n[o].order;i===1||isNaN(i)||(n[o].order=Number(i)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${mo}${r}${Ma}`),this.addEventListener(ft,this.handleQuantitySelection),this.addEventListener(vr,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Fe,this.handleAemFragmentEvents),this.addEventListener(ze,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(ft,this.handleQuantitySelection),this.storageOptions?.removeEventListener(pt,this.handleStorageChange),this.removeEventListener(Fe,this.handleAemFragmentEvents),this.removeEventListener(ze,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Fe&&dt(this,Ie,ar).call(this,"AEM fragment cannot be loaded"),r.type===ze&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await ho(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(i=>i.onceSettled().catch(()=>i))).then(i=>i.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(i=>setTimeout(()=>i(!1),Ia));if(await Promise.race([r,n])===!0){performance.mark(`${mo}${this.id}${Ha}`),this.dispatchEvent(new CustomEvent(wr,{bubbles:!0,composed:!0}));return}dt(this,Ie,ar).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let r=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll('a[is="checkout-link"].con-button')).length===2&&r&&r.parentElement.classList.add("footer-column")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||(this.dispatchEvent(new CustomEvent(yr,{bubbles:!0})),this.displayFooterElementsInColumn())}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(pt,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let o=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(o)}):n.replaceWith(o)}}};Ie=new WeakSet,ar=function(r){this.dispatchEvent(new CustomEvent(Sr,{detail:r,bubbles:!0,composed:!0}))},p(d,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,o,i]=r.split(",");return{PUF:n,ABM:o,M2M:i}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[o,i,a]=n.split(":"),s=Number(i);return[o,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:o,size:i}])=>[n,o,i].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:ot,reflect:!0},loading:{type:String}}),p(d,"styles",[gr,Vr(),...xr()]);customElements.define(Oa,d); From b8541c7927c92d73d3f0fcafb58887e11da4c13f Mon Sep 17 00:00:00 2001 From: Bozo Jovicic Date: Mon, 27 Jan 2025 16:12:56 +0100 Subject: [PATCH 7/7] MWPW-162026 [Milo][Sev2][Catalog] Group of checkboxes is missing FIELDSET element - filter checkboxes --- libs/deps/mas/mas.js | 3 --- libs/deps/mas/merch-card.js | 3 --- libs/features/mas/dist/mas.js | 3 --- libs/features/mas/src/global.css.js | 3 --- 4 files changed, 12 deletions(-) diff --git a/libs/deps/mas/mas.js b/libs/deps/mas/mas.js index 36d74d812a..475483275a 100644 --- a/libs/deps/mas/mas.js +++ b/libs/deps/mas/mas.js @@ -2097,11 +2097,8 @@ body.merch-modal { merch-sidenav-checkbox-group h3 { font-size: 14px; - font-style: normal; - font-weight: 700; height: 32px; letter-spacing: 0px; - padding: 0px; line-height: 18.2px; color: var(--color-gray-600); margin: 0px; diff --git a/libs/deps/mas/merch-card.js b/libs/deps/mas/merch-card.js index 1287533c64..ff0e309ea0 100644 --- a/libs/deps/mas/merch-card.js +++ b/libs/deps/mas/merch-card.js @@ -2122,11 +2122,8 @@ body.merch-modal { merch-sidenav-checkbox-group h3 { font-size: 14px; - font-style: normal; - font-weight: 700; height: 32px; letter-spacing: 0px; - padding: 0px; line-height: 18.2px; color: var(--color-gray-600); margin: 0px; diff --git a/libs/features/mas/dist/mas.js b/libs/features/mas/dist/mas.js index 36d74d812a..475483275a 100644 --- a/libs/features/mas/dist/mas.js +++ b/libs/features/mas/dist/mas.js @@ -2097,11 +2097,8 @@ body.merch-modal { merch-sidenav-checkbox-group h3 { font-size: 14px; - font-style: normal; - font-weight: 700; height: 32px; letter-spacing: 0px; - padding: 0px; line-height: 18.2px; color: var(--color-gray-600); margin: 0px; diff --git a/libs/features/mas/src/global.css.js b/libs/features/mas/src/global.css.js index 9ff1d35350..630bce4ff5 100644 --- a/libs/features/mas/src/global.css.js +++ b/libs/features/mas/src/global.css.js @@ -434,11 +434,8 @@ body.merch-modal { merch-sidenav-checkbox-group h3 { font-size: 14px; - font-style: normal; - font-weight: 700; height: 32px; letter-spacing: 0px; - padding: 0px; line-height: 18.2px; color: var(--color-gray-600); margin: 0px;