@everymatrix/cashier-step-up 0.7.14 → 0.7.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ "use strict";var Xr=Object.defineProperty,Wr=Object.defineProperties;var Zr=Object.getOwnPropertyDescriptors;var Nt=Object.getOwnPropertySymbols;var qr=Object.prototype.hasOwnProperty,Qr=Object.prototype.propertyIsEnumerable;var lt=(e,t,r)=>t in e?Xr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xe=(e,t)=>{for(var r in t||(t={}))qr.call(t,r)&&lt(e,r,t[r]);if(Nt)for(var r of Nt(t))Qr.call(t,r)&&lt(e,r,t[r]);return e},ut=(e,t)=>Wr(e,Zr(t));var K=(e,t,r)=>(lt(e,typeof t!="symbol"?t+"":t,r),r);var ve=(e,t,r)=>new Promise((n,i)=>{var o=u=>{try{s(r.next(u))}catch(l){i(l)}},a=u=>{try{s(r.throw(u))}catch(l){i(l)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(o,a);s((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ee(){}function ir(e){return e()}function Rt(){return Object.create(null)}function xe(e){e.forEach(ir)}function At(e){return typeof e=="function"}function or(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Jr(e){return Object.keys(e).length===0}function sr(e,...t){if(e==null){for(const n of t)n(void 0);return ee}const r=e.subscribe(...t);return r.unsubscribe?()=>r.unsubscribe():r}function Yr(e,t,r){e.$$.on_destroy.push(sr(t,r))}function y(e,t){e.appendChild(t)}function Kr(e,t,r){const n=en(e);if(!n.getElementById(t)){const i=O("style");i.id=t,i.textContent=r,tn(n,i)}}function en(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function tn(e,t){return y(e.head||e,t),t.sheet}function C(e,t,r){e.insertBefore(t,r||null)}function H(e){e.parentNode&&e.parentNode.removeChild(e)}function rn(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}function O(e){return document.createElement(e)}function oe(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function F(){return k(" ")}function nn(){return k("")}function pe(e,t,r,n){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}function p(e,t,r){r==null?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}function on(e){return Array.from(e.childNodes)}function j(e,t){t=""+t,e.data!==t&&(e.data=t)}function se(e,t,r){e.classList.toggle(t,!!r)}function sn(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}let Ge;function Ue(e){Ge=e}function an(){if(!Ge)throw new Error("Function called outside component initialization");return Ge}function ln(e){an().$$.on_mount.push(e)}const Ce=[],Je=[];let Be=[];const kt=[],un=Promise.resolve();let bt=!1;function hn(){bt||(bt=!0,un.then(ae))}function yt(e){Be.push(e)}const ht=new Set;let He=0;function ae(){if(He!==0)return;const e=Ge;do{try{for(;He<Ce.length;){const t=Ce[He];He++,Ue(t),cn(t.$$)}}catch(t){throw Ce.length=0,He=0,t}for(Ue(null),Ce.length=0,He=0;Je.length;)Je.pop()();for(let t=0;t<Be.length;t+=1){const r=Be[t];ht.has(r)||(ht.add(r),r())}Be.length=0}while(Ce.length);for(;kt.length;)kt.pop()();bt=!1,ht.clear(),Ue(e)}function cn(e){if(e.fragment!==null){e.update(),xe(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(yt)}}function fn(e){const t=[],r=[];Be.forEach(n=>e.indexOf(n)===-1?t.push(n):r.push(n)),r.forEach(n=>n()),Be=t}const pn=new Set;function dn(e,t){e&&e.i&&(pn.delete(e),e.i(t))}function Dt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function mn(e,t,r){const{fragment:n,after_update:i}=e.$$;n&&n.m(t,r),yt(()=>{const o=e.$$.on_mount.map(ir).filter(At);e.$$.on_destroy?e.$$.on_destroy.push(...o):xe(o),e.$$.on_mount=[]}),i.forEach(yt)}function gn(e,t){const r=e.$$;r.fragment!==null&&(fn(r.after_update),xe(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function bn(e,t){e.$$.dirty[0]===-1&&(Ce.push(e),hn(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function yn(e,t,r,n,i,o,a=null,s=[-1]){const u=Ge;Ue(e);const l=e.$$={fragment:null,ctx:[],props:o,update:ee,not_equal:i,bound:Rt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Rt(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};a&&a(l.root);let h=!1;if(l.ctx=r?r(e,t.props||{},(c,d,...E)=>{const m=E.length?E[0]:d;return l.ctx&&i(l.ctx[c],l.ctx[c]=m)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](m),h&&bn(e,c)),d}):[],l.update(),h=!0,xe(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const c=on(t.target);l.fragment&&l.fragment.l(c),c.forEach(H)}else l.fragment&&l.fragment.c();t.intro&&dn(e.$$.fragment),mn(e,t.target,t.anchor),ae()}Ue(u)}let ar;typeof HTMLElement=="function"&&(ar=class extends HTMLElement{constructor(t,r,n){super();K(this,"$$ctor");K(this,"$$s");K(this,"$$c");K(this,"$$cn",!1);K(this,"$$d",{});K(this,"$$r",!1);K(this,"$$p_d",{});K(this,"$$l",{});K(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}connectedCallback(){return ve(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let a;return{c:function(){a=O("slot"),o!=="default"&&p(a,"name",o)},m:function(l,h){C(l,a,h)},d:function(l){l&&H(a)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=sn(this);for(const o of this.$$s)o in n&&(r[o]=[t(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ze(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:ut(Xe({},this.$$d),{$$slots:r,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=Ze(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const a of this.$$l[o]){const s=this.$$c.$on(o,a);this.$$l_u.set(a,s)}this.$$l={}}})}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ze(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Ze(e,t,r,n){var o;const i=(o=r[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function En(e,t,r,n,i,o){let a=class extends ar{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Object.keys(t).forEach(s=>{Object.defineProperty(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(u){var l;u=Ze(s,u,t),this.$$d[s]=u,(l=this.$$c)==null||l.$set({[s]:u})}})}),n.forEach(s=>{Object.defineProperty(a.prototype,s,{get(){var u;return(u=this.$$c)==null?void 0:u[s]}})}),e.element=a,a}class _n{constructor(){K(this,"$$");K(this,"$$set")}$destroy(){gn(this,1),this.$destroy=ee}$on(t,r){if(!At(r))return ee;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(r),()=>{const i=n.indexOf(r);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Jr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const vn="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(vn);function xn(e,t){if(e){const r=document.createElement("style");r.innerHTML=t,e.appendChild(r)}}function wn(e,t){if(!e||!t)return;const r=new URL(t);fetch(r.href).then(n=>n.text()).then(n=>{const i=document.createElement("style");i.innerHTML=n,e&&e.appendChild(i)}).catch(n=>{console.error("There was an error while trying to load client styling from URL",n)})}function Sn(e,t,r){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(t,i=>{n.innerHTML=i,e&&e.appendChild(n)})}}const Ae=[];function Tn(e,t){return{subscribe:tt(e,t).subscribe}}function tt(e,t=ee){let r;const n=new Set;function i(s){if(or(e,s)&&(e=s,r)){const u=!Ae.length;for(const l of n)l[1](),Ae.push(l,e);if(u){for(let l=0;l<Ae.length;l+=2)Ae[l][0](Ae[l+1]);Ae.length=0}}}function o(s){i(s(e))}function a(s,u=ee){const l=[s,u];return n.add(l),n.size===1&&(r=t(i,o)||ee),s(e),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:o,subscribe:a}}function Ne(e,t,r){const n=!Array.isArray(e),i=n?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return Tn(r,(a,s)=>{let u=!1;const l=[];let h=0,c=ee;const d=()=>{if(h)return;c();const m=t(n?l[0]:l,a,s);o?a(m):c=At(m)?m:ee},E=i.map((m,g)=>sr(m,v=>{l[g]=v,h&=~(1<<g),u&&d()},()=>{h|=1<<g}));return u=!0,d(),function(){xe(E),c(),u=!1}})}function On(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hn=function(t){return An(t)&&!Cn(t)};function An(e){return!!e&&typeof e=="object"}function Cn(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Mn(e)}var Bn=typeof Symbol=="function"&&Symbol.for,Pn=Bn?Symbol.for("react.element"):60103;function Mn(e){return e.$$typeof===Pn}function Ln(e){return Array.isArray(e)?[]:{}}function Fe(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Pe(Ln(e),e,t):e}function In(e,t,r){return e.concat(t).map(function(n){return Fe(n,r)})}function Nn(e,t){if(!t.customMerge)return Pe;var r=t.customMerge(e);return typeof r=="function"?r:Pe}function Rn(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ut(e){return Object.keys(e).concat(Rn(e))}function lr(e,t){try{return t in e}catch(r){return!1}}function kn(e,t){return lr(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Dn(e,t,r){var n={};return r.isMergeableObject(e)&&Ut(e).forEach(function(i){n[i]=Fe(e[i],r)}),Ut(t).forEach(function(i){kn(e,i)||(lr(e,i)&&r.isMergeableObject(t[i])?n[i]=Nn(i,r)(e[i],t[i],r):n[i]=Fe(t[i],r))}),n}function Pe(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||In,r.isMergeableObject=r.isMergeableObject||Hn,r.cloneUnlessOtherwiseSpecified=Fe;var n=Array.isArray(t),i=Array.isArray(e),o=n===i;return o?n?r.arrayMerge(e,t,r):Dn(e,t,r):Fe(t,r)}Pe.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Pe(n,i,r)},{})};var Un=Pe,Gn=Un;const Fn=On(Gn);var Et=function(e,t){return Et=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])},Et(e,t)};function rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Et(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var le=function(){return le=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},le.apply(this,arguments)};function jn(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<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function ct(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function ft(e,t){var r=t&&t.cache?t.cache:qn,n=t&&t.serializer?t.serializer:Wn,i=t&&t.strategy?t.strategy:zn;return i(e,{cache:r,serializer:n})}function Vn(e){return e==null||typeof e=="number"||typeof e=="boolean"}function $n(e,t,r,n){var i=Vn(n)?n:r(n),o=t.get(i);return typeof o=="undefined"&&(o=e.call(this,n),t.set(i,o)),o}function ur(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o=="undefined"&&(o=e.apply(this,n),t.set(i,o)),o}function hr(e,t,r,n,i){return r.bind(t,e,n,i)}function zn(e,t){var r=e.length===1?$n:ur;return hr(e,this,r,t.cache.create(),t.serializer)}function Xn(e,t){return hr(e,this,ur,t.cache.create(),t.serializer)}var Wn=function(){return JSON.stringify(arguments)},Zn=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,r){this.cache[t]=r},e}(),qn={create:function(){return new Zn}},pt={variadic:Xn},Ye=function(){return Ye=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ye.apply(this,arguments)};var w;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(w||(w={}));var L;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(L||(L={}));var Me;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Me||(Me={}));function Gt(e){return e.type===L.literal}function Qn(e){return e.type===L.argument}function cr(e){return e.type===L.number}function fr(e){return e.type===L.date}function pr(e){return e.type===L.time}function dr(e){return e.type===L.select}function mr(e){return e.type===L.plural}function Jn(e){return e.type===L.pound}function gr(e){return e.type===L.tag}function br(e){return!!(e&&typeof e=="object"&&e.type===Me.number)}function _t(e){return!!(e&&typeof e=="object"&&e.type===Me.dateTime)}var yr=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Yn=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Kn(e){var t={};return e.replace(Yn,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var R=function(){return R=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},R.apply(this,arguments)};var ei=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ti(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ei).filter(function(d){return d.length>0}),r=[],n=0,i=t;n<i.length;n++){var o=i[n],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],u=a.slice(1),l=0,h=u;l<h.length;l++){var c=h[l];if(c.length===0)throw new Error("Invalid number skeleton")}r.push({stem:s,options:u})}return r}function ri(e){return e.replace(/^(.*?)-/,"")}var Ft=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Er=/^(@+)?(\+|#+)?[rs]?$/g,ni=/(\*)(0+)|(#+)(0+)|(0+)/g,_r=/^(0+)$/;function jt(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Er,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function vr(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ii(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!_r.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Vt(e){var t={},r=vr(e);return r||t}function oi(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=ri(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=R(R(R({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return R(R({},u),Vt(l))},{}));continue;case"engineering":t=R(R(R({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return R(R({},u),Vt(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ni,function(u,l,h,c,d,E){if(l)t.minimumIntegerDigits=h.length;else{if(c&&d)throw new Error("We currently do not support maximum integer digits");if(E)throw new Error("We currently do not support exact integer digits")}return""});continue}if(_r.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Ft.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ft,function(u,l,h,c,d,E){return h==="*"?t.minimumFractionDigits=l.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:d&&E?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+E.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=R(R({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=R(R({},t),jt(o)));continue}if(Er.test(i.stem)){t=R(R({},t),jt(i.stem));continue}var a=vr(i.stem);a&&(t=R(R({},t),a));var s=ii(i.stem);s&&(t=R(R({},t),s))}return t}var We={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function si(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var a=1+(o&1),s=o<2?1:3+(o>>1),u="a",l=ai(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=u;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function ai(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=We[n||""]||We[r||""]||We["".concat(r,"-001")]||We["001"];return i[0]}var dt,li=new RegExp("^".concat(yr.source,"*")),ui=new RegExp("".concat(yr.source,"*$"));function T(e,t){return{start:e,end:t}}var hi=!!String.prototype.startsWith&&"_a".startsWith("a",1),ci=!!String.fromCodePoint,fi=!!Object.fromEntries,pi=!!String.prototype.codePointAt,di=!!String.prototype.trimStart,mi=!!String.prototype.trimEnd,gi=!!Number.isSafeInteger,bi=gi?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},vt=!0;try{var yi=wr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");vt=((dt=yi.exec("a"))===null||dt===void 0?void 0:dt[0])==="a"}catch(e){vt=!1}var $t=hi?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},xt=ci?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,o=0,a;i>o;){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},zt=fi?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var o=i[n],a=o[0],s=o[1];r[a]=s}return r},xr=pi?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=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}},Ei=di?function(t){return t.trimStart()}:function(t){return t.replace(li,"")},_i=mi?function(t){return t.trimEnd()}:function(t){return t.replace(ui,"")};function wr(e,t){return new RegExp(e,t)}var wt;if(vt){var Xt=wr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wt=function(t,r){var n;Xt.lastIndex=r;var i=Xt.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else wt=function(t,r){for(var n=[];;){var i=xr(t,r);if(i===void 0||Sr(i)||Si(i))break;n.push(i),r+=i>=65536?2:1}return xt.apply(void 0,n)};var vi=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:L.pound,location:T(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(w.UNMATCHED_CLOSING_TAG,T(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&St(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:L.literal,value:"<".concat(i,"/>"),location:T(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("</")){if(this.isEOF()||!St(this.char()))return this.error(w.INVALID_TAG,T(s,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(w.UNMATCHED_CLOSING_TAG,T(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:L.tag,value:i,children:a,location:T(n,this.clonePosition())},err:null}:this.error(w.INVALID_TAG,T(s,this.clonePosition())))}else return this.error(w.UNCLOSED_TAG,T(n,this.clonePosition()))}else return this.error(w.INVALID_TAG,T(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&wi(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 u=T(n,this.clonePosition());return{val:{type:L.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!xi(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 xt.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(),xt(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(w.EMPTY_ARGUMENT,T(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(w.MALFORMED_ARGUMENT,T(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:L.argument,value:i,location:T(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(w.MALFORMED_ARGUMENT,T(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=wt(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),a=T(t,o);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(w.EXPECT_ARGUMENT_TYPE,T(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var d=_i(c.val);if(d.length===0)return this.error(w.EXPECT_ARGUMENT_STYLE,T(this.clonePosition(),this.clonePosition()));var E=T(h,this.clonePosition());l={style:d,styleLocation:E}}var m=this.tryParseArgumentClose(i);if(m.err)return m;var g=T(i,this.clonePosition());if(l&&$t(l==null?void 0:l.style,"::",0)){var v=Ei(l.style.slice(2));if(s==="number"){var c=this.parseNumberSkeletonFromString(v,l.styleLocation);return c.err?c:{val:{type:L.number,value:n,location:g,style:c.val},err:null}}else{if(v.length===0)return this.error(w.EXPECT_DATE_TIME_SKELETON,g);var S=v;this.locale&&(S=si(v,this.locale));var d={type:Me.dateTime,pattern:S,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Kn(S):{}},P=s==="date"?L.date:L.time;return{val:{type:P,value:n,location:g,style:d},err:null}}}return{val:{type:s==="number"?L.number:s==="date"?L.date:L.time,value:n,location:g,style:(o=l==null?void 0:l.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(w.EXPECT_SELECT_ARGUMENT_OPTIONS,T(I,Ye({},I)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),M=0;if(s!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),D=this.parseIdentifierIfPossible(),M=c.val}var N=this.tryParsePluralOrSelectOptions(t,s,r,D);if(N.err)return N;var m=this.tryParseArgumentClose(i);if(m.err)return m;var te=T(i,this.clonePosition());return s==="select"?{val:{type:L.select,value:n,options:zt(N.val),location:te},err:null}:{val:{type:L.plural,value:n,options:zt(N.val),offset:M,pluralType:s==="plural"?"cardinal":"ordinal",location:te},err:null}}default:return this.error(w.INVALID_ARGUMENT_TYPE,T(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(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(w.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,T(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=ti(t)}catch(i){return this.error(w.INVALID_NUMBER_SKELETON,r)}return{val:{type:Me.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?oi(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,a=!1,s=[],u=new Set,l=i.value,h=i.location;;){if(l.length===0){var c=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_SELECTOR,w.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;h=T(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?w.DUPLICATE_SELECT_ARGUMENT_SELECTOR:w.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var E=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:w.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,T(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(t+1,r,n);if(m.err)return m;var g=this.tryParseArgumentClose(E);if(g.err)return g;s.push([l,{value:m.val,location:T(E,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR:w.EXPECT_PLURAL_ARGUMENT_SELECTOR,T(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(w.MISSING_OTHER_CLAUSE,T(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 u=T(i,this.clonePosition());return o?(a*=n,bi(a)?{val:a,err:null}:this.error(r,u)):this.error(t,u)},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=xr(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($t(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=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()&&Sr(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?n:null},e}();function St(e){return e>=97&&e<=122||e>=65&&e<=90}function xi(e){return St(e)||e===47}function wi(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 Sr(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Si(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 Tt(e){e.forEach(function(t){if(delete t.location,dr(t)||mr(t))for(var r in t.options)delete t.options[r].location,Tt(t.options[r].value);else cr(t)&&br(t.style)||(fr(t)||pr(t))&&_t(t.style)?delete t.style.location:gr(t)&&Tt(t.children)})}function Ti(e,t){t===void 0&&(t={}),t=Ye({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new vi(e,t).parse();if(r.err){var n=SyntaxError(w[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Tt(r.val),r.val}var Le;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Le||(Le={}));var nt=function(e){rt(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),Wt=function(e){rt(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('", "'),'"'),Le.INVALID_VALUE,o)||this}return t}(nt),Oi=function(e){rt(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Le.INVALID_VALUE,i)||this}return t}(nt),Hi=function(e){rt(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,'"'),Le.MISSING_VALUE,n)||this}return t}(nt),q;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(q||(q={}));function Ai(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==q.literal||r.type!==q.literal?t.push(r):n.value+=r.value,t},[])}function Ci(e){return typeof e=="function"}function qe(e,t,r,n,i,o,a){if(e.length===1&&Gt(e[0]))return[{type:q.literal,value:e[0].value}];for(var s=[],u=0,l=e;u<l.length;u++){var h=l[u];if(Gt(h)){s.push({type:q.literal,value:h.value});continue}if(Jn(h)){typeof o=="number"&&s.push({type:q.literal,value:r.getNumberFormat(t).format(o)});continue}var c=h.value;if(!(i&&c in i))throw new Hi(c,a);var d=i[c];if(Qn(h)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),s.push({type:typeof d=="string"?q.literal:q.object,value:d});continue}if(fr(h)){var E=typeof h.style=="string"?n.date[h.style]:_t(h.style)?h.style.parsedOptions:void 0;s.push({type:q.literal,value:r.getDateTimeFormat(t,E).format(d)});continue}if(pr(h)){var E=typeof h.style=="string"?n.time[h.style]:_t(h.style)?h.style.parsedOptions:n.time.medium;s.push({type:q.literal,value:r.getDateTimeFormat(t,E).format(d)});continue}if(cr(h)){var E=typeof h.style=="string"?n.number[h.style]:br(h.style)?h.style.parsedOptions:void 0;E&&E.scale&&(d=d*(E.scale||1)),s.push({type:q.literal,value:r.getNumberFormat(t,E).format(d)});continue}if(gr(h)){var m=h.children,g=h.value,v=i[g];if(!Ci(v))throw new Oi(g,"function",a);var S=qe(m,t,r,n,i,o),P=v(S.map(function(M){return M.value}));Array.isArray(P)||(P=[P]),s.push.apply(s,P.map(function(M){return{type:typeof M=="string"?q.literal:q.object,value:M}}))}if(dr(h)){var I=h.options[d]||h.options.other;if(!I)throw new Wt(h.value,d,Object.keys(h.options),a);s.push.apply(s,qe(I.value,t,r,n,i));continue}if(mr(h)){var I=h.options["=".concat(d)];if(!I){if(!Intl.PluralRules)throw new nt(`Intl.PluralRules is not available in this environment.
2
+ Try polyfilling it using "@formatjs/intl-pluralrules"
3
+ `,Le.MISSING_INTL_API,a);var D=r.getPluralRules(t,{type:h.pluralType}).select(d-(h.offset||0));I=h.options[D]||h.options.other}if(!I)throw new Wt(h.value,d,Object.keys(h.options),a);s.push.apply(s,qe(I.value,t,r,n,i,d-(h.offset||0)));continue}}return Ai(s)}function Bi(e,t){return t?le(le(le({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=le(le({},e[n]),t[n]||{}),r},{})):e}function Pi(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Bi(e[n],t[n]),r},le({},e)):e}function mt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Mi(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ft(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,ct([void 0],r,!1)))},{cache:mt(e.number),strategy:pt.variadic}),getDateTimeFormat:ft(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,ct([void 0],r,!1)))},{cache:mt(e.dateTime),strategy:pt.variadic}),getPluralRules:ft(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,ct([void 0],r,!1)))},{cache:mt(e.pluralRules),strategy:pt.variadic})}}var Li=function(){function e(t,r,n,i){r===void 0&&(r=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=o.formatToParts(u);if(l.length===1)return l[0].value;var h=l.reduce(function(c,d){return!c.length||d.type!==q.literal||typeof c[c.length-1]!="string"?c.push(d.value):c[c.length-1]+=d.value,c},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return qe(o.ast,o.locales,o.formatters,o.formats,u,void 0,o.message)},this.resolvedOptions=function(){var u;return{locale:((u=o.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var s=jn(a,["formatters"]);this.ast=e.__parse(t,le(le({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Pi(e.formats,n),this.formatters=i&&i.formatters||Mi(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Ti,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}();function Ii(e,t){if(t==null)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let i=0;i<r.length;i++)if(typeof n=="object"){if(i>0){const o=r.slice(i,r.length).join(".");if(o in n){n=n[o];break}}n=n[r[i]]}else n=void 0;return n}const de={},Ni=(e,t,r)=>r&&(t in de||(de[t]={}),e in de[t]||(de[t][e]=r),r),Tr=(e,t)=>{if(t==null)return;if(t in de&&e in de[t])return de[t][e];const r=it(t);for(let n=0;n<r.length;n++){const i=r[n],o=ki(i,e);if(o)return Ni(e,t,o)}};let Ct;const Ve=tt({});function Ri(e){return Ct[e]||null}function Or(e){return e in Ct}function ki(e,t){if(!Or(e))return null;const r=Ri(e);return Ii(r,t)}function Di(e){if(e==null)return;const t=it(e);for(let r=0;r<t.length;r++){const n=t[r];if(Or(n))return n}}function Hr(e,...t){delete de[e],Ve.update(r=>(r[e]=Fn.all([r[e]||{},...t]),r))}Ne([Ve],([e])=>Object.keys(e));Ve.subscribe(e=>Ct=e);const Qe={};function Ui(e,t){Qe[e].delete(t),Qe[e].size===0&&delete Qe[e]}function Ar(e){return Qe[e]}function Gi(e){return it(e).map(t=>{const r=Ar(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function Ot(e){return e==null?!1:it(e).some(t=>{var r;return(r=Ar(t))==null?void 0:r.size})}function Fi(e,t){return Promise.all(t.map(n=>(Ui(e,n),n().then(i=>i.default||i)))).then(n=>Hr(e,...n))}const De={};function Cr(e){if(!Ot(e))return e in De?De[e]:Promise.resolve();const t=Gi(e);return De[e]=Promise.all(t.map(([r,n])=>Fi(r,n))).then(()=>{if(Ot(e))return Cr(e);delete De[e]}),De[e]}const ji={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},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"}}},Vi={fallbackLocale:null,loadingDelay:200,formats:ji,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},$i=Vi;function Ie(){return $i}const gt=tt(!1);var zi=Object.defineProperty,Xi=Object.defineProperties,Wi=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,qi=Object.prototype.propertyIsEnumerable,qt=(e,t,r)=>t in e?zi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qi=(e,t)=>{for(var r in t||(t={}))Zi.call(t,r)&&qt(e,r,t[r]);if(Zt)for(var r of Zt(t))qi.call(t,r)&&qt(e,r,t[r]);return e},Ji=(e,t)=>Xi(e,Wi(t));let Ht;const Ke=tt(null);function Qt(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function it(e,t=Ie().fallbackLocale){const r=Qt(e);return t?[...new Set([...r,...Qt(t)])]:r}function we(){return Ht!=null?Ht:void 0}Ke.subscribe(e=>{Ht=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Yi=e=>{if(e&&Di(e)&&Ot(e)){const{loadingDelay:t}=Ie();let r;return typeof window!="undefined"&&we()!=null&&t?r=window.setTimeout(()=>gt.set(!0),t):gt.set(!0),Cr(e).then(()=>{Ke.set(e)}).finally(()=>{clearTimeout(r),gt.set(!1)})}return Ke.set(e)},Re=Ji(Qi({},Ke),{set:Yi}),ot=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var Ki=Object.defineProperty,et=Object.getOwnPropertySymbols,Br=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Jt=(e,t,r)=>t in e?Ki(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bt=(e,t)=>{for(var r in t||(t={}))Br.call(t,r)&&Jt(e,r,t[r]);if(et)for(var r of et(t))Pr.call(t,r)&&Jt(e,r,t[r]);return e},ke=(e,t)=>{var r={};for(var n in e)Br.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&et)for(var n of et(e))t.indexOf(n)<0&&Pr.call(e,n)&&(r[n]=e[n]);return r};const je=(e,t)=>{const{formats:r}=Ie();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},eo=ot(e=>{var t=e,{locale:r,format:n}=t,i=ke(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=je("number",n)),new Intl.NumberFormat(r,i)}),to=ot(e=>{var t=e,{locale:r,format:n}=t,i=ke(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=je("date",n):Object.keys(i).length===0&&(i=je("date","short")),new Intl.DateTimeFormat(r,i)}),ro=ot(e=>{var t=e,{locale:r,format:n}=t,i=ke(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=je("time",n):Object.keys(i).length===0&&(i=je("time","short")),new Intl.DateTimeFormat(r,i)}),no=(e={})=>{var t=e,{locale:r=we()}=t,n=ke(t,["locale"]);return eo(Bt({locale:r},n))},io=(e={})=>{var t=e,{locale:r=we()}=t,n=ke(t,["locale"]);return to(Bt({locale:r},n))},oo=(e={})=>{var t=e,{locale:r=we()}=t,n=ke(t,["locale"]);return ro(Bt({locale:r},n))},so=ot((e,t=we())=>new Li(e,t,Ie().formats,{ignoreTag:Ie().ignoreTag})),ao=(e,t={})=>{var r,n,i,o;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:s,locale:u=we(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Tr(e,u);if(!h)h=(o=(i=(n=(r=Ie()).handleMissingMessage)==null?void 0:n.call(r,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?o:e;else if(typeof h!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),h;if(!s)return h;let c=h;try{c=so(h,u).format(s)}catch(d){d instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,d.message)}return c},lo=(e,t)=>oo(t).format(e),uo=(e,t)=>io(t).format(e),ho=(e,t)=>no(t).format(e),co=(e,t=we())=>Tr(e,t),fo=Ne([Re,Ve],()=>ao);Ne([Re],()=>lo);Ne([Re],()=>uo);Ne([Re],()=>ho);Ne([Re,Ve],()=>co);function Yt(e,t){Hr(e,t)}function po(e){Re.set(e)}const Kt={en:{otpTitle:"Code verification is required",popupMessage:"Please enter the security code received on your SMS/email address to perform the update.",popupMessageLastWarning:"If the next validation attempt is failed, your transaction will fail and you will be returned back to payment method.",minutes:"minutes",errorHeader:"Error",configError:"Unable to load OTP data. Please try again later.",otpHeading:"Enter OTP",resendOtp:"Resent OTP",submit:"Submit",close:"Close",invalidOtp:"The code you've sent is not valid. Please try again.",accountBlocked:"Too many attempts for OTP. Your account has been blocked for one hour.",submissionError:"Something went wrong. Please try again.",otpExpiredMessage:"Validation code has expired, please request a new one to continue.",timeRemaining:"Code expires in:",selectChannelTitle:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS",channelEmail:"Email",sendCode:"Send code",waitSeconds:"Please wait for before resending:"},tr:{otpTitle:"Kod doğrulaması gereklidir",popupMessage:"Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",popupMessageLastWarning:"Bir sonraki doğrulama denemesi başarısız olursa, işleminiz başarısız olacak ve ödeme yöntemine geri döndürüleceksiniz.",minutes:"dakika",errorHeader:"Hata",configError:"OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",otpHeading:"OTP Girin",resendOtp:"OTP'yi Yeniden Gönder",submit:"Gönder",close:"Kapat",invalidOtp:"Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",accountBlocked:"OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",submissionError:"Bir şeyler ters gitti. Lütfen tekrar deneyin.",otpExpiredMessage:"Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",timeRemaining:"Kodun süresi doluyor:",selectChannelTitle:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS kodu",channelEmail:"E-posta kodu",sendCode:"Kodu gönder",waitSeconds:"Tekrar göndermeden önce lütfen bekleyin:"},fr:{otpTitle:"La vérification par code est requise",popupMessage:"Veuillez saisir le code de sécurité reçu par SMS ou par e-mail afin d’effectuer la mise à jour.",popupMessageLastWarning:"Si la prochaine tentative de validation échoue, votre transaction échouera et vous serez redirigé vers le moyen de paiement.",minutes:"minutes",errorHeader:"Erreur",configError:"Impossible de charger les données OTP. Veuillez réessayer plus tard.",otpHeading:"Saisir le code OTP",resendOtp:"Renvoyer le code OTP",submit:"Valider",close:"Fermer",invalidOtp:"Le code que vous avez saisi n’est pas valide. Veuillez réessayer.",accountBlocked:"Trop de tentatives de code OTP. Votre compte a été bloqué pendant une heure.",submissionError:"Une erreur s’est produite. Veuillez réessayer.",otpExpiredMessage:"Le code de validation a expiré. Veuillez en demander un nouveau pour continuer.",timeRemaining:"Le code expire dans :",selectChannelTitle:"Sélectionner la méthode de vérification",selectChannelMessage:"Choisissez comment vous souhaitez recevoir votre code de vérification",channelSMS:"SMS",channelEmail:"E-mail",sendCode:"Envoyer le code",waitSeconds:"Veuillez patienter avant de renvoyer le code :"}};function mo(e){Kr(e,"svelte-gpy3mu",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.RadioIndicator{width:20px;height:20px;border-radius:50%;border:2px solid var(--emw--color-typography, #fff);position:relative;flex-shrink:0;margin-right:8px;transition:all 0.2s ease;opacity:0.7}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;opacity:1;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.ModalCloseIcon{padding:0px;position:absolute;right:0;top:0;margin:15px 20px;z-index:20;transition:all 0.3s ease}.ModalCloseIcon svg{width:11px;height:11px;fill:var(--emw--color-primary, red);cursor:pointer}.ModalCloseIcon:hover{transform:rotate(90deg)}.OtpContent{width:100%;display:flex;flex-direction:column;gap:var(--emw--spacing-large, 20px)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.OtpButton{text-transform:uppercase;font-weight:var(--emw--font-weight-medium, 500);color:var(--emw--color-typography-button, #000000);text-align:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-family:inherit;height:46px;line-height:normal;border:none;background:var(--emw--color-primary, #f9c408);border-radius:10px;width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--emw--spacing-2x-small-plus, 5px);transition:all 0.2s linear}.OtpButton:active{box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-active, #fecd1c)}.OtpButton[disabled],.OtpButton.disabled{filter:saturate(50%);opacity:0.5;cursor:not-allowed;pointer-events:none}.OtpButton:hover:not([disabled]):not(.disabled){box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-hover, #dbac03)}@container (max-width: 500px){.OtpDescription{font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-size-big, 20px)}}.OtpDescription{display:flex;color:var(--emw--color-typography, #fff);flex-direction:column;gap:12px;font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-medium, 16px);font-weight:var(--emw--font-weight-medium, 600)}.OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px;align-items:center}.OtpError h2{margin:0;color:var(--emw--color-typography, #fff)}.OtpError p{color:var(--emw--color-typography, #fff);text-align:center;font-size:var(--emw--font-size-small, 12px)}.OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.ChannelSelection{display:flex;flex-direction:row;justify-content:space-between}.ChannelCheckbox{display:flex;align-items:center;padding:var(--emw--spacing-medium, 16px);cursor:pointer;transition:all 0.2s ease}.ChannelCheckbox input[type=radio]{display:none}.ChannelCheckbox .ChannelContent{display:flex;align-items:center;gap:3px;width:100%;color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500)}.ChannelCheckbox .ChannelContent svg{flex-shrink:0;opacity:0.7;width:20px;height:20px}.ChannelCheckbox .ChannelContent span{text-transform:uppercase}.ChannelCheckbox.selected .ChannelContent{color:var(--emw--color-primary, #000000)}.ChannelCheckbox.selected .ChannelContent svg{stroke:var(--emw--color-primary, #000000);opacity:1}.ChannelCheckbox:hover:not(.selected){color:var(--emw--color-active, #fff)}.OtpField{display:flex;justify-content:space-between;margin:10px}.OtpField input{width:45px;font-size:32px;padding:5px;text-align:center;border-radius:5px;margin:6px;font-weight:bold;outline:none;background:var(--emw--color-background);border:0;transition:all 0.1s;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);color:var(--emw--color-typography, #fff)}.OtpField input.space{margin-right:1rem !important}.OtpField input:focus{box-shadow:0 0 1px 1px var(--emw--color-primary, #007bff)}.OtpActionButtons{display:flex;justify-content:space-between;gap:40px}.OtpErrorMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpNoticeMessage{color:var(--emw--color-primary, #f9c408);font-weight:bold}.LastWarningMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpLoaderContainer{width:100%;display:flex;justify-content:center;align-items:center;padding:20px 0}.OtpLoader{width:48px;height:48px;border:5px solid var(--emw--color-secondary, #b3d8ff);border-bottom-color:var(--emw--color-primary, #007bff);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.OtpTimer{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-small, 12px);opacity:0.8}@container (max-width: 500px){.OtpContent{padding:var(--emw--spacing-small, 10px)}.OtpField input{width:40px;font-size:28px;margin:4px}}')}function er(e,t,r){const n=e.slice();return n[69]=t[r],n[70]=t,n[71]=r,n}function go(e){let t,r,n,i,o,a,s,u,l,h,c,d,E,m,g,v,S,P=e[19]("channelSMS")+"",I,D,M,N,te,Q,ue,me,he,B,U,Z,ge,be,ye=e[19]("channelEmail")+"",J,re,X,ce,ne,Ee,Se;function _e(b,A){return b[9]?_o:b[12]?yo:Eo}let Te=_e(e),Y=Te(e),V=e[0]&&rr(e);function $e(b,A){if(b[3]&&b[12])return Oo;if(b[12]&&b[4])return To}let fe=$e(e),$=fe&&fe(e);function ze(b,A){if(b[9])return Ao;if(b[12]&&b[4])return Ho}let ie=ze(e),W=ie&&ie(e);return{c(){t=O("div"),Y.c(),r=F(),n=O("div"),i=O("label"),o=O("div"),a=F(),s=O("input"),l=F(),h=O("div"),c=oe("svg"),d=oe("path"),E=oe("circle"),m=oe("circle"),g=oe("circle"),v=F(),S=O("span"),I=k(P),D=F(),M=O("label"),N=O("div"),te=F(),Q=O("input"),me=F(),he=O("div"),B=oe("svg"),U=oe("rect"),Z=oe("path"),ge=F(),be=O("span"),J=k(ye),re=F(),V&&V.c(),X=F(),$&&$.c(),ce=F(),ne=O("div"),W&&W.c(),p(t,"class","OtpDescription"),p(o,"class","RadioIndicator"),se(o,"checked",e[0]===e[20].SMS),p(s,"type","radio"),p(s,"name","channel"),s.value=e[20].SMS,s.checked=u=e[0]===e[20].SMS,p(d,"d","M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"),p(E,"cx","9"),p(E,"cy","11"),p(E,"r","0.5"),p(E,"fill","currentColor"),p(m,"cx","12"),p(m,"cy","11"),p(m,"r","0.5"),p(m,"fill","currentColor"),p(g,"cx","15"),p(g,"cy","11"),p(g,"r","0.5"),p(g,"fill","currentColor"),p(c,"xmlns","http://www.w3.org/2000/svg"),p(c,"width","24"),p(c,"height","24"),p(c,"viewBox","0 0 24 24"),p(c,"fill","none"),p(c,"stroke","currentColor"),p(c,"stroke-width","2"),p(c,"stroke-linecap","round"),p(c,"stroke-linejoin","round"),p(h,"class","ChannelContent"),p(i,"class","ChannelCheckbox"),se(i,"selected",e[0]===e[20].SMS),p(N,"class","RadioIndicator"),se(N,"checked",e[0]===e[20].EMAIL),p(Q,"type","radio"),p(Q,"name","channel"),Q.value=e[20].EMAIL,Q.checked=ue=e[0]===e[20].EMAIL,p(U,"x","2"),p(U,"y","4"),p(U,"width","20"),p(U,"height","16"),p(U,"rx","2"),p(Z,"d","m2 7 10 6 10-6"),p(B,"xmlns","http://www.w3.org/2000/svg"),p(B,"width","24"),p(B,"height","24"),p(B,"viewBox","0 0 24 24"),p(B,"fill","none"),p(B,"stroke","currentColor"),p(B,"stroke-width","2"),p(B,"stroke-linecap","round"),p(B,"stroke-linejoin","round"),p(he,"class","ChannelContent"),p(M,"class","ChannelCheckbox"),se(M,"selected",e[0]===e[20].EMAIL),p(n,"class","ChannelSelection"),p(ne,"class","OtpActionButtons")},m(b,A){C(b,t,A),Y.m(t,null),C(b,r,A),C(b,n,A),y(n,i),y(i,o),y(i,a),y(i,s),y(i,l),y(i,h),y(h,c),y(c,d),y(c,E),y(c,m),y(c,g),y(h,v),y(h,S),y(S,I),y(n,D),y(n,M),y(M,N),y(M,te),y(M,Q),y(M,me),y(M,he),y(he,B),y(B,U),y(B,Z),y(he,ge),y(he,be),y(be,J),C(b,re,A),V&&V.m(b,A),C(b,X,A),$&&$.m(b,A),C(b,ce,A),C(b,ne,A),W&&W.m(ne,null),Ee||(Se=[pe(s,"change",e[39]),pe(Q,"change",e[40])],Ee=!0)},p(b,A){Te===(Te=_e(b))&&Y?Y.p(b,A):(Y.d(1),Y=Te(b),Y&&(Y.c(),Y.m(t,null))),A[0]&1048577&&se(o,"checked",b[0]===b[20].SMS),A[0]&1&&u!==(u=b[0]===b[20].SMS)&&(s.checked=u),A[0]&524288&&P!==(P=b[19]("channelSMS")+"")&&j(I,P),A[0]&1048577&&se(i,"selected",b[0]===b[20].SMS),A[0]&1048577&&se(N,"checked",b[0]===b[20].EMAIL),A[0]&1&&ue!==(ue=b[0]===b[20].EMAIL)&&(Q.checked=ue),A[0]&524288&&ye!==(ye=b[19]("channelEmail")+"")&&j(J,ye),A[0]&1048577&&se(M,"selected",b[0]===b[20].EMAIL),b[0]?V?V.p(b,A):(V=rr(b),V.c(),V.m(X.parentNode,X)):V&&(V.d(1),V=null),fe===(fe=$e(b))&&$?$.p(b,A):($&&$.d(1),$=fe&&fe(b),$&&($.c(),$.m(ce.parentNode,ce))),ie===(ie=ze(b))&&W?W.p(b,A):(W&&W.d(1),W=ie&&ie(b),W&&(W.c(),W.m(ne,null)))},d(b){b&&(H(t),H(r),H(n),H(re),H(X),H(ce),H(ne)),Y.d(),V&&V.d(b),$&&$.d(b),W&&W.d(),Ee=!1,xe(Se)}}}function bo(e){let t,r,n,i,o,a,s=e[19]("errorHeader")+"",u,l,h,c,d,E,m=e[19]("close")+"",g,v,S;return{c(){t=O("div"),r=O("div"),n=oe("svg"),i=oe("path"),o=F(),a=O("h2"),u=k(s),l=F(),h=O("p"),c=k(e[8]),d=F(),E=O("button"),g=k(m),p(i,"d","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"),p(n,"xmlns","http://www.w3.org/2000/svg"),p(n,"viewBox","0 0 512 512"),p(r,"class","OtpErrorHeader"),p(E,"class","OtpButton error"),p(t,"class","OtpError")},m(P,I){C(P,t,I),y(t,r),y(r,n),y(n,i),y(r,o),y(r,a),y(a,u),y(t,l),y(t,h),y(h,c),y(t,d),y(t,E),y(E,g),v||(S=pe(E,"click",e[28]),v=!0)},p(P,I){I[0]&524288&&s!==(s=P[19]("errorHeader")+"")&&j(u,s),I[0]&256&&j(c,P[8]),I[0]&524288&&m!==(m=P[19]("close")+"")&&j(g,m)},d(P){P&&H(t),v=!1,S()}}}function yo(e){let t,r,n,i;function o(l,h){return l[10]?xo:vo}let a=o(e),s=a(e),u=e[6]&&tr(e);return{c(){t=O("p"),s.c(),n=F(),u&&u.c(),i=nn(),p(t,"class",r=e[10]?"LastWarningMessage":"")},m(l,h){C(l,t,h),s.m(t,null),C(l,n,h),u&&u.m(l,h),C(l,i,h)},p(l,h){a===(a=o(l))&&s?s.p(l,h):(s.d(1),s=a(l),s&&(s.c(),s.m(t,null))),h[0]&1024&&r!==(r=l[10]?"LastWarningMessage":"")&&p(t,"class",r),l[6]?u?u.p(l,h):(u=tr(l),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null)},d(l){l&&(H(t),H(n),H(i)),s.d(),u&&u.d(l)}}}function Eo(e){let t,r=(e[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"",n;return{c(){t=O("p"),n=k(r)},m(i,o){C(i,t,o),y(t,n)},p(i,o){o[0]&524288&&r!==(r=(i[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"")&&j(n,r)},d(i){i&&H(t)}}}function _o(e){let t,r=e[19]("otpExpiredMessage")+"",n;return{c(){t=O("p"),n=k(r),p(t,"class","OtpNoticeMessage"),p(t,"role","alert")},m(i,o){C(i,t,o),y(t,n)},p(i,o){o[0]&524288&&r!==(r=i[19]("otpExpiredMessage")+"")&&j(n,r)},d(i){i&&H(t)}}}function vo(e){let t=e[19]("popupMessage")+"",r;return{c(){r=k(t)},m(n,i){C(n,r,i)},p(n,i){i[0]&524288&&t!==(t=n[19]("popupMessage")+"")&&j(r,t)},d(n){n&&H(r)}}}function xo(e){let t=e[19]("popupMessageLastWarning")+"",r;return{c(){r=k(t)},m(n,i){C(n,r,i)},p(n,i){i[0]&524288&&t!==(t=n[19]("popupMessageLastWarning")+"")&&j(r,t)},d(n){n&&H(r)}}}function tr(e){let t,r;return{c(){t=O("p"),r=k(e[8]),p(t,"class","OtpErrorMessage"),p(t,"role","alert")},m(n,i){C(n,t,i),y(t,r)},p(n,i){i[0]&256&&j(r,n[8])},d(n){n&&H(t)}}}function rr(e){let t,r,n,i;function o(u,l){return u[17]>0?So:wo}let a=o(e),s=a(e);return{c(){t=O("button"),s.c(),p(t,"class","OtpButton"),t.disabled=r=!e[18],se(t,"disabled",!e[18]||e[16])},m(u,l){C(u,t,l),s.m(t,null),n||(i=pe(t,"click",e[22]),n=!0)},p(u,l){a===(a=o(u))&&s?s.p(u,l):(s.d(1),s=a(u),s&&(s.c(),s.m(t,null))),l[0]&262144&&r!==(r=!u[18])&&(t.disabled=r),l[0]&327680&&se(t,"disabled",!u[18]||u[16])},d(u){u&&H(t),s.d(),n=!1,i()}}}function wo(e){let t=e[19]("sendCode")+"",r;return{c(){r=k(t)},m(n,i){C(n,r,i)},p(n,i){i[0]&524288&&t!==(t=n[19]("sendCode")+"")&&j(r,t)},d(n){n&&H(r)}}}function So(e){let t=e[19]("waitSeconds")+"",r,n,i,o;return{c(){r=k(t),n=k(" ("),i=k(e[17]),o=k("s)")},m(a,s){C(a,r,s),C(a,n,s),C(a,i,s),C(a,o,s)},p(a,s){s[0]&524288&&t!==(t=a[19]("waitSeconds")+"")&&j(r,t),s[0]&131072&&j(i,a[17])},d(a){a&&(H(r),H(n),H(i),H(o))}}}function To(e){let t,r,n=e[19]("timeRemaining")+"",i,o,a=e[23](e[5])+"",s,u,l=e[19]("minutes")+"",h,c,d,E=Dt(e[2]),m=[];for(let g=0;g<E.length;g+=1)m[g]=nr(er(e,E,g));return{c(){t=O("div"),r=O("div"),i=k(n),o=F(),s=k(a),u=F(),h=k(l),c=F(),d=O("div");for(let g=0;g<m.length;g+=1)m[g].c();p(r,"class","OtpTimer"),p(d,"class","OtpField"),p(t,"class","OtpFieldWrapper")},m(g,v){C(g,t,v),y(t,r),y(r,i),y(r,o),y(r,s),y(r,u),y(r,h),y(t,c),y(t,d);for(let S=0;S<m.length;S+=1)m[S]&&m[S].m(d,null)},p(g,v){if(v[0]&524288&&n!==(n=g[19]("timeRemaining")+"")&&j(i,n),v[0]&32&&a!==(a=g[23](g[5])+"")&&j(s,a),v[0]&524288&&l!==(l=g[19]("minutes")+"")&&j(h,l),v[0]&117458964){E=Dt(g[2]);let S;for(S=0;S<E.length;S+=1){const P=er(g,E,S);m[S]?m[S].p(P,v):(m[S]=nr(P),m[S].c(),m[S].m(d,null))}for(;S<m.length;S+=1)m[S].d(1);m.length=E.length}},d(g){g&&H(t),rn(m,g)}}}function Oo(e){let t;return{c(){t=O("div"),t.innerHTML='<span class="OtpLoader"></span>',p(t,"class","OtpLoaderContainer")},m(r,n){C(r,t,n)},p:ee,d(r){r&&H(t)}}}function nr(e){let t,r,n,i=e[71],o,a;const s=()=>e[41](t,i),u=()=>e[41](null,i);function l(...c){return e[42](e[71],...c)}function h(...c){return e[43](e[71],...c)}return{c(){t=O("input"),p(t,"id",`otp-input-${e[71]}`),p(t,"type","text"),p(t,"class",r=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`),p(t,"maxlength",1),t.value=n=e[69],p(t,"inputmode","numeric"),t.disabled=e[11],p(t,"autocomplete","off")},m(c,d){C(c,t,d),s(),o||(a=[pe(t,"input",l),pe(t,"keydown",h),pe(t,"paste",e[24])],o=!0)},p(c,d){e=c,d[0]&16&&r!==(r=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`)&&p(t,"class",r),d[0]&4&&n!==(n=e[69])&&t.value!==n&&(t.value=n),d[0]&2048&&(t.disabled=e[11]),i!==e[71]&&(u(),i=e[71],s())},d(c){c&&H(t),u(),o=!1,xe(a)}}}function Ho(e){let t,r=e[19]("submit")+"",n,i,o,a;return{c(){t=O("button"),n=k(r),p(t,"class","OtpButton"),t.disabled=i=e[2].join("").length!==e[4].inputLength||e[13]||e[15]},m(s,u){C(s,t,u),y(t,n),o||(a=pe(t,"click",e[29]),o=!0)},p(s,u){u[0]&524288&&r!==(r=s[19]("submit")+"")&&j(n,r),u[0]&40980&&i!==(i=s[2].join("").length!==s[4].inputLength||s[13]||s[15])&&(t.disabled=i)},d(s){s&&H(t),o=!1,a()}}}function Ao(e){let t,r=e[19]("resendOtp")+"",n,i,o;return{c(){t=O("button"),n=k(r),p(t,"class","OtpButton")},m(a,s){C(a,t,s),y(t,n),i||(o=pe(t,"click",e[27]),i=!0)},p(a,s){s[0]&524288&&r!==(r=a[19]("resendOtp")+"")&&j(n,r)},d(a){a&&H(t),i=!1,o()}}}function Co(e){let t;function r(o,a){return o[7]?bo:go}let n=r(e),i=n(e);return{c(){t=O("div"),i.c(),p(t,"class","OtpContent")},m(o,a){C(o,t,a),i.m(t,null),e[44](t)},p(o,a){n===(n=r(o))&&i?i.p(o,a):(i.d(1),i=n(o),i&&(i.c(),i.m(t,null)))},i:ee,o:ee,d(o){o&&H(t),i.d(),e[44](null)}}}function Bo(e,t,r){let n,i,o;Yr(e,fo,f=>r(19,o=f));let{clientstyling:a=""}=t,{clientstylingurl:s=""}=t,{mbsource:u}=t,{lang:l="en"}=t,{endpoint:h}=t,{session:c}=t,{translationurl:d}=t,{templateid:E}=t,m=[],g=!0,v=null,S=0,P="",I="",D=!1,M=!1,N="",te="",Q="",ue=!1,me=!1,he=!1,B="",U={},Z=null,ge=!1,be=!1,ye="",J,re=[],X=null,ce=0,ne=!1,Ee=!1;const Se={SMS:"sms",EMAIL:"email"},_e={MAX_ATTEMPTS_EXCEEDED:"gm.twofa.token_max_attempts_exceeded",INTERNAL_SERVER_ERROR:"gm.multifactorauthentication.internal_server_error",MAX_INVALIDATE:"gm.multifactorauthentication.challenge_internal_server_error"};Object.keys(Kt).forEach(f=>{Yt(f,Kt[f])});const Te=()=>{po(l)},Y=()=>{fetch(d).then(f=>f.json()).then(f=>{Object.keys(f).forEach(_=>{Yt(_,f[_])})}).catch(f=>{console.log(f)})},V=f=>ve(this,null,function*(){var _;if((_=f.detail)!=null&&_["x-step-up-required"]){if(r(7,M=!1),r(6,D=!1),r(8,N=""),te=f.detail["x-step-up-token"],Q=f.detail.flow,!te||!Q){r(3,g=!1),r(7,M=!0),r(8,N=o("configError"));return}r(12,ge=!1),r(3,g=!1)}}),$e=()=>{X&&(clearInterval(X),X=null),Z&&(clearInterval(Z),Z=null),r(6,D=!1),r(7,M=!1),r(8,N=""),r(10,me=!1),r(2,m=[]),r(4,v=null),r(3,g=!0),r(0,B=""),r(12,ge=!1),r(38,U={})},fe=()=>{$e()},$=()=>new Promise((f,_)=>{const x=new URL(`${h}/api/pam/v1/mfa/challenge/${te}`),G=new Headers;G.append("accept","application/json"),G.append("Content-Type","application/json"),G.append("X-SessionId",`${c}`),r(16,Ee=!0);const Oe={method:"PATCH",headers:G,body:JSON.stringify({channel:B,templateId:E})};fetch(x,Oe).then(It=>It.json()).then(()=>{r(15,ne=!1),b(),A(),f()}).catch(It=>{_()})}),ze=()=>{Z&&clearInterval(Z),Z=setInterval(()=>{const f=Xe({},U);let _=!1;Object.keys(f).forEach(x=>{f[x]>0&&(f[x]--,_=!0)}),r(38,U=f),!_&&Z&&(clearInterval(Z),Z=null)},1e3)},ie=f=>{r(0,B=f)},W=()=>ve(this,null,function*(){if(!(!B||U[B]&&U[B]>0)){r(3,g=!0),E&&E.startsWith("2fa-")&&r(30,E=`2fa-${B}`);try{yield $(),yield at(),r(38,U=ut(Xe({},U),{[B]:30})),ze(),r(12,ge=!0),b(),A()}catch(f){console.error("Error submitting channel:",f),r(6,D=!0),r(8,N=o("submissionError"))}finally{r(3,g=!1)}}}),b=()=>{const f=new Date(P),_=new Date(I),x=new Date,G=_.getTime()-x.getTime();ce=f.getTime()-G;const z=Date.now(),Oe=Math.max(0,Math.floor((ce-z)/1e3));r(5,S=Oe)},A=()=>{X&&clearInterval(X),X=setInterval(()=>{const f=Date.now(),_=Math.max(0,Math.floor((ce-f)/1e3));r(5,S=_),r(11,he=_<=0),_<=0&&(clearInterval(X),X=null,r(9,ue=!0),r(6,D=!1),r(10,me=!1))},1e3)},Lr=f=>{const _=Math.floor(f/60),x=f%60;return`${_.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}`},st=(f,_)=>{const x=[...m];x[f]=_.toUpperCase(),r(2,m=x),x.join("")!==ye&&r(13,be=!1)},Ir=f=>{var G,z,Oe;f.preventDefault();const x=(((z=(G=f.clipboardData)==null?void 0:G.getData("text"))==null?void 0:z.trim())||"").slice(0,v.inputLength).split("");r(2,m=[...x,...Array(v.inputLength-x.length).fill("")]),(Oe=re[x.length])==null||Oe.focus(),x.length===v.inputLength&&Lt()},Pt=(f,_)=>{const x=f.target,G=x.value;if(/^[a-z0-9]$/i.test(G)){st(_,G);const z=re[_+1];z==null||z.focus()}x.value=""},Mt=(f,_)=>{const x=f.key,G=f.ctrlKey||f.metaKey;if(/^[a-z0-9]$/i.test(x)){if(G&&x.toLowerCase()==="v")return;f.preventDefault(),st(_,x);const z=re[_+1];z==null||z.focus()}else if(x==="Backspace"){f.preventDefault(),m[_]!==""&&st(_,"");const z=re[_-1];z==null||z.focus()}},Nr=()=>{Q=="stateful"&&($(),r(9,ue=!1));const f=new CustomEvent("otpResendRequested");window.dispatchEvent(f)},Rr=f=>{window.dispatchEvent(new CustomEvent("otpSubmitted",{detail:{code:f,maxAttempts:v.maxValidationAttempts,validatedAttempts:v.numberOfValidateAttempts}}))},kr=f=>ve(this,null,function*(){const _=new URL(`/api/nwa/api/v1/mfa/challenge/${te}/validate`,h);_.searchParams.append("input",f);try{const x=yield fetch(_.href,{method:"POST"});if(x.status===200){Dr();return}const G=yield x.json();throw new Error(G.message)}catch(x){if(yield at(),x.message===_e.INTERNAL_SERVER_ERROR){if(v.numberOfValidateAttempts===v.maxValidationAttempts-1){window.dispatchEvent(new CustomEvent("otpSetTimeout")),window.postMessage({type:"WidgetNotification",data:{type:"error",message:o("accountBlocked")}},window.location.href),window.dispatchEvent(new CustomEvent("manualClosePopup"));return}r(6,D=!0),r(8,N=o("invalidOtp")),at();return}x.message===_e.MAX_INVALIDATE&&(r(6,D=!0),r(8,N=o("invalidOtp"))),x.details===_e.MAX_ATTEMPTS_EXCEEDED&&r(15,ne=!0),console.error("OTP submission failed:",x),r(6,D=!0),r(8,N=o("submissionError"))}finally{r(3,g=!1)}}),Dr=()=>{window.dispatchEvent(new CustomEvent("otpSuccess",{detail:{message:"User successfully authenticated"}}))},Ur=()=>{window.dispatchEvent(new CustomEvent("manualClosePopup"))},Lt=()=>ve(this,null,function*(){if(m.join("").length!==v.inputLength){r(6,D=!0),r(8,N=o("invalidOtp"));return}const f=m.join("");r(13,be=!0),ye=f,r(3,g=!0),r(6,D=!1),r(8,N=""),Q==="stateless"&&Rr(f),Q==="stateful"&&(yield kr(f))}),at=()=>ve(this,null,function*(){if(h)try{r(3,g=!0);const f=new URL(`/api/nwa/api/v1/mfa/challenge/${te}/config`,h),_=yield fetch(f.href),x=yield _.json();if(_.ok)r(4,v=x),r(2,m=Array(v.inputLength).fill("")),r(9,ue=!1),P=v.expirationTime,I=v.serverTime,v.numberOfValidateAttempts!==0&&(r(6,D=!0),r(8,N=o("invalidOtp"))),v.numberOfValidateAttempts===v.maxValidationAttempts-1&&r(10,me=!0),r(3,g=!1),b(),A(),r(16,Ee=!1);else if(x&&x.details===_e.MAX_ATTEMPTS_EXCEEDED)window.dispatchEvent(new CustomEvent("manualClosePopup"));else{const G=x&&x.message||`Failed to load config. Status: ${_.status}`;throw new Error(G)}}catch(f){r(3,g=!1),r(7,M=!0),r(8,N=o("configError")),window.dispatchEvent(new CustomEvent("2fa-loading",{detail:{isLoading:!1}})),console.error("Error loading 2FA config:",f)}});ln(()=>(window.addEventListener("stepUpAuthRequired",V,!1),window.addEventListener("closePopup",fe,!1),()=>{window.removeEventListener("stepUpAuthRequired",V),window.removeEventListener("closePopup",fe,!1),X&&clearInterval(X),Z&&clearInterval(Z)}));const Gr=()=>ie(Se.SMS),Fr=()=>ie(Se.EMAIL);function jr(f,_){Je[f?"unshift":"push"](()=>{re[_]=f,r(14,re)})}const Vr=(f,_)=>Pt(_,f),$r=(f,_)=>Mt(_,f);function zr(f){Je[f?"unshift":"push"](()=>{J=f,r(1,J)})}return e.$$set=f=>{"clientstyling"in f&&r(31,a=f.clientstyling),"clientstylingurl"in f&&r(32,s=f.clientstylingurl),"mbsource"in f&&r(33,u=f.mbsource),"lang"in f&&r(34,l=f.lang),"endpoint"in f&&r(35,h=f.endpoint),"session"in f&&r(36,c=f.session),"translationurl"in f&&r(37,d=f.translationurl),"templateid"in f&&r(30,E=f.templateid)},e.$$.update=()=>{e.$$.dirty[0]&2|e.$$.dirty[1]&1&&a&&J&&xn(J,a),e.$$.dirty[0]&2|e.$$.dirty[1]&2&&s&&J&&wn(J,s),e.$$.dirty[0]&2|e.$$.dirty[1]&4&&u&&J&&Sn(J,`${u}.Style`),e.$$.dirty[1]&8&&l&&Te(),e.$$.dirty[1]&72&&l&&d&&Y(),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&r(18,n=B&&(!U[B]||U[B]===0)),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&r(17,i=B&&U[B]||0)},[B,J,m,g,v,S,D,M,N,ue,me,he,ge,be,re,ne,Ee,i,n,o,Se,ie,W,Lr,Ir,Pt,Mt,Nr,Ur,Lt,E,a,s,u,l,h,c,d,U,Gr,Fr,jr,Vr,$r,zr]}class Mr extends _n{constructor(t){super(),yn(this,t,Bo,Co,or,{clientstyling:31,clientstylingurl:32,mbsource:33,lang:34,endpoint:35,session:36,translationurl:37,templateid:30},mo,[-1,-1,-1])}get clientstyling(){return this.$$.ctx[31]}set clientstyling(t){this.$$set({clientstyling:t}),ae()}get clientstylingurl(){return this.$$.ctx[32]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),ae()}get mbsource(){return this.$$.ctx[33]}set mbsource(t){this.$$set({mbsource:t}),ae()}get lang(){return this.$$.ctx[34]}set lang(t){this.$$set({lang:t}),ae()}get endpoint(){return this.$$.ctx[35]}set endpoint(t){this.$$set({endpoint:t}),ae()}get session(){return this.$$.ctx[36]}set session(t){this.$$set({session:t}),ae()}get translationurl(){return this.$$.ctx[37]}set translationurl(t){this.$$set({translationurl:t}),ae()}get templateid(){return this.$$.ctx[30]}set templateid(t){this.$$set({templateid:t}),ae()}}En(Mr,{clientstyling:{},clientstylingurl:{},mbsource:{},lang:{},endpoint:{},session:{},translationurl:{},templateid:{}},[],[],!0);exports.default=Mr;
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let s=function(t){return function(...n){try{return t.apply(this,n)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=s(customElements.define),Promise.resolve().then(()=>require("../components/CashierStepUp-RhYbb0pX.cjs")).then(({default:t})=>{!customElements.get("cashier-step-up")&&customElements.define("cashier-step-up",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let s=function(t){return function(...n){try{return t.apply(this,n)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=s(customElements.define),Promise.resolve().then(()=>require("../components/CashierStepUp-DuitlZco.cjs")).then(({default:t})=>{!customElements.get("cashier-step-up")&&customElements.define("cashier-step-up",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/CashierStepUp-DMe1yRC2.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CashierStepUp-C6kbH5iC.js").then(({ default: t }) => {
14
14
  !customElements.get("cashier-step-up") && customElements.define("cashier-step-up", t.element);
15
15
  });
16
16
  }
@@ -1,4 +1,4 @@
1
- import { C as n } from "../components/CashierStepUp-BWSssgbu.js";
1
+ import { C as n } from "../components/CashierStepUp--Zdd8aV8.js";
2
2
  function i(t) {
3
3
  return function(...s) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-step-up",
3
- "version": "0.7.14",
3
+ "version": "0.7.16",
4
4
  "type": "module",
5
5
  "main": "esnext/cashier-step-up.js",
6
6
  "module": "esnext/cashier-step-up.js",
@@ -1,3 +0,0 @@
1
- "use strict";var Wn=Object.defineProperty,Zn=Object.defineProperties;var qn=Object.getOwnPropertyDescriptors;var Nt=Object.getOwnPropertySymbols;var Qn=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable;var lt=(e,t,n)=>t in e?Wn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t)=>{for(var n in t||(t={}))Qn.call(t,n)&&lt(e,n,t[n]);if(Nt)for(var n of Nt(t))Jn.call(t,n)&&lt(e,n,t[n]);return e},ut=(e,t)=>Zn(e,qn(t));var K=(e,t,n)=>(lt(e,typeof t!="symbol"?t+"":t,n),n);var ve=(e,t,n)=>new Promise((r,i)=>{var o=u=>{try{s(n.next(u))}catch(l){i(l)}},a=u=>{try{s(n.throw(u))}catch(l){i(l)}},s=u=>u.done?r(u.value):Promise.resolve(u.value).then(o,a);s((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ee(){}function on(e){return e()}function Rt(){return Object.create(null)}function xe(e){e.forEach(on)}function At(e){return typeof e=="function"}function sn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Yn(e){return Object.keys(e).length===0}function an(e,...t){if(e==null){for(const r of t)r(void 0);return ee}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Kn(e,t,n){e.$$.on_destroy.push(an(t,n))}function y(e,t){e.appendChild(t)}function er(e,t,n){const r=tr(e);if(!r.getElementById(t)){const i=O("style");i.id=t,i.textContent=n,nr(r,i)}}function tr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function nr(e,t){return y(e.head||e,t),t.sheet}function C(e,t,n){e.insertBefore(t,n||null)}function H(e){e.parentNode&&e.parentNode.removeChild(e)}function rr(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function O(e){return document.createElement(e)}function oe(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function F(){return k(" ")}function ir(){return k("")}function pe(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function p(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function or(e){return Array.from(e.childNodes)}function j(e,t){t=""+t,e.data!==t&&(e.data=t)}function se(e,t,n){e.classList.toggle(t,!!n)}function sr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let Ge;function Ue(e){Ge=e}function ar(){if(!Ge)throw new Error("Function called outside component initialization");return Ge}function lr(e){ar().$$.on_mount.push(e)}const Ce=[],Je=[];let Be=[];const kt=[],ur=Promise.resolve();let bt=!1;function hr(){bt||(bt=!0,ur.then(ae))}function yt(e){Be.push(e)}const ht=new Set;let He=0;function ae(){if(He!==0)return;const e=Ge;do{try{for(;He<Ce.length;){const t=Ce[He];He++,Ue(t),cr(t.$$)}}catch(t){throw Ce.length=0,He=0,t}for(Ue(null),Ce.length=0,He=0;Je.length;)Je.pop()();for(let t=0;t<Be.length;t+=1){const n=Be[t];ht.has(n)||(ht.add(n),n())}Be.length=0}while(Ce.length);for(;kt.length;)kt.pop()();bt=!1,ht.clear(),Ue(e)}function cr(e){if(e.fragment!==null){e.update(),xe(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(yt)}}function fr(e){const t=[],n=[];Be.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Be=t}const pr=new Set;function mr(e,t){e&&e.i&&(pr.delete(e),e.i(t))}function Dt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function dr(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),yt(()=>{const o=e.$$.on_mount.map(on).filter(At);e.$$.on_destroy?e.$$.on_destroy.push(...o):xe(o),e.$$.on_mount=[]}),i.forEach(yt)}function gr(e,t){const n=e.$$;n.fragment!==null&&(fr(n.after_update),xe(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function br(e,t){e.$$.dirty[0]===-1&&(Ce.push(e),hr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function yr(e,t,n,r,i,o,a=null,s=[-1]){const u=Ge;Ue(e);const l=e.$$={fragment:null,ctx:[],props:o,update:ee,not_equal:i,bound:Rt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Rt(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};a&&a(l.root);let h=!1;if(l.ctx=n?n(e,t.props||{},(c,m,..._)=>{const d=_.length?_[0]:m;return l.ctx&&i(l.ctx[c],l.ctx[c]=d)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](d),h&&br(e,c)),m}):[],l.update(),h=!0,xe(l.before_update),l.fragment=r?r(l.ctx):!1,t.target){if(t.hydrate){const c=or(t.target);l.fragment&&l.fragment.l(c),c.forEach(H)}else l.fragment&&l.fragment.c();t.intro&&mr(e.$$.fragment),dr(e,t.target,t.anchor),ae()}Ue(u)}let ln;typeof HTMLElement=="function"&&(ln=class extends HTMLElement{constructor(t,n,r){super();K(this,"$$ctor");K(this,"$$s");K(this,"$$c");K(this,"$$cn",!1);K(this,"$$d",{});K(this,"$$r",!1);K(this,"$$p_d",{});K(this,"$$l",{});K(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return ve(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let a;return{c:function(){a=O("slot"),o!=="default"&&p(a,"name",o)},m:function(l,h){C(l,a,h)},d:function(l){l&&H(a)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=sr(this);for(const o of this.$$s)o in r&&(n[o]=[t(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ze(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:ut(Xe({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=Ze(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const a of this.$$l[o]){const s=this.$$c.$on(o,a);this.$$l_u.set(a,s)}this.$$l={}}})}attributeChangedCallback(t,n,r){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ze(t,r,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function Ze(e,t,n,r){var o;const i=(o=n[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function _r(e,t,n,r,i,o){let a=class extends ln{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Object.keys(t).forEach(s=>{Object.defineProperty(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(u){var l;u=Ze(s,u,t),this.$$d[s]=u,(l=this.$$c)==null||l.$set({[s]:u})}})}),r.forEach(s=>{Object.defineProperty(a.prototype,s,{get(){var u;return(u=this.$$c)==null?void 0:u[s]}})}),e.element=a,a}class Er{constructor(){K(this,"$$");K(this,"$$set")}$destroy(){gr(this,1),this.$destroy=ee}$on(t,n){if(!At(n))return ee;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!Yn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const vr="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(vr);function xr(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function wr(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(r=>r.text()).then(r=>{const i=document.createElement("style");i.innerHTML=r,e&&e.appendChild(i)}).catch(r=>{console.error("There was an error while trying to load client styling from URL",r)})}function Sr(e,t,n){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(t,i=>{r.innerHTML=i,e&&e.appendChild(r)})}}const Ae=[];function Tr(e,t){return{subscribe:tt(e,t).subscribe}}function tt(e,t=ee){let n;const r=new Set;function i(s){if(sn(e,s)&&(e=s,n)){const u=!Ae.length;for(const l of r)l[1](),Ae.push(l,e);if(u){for(let l=0;l<Ae.length;l+=2)Ae[l][0](Ae[l+1]);Ae.length=0}}}function o(s){i(s(e))}function a(s,u=ee){const l=[s,u];return r.add(l),r.size===1&&(n=t(i,o)||ee),s(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:a}}function Ne(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return Tr(n,(a,s)=>{let u=!1;const l=[];let h=0,c=ee;const m=()=>{if(h)return;c();const d=t(r?l[0]:l,a,s);o?a(d):c=At(d)?d:ee},_=i.map((d,g)=>an(d,v=>{l[g]=v,h&=~(1<<g),u&&m()},()=>{h|=1<<g}));return u=!0,m(),function(){xe(_),c(),u=!1}})}function Or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hr=function(t){return Ar(t)&&!Cr(t)};function Ar(e){return!!e&&typeof e=="object"}function Cr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Mr(e)}var Br=typeof Symbol=="function"&&Symbol.for,Pr=Br?Symbol.for("react.element"):60103;function Mr(e){return e.$$typeof===Pr}function Lr(e){return Array.isArray(e)?[]:{}}function Fe(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Pe(Lr(e),e,t):e}function Ir(e,t,n){return e.concat(t).map(function(r){return Fe(r,n)})}function Nr(e,t){if(!t.customMerge)return Pe;var n=t.customMerge(e);return typeof n=="function"?n:Pe}function Rr(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ut(e){return Object.keys(e).concat(Rr(e))}function un(e,t){try{return t in e}catch(n){return!1}}function kr(e,t){return un(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Dr(e,t,n){var r={};return n.isMergeableObject(e)&&Ut(e).forEach(function(i){r[i]=Fe(e[i],n)}),Ut(t).forEach(function(i){kr(e,i)||(un(e,i)&&n.isMergeableObject(t[i])?r[i]=Nr(i,n)(e[i],t[i],n):r[i]=Fe(t[i],n))}),r}function Pe(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Ir,n.isMergeableObject=n.isMergeableObject||Hr,n.cloneUnlessOtherwiseSpecified=Fe;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):Dr(e,t,n):Fe(t,n)}Pe.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Pe(r,i,n)},{})};var Ur=Pe,Gr=Ur;const Fr=Or(Gr);var _t=function(e,t){return _t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},_t(e,t)};function nt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_t(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var le=function(){return le=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},le.apply(this,arguments)};function jr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ct(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function ft(e,t){var n=t&&t.cache?t.cache:qr,r=t&&t.serializer?t.serializer:Wr,i=t&&t.strategy?t.strategy:zr;return i(e,{cache:n,serializer:r})}function Vr(e){return e==null||typeof e=="number"||typeof e=="boolean"}function $r(e,t,n,r){var i=Vr(r)?r:n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.call(this,r),t.set(i,o)),o}function hn(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.apply(this,r),t.set(i,o)),o}function cn(e,t,n,r,i){return n.bind(t,e,r,i)}function zr(e,t){var n=e.length===1?$r:hn;return cn(e,this,n,t.cache.create(),t.serializer)}function Xr(e,t){return cn(e,this,hn,t.cache.create(),t.serializer)}var Wr=function(){return JSON.stringify(arguments)},Zr=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),qr={create:function(){return new Zr}},pt={variadic:Xr},Ye=function(){return Ye=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ye.apply(this,arguments)};var w;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(w||(w={}));var L;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(L||(L={}));var Me;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Me||(Me={}));function Gt(e){return e.type===L.literal}function Qr(e){return e.type===L.argument}function fn(e){return e.type===L.number}function pn(e){return e.type===L.date}function mn(e){return e.type===L.time}function dn(e){return e.type===L.select}function gn(e){return e.type===L.plural}function Jr(e){return e.type===L.pound}function bn(e){return e.type===L.tag}function yn(e){return!!(e&&typeof e=="object"&&e.type===Me.number)}function Et(e){return!!(e&&typeof e=="object"&&e.type===Me.dateTime)}var _n=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Yr=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Kr(e){var t={};return e.replace(Yr,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var R=function(){return R=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},R.apply(this,arguments)};var ei=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ti(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ei).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],u=a.slice(1),l=0,h=u;l<h.length;l++){var c=h[l];if(c.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:u})}return n}function ni(e){return e.replace(/^(.*?)-/,"")}var Ft=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,En=/^(@+)?(\+|#+)?[rs]?$/g,ri=/(\*)(0+)|(#+)(0+)|(0+)/g,vn=/^(0+)$/;function jt(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(En,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function xn(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ii(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!vn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Vt(e){var t={},n=xn(e);return n||t}function oi(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=ni(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=R(R(R({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return R(R({},u),Vt(l))},{}));continue;case"engineering":t=R(R(R({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return R(R({},u),Vt(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ri,function(u,l,h,c,m,_){if(l)t.minimumIntegerDigits=h.length;else{if(c&&m)throw new Error("We currently do not support maximum integer digits");if(_)throw new Error("We currently do not support exact integer digits")}return""});continue}if(vn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Ft.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ft,function(u,l,h,c,m,_){return h==="*"?t.minimumFractionDigits=l.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:m&&_?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+_.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=R(R({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=R(R({},t),jt(o)));continue}if(En.test(i.stem)){t=R(R({},t),jt(i.stem));continue}var a=xn(i.stem);a&&(t=R(R({},t),a));var s=ii(i.stem);s&&(t=R(R({},t),s))}return t}var We={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function si(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var a=1+(o&1),s=o<2?1:3+(o>>1),u="a",l=ai(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)n+=u;for(;a-- >0;)n=l+n}else i==="J"?n+="H":n+=i}return n}function ai(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 n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=We[r||""]||We[n||""]||We["".concat(n,"-001")]||We["001"];return i[0]}var mt,li=new RegExp("^".concat(_n.source,"*")),ui=new RegExp("".concat(_n.source,"*$"));function T(e,t){return{start:e,end:t}}var hi=!!String.prototype.startsWith&&"_a".startsWith("a",1),ci=!!String.fromCodePoint,fi=!!Object.fromEntries,pi=!!String.prototype.codePointAt,mi=!!String.prototype.trimStart,di=!!String.prototype.trimEnd,gi=!!Number.isSafeInteger,bi=gi?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},vt=!0;try{var yi=Sn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");vt=((mt=yi.exec("a"))===null||mt===void 0?void 0:mt[0])==="a"}catch(e){vt=!1}var $t=hi?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},xt=ci?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,a;i>o;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");r+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return r},zt=fi?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=s}return n},wn=pi?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},_i=mi?function(t){return t.trimStart()}:function(t){return t.replace(li,"")},Ei=di?function(t){return t.trimEnd()}:function(t){return t.replace(ui,"")};function Sn(e,t){return new RegExp(e,t)}var wt;if(vt){var Xt=Sn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wt=function(t,n){var r;Xt.lastIndex=n;var i=Xt.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else wt=function(t,n){for(var r=[];;){var i=wn(t,n);if(i===void 0||Tn(i)||Si(i))break;r.push(i),n+=i>=65536?2:1}return xt.apply(void 0,r)};var vi=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.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,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,r);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:L.pound,location:T(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(w.UNMATCHED_CLOSING_TAG,T(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&St(this.peek()||0)){var a=this.parseTag(t,n);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,n);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:L.literal,value:"<".concat(i,"/>"),location:T(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!St(this.char()))return this.error(w.INVALID_TAG,T(s,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(w.UNMATCHED_CLOSING_TAG,T(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:L.tag,value:i,children:a,location:T(r,this.clonePosition())},err:null}:this.error(w.INVALID_TAG,T(s,this.clonePosition())))}else return this.error(w.UNCLOSED_TAG,T(r,this.clonePosition()))}else return this.error(w.INVALID_TAG,T(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&wi(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,n);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var u=T(r,this.clonePosition());return{val:{type:L.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!xi(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 n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return xt.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),xt(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(w.EMPTY_ARGUMENT,T(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(w.MALFORMED_ARGUMENT,T(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:L.argument,value:i,location:T(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(w.MALFORMED_ARGUMENT,T(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=wt(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),a=T(t,o);return{value:r,location:a}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(w.EXPECT_ARGUMENT_TYPE,T(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var m=Ei(c.val);if(m.length===0)return this.error(w.EXPECT_ARGUMENT_STYLE,T(this.clonePosition(),this.clonePosition()));var _=T(h,this.clonePosition());l={style:m,styleLocation:_}}var d=this.tryParseArgumentClose(i);if(d.err)return d;var g=T(i,this.clonePosition());if(l&&$t(l==null?void 0:l.style,"::",0)){var v=_i(l.style.slice(2));if(s==="number"){var c=this.parseNumberSkeletonFromString(v,l.styleLocation);return c.err?c:{val:{type:L.number,value:r,location:g,style:c.val},err:null}}else{if(v.length===0)return this.error(w.EXPECT_DATE_TIME_SKELETON,g);var S=v;this.locale&&(S=si(v,this.locale));var m={type:Me.dateTime,pattern:S,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Kr(S):{}},P=s==="date"?L.date:L.time;return{val:{type:P,value:r,location:g,style:m},err:null}}}return{val:{type:s==="number"?L.number:s==="date"?L.date:L.time,value:r,location:g,style:(o=l==null?void 0:l.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(w.EXPECT_SELECT_ARGUMENT_OPTIONS,T(I,Ye({},I)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),M=0;if(s!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),D=this.parseIdentifierIfPossible(),M=c.val}var N=this.tryParsePluralOrSelectOptions(t,s,n,D);if(N.err)return N;var d=this.tryParseArgumentClose(i);if(d.err)return d;var te=T(i,this.clonePosition());return s==="select"?{val:{type:L.select,value:r,options:zt(N.val),location:te},err:null}:{val:{type:L.plural,value:r,options:zt(N.val),offset:M,pluralType:s==="plural"?"cardinal":"ordinal",location:te},err:null}}default:return this.error(w.INVALID_ARGUMENT_TYPE,T(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(w.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,T(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(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ti(t)}catch(i){return this.error(w.INVALID_NUMBER_SKELETON,n)}return{val:{type:Me.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?oi(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,a=!1,s=[],u=new Set,l=i.value,h=i.location;;){if(l.length===0){var c=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_SELECTOR,w.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;h=T(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?w.DUPLICATE_SELECT_ARGUMENT_SELECTOR:w.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:w.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,T(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,n,r);if(d.err)return d;var g=this.tryParseArgumentClose(_);if(g.err)return g;s.push([l,{value:d.val,location:T(_,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(n==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR:w.EXPECT_PLURAL_ARGUMENT_SELECTOR,T(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(w.MISSING_OTHER_CLAUSE,T(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-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 u=T(i,this.clonePosition());return o?(a*=r,bi(a)?{val:a,err:null}:this.error(n,u)):this.error(t,u)},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 n=wn(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},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($t(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!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 n=this.offset();if(n===t)break;if(n>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()&&Tn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r!=null?r:null},e}();function St(e){return e>=97&&e<=122||e>=65&&e<=90}function xi(e){return St(e)||e===47}function wi(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 Tn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Si(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 Tt(e){e.forEach(function(t){if(delete t.location,dn(t)||gn(t))for(var n in t.options)delete t.options[n].location,Tt(t.options[n].value);else fn(t)&&yn(t.style)||(pn(t)||mn(t))&&Et(t.style)?delete t.style.location:bn(t)&&Tt(t.children)})}function Ti(e,t){t===void 0&&(t={}),t=Ye({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new vi(e,t).parse();if(n.err){var r=SyntaxError(w[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Tt(n.val),n.val}var Le;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Le||(Le={}));var rt=function(e){nt(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Wt=function(e){nt(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Le.INVALID_VALUE,o)||this}return t}(rt),Oi=function(e){nt(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Le.INVALID_VALUE,i)||this}return t}(rt),Hi=function(e){nt(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Le.MISSING_VALUE,r)||this}return t}(rt),q;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(q||(q={}));function Ai(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==q.literal||n.type!==q.literal?t.push(n):r.value+=n.value,t},[])}function Ci(e){return typeof e=="function"}function qe(e,t,n,r,i,o,a){if(e.length===1&&Gt(e[0]))return[{type:q.literal,value:e[0].value}];for(var s=[],u=0,l=e;u<l.length;u++){var h=l[u];if(Gt(h)){s.push({type:q.literal,value:h.value});continue}if(Jr(h)){typeof o=="number"&&s.push({type:q.literal,value:n.getNumberFormat(t).format(o)});continue}var c=h.value;if(!(i&&c in i))throw new Hi(c,a);var m=i[c];if(Qr(h)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),s.push({type:typeof m=="string"?q.literal:q.object,value:m});continue}if(pn(h)){var _=typeof h.style=="string"?r.date[h.style]:Et(h.style)?h.style.parsedOptions:void 0;s.push({type:q.literal,value:n.getDateTimeFormat(t,_).format(m)});continue}if(mn(h)){var _=typeof h.style=="string"?r.time[h.style]:Et(h.style)?h.style.parsedOptions:r.time.medium;s.push({type:q.literal,value:n.getDateTimeFormat(t,_).format(m)});continue}if(fn(h)){var _=typeof h.style=="string"?r.number[h.style]:yn(h.style)?h.style.parsedOptions:void 0;_&&_.scale&&(m=m*(_.scale||1)),s.push({type:q.literal,value:n.getNumberFormat(t,_).format(m)});continue}if(bn(h)){var d=h.children,g=h.value,v=i[g];if(!Ci(v))throw new Oi(g,"function",a);var S=qe(d,t,n,r,i,o),P=v(S.map(function(M){return M.value}));Array.isArray(P)||(P=[P]),s.push.apply(s,P.map(function(M){return{type:typeof M=="string"?q.literal:q.object,value:M}}))}if(dn(h)){var I=h.options[m]||h.options.other;if(!I)throw new Wt(h.value,m,Object.keys(h.options),a);s.push.apply(s,qe(I.value,t,n,r,i));continue}if(gn(h)){var I=h.options["=".concat(m)];if(!I){if(!Intl.PluralRules)throw new rt(`Intl.PluralRules is not available in this environment.
2
- Try polyfilling it using "@formatjs/intl-pluralrules"
3
- `,Le.MISSING_INTL_API,a);var D=n.getPluralRules(t,{type:h.pluralType}).select(m-(h.offset||0));I=h.options[D]||h.options.other}if(!I)throw new Wt(h.value,m,Object.keys(h.options),a);s.push.apply(s,qe(I.value,t,n,r,i,m-(h.offset||0)));continue}}return Ai(s)}function Bi(e,t){return t?le(le(le({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=le(le({},e[r]),t[r]||{}),n},{})):e}function Pi(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Bi(e[r],t[r]),n},le({},e)):e}function dt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Mi(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ct([void 0],n,!1)))},{cache:dt(e.number),strategy:pt.variadic}),getDateTimeFormat:ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ct([void 0],n,!1)))},{cache:dt(e.dateTime),strategy:pt.variadic}),getPluralRules:ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ct([void 0],n,!1)))},{cache:dt(e.pluralRules),strategy:pt.variadic})}}var Li=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=o.formatToParts(u);if(l.length===1)return l[0].value;var h=l.reduce(function(c,m){return!c.length||m.type!==q.literal||typeof c[c.length-1]!="string"?c.push(m.value):c[c.length-1]+=m.value,c},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return qe(o.ast,o.locales,o.formatters,o.formats,u,void 0,o.message)},this.resolvedOptions=function(){var u;return{locale:((u=o.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var s=jr(a,["formatters"]);this.ast=e.__parse(t,le(le({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Pi(e.formats,r),this.formatters=i&&i.formatters||Mi(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Ti,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}();function Ii(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const o=n.slice(i,n.length).join(".");if(o in r){r=r[o];break}}r=r[n[i]]}else r=void 0;return r}const me={},Ni=(e,t,n)=>n&&(t in me||(me[t]={}),e in me[t]||(me[t][e]=n),n),On=(e,t)=>{if(t==null)return;if(t in me&&e in me[t])return me[t][e];const n=it(t);for(let r=0;r<n.length;r++){const i=n[r],o=ki(i,e);if(o)return Ni(e,t,o)}};let Ct;const Ve=tt({});function Ri(e){return Ct[e]||null}function Hn(e){return e in Ct}function ki(e,t){if(!Hn(e))return null;const n=Ri(e);return Ii(n,t)}function Di(e){if(e==null)return;const t=it(e);for(let n=0;n<t.length;n++){const r=t[n];if(Hn(r))return r}}function An(e,...t){delete me[e],Ve.update(n=>(n[e]=Fr.all([n[e]||{},...t]),n))}Ne([Ve],([e])=>Object.keys(e));Ve.subscribe(e=>Ct=e);const Qe={};function Ui(e,t){Qe[e].delete(t),Qe[e].size===0&&delete Qe[e]}function Cn(e){return Qe[e]}function Gi(e){return it(e).map(t=>{const n=Cn(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Ot(e){return e==null?!1:it(e).some(t=>{var n;return(n=Cn(t))==null?void 0:n.size})}function Fi(e,t){return Promise.all(t.map(r=>(Ui(e,r),r().then(i=>i.default||i)))).then(r=>An(e,...r))}const De={};function Bn(e){if(!Ot(e))return e in De?De[e]:Promise.resolve();const t=Gi(e);return De[e]=Promise.all(t.map(([n,r])=>Fi(n,r))).then(()=>{if(Ot(e))return Bn(e);delete De[e]}),De[e]}const ji={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},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"}}},Vi={fallbackLocale:null,loadingDelay:200,formats:ji,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},$i=Vi;function Ie(){return $i}const gt=tt(!1);var zi=Object.defineProperty,Xi=Object.defineProperties,Wi=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,qi=Object.prototype.propertyIsEnumerable,qt=(e,t,n)=>t in e?zi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qi=(e,t)=>{for(var n in t||(t={}))Zi.call(t,n)&&qt(e,n,t[n]);if(Zt)for(var n of Zt(t))qi.call(t,n)&&qt(e,n,t[n]);return e},Ji=(e,t)=>Xi(e,Wi(t));let Ht;const Ke=tt(null);function Qt(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function it(e,t=Ie().fallbackLocale){const n=Qt(e);return t?[...new Set([...n,...Qt(t)])]:n}function we(){return Ht!=null?Ht:void 0}Ke.subscribe(e=>{Ht=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Yi=e=>{if(e&&Di(e)&&Ot(e)){const{loadingDelay:t}=Ie();let n;return typeof window!="undefined"&&we()!=null&&t?n=window.setTimeout(()=>gt.set(!0),t):gt.set(!0),Bn(e).then(()=>{Ke.set(e)}).finally(()=>{clearTimeout(n),gt.set(!1)})}return Ke.set(e)},Re=Ji(Qi({},Ke),{set:Yi}),ot=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var Ki=Object.defineProperty,et=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Jt=(e,t,n)=>t in e?Ki(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bt=(e,t)=>{for(var n in t||(t={}))Pn.call(t,n)&&Jt(e,n,t[n]);if(et)for(var n of et(t))Mn.call(t,n)&&Jt(e,n,t[n]);return e},ke=(e,t)=>{var n={};for(var r in e)Pn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&et)for(var r of et(e))t.indexOf(r)<0&&Mn.call(e,r)&&(n[r]=e[r]);return n};const je=(e,t)=>{const{formats:n}=Ie();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},eo=ot(e=>{var t=e,{locale:n,format:r}=t,i=ke(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=je("number",r)),new Intl.NumberFormat(n,i)}),to=ot(e=>{var t=e,{locale:n,format:r}=t,i=ke(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=je("date",r):Object.keys(i).length===0&&(i=je("date","short")),new Intl.DateTimeFormat(n,i)}),no=ot(e=>{var t=e,{locale:n,format:r}=t,i=ke(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=je("time",r):Object.keys(i).length===0&&(i=je("time","short")),new Intl.DateTimeFormat(n,i)}),ro=(e={})=>{var t=e,{locale:n=we()}=t,r=ke(t,["locale"]);return eo(Bt({locale:n},r))},io=(e={})=>{var t=e,{locale:n=we()}=t,r=ke(t,["locale"]);return to(Bt({locale:n},r))},oo=(e={})=>{var t=e,{locale:n=we()}=t,r=ke(t,["locale"]);return no(Bt({locale:n},r))},so=ot((e,t=we())=>new Li(e,t,Ie().formats,{ignoreTag:Ie().ignoreTag})),ao=(e,t={})=>{var n,r,i,o;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:s,locale:u=we(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=On(e,u);if(!h)h=(o=(i=(r=(n=Ie()).handleMissingMessage)==null?void 0:r.call(n,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?o:e;else if(typeof h!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),h;if(!s)return h;let c=h;try{c=so(h,u).format(s)}catch(m){m instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,m.message)}return c},lo=(e,t)=>oo(t).format(e),uo=(e,t)=>io(t).format(e),ho=(e,t)=>ro(t).format(e),co=(e,t=we())=>On(e,t),fo=Ne([Re,Ve],()=>ao);Ne([Re],()=>lo);Ne([Re],()=>uo);Ne([Re],()=>ho);Ne([Re,Ve],()=>co);function Yt(e,t){An(e,t)}function po(e){Re.set(e)}const Kt={en:{otpTitle:"Code verification is required",popupMessage:"Please enter the security code received on your SMS/email address to perform the update.",popupMessageLastWarning:"If the next validation attempt is failed, your transaction will fail and you will be returned back to payment method.",minutes:"minutes",errorHeader:"Error",configError:"Unable to load OTP data. Please try again later.",otpHeading:"Enter OTP",resendOtp:"Resent OTP",submit:"Submit",close:"Close",invalidOtp:"The code you've sent is not valid. Please try again.",accountBlocked:"Too many attempts for OTP. Your account has been blocked for one hour.",submissionError:"Something went wrong. Please try again.",otpExpiredMessage:"Validation code has expired, please request a new one to continue.",timeRemaining:"Code expires in:",selectChannelTitle:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS",channelEmail:"Email",sendCode:"Send code",waitSeconds:"Please wait for before resending:"},tr:{otpTitle:"Kod doğrulaması gereklidir",popupMessage:"Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",popupMessageLastWarning:"Bir sonraki doğrulama denemesi başarısız olursa, işleminiz başarısız olacak ve ödeme yöntemine geri döndürüleceksiniz.",minutes:"dakika",errorHeader:"Hata",configError:"OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",otpHeading:"OTP Girin",resendOtp:"OTP'yi Yeniden Gönder",submit:"Gönder",close:"Kapat",invalidOtp:"Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",accountBlocked:"OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",submissionError:"Bir şeyler ters gitti. Lütfen tekrar deneyin.",otpExpiredMessage:"Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",timeRemaining:"Kodun süresi doluyor:",selectChannelTitle:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS kodu",channelEmail:"E-posta kodu",sendCode:"Kodu gönder",waitSeconds:"Tekrar göndermeden önce lütfen bekleyin:"}};function mo(e){er(e,"svelte-gpy3mu",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.RadioIndicator{width:20px;height:20px;border-radius:50%;border:2px solid var(--emw--color-typography, #fff);position:relative;flex-shrink:0;margin-right:8px;transition:all 0.2s ease;opacity:0.7}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;opacity:1;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.ModalCloseIcon{padding:0px;position:absolute;right:0;top:0;margin:15px 20px;z-index:20;transition:all 0.3s ease}.ModalCloseIcon svg{width:11px;height:11px;fill:var(--emw--color-primary, red);cursor:pointer}.ModalCloseIcon:hover{transform:rotate(90deg)}.OtpContent{width:100%;display:flex;flex-direction:column;gap:var(--emw--spacing-large, 20px)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.OtpButton{text-transform:uppercase;font-weight:var(--emw--font-weight-medium, 500);color:var(--emw--color-typography-button, #000000);text-align:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-family:inherit;height:46px;line-height:normal;border:none;background:var(--emw--color-primary, #f9c408);border-radius:10px;width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--emw--spacing-2x-small-plus, 5px);transition:all 0.2s linear}.OtpButton:active{box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-active, #fecd1c)}.OtpButton[disabled],.OtpButton.disabled{filter:saturate(50%);opacity:0.5;cursor:not-allowed;pointer-events:none}.OtpButton:hover:not([disabled]):not(.disabled){box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-hover, #dbac03)}@container (max-width: 500px){.OtpDescription{font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-size-big, 20px)}}.OtpDescription{display:flex;color:var(--emw--color-typography, #fff);flex-direction:column;gap:12px;font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-medium, 16px);font-weight:var(--emw--font-weight-medium, 600)}.OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px;align-items:center}.OtpError h2{margin:0;color:var(--emw--color-typography, #fff)}.OtpError p{color:var(--emw--color-typography, #fff);text-align:center;font-size:var(--emw--font-size-small, 12px)}.OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.ChannelSelection{display:flex;flex-direction:row;justify-content:space-between}.ChannelCheckbox{display:flex;align-items:center;padding:var(--emw--spacing-medium, 16px);cursor:pointer;transition:all 0.2s ease}.ChannelCheckbox input[type=radio]{display:none}.ChannelCheckbox .ChannelContent{display:flex;align-items:center;gap:3px;width:100%;color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500)}.ChannelCheckbox .ChannelContent svg{flex-shrink:0;opacity:0.7;width:20px;height:20px}.ChannelCheckbox .ChannelContent span{text-transform:uppercase}.ChannelCheckbox.selected .ChannelContent{color:var(--emw--color-primary, #000000)}.ChannelCheckbox.selected .ChannelContent svg{stroke:var(--emw--color-primary, #000000);opacity:1}.ChannelCheckbox:hover:not(.selected){color:var(--emw--color-active, #fff)}.OtpField{display:flex;justify-content:space-between;margin:10px}.OtpField input{width:45px;font-size:32px;padding:5px;text-align:center;border-radius:5px;margin:6px;font-weight:bold;outline:none;background:var(--emw--color-background);border:0;transition:all 0.1s;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);color:var(--emw--color-typography, #fff)}.OtpField input.space{margin-right:1rem !important}.OtpField input:focus{box-shadow:0 0 1px 1px var(--emw--color-primary, #007bff)}.OtpActionButtons{display:flex;justify-content:space-between;gap:40px}.OtpErrorMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpNoticeMessage{color:var(--emw--color-primary, #f9c408);font-weight:bold}.LastWarningMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpLoaderContainer{width:100%;display:flex;justify-content:center;align-items:center;padding:20px 0}.OtpLoader{width:48px;height:48px;border:5px solid var(--emw--color-secondary, #b3d8ff);border-bottom-color:var(--emw--color-primary, #007bff);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.OtpTimer{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-small, 12px);opacity:0.8}@container (max-width: 500px){.OtpContent{padding:var(--emw--spacing-small, 10px)}.OtpField input{width:40px;font-size:28px;margin:4px}}')}function en(e,t,n){const r=e.slice();return r[69]=t[n],r[70]=t,r[71]=n,r}function go(e){let t,n,r,i,o,a,s,u,l,h,c,m,_,d,g,v,S,P=e[19]("channelSMS")+"",I,D,M,N,te,Q,ue,de,he,B,U,Z,ge,be,ye=e[19]("channelEmail")+"",J,ne,X,ce,re,_e,Se;function Ee(b,A){return b[9]?Eo:b[12]?yo:_o}let Te=Ee(e),Y=Te(e),V=e[0]&&nn(e);function $e(b,A){if(b[3]&&b[12])return Oo;if(b[12]&&b[4])return To}let fe=$e(e),$=fe&&fe(e);function ze(b,A){if(b[9])return Ao;if(b[12]&&b[4])return Ho}let ie=ze(e),W=ie&&ie(e);return{c(){t=O("div"),Y.c(),n=F(),r=O("div"),i=O("label"),o=O("div"),a=F(),s=O("input"),l=F(),h=O("div"),c=oe("svg"),m=oe("path"),_=oe("circle"),d=oe("circle"),g=oe("circle"),v=F(),S=O("span"),I=k(P),D=F(),M=O("label"),N=O("div"),te=F(),Q=O("input"),de=F(),he=O("div"),B=oe("svg"),U=oe("rect"),Z=oe("path"),ge=F(),be=O("span"),J=k(ye),ne=F(),V&&V.c(),X=F(),$&&$.c(),ce=F(),re=O("div"),W&&W.c(),p(t,"class","OtpDescription"),p(o,"class","RadioIndicator"),se(o,"checked",e[0]===e[20].SMS),p(s,"type","radio"),p(s,"name","channel"),s.value=e[20].SMS,s.checked=u=e[0]===e[20].SMS,p(m,"d","M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"),p(_,"cx","9"),p(_,"cy","11"),p(_,"r","0.5"),p(_,"fill","currentColor"),p(d,"cx","12"),p(d,"cy","11"),p(d,"r","0.5"),p(d,"fill","currentColor"),p(g,"cx","15"),p(g,"cy","11"),p(g,"r","0.5"),p(g,"fill","currentColor"),p(c,"xmlns","http://www.w3.org/2000/svg"),p(c,"width","24"),p(c,"height","24"),p(c,"viewBox","0 0 24 24"),p(c,"fill","none"),p(c,"stroke","currentColor"),p(c,"stroke-width","2"),p(c,"stroke-linecap","round"),p(c,"stroke-linejoin","round"),p(h,"class","ChannelContent"),p(i,"class","ChannelCheckbox"),se(i,"selected",e[0]===e[20].SMS),p(N,"class","RadioIndicator"),se(N,"checked",e[0]===e[20].EMAIL),p(Q,"type","radio"),p(Q,"name","channel"),Q.value=e[20].EMAIL,Q.checked=ue=e[0]===e[20].EMAIL,p(U,"x","2"),p(U,"y","4"),p(U,"width","20"),p(U,"height","16"),p(U,"rx","2"),p(Z,"d","m2 7 10 6 10-6"),p(B,"xmlns","http://www.w3.org/2000/svg"),p(B,"width","24"),p(B,"height","24"),p(B,"viewBox","0 0 24 24"),p(B,"fill","none"),p(B,"stroke","currentColor"),p(B,"stroke-width","2"),p(B,"stroke-linecap","round"),p(B,"stroke-linejoin","round"),p(he,"class","ChannelContent"),p(M,"class","ChannelCheckbox"),se(M,"selected",e[0]===e[20].EMAIL),p(r,"class","ChannelSelection"),p(re,"class","OtpActionButtons")},m(b,A){C(b,t,A),Y.m(t,null),C(b,n,A),C(b,r,A),y(r,i),y(i,o),y(i,a),y(i,s),y(i,l),y(i,h),y(h,c),y(c,m),y(c,_),y(c,d),y(c,g),y(h,v),y(h,S),y(S,I),y(r,D),y(r,M),y(M,N),y(M,te),y(M,Q),y(M,de),y(M,he),y(he,B),y(B,U),y(B,Z),y(he,ge),y(he,be),y(be,J),C(b,ne,A),V&&V.m(b,A),C(b,X,A),$&&$.m(b,A),C(b,ce,A),C(b,re,A),W&&W.m(re,null),_e||(Se=[pe(s,"change",e[39]),pe(Q,"change",e[40])],_e=!0)},p(b,A){Te===(Te=Ee(b))&&Y?Y.p(b,A):(Y.d(1),Y=Te(b),Y&&(Y.c(),Y.m(t,null))),A[0]&1048577&&se(o,"checked",b[0]===b[20].SMS),A[0]&1&&u!==(u=b[0]===b[20].SMS)&&(s.checked=u),A[0]&524288&&P!==(P=b[19]("channelSMS")+"")&&j(I,P),A[0]&1048577&&se(i,"selected",b[0]===b[20].SMS),A[0]&1048577&&se(N,"checked",b[0]===b[20].EMAIL),A[0]&1&&ue!==(ue=b[0]===b[20].EMAIL)&&(Q.checked=ue),A[0]&524288&&ye!==(ye=b[19]("channelEmail")+"")&&j(J,ye),A[0]&1048577&&se(M,"selected",b[0]===b[20].EMAIL),b[0]?V?V.p(b,A):(V=nn(b),V.c(),V.m(X.parentNode,X)):V&&(V.d(1),V=null),fe===(fe=$e(b))&&$?$.p(b,A):($&&$.d(1),$=fe&&fe(b),$&&($.c(),$.m(ce.parentNode,ce))),ie===(ie=ze(b))&&W?W.p(b,A):(W&&W.d(1),W=ie&&ie(b),W&&(W.c(),W.m(re,null)))},d(b){b&&(H(t),H(n),H(r),H(ne),H(X),H(ce),H(re)),Y.d(),V&&V.d(b),$&&$.d(b),W&&W.d(),_e=!1,xe(Se)}}}function bo(e){let t,n,r,i,o,a,s=e[19]("errorHeader")+"",u,l,h,c,m,_,d=e[19]("close")+"",g,v,S;return{c(){t=O("div"),n=O("div"),r=oe("svg"),i=oe("path"),o=F(),a=O("h2"),u=k(s),l=F(),h=O("p"),c=k(e[8]),m=F(),_=O("button"),g=k(d),p(i,"d","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"),p(r,"xmlns","http://www.w3.org/2000/svg"),p(r,"viewBox","0 0 512 512"),p(n,"class","OtpErrorHeader"),p(_,"class","OtpButton error"),p(t,"class","OtpError")},m(P,I){C(P,t,I),y(t,n),y(n,r),y(r,i),y(n,o),y(n,a),y(a,u),y(t,l),y(t,h),y(h,c),y(t,m),y(t,_),y(_,g),v||(S=pe(_,"click",e[28]),v=!0)},p(P,I){I[0]&524288&&s!==(s=P[19]("errorHeader")+"")&&j(u,s),I[0]&256&&j(c,P[8]),I[0]&524288&&d!==(d=P[19]("close")+"")&&j(g,d)},d(P){P&&H(t),v=!1,S()}}}function yo(e){let t,n,r,i;function o(l,h){return l[10]?xo:vo}let a=o(e),s=a(e),u=e[6]&&tn(e);return{c(){t=O("p"),s.c(),r=F(),u&&u.c(),i=ir(),p(t,"class",n=e[10]?"LastWarningMessage":"")},m(l,h){C(l,t,h),s.m(t,null),C(l,r,h),u&&u.m(l,h),C(l,i,h)},p(l,h){a===(a=o(l))&&s?s.p(l,h):(s.d(1),s=a(l),s&&(s.c(),s.m(t,null))),h[0]&1024&&n!==(n=l[10]?"LastWarningMessage":"")&&p(t,"class",n),l[6]?u?u.p(l,h):(u=tn(l),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null)},d(l){l&&(H(t),H(r),H(i)),s.d(),u&&u.d(l)}}}function _o(e){let t,n=(e[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"",r;return{c(){t=O("p"),r=k(n)},m(i,o){C(i,t,o),y(t,r)},p(i,o){o[0]&524288&&n!==(n=(i[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"")&&j(r,n)},d(i){i&&H(t)}}}function Eo(e){let t,n=e[19]("otpExpiredMessage")+"",r;return{c(){t=O("p"),r=k(n),p(t,"class","OtpNoticeMessage"),p(t,"role","alert")},m(i,o){C(i,t,o),y(t,r)},p(i,o){o[0]&524288&&n!==(n=i[19]("otpExpiredMessage")+"")&&j(r,n)},d(i){i&&H(t)}}}function vo(e){let t=e[19]("popupMessage")+"",n;return{c(){n=k(t)},m(r,i){C(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("popupMessage")+"")&&j(n,t)},d(r){r&&H(n)}}}function xo(e){let t=e[19]("popupMessageLastWarning")+"",n;return{c(){n=k(t)},m(r,i){C(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("popupMessageLastWarning")+"")&&j(n,t)},d(r){r&&H(n)}}}function tn(e){let t,n;return{c(){t=O("p"),n=k(e[8]),p(t,"class","OtpErrorMessage"),p(t,"role","alert")},m(r,i){C(r,t,i),y(t,n)},p(r,i){i[0]&256&&j(n,r[8])},d(r){r&&H(t)}}}function nn(e){let t,n,r,i;function o(u,l){return u[17]>0?So:wo}let a=o(e),s=a(e);return{c(){t=O("button"),s.c(),p(t,"class","OtpButton"),t.disabled=n=!e[18],se(t,"disabled",!e[18]||e[16])},m(u,l){C(u,t,l),s.m(t,null),r||(i=pe(t,"click",e[22]),r=!0)},p(u,l){a===(a=o(u))&&s?s.p(u,l):(s.d(1),s=a(u),s&&(s.c(),s.m(t,null))),l[0]&262144&&n!==(n=!u[18])&&(t.disabled=n),l[0]&327680&&se(t,"disabled",!u[18]||u[16])},d(u){u&&H(t),s.d(),r=!1,i()}}}function wo(e){let t=e[19]("sendCode")+"",n;return{c(){n=k(t)},m(r,i){C(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("sendCode")+"")&&j(n,t)},d(r){r&&H(n)}}}function So(e){let t=e[19]("waitSeconds")+"",n,r,i,o;return{c(){n=k(t),r=k(" ("),i=k(e[17]),o=k("s)")},m(a,s){C(a,n,s),C(a,r,s),C(a,i,s),C(a,o,s)},p(a,s){s[0]&524288&&t!==(t=a[19]("waitSeconds")+"")&&j(n,t),s[0]&131072&&j(i,a[17])},d(a){a&&(H(n),H(r),H(i),H(o))}}}function To(e){let t,n,r=e[19]("timeRemaining")+"",i,o,a=e[23](e[5])+"",s,u,l=e[19]("minutes")+"",h,c,m,_=Dt(e[2]),d=[];for(let g=0;g<_.length;g+=1)d[g]=rn(en(e,_,g));return{c(){t=O("div"),n=O("div"),i=k(r),o=F(),s=k(a),u=F(),h=k(l),c=F(),m=O("div");for(let g=0;g<d.length;g+=1)d[g].c();p(n,"class","OtpTimer"),p(m,"class","OtpField"),p(t,"class","OtpFieldWrapper")},m(g,v){C(g,t,v),y(t,n),y(n,i),y(n,o),y(n,s),y(n,u),y(n,h),y(t,c),y(t,m);for(let S=0;S<d.length;S+=1)d[S]&&d[S].m(m,null)},p(g,v){if(v[0]&524288&&r!==(r=g[19]("timeRemaining")+"")&&j(i,r),v[0]&32&&a!==(a=g[23](g[5])+"")&&j(s,a),v[0]&524288&&l!==(l=g[19]("minutes")+"")&&j(h,l),v[0]&117458964){_=Dt(g[2]);let S;for(S=0;S<_.length;S+=1){const P=en(g,_,S);d[S]?d[S].p(P,v):(d[S]=rn(P),d[S].c(),d[S].m(m,null))}for(;S<d.length;S+=1)d[S].d(1);d.length=_.length}},d(g){g&&H(t),rr(d,g)}}}function Oo(e){let t;return{c(){t=O("div"),t.innerHTML='<span class="OtpLoader"></span>',p(t,"class","OtpLoaderContainer")},m(n,r){C(n,t,r)},p:ee,d(n){n&&H(t)}}}function rn(e){let t,n,r,i=e[71],o,a;const s=()=>e[41](t,i),u=()=>e[41](null,i);function l(...c){return e[42](e[71],...c)}function h(...c){return e[43](e[71],...c)}return{c(){t=O("input"),p(t,"id",`otp-input-${e[71]}`),p(t,"type","text"),p(t,"class",n=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`),p(t,"maxlength",1),t.value=r=e[69],p(t,"inputmode","numeric"),t.disabled=e[11],p(t,"autocomplete","off")},m(c,m){C(c,t,m),s(),o||(a=[pe(t,"input",l),pe(t,"keydown",h),pe(t,"paste",e[24])],o=!0)},p(c,m){e=c,m[0]&16&&n!==(n=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`)&&p(t,"class",n),m[0]&4&&r!==(r=e[69])&&t.value!==r&&(t.value=r),m[0]&2048&&(t.disabled=e[11]),i!==e[71]&&(u(),i=e[71],s())},d(c){c&&H(t),u(),o=!1,xe(a)}}}function Ho(e){let t,n=e[19]("submit")+"",r,i,o,a;return{c(){t=O("button"),r=k(n),p(t,"class","OtpButton"),t.disabled=i=e[2].join("").length!==e[4].inputLength||e[13]||e[15]},m(s,u){C(s,t,u),y(t,r),o||(a=pe(t,"click",e[29]),o=!0)},p(s,u){u[0]&524288&&n!==(n=s[19]("submit")+"")&&j(r,n),u[0]&40980&&i!==(i=s[2].join("").length!==s[4].inputLength||s[13]||s[15])&&(t.disabled=i)},d(s){s&&H(t),o=!1,a()}}}function Ao(e){let t,n=e[19]("resendOtp")+"",r,i,o;return{c(){t=O("button"),r=k(n),p(t,"class","OtpButton")},m(a,s){C(a,t,s),y(t,r),i||(o=pe(t,"click",e[27]),i=!0)},p(a,s){s[0]&524288&&n!==(n=a[19]("resendOtp")+"")&&j(r,n)},d(a){a&&H(t),i=!1,o()}}}function Co(e){let t;function n(o,a){return o[7]?bo:go}let r=n(e),i=r(e);return{c(){t=O("div"),i.c(),p(t,"class","OtpContent")},m(o,a){C(o,t,a),i.m(t,null),e[44](t)},p(o,a){r===(r=n(o))&&i?i.p(o,a):(i.d(1),i=r(o),i&&(i.c(),i.m(t,null)))},i:ee,o:ee,d(o){o&&H(t),i.d(),e[44](null)}}}function Bo(e,t,n){let r,i,o;Kn(e,fo,f=>n(19,o=f));let{clientstyling:a=""}=t,{clientstylingurl:s=""}=t,{mbsource:u}=t,{lang:l="en"}=t,{endpoint:h}=t,{session:c}=t,{translationurl:m}=t,{templateid:_}=t,d=[],g=!0,v=null,S=0,P="",I="",D=!1,M=!1,N="",te="",Q="",ue=!1,de=!1,he=!1,B="",U={},Z=null,ge=!1,be=!1,ye="",J,ne=[],X=null,ce=0,re=!1,_e=!1;const Se={SMS:"sms",EMAIL:"email"},Ee={MAX_ATTEMPTS_EXCEEDED:"gm.twofa.token_max_attempts_exceeded",INTERNAL_SERVER_ERROR:"gm.multifactorauthentication.internal_server_error",MAX_INVALIDATE:"gm.multifactorauthentication.challenge_internal_server_error"};Object.keys(Kt).forEach(f=>{Yt(f,Kt[f])});const Te=()=>{po(l)},Y=()=>{fetch(m).then(f=>f.json()).then(f=>{Object.keys(f).forEach(E=>{Yt(E,f[E])})}).catch(f=>{console.log(f)})},V=f=>ve(this,null,function*(){var E;if((E=f.detail)!=null&&E["x-step-up-required"]){if(n(7,M=!1),n(6,D=!1),n(8,N=""),te=f.detail["x-step-up-token"],Q=f.detail.flow,!te||!Q){n(3,g=!1),n(7,M=!0),n(8,N=o("configError"));return}n(12,ge=!1),n(3,g=!1)}}),$e=()=>{X&&(clearInterval(X),X=null),Z&&(clearInterval(Z),Z=null),n(6,D=!1),n(7,M=!1),n(8,N=""),n(10,de=!1),n(2,d=[]),n(4,v=null),n(3,g=!0),n(0,B=""),n(12,ge=!1),n(38,U={})},fe=()=>{$e()},$=()=>new Promise((f,E)=>{const x=new URL(`${h}/api/pam/v1/mfa/challenge/${te}`),G=new Headers;G.append("accept","application/json"),G.append("Content-Type","application/json"),G.append("X-SessionId",`${c}`),n(16,_e=!0);const Oe={method:"PATCH",headers:G,body:JSON.stringify({channel:B,templateId:_})};fetch(x,Oe).then(It=>It.json()).then(()=>{n(15,re=!1),b(),A(),f()}).catch(It=>{E()})}),ze=()=>{Z&&clearInterval(Z),Z=setInterval(()=>{const f=Xe({},U);let E=!1;Object.keys(f).forEach(x=>{f[x]>0&&(f[x]--,E=!0)}),n(38,U=f),!E&&Z&&(clearInterval(Z),Z=null)},1e3)},ie=f=>{n(0,B=f)},W=()=>ve(this,null,function*(){if(!(!B||U[B]&&U[B]>0)){n(3,g=!0),_&&_.startsWith("2fa-")&&n(30,_=`2fa-${B}`);try{yield $(),yield at(),n(38,U=ut(Xe({},U),{[B]:30})),ze(),n(12,ge=!0),b(),A()}catch(f){console.error("Error submitting channel:",f),n(6,D=!0),n(8,N=o("submissionError"))}finally{n(3,g=!1)}}}),b=()=>{const f=new Date(P),E=new Date(I),x=new Date,G=E.getTime()-x.getTime();ce=f.getTime()-G;const z=Date.now(),Oe=Math.max(0,Math.floor((ce-z)/1e3));n(5,S=Oe)},A=()=>{X&&clearInterval(X),X=setInterval(()=>{const f=Date.now(),E=Math.max(0,Math.floor((ce-f)/1e3));n(5,S=E),n(11,he=E<=0),E<=0&&(clearInterval(X),X=null,n(9,ue=!0),n(6,D=!1),n(10,de=!1))},1e3)},In=f=>{const E=Math.floor(f/60),x=f%60;return`${E.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}`},st=(f,E)=>{const x=[...d];x[f]=E.toUpperCase(),n(2,d=x),x.join("")!==ye&&n(13,be=!1)},Nn=f=>{var G,z,Oe;f.preventDefault();const x=(((z=(G=f.clipboardData)==null?void 0:G.getData("text"))==null?void 0:z.trim())||"").slice(0,v.inputLength).split("");n(2,d=[...x,...Array(v.inputLength-x.length).fill("")]),(Oe=ne[x.length])==null||Oe.focus(),x.length===v.inputLength&&Lt()},Pt=(f,E)=>{const x=f.target,G=x.value;if(/^[a-z0-9]$/i.test(G)){st(E,G);const z=ne[E+1];z==null||z.focus()}x.value=""},Mt=(f,E)=>{const x=f.key,G=f.ctrlKey||f.metaKey;if(/^[a-z0-9]$/i.test(x)){if(G&&x.toLowerCase()==="v")return;f.preventDefault(),st(E,x);const z=ne[E+1];z==null||z.focus()}else if(x==="Backspace"){f.preventDefault(),d[E]!==""&&st(E,"");const z=ne[E-1];z==null||z.focus()}},Rn=()=>{Q=="stateful"&&($(),n(9,ue=!1));const f=new CustomEvent("otpResendRequested");window.dispatchEvent(f)},kn=f=>{window.dispatchEvent(new CustomEvent("otpSubmitted",{detail:{code:f,maxAttempts:v.maxValidationAttempts,validatedAttempts:v.numberOfValidateAttempts}}))},Dn=f=>ve(this,null,function*(){const E=new URL(`/api/nwa/api/v1/mfa/challenge/${te}/validate`,h);E.searchParams.append("input",f);try{const x=yield fetch(E.href,{method:"POST"});if(x.status===200){Un();return}const G=yield x.json();throw new Error(G.message)}catch(x){if(yield at(),x.message===Ee.INTERNAL_SERVER_ERROR){if(v.numberOfValidateAttempts===v.maxValidationAttempts-1){window.dispatchEvent(new CustomEvent("otpSetTimeout")),window.postMessage({type:"WidgetNotification",data:{type:"error",message:o("accountBlocked")}},window.location.href),window.dispatchEvent(new CustomEvent("manualClosePopup"));return}n(6,D=!0),n(8,N=o("invalidOtp")),at();return}x.message===Ee.MAX_INVALIDATE&&(n(6,D=!0),n(8,N=o("invalidOtp"))),x.details===Ee.MAX_ATTEMPTS_EXCEEDED&&n(15,re=!0),console.error("OTP submission failed:",x),n(6,D=!0),n(8,N=o("submissionError"))}finally{n(3,g=!1)}}),Un=()=>{window.dispatchEvent(new CustomEvent("otpSuccess",{detail:{message:"User successfully authenticated"}}))},Gn=()=>{window.dispatchEvent(new CustomEvent("manualClosePopup"))},Lt=()=>ve(this,null,function*(){if(d.join("").length!==v.inputLength){n(6,D=!0),n(8,N=o("invalidOtp"));return}const f=d.join("");n(13,be=!0),ye=f,n(3,g=!0),n(6,D=!1),n(8,N=""),Q==="stateless"&&kn(f),Q==="stateful"&&(yield Dn(f))}),at=()=>ve(this,null,function*(){if(h)try{n(3,g=!0);const f=new URL(`/api/nwa/api/v1/mfa/challenge/${te}/config`,h),E=yield fetch(f.href),x=yield E.json();if(E.ok)n(4,v=x),n(2,d=Array(v.inputLength).fill("")),n(9,ue=!1),P=v.expirationTime,I=v.serverTime,v.numberOfValidateAttempts!==0&&(n(6,D=!0),n(8,N=o("invalidOtp"))),v.numberOfValidateAttempts===v.maxValidationAttempts-1&&n(10,de=!0),n(3,g=!1),b(),A(),n(16,_e=!1);else if(x&&x.details===Ee.MAX_ATTEMPTS_EXCEEDED)window.dispatchEvent(new CustomEvent("manualClosePopup"));else{const G=x&&x.message||`Failed to load config. Status: ${E.status}`;throw new Error(G)}}catch(f){n(3,g=!1),n(7,M=!0),n(8,N=o("configError")),window.dispatchEvent(new CustomEvent("2fa-loading",{detail:{isLoading:!1}})),console.error("Error loading 2FA config:",f)}});lr(()=>(window.addEventListener("stepUpAuthRequired",V,!1),window.addEventListener("closePopup",fe,!1),()=>{window.removeEventListener("stepUpAuthRequired",V),window.removeEventListener("closePopup",fe,!1),X&&clearInterval(X),Z&&clearInterval(Z)}));const Fn=()=>ie(Se.SMS),jn=()=>ie(Se.EMAIL);function Vn(f,E){Je[f?"unshift":"push"](()=>{ne[E]=f,n(14,ne)})}const $n=(f,E)=>Pt(E,f),zn=(f,E)=>Mt(E,f);function Xn(f){Je[f?"unshift":"push"](()=>{J=f,n(1,J)})}return e.$$set=f=>{"clientstyling"in f&&n(31,a=f.clientstyling),"clientstylingurl"in f&&n(32,s=f.clientstylingurl),"mbsource"in f&&n(33,u=f.mbsource),"lang"in f&&n(34,l=f.lang),"endpoint"in f&&n(35,h=f.endpoint),"session"in f&&n(36,c=f.session),"translationurl"in f&&n(37,m=f.translationurl),"templateid"in f&&n(30,_=f.templateid)},e.$$.update=()=>{e.$$.dirty[0]&2|e.$$.dirty[1]&1&&a&&J&&xr(J,a),e.$$.dirty[0]&2|e.$$.dirty[1]&2&&s&&J&&wr(J,s),e.$$.dirty[0]&2|e.$$.dirty[1]&4&&u&&J&&Sr(J,`${u}.Style`),e.$$.dirty[1]&8&&l&&Te(),e.$$.dirty[1]&72&&l&&m&&Y(),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&n(18,r=B&&(!U[B]||U[B]===0)),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&n(17,i=B&&U[B]||0)},[B,J,d,g,v,S,D,M,N,ue,de,he,ge,be,ne,re,_e,i,r,o,Se,ie,W,In,Nn,Pt,Mt,Rn,Gn,Lt,_,a,s,u,l,h,c,m,U,Fn,jn,Vn,$n,zn,Xn]}class Ln extends Er{constructor(t){super(),yr(this,t,Bo,Co,sn,{clientstyling:31,clientstylingurl:32,mbsource:33,lang:34,endpoint:35,session:36,translationurl:37,templateid:30},mo,[-1,-1,-1])}get clientstyling(){return this.$$.ctx[31]}set clientstyling(t){this.$$set({clientstyling:t}),ae()}get clientstylingurl(){return this.$$.ctx[32]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),ae()}get mbsource(){return this.$$.ctx[33]}set mbsource(t){this.$$set({mbsource:t}),ae()}get lang(){return this.$$.ctx[34]}set lang(t){this.$$set({lang:t}),ae()}get endpoint(){return this.$$.ctx[35]}set endpoint(t){this.$$set({endpoint:t}),ae()}get session(){return this.$$.ctx[36]}set session(t){this.$$set({session:t}),ae()}get translationurl(){return this.$$.ctx[37]}set translationurl(t){this.$$set({translationurl:t}),ae()}get templateid(){return this.$$.ctx[30]}set templateid(t){this.$$set({templateid:t}),ae()}}_r(Ln,{clientstyling:{},clientstylingurl:{},mbsource:{},lang:{},endpoint:{},session:{},translationurl:{},templateid:{}},[],[],!0);exports.default=Ln;