@smals-belgium-shared/vidis-prescription-list
Version:
Prescription list web component
12 lines • 3.06 MB
JavaScript
var cK=Object.defineProperty;var j8=e=>{throw TypeError(e)};var hK=(e,t,i)=>t in e?cK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var d=(e,t,i)=>hK(e,typeof t!="symbol"?t+"":t,i),O8=(e,t,i)=>t.has(e)||j8("Cannot "+i);var OA=(e,t,i)=>(O8(e,t,"read from private field"),i?i.call(e):t.get(e)),W8=(e,t,i)=>t.has(e)?j8("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),L8=(e,t,i,u)=>(O8(e,t,"write to private field"),u?u.call(e,i):t.set(e,i),i);var EK=Object.create,hh=Object.defineProperty,dK=Object.defineProperties,BK=Object.getOwnPropertyDescriptor,gK=Object.getOwnPropertyDescriptors,fK=Object.getOwnPropertyNames,C0=Object.getOwnPropertySymbols,pK=Object.getPrototypeOf,L1=Object.prototype.hasOwnProperty,U6=Object.prototype.propertyIsEnumerable,H8=(e,t,i)=>t in e?hh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,su=(e,t)=>{for(var i in t||(t={}))L1.call(t,i)&&H8(e,i,t[i]);if(C0)for(var i of C0(t))U6.call(t,i)&&H8(e,i,t[i]);return e},Dr=(e,t)=>dK(e,gK(t)),CK=(e,t)=>{var i={};for(var u in e)L1.call(e,u)&&t.indexOf(u)<0&&(i[u]=e[u]);if(e!=null&&C0)for(var u of C0(e))t.indexOf(u)<0&&U6.call(e,u)&&(i[u]=e[u]);return i},Qu=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wu=(e,t)=>{for(var i in t)hh(e,i,{get:t[i],enumerable:!0})},mK=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of fK(t))!L1.call(e,r)&&r!==i&&hh(e,r,{get:()=>t[r],enumerable:!(u=BK(t,r))||u.enumerable});return e},Eh=(e,t,i)=>(i=e!=null?EK(pK(e)):{},mK(t||!e||!e.__esModule?hh(i,"default",{value:e,enumerable:!0}):i,e)),Ei=(e,t,i)=>new Promise((u,r)=>{var s=n=>{try{l(i.next(n))}catch(h){r(h)}},o=n=>{try{l(i.throw(n))}catch(h){r(h)}},l=n=>n.done?u(n.value):Promise.resolve(n.value).then(s,o);l((i=i.apply(e,t)).next())}),FK=Qu((e,t)=>{(function(i,u){typeof e=="object"&&typeof t<"u"?t.exports=u():typeof define=="function"&&define.amd?define(u):(i=typeof globalThis<"u"?globalThis:i||self,i.MessageFormat=u())})(e,function(){var i=function(){return i=Object.assign||function(z){for(var H,K=1,$=arguments.length;K<$;K++){H=arguments[K];for(var ne in H)Object.prototype.hasOwnProperty.call(H,ne)&&(z[ne]=H[ne])}return z},i.apply(this,arguments)};function u(z){var H=typeof Symbol=="function"&&Symbol.iterator,K=H&&z[H],$=0;if(K)return K.call(z);if(z&&typeof z.length=="number")return{next:function(){return z&&$>=z.length&&(z=void 0),{value:z&&z[$++],done:!z}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(z,H){var K=typeof Symbol=="function"&&z[Symbol.iterator];if(!K)return z;var $=K.call(z),ne,be=[],Ze;try{for(;(H===void 0||H-- >0)&&!(ne=$.next()).done;)be.push(ne.value)}catch(st){Ze={error:st}}finally{try{ne&&!ne.done&&(K=$.return)&&K.call($)}finally{if(Ze)throw Ze.error}}return be}function s(z,H,K){if(arguments.length===2)for(var $=0,ne=H.length,be;$<ne;$++)(be||!($ in H))&&(be||(be=Array.prototype.slice.call(H,0,$)),be[$]=H[$]);return z.concat(be||Array.prototype.slice.call(H))}typeof SuppressedError=="function"&&SuppressedError;class o extends Error{constructor(H,K,$){super(H),this.token=K,this.type=$||"error"}}let l=z=>z<4?"short":z===4?"long":"narrow",n=z=>z%2===0?"2-digit":"numeric";function h(z,H){switch(z.char){case"y":return{year:n(z.width)};case"r":return{calendar:"gregory",year:"numeric"};case"u":case"U":case"Y":default:return H(`${z.desc} is not supported; falling back to year:numeric`,o.WARNING),{year:"numeric"}}}function a(z,H){switch(z.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:H(`${z.desc} is not supported with width ${z.width}`);return}}function c(z,H){let{char:K,desc:$,width:ne}=z;if(K==="d")return n(ne);H(`${$} is not supported`)}function E(z,H){let{char:K,desc:$,width:ne}=z;if((K==="c"||K==="e")&&ne<3){let be=`Numeric value is not supported for ${$}; falling back to weekday:short`;H(be,o.WARNING)}return l(ne)}function B(z){let H=n(z.width),K;switch(z.char){case"h":K="h12";break;case"H":K="h23";break;case"k":K="h24";break;case"K":K="h11";break}return K?{hour:H,hourCycle:K}:{hour:H}}function g(z,H){let{char:K,desc:$,width:ne}=z;switch(K){case"v":case"z":return ne===4?"long":"short";case"V":if(ne===4)return"long";H(`${$} is not supported with width ${ne}`);return;case"X":H(`${$} is not supported`);return}return"short"}function f(z,H){switch(z.field){case"era":return{era:l(z.width)};case"year":return h(z,H);case"month":return{month:a(z,H)};case"day":return{day:c(z,H)};case"weekday":return{weekday:E(z,H)};case"period":return;case"hour":return B(z);case"min":return{minute:n(z.width)};case"sec":return{second:n(z.width)};case"tz":return{timeZoneName:g(z,H)};case"quarter":case"week":case"sec-frac":case"ms":H(`${z.desc} is not supported`)}}function C(z,H){let K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:be=>{throw be},$={timeZone:H},ne=[];for(let be of z){let{error:Ze,field:st,str:Ct}=be;if(Ze){let uu=new o(Ze.message,be);uu.stack=Ze.stack,K(uu)}if(Ct){let uu=`Ignoring string part: ${Ct}`;K(new o(uu,be,o.WARNING))}st&&(ne.indexOf(st)===-1?ne.push(st):K(new o(`Duplicate ${st} token`,be)));let zt=f(be,(uu,Cu)=>K(new o(uu,be,Cu)));zt&&Object.assign($,zt)}return $}let p={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},m=z=>z>="A"&&z<="Z"||z>="a"&&z<="z";function F(z,H){let K=z[H],$=1;for(;z[++H]===K;)++$;let ne=p[K];if(!ne){let be=`The letter ${K} is not a valid field identifier`;return{char:K,error:new Error(be),width:$}}return{char:K,field:ne.field,desc:ne.desc,width:$}}function w(z,H){let K=z[++H],$=2;if(K==="'")return{char:"'",str:K,width:$};for(;;){let ne=z[++H];if(++$,ne===void 0){let be=`Unterminated quoted literal in pattern: ${K||z}`;return{char:"'",error:new Error(be),str:K,width:$}}else if(ne==="'"){if(z[++H]!=="'")return{char:"'",str:K,width:$};++$}K+=ne}}function A(z,H){let K=z[H];if(!K)return null;if(m(K))return F(z,H);if(K==="'")return w(z,H);let $=K,ne=1;for(;;){let be=z[++H];if(!be||m(be)||be==="'")return{char:K,str:$,width:ne};$+=be,ne+=1}}function D(z){let H=[],K=0;for(;;){let $=A(z,K);if(!$)return H;H.push($),K+=$.width}}function x(z,H,K,$){typeof H=="string"&&(H=D(H)),typeof K=="function"&&($=K,K=void 0);let ne=C(H,K,$),be=new Intl.DateTimeFormat(z,ne);return Ze=>be.format(Ze)}function N(z,H,K,$){typeof H=="string"&&(H=D(H)),typeof K=="function"&&($=K,K=void 0);let ne=C(H,K,$);return["(function() {",`var opt = ${JSON.stringify(ne)};`,`var dtf = new Intl.DateTimeFormat(${JSON.stringify(z)}, opt);`,"return function(value) { return dtf.format(value); }"].join(`
`)+`
})()`}class S extends Error{constructor(H,K){super(K),this.code=H}}class R extends S{constructor(H,K){super("BAD_OPTION",`Unknown ${H} option: ${K}`),this.stem=H,this.option=K}}class y extends S{constructor(H){super("BAD_STEM",`Unknown stem: ${H}`),this.stem=H}}class I extends S{constructor(H,K){super("MASKED_VALUE",`Value for ${H} is set multiple times`),this.type=H,this.prev=K}}class M extends S{constructor(H){super("MISSING_OPTION",`Required option missing for ${H}`),this.stem=H}}class b extends S{constructor(H,K){super("BAD_PATTERN",K),this.char=H}}class Q extends S{constructor(H,K,$){let ne=$>1?`${$} options`:"one option";super("TOO_MANY_OPTIONS",`Token ${H} only supports ${ne} (got ${K.length})`),this.stem=H,this.options=K}}function T(z,H){let{numberingSystem:K}=H;return Array.isArray(z)||(z=[z]),K?z.map($=>{let ne=$.indexOf("-u-")===-1?"u-nu":"nu";return`${$}-${ne}-${K}`}).concat(z):z}function _(z,H){let K=+z+H/2;return K-K%+H}function j(z){let{scale:H,unit:K}=z,$=typeof H=="number"&&H>=0?H:1;return K&&K.style==="percent"&&($*=.01),$}function re(z){let H=j(z),{precision:K}=z;return K&&K.style==="precision-increment"?$=>_($,K.increment)*H:$=>$*H}function de(z){let H=j(z),{precision:K}=z;if(K&&K.style==="precision-increment"){let $=`+n + ${K.increment/2}`,ne=`x - (x % +${K.increment})`;return H!==1&&(ne=`(${ne}) * ${H}`),`function(n) { var x = ${$}; return ${ne}; }`}return H!==1?`function(n) { return n * ${H}; }`:null}function ae(z,H){let{decimal:K,group:$,integerWidth:ne,notation:be,precision:Ze,roundingMode:st,sign:Ct,unit:zt,unitPer:uu,unitWidth:Cu}=z,mu=(sr,Zu)=>{},Zt={};if(zt)switch(zt.style){case"base-unit":Zt.style="decimal";break;case"currency":Zt.style="currency",Zt.currency=zt.currency;break;case"measure-unit":Zt.style="unit",Zt.unit=zt.unit.replace(/.*-/,""),uu&&(Zt.unit+="-per-"+uu.replace(/.*-/,""));break;case"percent":Zt.style="percent";break}switch(Cu){case"unit-width-full-name":Zt.currencyDisplay="name",Zt.unitDisplay="long";break;case"unit-width-hidden":break;case"unit-width-iso-code":Zt.currencyDisplay="code";break;case"unit-width-narrow":Zt.currencyDisplay="narrowSymbol",Zt.unitDisplay="narrow";break;case"unit-width-short":Zt.currencyDisplay="symbol",Zt.unitDisplay="short";break}switch($){case"group-off":Zt.useGrouping=!1;break;case"group-auto":Zt.useGrouping=!0;break;case"group-min2":case"group-on-aligned":case"group-thousands":Zt.useGrouping=!0;break}if(Ze)switch(Ze.style){case"precision-fraction":{let{minFraction:sr,maxFraction:Zu,minSignificant:hr,maxSignificant:Cr,source:Yi}=Ze;typeof sr=="number"&&(Zt.minimumFractionDigits=sr,typeof hr=="number"&&mu()),typeof Zu=="number"&&(Zt.maximumFractionDigits=Zu),typeof hr=="number"&&(Zt.minimumSignificantDigits=hr),typeof Cr=="number"&&(Zt.maximumSignificantDigits=Cr);break}case"precision-integer":Zt.maximumFractionDigits=0;break;case"precision-unlimited":Zt.maximumFractionDigits=20;break;case"precision-increment":break;case"precision-currency-standard":Zt.trailingZeroDisplay=Ze.trailingZero;break;case"precision-currency-cash":mu(Ze.style);break}if(be)switch(be.style){case"compact-short":Zt.notation="compact",Zt.compactDisplay="short";break;case"compact-long":Zt.notation="compact",Zt.compactDisplay="long";break;case"notation-simple":Zt.notation="standard";break;case"scientific":case"engineering":{let{expDigits:sr,expSign:Zu,source:hr,style:Cr}=be;Zt.notation=Cr;break}}if(ne){let{min:sr,max:Zu,source:hr}=ne;if(sr>0&&(Zt.minimumIntegerDigits=sr),Number(Zu)>0){let Cr=Zt.notation==="engineering"||Zt.notation==="scientific";Zu===3&&Cr?Zt.notation="engineering":mu()}}switch(Ct){case"sign-auto":Zt.signDisplay="auto";break;case"sign-always":Zt.signDisplay="always";break;case"sign-except-zero":Zt.signDisplay="exceptZero";break;case"sign-never":Zt.signDisplay="never";break;case"sign-accounting":Zt.currencySign="accounting";break;case"sign-accounting-always":Zt.currencySign="accounting",Zt.signDisplay="always";break;case"sign-accounting-except-zero":Zt.currencySign="accounting",Zt.signDisplay="exceptZero";break}return Zt}function ge(z,H,K){let $=z[H];switch($){case"%":return{char:"%",style:"percent",width:1};case"‰":return{char:"%",style:"permille",width:1};case"¤":{let ne=1;for(;z[++H]==="¤";)++ne;switch(ne){case 1:return{char:$,currency:"default",width:ne};case 2:return{char:$,currency:"iso-code",width:ne};case 3:return{char:$,currency:"full-name",width:ne};case 5:return{char:$,currency:"narrow",width:ne};default:{let be=`Invalid number (${ne}) of ¤ chars in pattern`;return K(new b("¤",be)),null}}}case"*":{let ne=z[H+1];if(ne)return{char:$,pad:ne,width:2};break}case"+":case"-":return{char:$,width:1};case"'":{let ne=z[++H],be=2;if(ne==="'")return{char:$,str:ne,width:be};for(;;){let Ze=z[++H];if(++be,Ze===void 0){let st=`Unterminated quoted literal in pattern: ${ne}`;return K(new b("'",st)),{char:$,str:ne,width:be}}else if(Ze==="'"){if(z[++H]!=="'")return{char:$,str:ne,width:be};++be}ne+=Ze}}}return null}let xe=z=>z>="0"&&z<="9";function Te(z,H){let K=z[H];if(xe(K)){let $=K;for(;;){let ne=z[++H];if(xe(ne))$+=ne;else return{char:"0",digits:$,width:$.length}}}switch(K){case"#":{let $=1;for(;z[++H]==="#";)++$;return{char:K,width:$}}case"@":{let $=1;for(;z[++H]==="@";)++$;let ne=$;for(H-=1;z[++H]==="#";)++ne;return{char:K,min:$,width:ne}}case"E":{let $=z[H+1]==="+";$&&++H;let ne=0;for(;z[++H]==="0";)++ne;let be=($?2:1)+ne;if(ne)return{char:K,expDigits:ne,plus:$,width:be};break}case".":case",":return{char:K,width:1}}return null}function je(z,H,K){let $;(function(zt){zt[zt.Prefix=0]="Prefix",zt[zt.Number=1]="Number",zt[zt.Suffix=2]="Suffix"})($||($={}));let ne=[],be=[],Ze=[],st=$.Prefix,Ct="";for(;H<z.length;){let zt=z[H];if(zt===";"){H+=1;break}switch(st){case $.Prefix:{let uu=ge(z,H,K);if(uu)Ct&&(ne.push({char:"'",str:Ct,width:Ct.length}),Ct=""),ne.push(uu),H+=uu.width;else{let Cu=Te(z,H);Cu?(Ct&&(ne.push({char:"'",str:Ct,width:Ct.length}),Ct=""),st=$.Number,be.push(Cu),H+=Cu.width):(Ct+=zt,H+=1)}break}case $.Number:{let uu=Te(z,H);uu?(be.push(uu),H+=uu.width):st=$.Suffix;break}case $.Suffix:{let uu=ge(z,H,K);uu?(Ct&&(Ze.push({char:"'",str:Ct,width:Ct.length}),Ct=""),Ze.push(uu),H+=uu.width):(Ct+=zt,H+=1);break}}}return Ct&&Ze.push({char:"'",str:Ct,width:Ct.length}),{pattern:{prefix:ne,number:be,suffix:Ze},pos:H}}function Fe(z,H){let{pattern:K,pos:$}=je(z,0,H);if($<z.length){let{pattern:ne}=je(z,$,H);return{tokens:K,negative:ne}}return{tokens:K}}function ke(z,H){let K={},$=!1,ne=!1,be=0,Ze="",st=-1,Ct="",zt=0;for(let Cu=0;Cu<z.length;++Cu){let mu=z[Cu];switch(mu.char){case"#":{if(st===-1){if(Ze){let Zt="Pattern has # after integer digits";H(new b("#",Zt))}be+=mu.width}else zt+=mu.width;break}case"0":{if(st===-1)Ze+=mu.digits;else{if(zt){let Zt="Pattern has digits after # in fraction";H(new b("0",Zt))}Ct+=mu.digits}break}case"@":{K.precision&&H(new I("precision",K.precision)),K.precision={style:"precision-fraction",minSignificant:mu.min,maxSignificant:mu.width};break}case",":$=!0;break;case".":if(st===1){let Zt="Pattern has more than one decimal separator";H(new b(".",Zt))}st=Cu;break;case"E":{if(ne&&H(new I("exponent",K.notation)),$){let Zt="Exponential patterns may not contain grouping separators";H(new b("E",Zt))}K.notation={style:"scientific"},mu.expDigits>1&&(K.notation.expDigits=mu.expDigits),mu.plus&&(K.notation.expSign="sign-always"),ne=!0}}}$?K.group="group-auto":be+Ze.length>3&&(K.group="group-off");let uu=+`${Ze||"0"}.${Ct}`;if(uu&&(K.precision={style:"precision-increment",increment:uu}),!ne)Ze.length>1&&(K.integerWidth={min:Ze.length}),!K.precision&&(Ct.length||zt)&&(K.precision={style:"precision-fraction",minFraction:Ct.length,maxFraction:Ct.length+zt});else if((!K.precision||uu)&&(K.integerWidth=be?{min:1,max:be+Ze.length}:{min:Math.max(1,Ze.length)}),K.precision)uu||(K.integerWidth={min:1,max:1});else{let Cu=Ze.length+Ct.length;st===-1?Cu>0&&(K.precision={style:"precision-fraction",maxSignificant:Cu}):(K.precision={style:"precision-fraction",maxSignificant:Math.max(1,Cu)+zt},Cu>1&&(K.precision.minSignificant=Cu))}return K}function Qe(z,H,K,$,ne){let be=!1,Ze="";for(let st of z)switch(st.char){case"%":H.unit={style:st.style},ne?be=!0:Ze="";break;case"¤":if(!K){let Ct="The ¤ pattern requires a currency";$(new b("¤",Ct));break}switch(H.unit={style:"currency",currency:K},st.currency){case"iso-code":H.unitWidth="unit-width-iso-code";break;case"full-name":H.unitWidth="unit-width-full-name";break;case"narrow":H.unitWidth="unit-width-narrow";break}ne?be=!0:Ze="";break;case"*":break;case"+":be||(Ze+="+");break;case"'":be||(Ze+=st.str);break}return Ze}function X(z,H){let K=!1,$="";for(let ne of z)switch(ne.char){case"%":case"¤":H?K=!0:$="";break;case"-":K||($+="-");break;case"'":K||($+=ne.str);break}return $}function fe(z,H){let K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ct=>{throw Ct},{tokens:$,negative:ne}=Fe(z,K),be=ke($.number,K),Ze=Qe($.prefix,be,H,K,!0),st=Qe($.suffix,be,H,K,!1);if(ne){let Ct=X(ne.prefix,!0),zt=X(ne.suffix,!1);be.affix={pos:[Ze,st],neg:[Ct,zt]},be.sign="sign-never"}else(Ze||st)&&(be.affix={pos:[Ze,st]});return be}function ie(z){return["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"].indexOf(z)!==-1}function ye(z){let H=["acceleration","angle","area","concentr","consumption","digital","duration","electric","energy","force","frequency","graphics","length","light","mass","power","pressure","speed","temperature","torque","volume"],[K]=z.split("-",1);return H.indexOf(K)!==-1}let Se={"compact-short":0,"compact-long":0,"notation-simple":0,scientific:2,engineering:2,percent:0,permille:0,"base-unit":0,currency:1,"measure-unit":1,"per-measure-unit":1,"unit-width-narrow":0,"unit-width-short":0,"unit-width-full-name":0,"unit-width-iso-code":0,"unit-width-hidden":0,"precision-integer":0,"precision-unlimited":0,"precision-currency-standard":1,"precision-currency-cash":0,"precision-increment":1,"rounding-mode-ceiling":0,"rounding-mode-floor":0,"rounding-mode-down":0,"rounding-mode-up":0,"rounding-mode-half-even":0,"rounding-mode-half-down":0,"rounding-mode-half-up":0,"rounding-mode-unnecessary":0,"integer-width":1,scale:1,"group-off":0,"group-min2":0,"group-auto":0,"group-on-aligned":0,"group-thousands":0,latin:0,"numbering-system":1,"sign-auto":0,"sign-always":0,"sign-never":0,"sign-accounting":0,"sign-accounting-always":0,"sign-except-zero":0,"sign-accounting-except-zero":0,"decimal-auto":0,"decimal-always":0},Ye={currency:1,"integer-width":1,"measure-unit":1,"numbering-system":1,"per-measure-unit":1,"precision-increment":1,scale:1};function Re(z){return z in Se}function G(z){return z in Ye}function U(z,H,K){if(Re(z)){let $=Se[z];if(H.length>$){if($===0)for(let ne of H)K(new R(z,ne));else K(new Q(z,H,$));return!1}else if(G(z)&&H.length<Ye[z])return K(new M(z)),!1}return!0}function le(z,H){let K=H==="fraction"?/^\.(0*)(\+|#*)$/:/^(@+)(\+|#*)$/,$=z&&z.match(K);if($){let ne=$[1].length;switch($[2].charAt(0)){case"":return{min:ne,max:ne};case"+":return{min:ne,max:null};case"#":return{min:ne,max:ne+$[2].length}}}return null}function he(z,H,K){let $=le(z,"fraction");if($){H.length>1&&K(new Q(z,H,1));let be={style:"precision-fraction",source:z,minFraction:$.min};$.max!=null&&(be.maxFraction=$.max);let Ze=H[0],st=le(Ze,"significant");return st?(be.source=`${z}/${Ze}`,be.minSignificant=st.min,st.max!=null&&(be.maxSignificant=st.max)):Ze&&K(new R(z,Ze)),be}let ne=le(z,"significant");if(ne){for(let Ze of H)K(new R(z,Ze));let be={style:"precision-fraction",source:z,minSignificant:ne.min};return ne.max!=null&&(be.maxSignificant=ne.max),be}return null}class me{constructor(H){this.skeleton={},this.onError=H}badOption(H,K){this.onError(new R(H,K))}assertEmpty(H){let K=this.skeleton[H];K&&this.onError(new I(H,K))}parseToken(H,K){if(!U(H,K,this.onError))return;let $=K[0],ne=this.skeleton;switch(H){case"compact-short":case"compact-long":case"notation-simple":this.assertEmpty("notation"),ne.notation={style:H};break;case"scientific":case"engineering":{let be=null,Ze;for(let Ct of K)switch(Ct){case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":Ze=Ct;break;default:/^\+e+$/.test(Ct)?be=Ct.length-1:this.badOption(H,Ct)}this.assertEmpty("notation");let st=K.join("/");ne.notation=be&&Ze?{style:H,source:st,expDigits:be,expSign:Ze}:be?{style:H,source:st,expDigits:be}:Ze?{style:H,source:st,expSign:Ze}:{style:H,source:st};break}case"percent":case"permille":case"base-unit":this.assertEmpty("unit"),ne.unit={style:H};break;case"currency":/^[A-Z]{3}$/.test($)?(this.assertEmpty("unit"),ne.unit={style:H,currency:$}):this.badOption(H,$);break;case"measure-unit":{ye($)?(this.assertEmpty("unit"),ne.unit={style:H,unit:$}):this.badOption(H,$);break}case"per-measure-unit":{ye($)?(this.assertEmpty("unitPer"),ne.unitPer=$):this.badOption(H,$);break}case"unit-width-narrow":case"unit-width-short":case"unit-width-full-name":case"unit-width-iso-code":case"unit-width-hidden":this.assertEmpty("unitWidth"),ne.unitWidth=H;break;case"precision-integer":case"precision-unlimited":case"precision-currency-cash":this.assertEmpty("precision"),ne.precision={style:H};break;case"precision-currency-standard":this.assertEmpty("precision"),$==="w"?ne.precision={style:H,trailingZero:"stripIfInteger"}:ne.precision={style:H};break;case"precision-increment":{let be=Number($);be>0?(this.assertEmpty("precision"),ne.precision={style:H,increment:be}):this.badOption(H,$);break}case"rounding-mode-ceiling":case"rounding-mode-floor":case"rounding-mode-down":case"rounding-mode-up":case"rounding-mode-half-even":case"rounding-mode-half-odd":case"rounding-mode-half-ceiling":case"rounding-mode-half-floor":case"rounding-mode-half-down":case"rounding-mode-half-up":case"rounding-mode-unnecessary":this.assertEmpty("roundingMode"),ne.roundingMode=H;break;case"integer-width":{if(/^\+0*$/.test($))this.assertEmpty("integerWidth"),ne.integerWidth={source:$,min:$.length-1};else{let be=$.match(/^#*(0*)$/);be?(this.assertEmpty("integerWidth"),ne.integerWidth={source:$,min:be[1].length,max:be[0].length}):this.badOption(H,$)}break}case"scale":{let be=Number($);be>0?(this.assertEmpty("scale"),ne.scale=be):this.badOption(H,$);break}case"group-off":case"group-min2":case"group-auto":case"group-on-aligned":case"group-thousands":this.assertEmpty("group"),ne.group=H;break;case"latin":this.assertEmpty("numberingSystem"),ne.numberingSystem="latn";break;case"numbering-system":{ie($)?(this.assertEmpty("numberingSystem"),ne.numberingSystem=$):this.badOption(H,$);break}case"sign-auto":case"sign-always":case"sign-never":case"sign-accounting":case"sign-accounting-always":case"sign-except-zero":case"sign-accounting-except-zero":this.assertEmpty("sign"),ne.sign=H;break;case"decimal-auto":case"decimal-always":this.assertEmpty("decimal"),ne.decimal=H;break;default:{let be=he(H,K,this.onError);be?(this.assertEmpty("precision"),ne.precision=be):this.onError(new y(H))}}}}function Ee(z){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ne=>{throw ne},K=[];for(let ne of z.split(" "))if(ne){let be=ne.split("/"),Ze=be.shift()||"";K.push({stem:Ze,options:be})}let $=new me(H);for(let{stem:ne,options:be}of K)$.parseToken(ne,be);return $.skeleton}function pe(z,H,K,$){typeof H=="string"&&(H=H.indexOf("::")===0?Ee(H.slice(2),$):fe(H,K,$));let ne=T(z,H),be=ae(H),Ze=re(H),st=new Intl.NumberFormat(ne,be);if(H.affix){let[Ct,zt]=H.affix.pos,[uu,Cu]=H.affix.neg||["",""];return mu=>{let Zt=st.format(Ze(mu));return mu<0?`${uu}${Zt}${Cu}`:`${Ct}${Zt}${zt}`}}return Ct=>st.format(Ze(Ct))}function Ve(z,H,K,$){typeof H=="string"&&(H=H.indexOf("::")===0?Ee(H.slice(2),$):fe(H,K,$));let ne=T(z,H),be=ae(H),Ze=de(H),st=["(function() {",`var opt = ${JSON.stringify(be)};`,`var nf = new Intl.NumberFormat(${JSON.stringify(ne)}, opt);`],Ct="nf.format(value)";if(Ze&&(st.push(`var mod = ${Ze};`),Ct="nf.format(mod(value))"),H.affix){let[zt,uu]=H.affix.pos.map(Cu=>JSON.stringify(Cu));if(H.affix.neg){let[Cu,mu]=H.affix.neg.map(Zt=>JSON.stringify(Zt));Ct=`value < 0 ? ${Cu} + ${Ct} + ${mu} : ${zt} + ${Ct} + ${uu}`}else Ct=`${zt} + ${Ct} + ${uu}`}return st.push(`return function(value) { return ${Ct}; }`),st.join(`
`)+`
})()`}var qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wt(z){return z&&z.__esModule&&Object.prototype.hasOwnProperty.call(z,"default")?z.default:z}var nt={},Ne={},Et={exports:{}};(function(z){(function(H,K){z.exports?z.exports=K():H.moo=K()})(qe,function(){var H=Object.prototype.hasOwnProperty,K=Object.prototype.toString,$=typeof new RegExp().sticky=="boolean";function ne(Oe){return Oe&&K.call(Oe)==="[object RegExp]"}function be(Oe){return Oe&&typeof Oe=="object"&&!ne(Oe)&&!Array.isArray(Oe)}function Ze(Oe){return Oe.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function st(Oe){var ut=new RegExp("|"+Oe);return ut.exec("").length-1}function Ct(Oe){return"("+Oe+")"}function zt(Oe){if(!Oe.length)return"(?!)";var ut=Oe.map(function(dt){return"(?:"+dt+")"}).join("|");return"(?:"+ut+")"}function uu(Oe){if(typeof Oe=="string")return"(?:"+Ze(Oe)+")";if(ne(Oe)){if(Oe.ignoreCase)throw new Error("RegExp /i flag not allowed");if(Oe.global)throw new Error("RegExp /g flag is implied");if(Oe.sticky)throw new Error("RegExp /y flag is implied");if(Oe.multiline)throw new Error("RegExp /m flag is implied");return Oe.source}else throw new Error("Not a pattern: "+Oe)}function Cu(Oe,ut){return Oe.length>ut?Oe:Array(ut-Oe.length+1).join(" ")+Oe}function mu(Oe,ut){for(var dt=Oe.length,Bt=0;;){var Dt=Oe.lastIndexOf(`
`,dt-1);if(Dt===-1||(Bt++,dt=Dt,Bt===ut)||dt===0)break}var Rt=Bt<ut?0:dt+1;return Oe.substring(Rt).split(`
`)}function Zt(Oe){for(var ut=Object.getOwnPropertyNames(Oe),dt=[],Bt=0;Bt<ut.length;Bt++){var Dt=ut[Bt],Rt=Oe[Dt],Gt=[].concat(Rt);if(Dt==="include"){for(var Xt=0;Xt<Gt.length;Xt++)dt.push({include:Gt[Xt]});continue}var ou=[];Gt.forEach(function(Wt){be(Wt)?(ou.length&&dt.push(Zu(Dt,ou)),dt.push(Zu(Dt,Wt)),ou=[]):ou.push(Wt)}),ou.length&&dt.push(Zu(Dt,ou))}return dt}function sr(Oe){for(var ut=[],dt=0;dt<Oe.length;dt++){var Bt=Oe[dt];if(Bt.include){for(var Dt=[].concat(Bt.include),Rt=0;Rt<Dt.length;Rt++)ut.push({include:Dt[Rt]});continue}if(!Bt.type)throw new Error("Rule has no type: "+JSON.stringify(Bt));ut.push(Zu(Bt.type,Bt))}return ut}function Zu(Oe,ut){if(be(ut)||(ut={match:ut}),ut.include)throw new Error("Matching rules cannot also include states");var dt={defaultType:Oe,lineBreaks:!!ut.error||!!ut.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var Bt in ut)H.call(ut,Bt)&&(dt[Bt]=ut[Bt]);if(typeof dt.type=="string"&&Oe!==dt.type)throw new Error("Type transform cannot be a string (type '"+dt.type+"' for token '"+Oe+"')");var Dt=dt.match;return dt.match=Array.isArray(Dt)?Dt:Dt?[Dt]:[],dt.match.sort(function(Rt,Gt){return ne(Rt)&&ne(Gt)?0:ne(Gt)?-1:ne(Rt)?1:Gt.length-Rt.length}),dt}function hr(Oe){return Array.isArray(Oe)?sr(Oe):Zt(Oe)}var Cr=Zu("error",{lineBreaks:!0,shouldThrow:!0});function Yi(Oe,ut){for(var dt=null,Bt=Object.create(null),Dt=!0,Rt=null,Gt=[],Xt=[],ou=0;ou<Oe.length;ou++)Oe[ou].fallback&&(Dt=!1);for(var ou=0;ou<Oe.length;ou++){var Wt=Oe[ou];if(Wt.include)throw new Error("Inheritance is not allowed in stateless lexers");if(Wt.error||Wt.fallback){if(dt)throw!Wt.fallback==!dt.fallback?new Error("Multiple "+(Wt.fallback?"fallback":"error")+" rules not allowed (for token '"+Wt.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+Wt.defaultType+"')");dt=Wt}var du=Wt.match.slice();if(Dt)for(;du.length&&typeof du[0]=="string"&&du[0].length===1;){var lr=du.shift();Bt[lr.charCodeAt(0)]=Wt}if(Wt.pop||Wt.push||Wt.next){if(!ut)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+Wt.defaultType+"')");if(Wt.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+Wt.defaultType+"')")}if(du.length!==0){Dt=!1,Gt.push(Wt);for(var cu=0;cu<du.length;cu++){var Eu=du[cu];if(ne(Eu)){if(Rt===null)Rt=Eu.unicode;else if(Rt!==Eu.unicode&&Wt.fallback===!1)throw new Error("If one rule is /u then all must be")}}var Ou=zt(du.map(uu)),ju=new RegExp(Ou);if(ju.test(""))throw new Error("RegExp matches empty string: "+ju);var Fi=st(Ou);if(Fi>0)throw new Error("RegExp has capture groups: "+ju+`
Use (?: … ) instead`);if(!Wt.lineBreaks&&ju.test(`
`))throw new Error("Rule should declare lineBreaks: "+ju);Xt.push(Ct(Ou))}}var ii=dt&&dt.fallback,Wr=$&&!ii?"ym":"gm",Ni=$||ii?"":"|";Rt===!0&&(Wr+="u");var Cn=new RegExp(zt(Xt)+Ni,Wr);return{regexp:Cn,groups:Gt,fast:Bt,error:dt||Cr}}function $r(Oe){var ut=Yi(hr(Oe));return new O({start:ut},"start")}function W(Oe,ut,dt){var Bt=Oe&&(Oe.push||Oe.next);if(Bt&&!dt[Bt])throw new Error("Missing state '"+Bt+"' (in token '"+Oe.defaultType+"' of state '"+ut+"')");if(Oe&&Oe.pop&&+Oe.pop!=1)throw new Error("pop must be 1 (in token '"+Oe.defaultType+"' of state '"+ut+"')")}function V(Oe,ut){var dt=Oe.$all?hr(Oe.$all):[];delete Oe.$all;var Bt=Object.getOwnPropertyNames(Oe);ut||(ut=Bt[0]);for(var Dt=Object.create(null),Rt=0;Rt<Bt.length;Rt++){var Gt=Bt[Rt];Dt[Gt]=hr(Oe[Gt]).concat(dt)}for(var Rt=0;Rt<Bt.length;Rt++)for(var Gt=Bt[Rt],Xt=Dt[Gt],ou=Object.create(null),Wt=0;Wt<Xt.length;Wt++){var du=Xt[Wt];if(du.include){var lr=[Wt,1];if(du.include!==Gt&&!ou[du.include]){ou[du.include]=!0;var cu=Dt[du.include];if(!cu)throw new Error("Cannot include nonexistent state '"+du.include+"' (in state '"+Gt+"')");for(var Eu=0;Eu<cu.length;Eu++){var Ou=cu[Eu];Xt.indexOf(Ou)===-1&&lr.push(Ou)}}Xt.splice.apply(Xt,lr),Wt--}}for(var ju=Object.create(null),Rt=0;Rt<Bt.length;Rt++){var Gt=Bt[Rt];ju[Gt]=Yi(Dt[Gt],!0)}for(var Rt=0;Rt<Bt.length;Rt++){for(var Fi=Bt[Rt],ii=ju[Fi],Wr=ii.groups,Wt=0;Wt<Wr.length;Wt++)W(Wr[Wt],Fi,ju);for(var Ni=Object.getOwnPropertyNames(ii.fast),Wt=0;Wt<Ni.length;Wt++)W(ii.fast[Ni[Wt]],Fi,ju)}return new O(ju,ut)}function ue(Oe){for(var ut=typeof Map<"u",dt=ut?new Map:Object.create(null),Bt=Object.getOwnPropertyNames(Oe),Dt=0;Dt<Bt.length;Dt++){var Rt=Bt[Dt],Gt=Oe[Rt],Xt=Array.isArray(Gt)?Gt:[Gt];Xt.forEach(function(ou){if(typeof ou!="string")throw new Error("keyword must be string (in keyword '"+Rt+"')");ut?dt.set(ou,Rt):dt[ou]=Rt})}return function(ou){return ut?dt.get(ou):dt[ou]}}var O=function(Oe,ut){this.startState=ut,this.states=Oe,this.buffer="",this.stack=[],this.reset()};O.prototype.reset=function(Oe,ut){return this.buffer=Oe||"",this.index=0,this.line=ut?ut.line:1,this.col=ut?ut.col:1,this.queuedToken=ut?ut.queuedToken:null,this.queuedText=ut?ut.queuedText:"",this.queuedThrow=ut?ut.queuedThrow:null,this.setState(ut?ut.state:this.startState),this.stack=ut&&ut.stack?ut.stack.slice():[],this},O.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},O.prototype.setState=function(Oe){if(!(!Oe||this.state===Oe)){this.state=Oe;var ut=this.states[Oe];this.groups=ut.groups,this.error=ut.error,this.re=ut.regexp,this.fast=ut.fast}},O.prototype.popState=function(){this.setState(this.stack.pop())},O.prototype.pushState=function(Oe){this.stack.push(this.state),this.setState(Oe)};var Be=$?function(Oe,ut){return Oe.exec(ut)}:function(Oe,ut){var dt=Oe.exec(ut);return dt[0].length===0?null:dt};O.prototype._getGroup=function(Oe){for(var ut=this.groups.length,dt=0;dt<ut;dt++)if(Oe[dt+1]!==void 0)return this.groups[dt];throw new Error("Cannot find token type for matched text")};function we(){return this.value}if(O.prototype.next=function(){var Oe=this.index;if(this.queuedGroup){var ut=this._token(this.queuedGroup,this.queuedText,Oe);return this.queuedGroup=null,this.queuedText="",ut}var dt=this.buffer;if(Oe!==dt.length){var Gt=this.fast[dt.charCodeAt(Oe)];if(Gt)return this._token(Gt,dt.charAt(Oe),Oe);var Bt=this.re;Bt.lastIndex=Oe;var Dt=Be(Bt,dt),Rt=this.error;if(Dt==null)return this._token(Rt,dt.slice(Oe,dt.length),Oe);var Gt=this._getGroup(Dt),Xt=Dt[0];return Rt.fallback&&Dt.index!==Oe?(this.queuedGroup=Gt,this.queuedText=Xt,this._token(Rt,dt.slice(Oe,Dt.index),Oe)):this._token(Gt,Xt,Oe)}},O.prototype._token=function(Oe,ut,dt){var Bt=0;if(Oe.lineBreaks){var Dt=/\n/g,Rt=1;if(ut===`
`)Bt=1;else for(;Dt.exec(ut);)Bt++,Rt=Dt.lastIndex}var Gt={type:typeof Oe.type=="function"&&Oe.type(ut)||Oe.defaultType,value:typeof Oe.value=="function"?Oe.value(ut):ut,text:ut,toString:we,offset:dt,lineBreaks:Bt,line:this.line,col:this.col},Xt=ut.length;if(this.index+=Xt,this.line+=Bt,Bt!==0?this.col=Xt-Rt+1:this.col+=Xt,Oe.shouldThrow){var ou=new Error(this.formatError(Gt,"invalid syntax"));throw ou}return Oe.pop?this.popState():Oe.push?this.pushState(Oe.push):Oe.next&&this.setState(Oe.next),Gt},typeof Symbol<"u"&&Symbol.iterator){var Je=function(Oe){this.lexer=Oe};Je.prototype.next=function(){var Oe=this.lexer.next();return{value:Oe,done:!Oe}},Je.prototype[Symbol.iterator]=function(){return this},O.prototype[Symbol.iterator]=function(){return new Je(this)}}return O.prototype.formatError=function(Bt,ut){if(Bt==null)var dt=this.buffer.slice(this.index),Bt={text:dt,offset:this.index,lineBreaks:dt.indexOf(`
`)===-1?0:1,line:this.line,col:this.col};var Dt=2,Rt=Math.max(Bt.line-Dt,1),Gt=Bt.line+Dt,Xt=String(Gt).length,ou=mu(this.buffer,this.line-Bt.line+Dt+1).slice(0,5),Wt=[];Wt.push(ut+" at line "+Bt.line+" col "+Bt.col+":"),Wt.push("");for(var du=0;du<ou.length;du++){var lr=ou[du],cu=Rt+du;Wt.push(Cu(String(cu),Xt)+" "+lr),cu===Bt.line&&Wt.push(Cu("",Xt+Bt.col+1)+"^")}return Wt.join(`
`)},O.prototype.clone=function(){return new O(this.states,this.state)},O.prototype.has=function(Oe){return!0},{compile:$r,states:V,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:ue}})})(Et);var St=Et.exports;(function(z){var H=qe&&qe.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(z,"__esModule",{value:!0}),z.lexer=z.states=void 0;let K=H(St);z.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:$=>$.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:$=>$.substring(1).trim()},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:$=>$.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:$=>$.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:$=>$.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:$=>$.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:$=>$.substring(0,$.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}},z.lexer=K.default.states(z.states)})(Ne),Object.defineProperty(nt,"__esModule",{value:!0});var Mt=nt.parse=nt.ParseError=void 0;let xt=Ne,Nt=z=>({offset:z.offset,line:z.line,col:z.col,text:z.text,lineBreaks:z.lineBreaks}),et=z=>z==="plural"||z==="select"||z==="selectordinal";function it(z,H){let K="",$="";for(let ne of H){let be=ne.ctx.text;switch($+=be,ne.type){case"content":K+=ne.value;break;case"argument":case"function":case"octothorpe":K+=be;break;default:throw new It(z,`Unsupported part in strict mode function arg style: ${be}`)}}return[{type:"content",value:K.trim(),ctx:Object.assign({},H[0].ctx,{text:$})}]}let Ft=["number","date","time","spellout","ordinal","duration"],yt=["zero","one","two","few","many","other"];class It extends Error{constructor(H,K){super(xt.lexer.formatError(H,K))}}nt.ParseError=It;class Kt{constructor(H,K){var $,ne,be,Ze;this.lexer=xt.lexer.reset(H),this.cardinalKeys=($=K==null?void 0:K.cardinal)!==null&&$!==void 0?$:yt,this.ordinalKeys=(ne=K==null?void 0:K.ordinal)!==null&&ne!==void 0?ne:yt,this.strict=(be=K==null?void 0:K.strict)!==null&&be!==void 0?be:!1,this.strictPluralKeys=(Ze=K==null?void 0:K.strictPluralKeys)!==null&&Ze!==void 0?Ze:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(H,K,$){if($[0]==="="){if(K==="select")throw new It(H,`The case ${$} is not valid with select`)}else if(K!=="select"){let ne=K==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&ne.length>0&&!ne.includes($)){let be=`The ${K} case ${$} is not valid in this locale`;throw new It(H,be)}}}parseSelect(H,K,$,ne){let{value:be}=H,Ze={type:ne,arg:be,cases:[],ctx:$};ne==="plural"||ne==="selectordinal"?K=!0:this.strict&&(K=!1);for(let st of this.lexer)switch(st.type){case"offset":if(ne==="select")throw new It(st,"Unexpected plural offset for select");if(Ze.cases.length>0)throw new It(st,"Plural offset must be set before cases");Ze.pluralOffset=Number(st.value),$.text+=st.text,$.lineBreaks+=st.lineBreaks;break;case"case":{this.checkSelectKey(st,ne,st.value),Ze.cases.push({key:st.value,tokens:this.parseBody(K),ctx:Nt(st)});break}case"end":return Ze;default:throw new It(st,`Unexpected lexer token: ${st.type}`)}throw new It(null,"Unexpected message end")}parseArgToken(H,K){let $=Nt(H),ne=this.lexer.next();if(!ne)throw new It(null,"Unexpected message end");if($.text+=ne.text,$.lineBreaks+=ne.lineBreaks,this.strict&&(ne.type==="func-simple"||ne.type==="func-args")&&!Ft.includes(ne.value)){let be=`Invalid strict mode function arg type: ${ne.value}`;throw new It(H,be)}switch(ne.type){case"end":return{type:"argument",arg:H.value,ctx:$};case"func-simple":{let be=this.lexer.next();if(!be)throw new It(null,"Unexpected message end");if(be.type!=="end")throw new It(be,`Unexpected lexer token: ${be.type}`);if($.text+=be.text,et(ne.value.toLowerCase()))throw new It(ne,`Invalid type identifier: ${ne.value}`);return{type:"function",arg:H.value,key:ne.value,ctx:$}}case"func-args":{if(et(ne.value.toLowerCase())){let Ze=`Invalid type identifier: ${ne.value}`;throw new It(ne,Ze)}let be=this.parseBody(this.strict?!1:K);return this.strict&&be.length>0&&(be=it(H,be)),{type:"function",arg:H.value,key:ne.value,param:be,ctx:$}}case"select":if(et(ne.value))return this.parseSelect(H,K,$,ne.value);throw new It(ne,`Unexpected select type ${ne.value}`);default:throw new It(ne,`Unexpected lexer token: ${ne.type}`)}}parseBody(H,K){let $=[],ne=null;for(let be of this.lexer)if(be.type==="argument")ne&&(ne=null),$.push(this.parseArgToken(be,H));else if(be.type==="octothorpe"&&H)ne&&(ne=null),$.push({type:"octothorpe",ctx:Nt(be)});else{if(be.type==="end"&&!K)return $;{let Ze=be.value;if(!H&&be.type==="quoted"&&Ze[0]==="#"){if(Ze.includes("{")){let st=`Unsupported escape pattern: ${Ze}`;throw new It(be,st)}Ze=be.text}ne?(ne.value+=Ze,ne.ctx.text+=be.text,ne.ctx.lineBreaks+=be.lineBreaks):(ne={type:"content",value:Ze,ctx:Nt(be)},$.push(ne))}}if(K)return $;throw new It(null,"Unexpected message end")}}function Ot(z){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Kt(z,H).parse()}Mt=nt.parse=Ot;function Ue(z){return Ue[z]||(Ue[z]=new Intl.NumberFormat(z))}function P(z,H,K){return Ue(z).format(H-K)}function J(z,H,K,$){var ne=H-K;if(isNaN(ne))throw new Error("`"+$+"` or its offset is not a number");return Ue(z).format(ne)}function oe(z,H,K,$,ne){if({}.hasOwnProperty.call($,z))return $[z];H&&(z-=H);var be=K(z,ne);return be in $?$[be]:$.other}function De(z,H){return{}.hasOwnProperty.call(H,z)?H[z]:H.other}function Ge(z,H){for(var K=0;K<z.length;++K)if(!H||H[z[K]]===void 0)throw new Error("Message requires argument '".concat(z[K],"'"))}var ce=Object.freeze({__proto__:null,_nf:Ue,number:P,plural:oe,reqArgs:Ge,select:De,strictNumber:J});function At(z,H,K){var $={day:"numeric",month:"short",year:"numeric"};switch(K){case"full":$.weekday="long";case"long":$.month="long";break;case"short":$.month="numeric"}return new Date(z).toLocaleDateString(H,$)}function Yt(z){if(typeof z!="number"&&(z=Number(z)),!isFinite(z))return String(z);var H="";z<0?(H="-",z=Math.abs(z)):z=Number(z);var K=z%60,$=[Math.round(K)===K?K:K.toFixed(3)];z<60?$.unshift(0):(z=Math.round((z-Number($[0]))/60),$.unshift(z%60),z>=60&&(z=Math.round((z-Number($[0]))/60),$.unshift(z)));var ne=$.shift();return H+ne+":"+$.map(function(be){return Number(be)<10?"0"+String(be):String(be)}).join(":")}var q={};function at(z,H){var K=String(z)+JSON.stringify(H);return q[K]||(q[K]=new Intl.NumberFormat(z,H)),q[K]}function lt(z,H,K,$){var ne=K&&K.split(":")||[],be=ne[0],Ze=ne[1],st={integer:{maximumFractionDigits:0},percent:{style:"percent"},currency:{style:"currency",currency:Ze&&Ze.trim()||$,minimumFractionDigits:2,maximumFractionDigits:2}};return at(H,st[be]||{}).format(z)}var Ie=function(z,H,K){return at(H,{style:"currency",currency:K,minimumFractionDigits:2,maximumFractionDigits:2}).format(z)},rt=function(z,H){return at(H,{maximumFractionDigits:0}).format(z)},mt=function(z,H){return at(H,{style:"percent"}).format(z)};function tu(z,H,K){var $={second:"numeric",minute:"numeric",hour:"numeric"};switch(K){case"full":case"long":$.timeZoneName="short";break;case"short":delete $.second}return new Date(z).toLocaleTimeString(H,$)}var Ht=Object.freeze({__proto__:null,date:At,duration:Yt,numberCurrency:Ie,numberFmt:lt,numberInteger:rt,numberPercent:mt,time:tu}),nu={ES3:{break:!0,continue:!0,delete:!0,else:!0,for:!0,function:!0,if:!0,in:!0,new:!0,return:!0,this:!0,typeof:!0,var:!0,void:!0,while:!0,with:!0,case:!0,catch:!0,default:!0,do:!0,finally:!0,instanceof:!0,switch:!0,throw:!0,try:!0},ESnext:{await:!0,debugger:!0,class:!0,enum:!0,extends:!0,super:!0,const:!0,export:!0,import:!0,null:!0,true:!0,false:!0,implements:!0,let:!0,private:!0,public:!0,yield:!0,interface:!0,package:!0,protected:!0,static:!0}},iu=wt(nu);function vr(z){let H=0;for(let K=0;K<z.length;++K){let $=z.charCodeAt(K);H=(H<<5)-H+$,H|=0}return H}function Mu(z,H){H&&(z+=" "+vr(z).toString(36));let K=z.trim().replace(/\W+/g,"_");return iu.ES3[K]||iu.ESnext[K]||/^\d/.test(K)?"_"+K:K}function _t(z,H){if(/^[A-Z_$][0-9A-Z_$]*$/i.test(H)&&!iu.ES3[H])return z?z+"."+H:H;{let K=JSON.stringify(H);return z?z+"["+K+"]":K}}var Lt=["ar","ckb","fa","he","ks($|[^bfh])","lrc","mzn","pa-Arab","ps","ug","ur","uz-Arab","yi"],Bu=new RegExp("^"+Lt.join("|^"));function yu(z,H){var K=Bu.test(H),$=JSON.stringify(K?"":"");return"".concat($," + ").concat(z," + ").concat($)}var Bi="@messageformat/runtime",nr="@messageformat/runtime/lib/cardinals",wr="@messageformat/runtime/lib/plurals",ui="@messageformat/runtime/lib/formatters",Mr=function(){function z(H){this.arguments=[],this.runtime={},this.options=H}return z.prototype.compile=function(H,K,$){var ne,be,Ze=this,st=this.options,Ct=st.localeCodeFromKey,zt=st.requireAllArguments,uu=st.strict,Cu=st.strictPluralKeys;if(typeof H=="object"){var mu={};try{for(var Zt=u(Object.keys(H)),sr=Zt.next();!sr.done;sr=Zt.next()){var Zu=sr.value,hr=Ct?Ct(Zu):Zu,Cr=$&&hr&&$[hr]||K;mu[Zu]=this.compile(H[Zu],Cr,$)}}catch(O){ne={error:O}}finally{try{sr&&!sr.done&&(be=Zt.return)&&be.call(Zt)}finally{if(ne)throw ne.error}}return mu}this.plural=K;var Yi={cardinal:K.cardinals,ordinal:K.ordinals,strict:uu,strictPluralKeys:Cu};this.arguments=[];var $r=Mt(H,Yi).map(function(O){return Ze.token(O,null)}),W=this.arguments.length>0,V=this.concatenate($r,!0);if(zt&&W){this.setRuntimeFn("reqArgs");var ue=JSON.stringify(this.arguments);return"(d) => { reqArgs(".concat(ue,", d); return ").concat(V,"; }")}return"(".concat(W?"d":"",") => ").concat(V)},z.prototype.cases=function(H,K){var $=this,ne=!0,be=H.cases.map(function(uu){var Cu=uu.key,mu=uu.tokens;Cu==="other"&&(ne=!1);var Zt=mu.map(function(sr){return $.token(sr,K)});return"".concat(_t(null,Cu.replace(/^=/,"")),": ").concat($.concatenate(Zt,!1))});if(ne){var Ze=H.type,st=this.plural,Ct=st.cardinals,zt=st.ordinals;if(Ze==="select"||Ze==="plural"&&Ct.includes("other")||Ze==="selectordinal"&&zt.includes("other"))throw new Error("No 'other' form found in ".concat(JSON.stringify(H)))}return"{ ".concat(be.join(", ")," }")},z.prototype.concatenate=function(H,K){var $=this.options.returnType==="values";return $&&(K||H.length>1)?"["+H.join(", ")+"]":H.join(" + ")||'""'},z.prototype.token=function(H,K){if(H.type==="content")return JSON.stringify(H.value);var $=this.plural,ne=$.id,be=$.lc,Ze,st;switch("arg"in H?(this.arguments.push(H.arg),Ze=[_t("d",H.arg)]):Ze=[],H.type){case"argument":return this.options.biDiSupport?yu(String(Ze[0]),be):String(Ze[0]);case"select":st="select",K&&this.options.strict&&(K=null),Ze.push(this.cases(H,K)),this.setRuntimeFn("select");break;case"selectordinal":st="plural",Ze.push(H.pluralOffset||0,ne,this.cases(H,H),1),this.setLocale(ne,!0),this.setRuntimeFn("plural");break;case"plural":st="plural",Ze.push(H.pluralOffset||0,ne,this.cases(H,H)),this.setLocale(ne,!1),this.setRuntimeFn("plural");break;case"function":{var Ct=this.options.customFormatters[H.key],zt=Ct&&"module"in Ct&&typeof Ct.module=="function";if(!Ct){if(H.key==="date"){st=this.setDateFormatter(H,Ze,K);break}else if(H.key==="number"){st=this.setNumberFormatter(H,Ze,K);break}}if(Ze.push(JSON.stringify(this.plural.locale)),H.param){K&&this.options.strict&&(K=null);var uu=this.getFormatterArg(H,K);uu&&Ze.push(uu)}st=zt?Mu("".concat(H.key,"__").concat(this.plural.locale)):H.key,this.setFormatter(st,H.key);break}case"octothorpe":if(!K)return'"#"';Ze=[JSON.stringify(this.plural.locale),_t("d",K.arg),K.pluralOffset||0],this.options.strict?(st="strictNumber",Ze.push(JSON.stringify(K.arg)),this.setRuntimeFn("strictNumber")):(st="number",this.setRuntimeFn("number"));break}if(!st)throw new Error("Parser error for token "+JSON.stringify(H));return"".concat(st,"(").concat(Ze.join(", "),")")},z.prototype.runtimeIncludes=function(H,K){if(Mu(H)!==H)throw new SyntaxError("Reserved word used as ".concat(K," identifier: ").concat(H));var $=this.runtime[H];if(!$||$.type===K)return $;throw new TypeError("Cannot override ".concat($.type," runtime function as ").concat(K,": ").concat(H))},z.prototype.setLocale=function(H,K){var $=this.runtimeIncludes(H,"locale"),ne=this.plural,be=ne.getCardinal,Ze=ne.getPlural,st=ne.isDefault,Ct,zt,uu;if(!K&&st&&be){if($)return;Ct=function(Cu){return be(Cu)},zt=nr,uu=function(){return String(be)}}else{if($&&(!st||$.module===wr))return;Ct=function(Cu,mu){return Ze(Cu,mu)},zt=st?wr:Ze.module||null,uu=function(){return String(Ze)}}this.runtime[H]=Object.assign(Ct,{id:H,module:zt,toString:uu,type:"locale"})},z.prototype.setRuntimeFn=function(H){this.runtimeIncludes(H,"runtime")||(this.runtime[H]=Object.assign(ce[H],{id:H,module:Bi,type:"runtime"}))},z.prototype.getFormatterArg=function(H,K){var $,ne,be,Ze,st=this,Ct=H.key,zt=H.param,uu=this.options.customFormatters[Ct]||Or(Ct)&&Ht[Ct];if(!uu||!zt)return null;var Cu="arg"in uu&&uu.arg||"string";if(Cu==="options"){var mu="";try{for(var Zt=u(zt),sr=Zt.next();!sr.done;sr=Zt.next()){var Zu=sr.value;if(Zu.type==="content")mu+=Zu.value;else throw new SyntaxError("Expected literal options for ".concat(Ct," formatter"))}}catch(Je){$={error:Je}}finally{try{sr&&!sr.done&&(ne=Zt.return)&&ne.call(Zt)}finally{if($)throw $.error}}var hr={};try{for(var Cr=u(mu.split(",")),Yi=Cr.next();!Yi.done;Yi=Cr.next()){var $r=Yi.value,W=$r.indexOf(":");if(W===-1)hr[$r.trim()]=null;else{var V=$r.substring(0,W).trim(),ue=$r.substring(W+1).trim();if(ue==="true")hr[V]=!0;else if(ue==="false")hr[V]=!1;else if(ue==="null")hr[V]=null;else{var O=Number(ue);hr[V]=Number.isFinite(O)?O:ue}}}}catch(Je){be={error:Je}}finally{try{Yi&&!Yi.done&&(Ze=Cr.return)&&Ze.call(Cr)}finally{if(be)throw be.error}}return JSON.stringify(hr)}else{var Be=zt.map(function(Je){return st.token(Je,K)});if(Cu==="raw")return"[".concat(Be.join(", "),"]");var we=Be.join(" + ");return we?"(".concat(we,").trim()"):'""'}},z.prototype.setFormatter=function(H,K){if(!this.runtimeIncludes(H,"formatter")){var $=this.options.customFormatters[K||H];if($){var ne=typeof $=="function"?{formatter:$}:$;this.runtime[H]=Object.assign(ne.formatter.bind({}),i(i({},ne.formatter.prototype),{toString:function(){return String(ne.formatter)}}),{type:"formatter"},"module"in $&&$.module&&$.id?{id:Mu($.id),module:typeof $.module=="function"?$.module(this.plural.locale):$.module}:{id:null,module:null})}else if(Or(H))this.runtime[H]=Object.assign(Ht[H],{type:"formatter"},{id:H,module:ui});else throw new Error("Formatting function not found: ".concat(H))}},z.prototype.setDateFormatter=function(H,K,$){var ne=this,be=H.param,Ze=this.plural.locale,st=be&&be.length===1&&be[0];if(st&&st.type==="content"&&/^\s*::/.test(st.value)){var Ct=st.value.trim().substr(2),zt=Mu("date_".concat(Ze,"_").concat(Ct),!0);if(!this.runtimeIncludes(zt,"formatter")){var uu=x(Ze,Ct,this.options.timeZone);this.runtime[zt]=Object.assign(uu,{id:zt,module:null,toString:function(){return N(Ze,Ct,ne.options.timeZone)},type:"formatter"})}return zt}if(K.push(JSON.stringify(Ze)),be&&be.length>0){$&&this.options.strict&&($=null);var Cu=be.map(function(mu){return ne.token(mu,$)});K.push("("+(Cu.join(" + ")||'""')+").trim()")}return this.setFormatter("date"),"date"},z.prototype.setNumberFormatter=function(H,K,$){var ne=this,be=H.param,Ze=this.plural.locale;if(!be||be.length===0)return K.unshift(JSON.stringify(Ze)),K.push("0"),this.setRuntimeFn("number"),"number";if(K.push(JSON.stringify(Ze)),be.length===1&&be[0].type==="content"){var st=be[0].value.trim();switch(st){case"currency":return K.push(JSON.stringify(this.options.currency)),this.setFormatter("numberCurrency"),"numberCurrency";case"integer":return this.setFormatter("numberInteger"),"numberInteger";case"percent":return this.se