@everymatrix/loyalty-level 0.1.10 → 0.1.12

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,16 @@
1
+ typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const xs="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(xs);const ws=1,Ts=2,Ss=16,As=1,Hs=2,Gn="[",fr="[!",Qr="]",nt={},Y=Symbol(),Os="http://www.w3.org/1999/xhtml",Nr=!1;var kn=Array.isArray,Ms=Array.prototype.indexOf,hr=Array.from,er=Object.keys,Rt=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,jn=Object.getOwnPropertyDescriptors,Ps=Object.prototype,Ns=Array.prototype,Kr=Object.getPrototypeOf,mn=Object.isExtensible;const Ge=()=>{};function Vn(e){for(var t=0;t<e.length;t++)e[t]()}function Xn(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const q=2,tr=4,kt=8,Wn=1<<24,$e=16,Ie=32,ze=64,en=128,ve=512,Q=1024,re=2048,Le=4096,he=8192,Me=16384,cr=32768,mt=65536,gn=1<<17,zn=1<<18,at=1<<19,Yn=1<<20,Ue=1<<25,it=32768,$r=1<<21,tn=1<<22,ke=1<<23,_t=Symbol("$state"),$s=Symbol("legacy props"),Is=Symbol(""),dt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},rn=3,ot=8;function Ls(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Bs(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Cs(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Rs(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ds(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Us(){throw new Error("https://svelte.dev/e/hydration_failed")}function Fs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Gs(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ks(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function js(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function jt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Vs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let $=!1;function Oe(e){$=e}let M;function ue(e){if(e===null)throw jt(),nt;return M=e}function gt(){return ue(xe(M))}function ht(e){if($){if(xe(M)!==null)throw jt(),nt;M=e}}function Xs(e=1){if($){for(var t=e,r=M;t--;)r=xe(r);M=r}}function rr(e=!0){for(var t=0,r=M;;){if(r.nodeType===ot){var n=r.data;if(n===Qr){if(t===0)return r;t-=1}else(n===Gn||n===fr)&&(t+=1)}var i=xe(r);e&&r.remove(),r=i}}function qn(e){if(!e||e.nodeType!==ot)throw jt(),nt;return e.data}function Zn(e){return e===this.v}function nn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Jn(e){return!nn(e,this.v)}let Ws=!1,_e=null;function bt(e){_e=e}function dr(e,t=!1,r){_e={p:_e,i:!1,c:null,e:null,s:e,x:null,l:null}}function pr(e){var t=_e,r=t.e;if(r!==null){t.e=null;for(var n of r)bi(n)}return e!==void 0&&(t.x=e),t.i=!0,_e=t.p,e??{}}function Qn(){return!0}let Qe=[];function Kn(){var e=Qe;Qe=[],Vn(e)}function vr(e){if(Qe.length===0&&!Lt){var t=Qe;queueMicrotask(()=>{t===Qe&&Kn()})}Qe.push(e)}function zs(){for(;Qe.length>0;)Kn()}function ei(e){var t=P;if(t===null)return H.f|=ke,e;if(t.f&cr)yt(e,t);else{if(!(t.f&en))throw e;t.b.error(e)}}function yt(e,t){for(;t!==null;){if(t.f&en)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const Ys=-7169;function z(e,t){e.f=e.f&Ys|t}function sn(e){e.f&ve||e.deps===null?z(e,Q):z(e,Le)}function ti(e){if(e!==null)for(const t of e)!(t.f&q)||!(t.f&it)||(t.f^=it,ti(t.deps))}function ri(e,t,r){e.f&re?t.add(e):e.f&Le&&r.add(e),ti(e.deps),z(e,Q)}const zt=new Set;let G=null,me=null,de=[],_r=null,Ir=!1,Lt=!1;class be{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#s=0;#a=null;#i=new Set;#n=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#s>0}process(t){de=[],this.apply();var r=[],n=[];for(const i of t)this.#o(i,r,n);this.is_fork||this.#l(),this.is_deferred()?(this.#u(n),this.#u(r)):(G=null,bn(n),bn(r),this.#a?.resolve()),me=null}#o(t,r,n){t.f^=Q;for(var i=t.first,s=null;i!==null;){var a=i.f,o=(a&(Ie|ze))!==0,u=o&&(a&Q)!==0,l=u||(a&he)!==0||this.skipped_effects.has(i);if(!l&&i.fn!==null){o?i.f^=Q:s!==null&&a&(tr|kt|Wn)?s.b.defer_effect(i):a&tr?r.push(i):Vt(i)&&(a&$e&&this.#i.add(i),Ut(i));var f=i.first;if(f!==null){i=f;continue}}var h=i.parent;for(i=i.next;i===null&&h!==null;)h===s&&(s=null),i=h.next,h=h.parent}}#u(t){for(var r=0;r<t.length;r+=1)ri(t[r],this.#i,this.#n)}capture(t,r){r!==Y&&!this.previous.has(t)&&this.previous.set(t,r),t.f&ke||(this.current.set(t,t.v),me?.set(t,t.v))}activate(){G=this,this.apply()}deactivate(){G===this&&(G=null,me=null)}flush(){if(this.activate(),de.length>0){if(ni(),G!==null&&G!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#t)t(this);this.#t.clear()}#l(){if(this.#s===0){for(const t of this.#e)t();this.#e.clear()}this.#r===0&&this.#f()}#f(){if(zt.size>1){this.previous.clear();var t=me,r=!0;for(const i of zt){if(i===this){r=!1;continue}const s=[];for(const[o,u]of this.current){if(i.current.has(o))if(r&&u!==i.current.get(o))i.current.set(o,u);else continue;s.push(o)}if(s.length===0)continue;const a=[...i.current.keys()].filter(o=>!this.current.has(o));if(a.length>0){var n=de;de=[];const o=new Set,u=new Map;for(const l of s)ii(l,a,o,u);if(de.length>0){G=i,i.apply();for(const l of de)i.#o(l,[],[]);i.deactivate()}de=n}}G=null,me=t}this.committed=!0,zt.delete(this)}increment(t){this.#r+=1,t&&(this.#s+=1)}decrement(t){this.#r-=1,t&&(this.#s-=1),this.revive()}revive(){for(const t of this.#i)this.#n.delete(t),z(t,re),Ne(t);for(const t of this.#n)z(t,Le),Ne(t);this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#a??=Xn()).promise}static ensure(){if(G===null){const t=G=new be;zt.add(G),Lt||be.enqueue(()=>{G===t&&t.flush()})}return G}static enqueue(t){vr(t)}apply(){}}function fe(e){var t=Lt;Lt=!0;try{for(var r;;){if(zs(),de.length===0&&(G?.flush(),de.length===0))return _r=null,r;ni()}}finally{Lt=t}}function ni(){var e=tt;Ir=!0;var t=null;try{var r=0;for(sr(!0);de.length>0;){var n=be.ensure();if(r++>1e3){var i,s;qs()}n.process(de),je.clear()}}finally{Ir=!1,sr(e),_r=null}}function qs(){try{Ds()}catch(e){yt(e,_r)}}let He=null;function bn(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if(!(n.f&(Me|he))&&Vt(n)&&(He=new Set,Ut(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?wi(n):n.fn=null),He?.size>0)){je.clear();for(const i of He){if(i.f&(Me|he))continue;const s=[i];let a=i.parent;for(;a!==null;)He.has(a)&&(He.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const u=s[o];u.f&(Me|he)||Ut(u)}}He.clear()}}He=null}}function ii(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;s&q?ii(i,t,r,n):s&(tn|$e)&&!(s&re)&&si(i,t,n)&&(z(i,re),Ne(i))}}function si(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if(i.f&q&&si(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Ne(e){for(var t=_r=e;t.parent!==null;){t=t.parent;var r=t.f;if(Ir&&t===P&&r&$e&&!(r&zn))return;if(r&(ze|Ie)){if(!(r&Q))return;t.f^=Q}}de.push(t)}function Zs(e){let t=0,r=st(0),n;return()=>{un()&&(E(r),gr(()=>(t===0&&(n=br(()=>e(()=>Bt(r)))),t+=1,()=>{vr(()=>{t-=1,t===0&&(n?.(),n=void 0,Bt(r))})})))}}var Js=mt|at|en;function Qs(e,t,r){new Ks(e,t,r)}class Ks{parent;is_pending=!1;#e;#t=$?M:null;#r;#s;#a;#i=null;#n=null;#o=null;#u=null;#l=null;#f=0;#h=0;#d=!1;#p=new Set;#v=new Set;#c=null;#y=Zs(()=>(this.#c=st(this.#f),()=>{this.#c=null}));constructor(t,r,n){this.#e=t,this.#r=r,this.#s=n,this.parent=P.b,this.is_pending=!!this.#r.pending,this.#a=fn(()=>{if(P.b=this,$){const s=this.#t;gt(),s.nodeType===ot&&s.data===fr?this.#x():(this.#E(),this.#h===0&&(this.is_pending=!1))}else{var i=this.#g();try{this.#i=pe(()=>n(i))}catch(s){this.error(s)}this.#h>0?this.#m():this.is_pending=!1}return()=>{this.#l?.remove()}},Js),$&&(this.#e=M)}#E(){try{this.#i=pe(()=>this.#s(this.#e))}catch(t){this.error(t)}}#x(){const t=this.#r.pending;t&&(this.#n=pe(()=>t(this.#e)),be.enqueue(()=>{var r=this.#g();this.#i=this.#_(()=>(be.ensure(),pe(()=>this.#s(r)))),this.#h>0?this.#m():(et(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#g(){var t=this.#e;return this.is_pending&&(this.#l=Ee(),this.#e.before(this.#l),t=this.#l),t}defer_effect(t){ri(t,this.#p,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#_(t){var r=P,n=H,i=_e;Ae(this.#a),oe(this.#a),bt(this.#a.ctx);try{return t()}catch(s){return ei(s),null}finally{Ae(r),oe(n),bt(i)}}#m(){const t=this.#r.pending;this.#i!==null&&(this.#u=document.createDocumentFragment(),this.#u.append(this.#l),Ai(this.#i,this.#u)),this.#n===null&&(this.#n=pe(()=>t(this.#e)))}#b(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t);return}if(this.#h+=t,this.#h===0){this.is_pending=!1;for(const r of this.#p)z(r,re),Ne(r);for(const r of this.#v)z(r,Le),Ne(r);this.#p.clear(),this.#v.clear(),this.#n&&et(this.#n,()=>{this.#n=null}),this.#u&&(this.#e.before(this.#u),this.#u=null)}}update_pending_count(t){this.#b(t),this.#f+=t,this.#c&&Et(this.#c,this.#f)}get_effect_pending(){return this.#y(),E(this.#c)}error(t){var r=this.#r.onerror;let n=this.#r.failed;if(this.#d||!r&&!n)throw t;this.#i&&(te(this.#i),this.#i=null),this.#n&&(te(this.#n),this.#n=null),this.#o&&(te(this.#o),this.#o=null),$&&(ue(this.#t),Xs(),ue(rr()));var i=!1,s=!1;const a=()=>{if(i){Vs();return}i=!0,s&&js(),be.ensure(),this.#f=0,this.#o!==null&&et(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#d=!1,pe(()=>this.#s(this.#e)))),this.#h>0?this.#m():this.is_pending=!1};var o=H;try{oe(null),s=!0,r?.(t,a),s=!1}catch(u){yt(u,this.#a&&this.#a.parent)}finally{oe(o)}n&&vr(()=>{this.#o=this.#_(()=>{be.ensure(),this.#d=!0;try{return pe(()=>{n(this.#e,()=>t,()=>a)})}catch(u){return yt(u,this.#a.parent),null}finally{this.#d=!1}})})}}function ea(e,t,r,n){const i=mr;if(r.length===0&&e.length===0){n(t.map(i));return}var s=G,a=P,o=ta();function u(){Promise.all(r.map(l=>ra(l))).then(l=>{o();try{n([...t.map(i),...l])}catch(f){a.f&Me||yt(f,a)}s?.deactivate(),nr()}).catch(l=>{yt(l,a)})}e.length>0?Promise.all(e).then(()=>{o();try{return u()}finally{s?.deactivate(),nr()}}):u()}function ta(){var e=P,t=H,r=_e,n=G;return function(s=!0){Ae(e),oe(t),bt(r),s&&n?.activate()}}function nr(){Ae(null),oe(null),bt(null)}function mr(e){var t=q|re,r=H!==null&&H.f&q?H:null;return P!==null&&(P.f|=at),{ctx:_e,deps:null,effects:null,equals:Zn,f:t,fn:e,reactions:null,rv:0,v:Y,wv:0,parent:r??P,ac:null}}function ra(e,t,r){let n=P;n===null&&Ls();var i=n.b,s=void 0,a=st(Y),o=!H,u=new Map;return fa(()=>{var l=Xn();s=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).then(()=>{f===G&&f.committed&&f.deactivate(),nr()})}catch(p){l.reject(p),nr()}var f=G;if(o){var h=i.is_rendered();i.update_pending_count(1),f.increment(h),u.get(f)?.reject(dt),u.delete(f),u.set(f,l)}const c=(p,d=void 0)=>{if(f.activate(),d)d!==dt&&(a.f|=ke,Et(a,d));else{a.f&ke&&(a.f^=ke),Et(a,p);for(const[b,N]of u){if(u.delete(b),b===f)break;N.reject(dt)}}o&&(i.update_pending_count(-1),f.decrement(h))};l.promise.then(c,p=>c(null,p||"unknown"))}),gi(()=>{for(const l of u.values())l.reject(dt)}),new Promise(l=>{function f(h){function c(){h===s?l(a):f(s)}h.then(c,c)}f(s)})}function Ze(e){const t=mr(e);return Hi(t),t}function na(e){const t=mr(e);return t.equals=Jn,t}function ai(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)te(t[r])}}function ia(e){for(var t=e.parent;t!==null;){if(!(t.f&q))return t.f&Me?null:t;t=t.parent}return null}function an(e){var t,r=P;Ae(ia(e));try{e.f&=~it,ai(e),t=Ni(e)}finally{Ae(r)}return t}function oi(e){var t=an(e);if(!e.equals(t)&&(e.wv=Mi(),(!G?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){z(e,Q);return}Xe||(me!==null?(un()||G?.is_fork)&&me.set(e,t):sn(e))}let Lr=new Set;const je=new Map;let ui=!1;function st(e,t){var r={f:0,v:e,reactions:null,equals:Zn,rv:0,wv:0};return r}function J(e,t){const r=st(e);return Hi(r),r}function on(e,t=!1,r=!0){const n=st(e);return t||(n.equals=Jn),n}function X(e,t,r=!1){H!==null&&(!ye||H.f&gn)&&Qn()&&H.f&(q|$e|tn|gn)&&!Pe?.includes(e)&&ks();let n=r?pt(t):t;return Et(e,n)}function Et(e,t){if(!e.equals(t)){var r=e.v;Xe?je.set(e,t):je.set(e,r),e.v=t;var n=be.ensure();if(n.capture(e,r),e.f&q){const i=e;e.f&re&&an(i),sn(i)}e.wv=Mi(),li(e,re),P!==null&&P.f&Q&&!(P.f&(Ie|ze))&&(ce===null?ca([e]):ce.push(e)),!n.is_fork&&Lr.size>0&&!ui&&sa()}return t}function sa(){ui=!1;var e=tt;sr(!0);const t=Array.from(Lr);try{for(const r of t)r.f&Q&&z(r,Le),Vt(r)&&Ut(r)}finally{sr(e)}Lr.clear()}function Bt(e){X(e,e.v+1)}function li(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],a=s.f,o=(a&re)===0;if(o&&z(s,t),a&q){var u=s;me?.delete(u),a&it||(a&ve&&(s.f|=it),li(u,Le))}else o&&(a&$e&&He!==null&&He.add(s),Ne(s))}}function pt(e){if(typeof e!="object"||e===null||_t in e)return e;const t=Kr(e);if(t!==Ps&&t!==Ns)return e;var r=new Map,n=kn(e),i=J(0),s=rt,a=o=>{if(rt===s)return o();var u=H,l=rt;oe(null),xn(s);var f=o();return oe(u),xn(l),f};return n&&r.set("length",J(e.length)),new Proxy(e,{defineProperty(o,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Fs();var f=r.get(u);return f===void 0?f=a(()=>{var h=J(l.value);return r.set(u,h),h}):X(f,l.value,!0),!0},deleteProperty(o,u){var l=r.get(u);if(l===void 0){if(u in o){const f=a(()=>J(Y));r.set(u,f),Bt(i)}}else X(l,Y),Bt(i);return!0},get(o,u,l){if(u===_t)return e;var f=r.get(u),h=u in o;if(f===void 0&&(!h||vt(o,u)?.writable)&&(f=a(()=>{var p=pt(h?o[u]:Y),d=J(p);return d}),r.set(u,f)),f!==void 0){var c=E(f);return c===Y?void 0:c}return Reflect.get(o,u,l)},getOwnPropertyDescriptor(o,u){var l=Reflect.getOwnPropertyDescriptor(o,u);if(l&&"value"in l){var f=r.get(u);f&&(l.value=E(f))}else if(l===void 0){var h=r.get(u),c=h?.v;if(h!==void 0&&c!==Y)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return l},has(o,u){if(u===_t)return!0;var l=r.get(u),f=l!==void 0&&l.v!==Y||Reflect.has(o,u);if(l!==void 0||P!==null&&(!f||vt(o,u)?.writable)){l===void 0&&(l=a(()=>{var c=f?pt(o[u]):Y,p=J(c);return p}),r.set(u,l));var h=E(l);if(h===Y)return!1}return f},set(o,u,l,f){var h=r.get(u),c=u in o;if(n&&u==="length")for(var p=l;p<h.v;p+=1){var d=r.get(p+"");d!==void 0?X(d,Y):p in o&&(d=a(()=>J(Y)),r.set(p+"",d))}if(h===void 0)(!c||vt(o,u)?.writable)&&(h=a(()=>J(void 0)),X(h,pt(l)),r.set(u,h));else{c=h.v!==Y;var b=a(()=>pt(l));X(h,b)}var N=Reflect.getOwnPropertyDescriptor(o,u);if(N?.set&&N.set.call(f,l),!c){if(n&&typeof u=="string"){var W=r.get("length"),B=Number(u);Number.isInteger(B)&&B>=W.v&&X(W,B+1)}Bt(i)}return!0},ownKeys(o){E(i);var u=Reflect.ownKeys(o).filter(h=>{var c=r.get(h);return c===void 0||c.v!==Y});for(var[l,f]of r)f.v!==Y&&!(l in o)&&u.push(l);return u},setPrototypeOf(){Gs()}})}var yn,fi,hi,ci;function Br(){if(yn===void 0){yn=window,fi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;hi=vt(t,"firstChild").get,ci=vt(t,"nextSibling").get,mn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),mn(r)&&(r.__t=void 0)}}function Ee(e=""){return document.createTextNode(e)}function Se(e){return hi.call(e)}function xe(e){return ci.call(e)}function ct(e,t){if(!$)return Se(e);var r=Se(M);if(r===null)r=M.appendChild(Ee());else if(t&&r.nodeType!==rn){var n=Ee();return r?.before(n),ue(n),n}return ue(r),r}function di(e,t=!1){if(!$){var r=Se(e);return r instanceof Comment&&r.data===""?xe(r):r}if(t&&M?.nodeType!==rn){var n=Ee();return M?.before(n),ue(n),n}return M}function Cr(e,t=1,r=!1){let n=$?M:e;for(var i;t--;)i=n,n=xe(n);if(!$)return n;if(r&&n?.nodeType!==rn){var s=Ee();return n===null?i?.after(s):n.before(s),ue(s),s}return ue(n),n}function pi(e){e.textContent=""}function vi(){return!1}function _i(e){var t=H,r=P;oe(null),Ae(null);try{return e()}finally{oe(t),Ae(r)}}function mi(e){P===null&&(H===null&&Rs(),Cs()),Xe&&Bs()}function aa(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function we(e,t,r){var n=P;n!==null&&n.f&he&&(e|=he);var i={ctx:_e,deps:null,nodes:null,f:e|re|ve,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{Ut(i),i.f|=cr}catch(o){throw te(i),o}else t!==null&&Ne(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&!(s.f&at)&&(s=s.first,e&$e&&e&mt&&s!==null&&(s.f|=mt)),s!==null&&(s.parent=n,n!==null&&aa(s,n),H!==null&&H.f&q&&!(e&ze))){var a=H;(a.effects??=[]).push(s)}return i}function un(){return H!==null&&!ye}function gi(e){const t=we(kt,null,!1);return z(t,Q),t.teardown=e,t}function Dt(e){mi();var t=P.f,r=!H&&(t&Ie)!==0&&(t&cr)===0;if(r){var n=_e;(n.e??=[]).push(e)}else return bi(e)}function bi(e){return we(tr|Yn,e,!1)}function oa(e){return mi(),we(kt|Yn,e,!0)}function ua(e){be.ensure();const t=we(ze|at,e,!0);return()=>{te(t)}}function la(e){be.ensure();const t=we(ze|at,e,!0);return(r={})=>new Promise(n=>{r.outro?et(t,()=>{te(t),n(void 0)}):(te(t),n(void 0))})}function ln(e){return we(tr,e,!1)}function fa(e){return we(tn|at,e,!0)}function gr(e,t=0){return we(kt|t,e,!0)}function ir(e,t=[],r=[],n=[]){ea(n,t,r,i=>{we(kt,()=>e(...i.map(E)),!0)})}function fn(e,t=0){var r=we($e|t,e,!0);return r}function pe(e){return we(Ie|at,e,!0)}function yi(e){var t=e.teardown;if(t!==null){const r=Xe,n=H;En(!0),oe(null);try{t.call(null)}finally{En(r),oe(n)}}}function Ei(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&_i(()=>{i.abort(dt)});var n=r.next;r.f&ze?r.parent=null:te(r,t),r=n}}function ha(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Ie||te(t),t=r}}function te(e,t=!0){var r=!1;(t||e.f&zn)&&e.nodes!==null&&e.nodes.end!==null&&(xi(e.nodes.start,e.nodes.end),r=!0),Ei(e,t&&!r),ar(e,0),z(e,Me);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();yi(e);var i=e.parent;i!==null&&i.first!==null&&wi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function xi(e,t){for(;e!==null;){var r=e===t?null:xe(e);e.remove(),e=r}}function wi(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function et(e,t,r=!0){var n=[];Ti(e,n,!0);var i=()=>{r&&te(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function Ti(e,t,r){if(!(e.f&he)){e.f^=he;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&mt)!==0||(i.f&Ie)!==0&&(e.f&$e)!==0;Ti(i,t,a?r:!1),i=s}}}function hn(e){Si(e,!0)}function Si(e,t){if(e.f&he){e.f^=he,e.f&Q||(z(e,re),Ne(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&mt)!==0||(r.f&Ie)!==0;Si(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Ai(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:xe(r);t.append(r),r=i}}let tt=!1;function sr(e){tt=e}let Xe=!1;function En(e){Xe=e}let H=null,ye=!1;function oe(e){H=e}let P=null;function Ae(e){P=e}let Pe=null;function Hi(e){H!==null&&(Pe===null?Pe=[e]:Pe.push(e))}let ae=null,le=0,ce=null;function ca(e){ce=e}let Oi=1,Ke=0,rt=Ke;function xn(e){rt=e}function Mi(){return++Oi}function Vt(e){var t=e.f;if(t&re)return!0;if(t&q&&(e.f&=~it),t&Le){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Vt(s)&&oi(s),s.wv>e.wv)return!0}t&ve&&me===null&&z(e,Q)}return!1}function Pi(e,t,r=!0){var n=e.reactions;if(n!==null&&!Pe?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];s.f&q?Pi(s,t,!1):t===s&&(r?z(s,re):s.f&Q&&z(s,Le),Ne(s))}}function Ni(e){var t=ae,r=le,n=ce,i=H,s=Pe,a=_e,o=ye,u=rt,l=e.f;ae=null,le=0,ce=null,H=l&(Ie|ze)?null:e,Pe=null,bt(e.ctx),ye=!1,rt=++Ke,e.ac!==null&&(_i(()=>{e.ac.abort(dt)}),e.ac=null);try{e.f|=$r;var f=e.fn,h=f(),c=e.deps;if(ae!==null){var p;if(ar(e,le),c!==null&&le>0)for(c.length=le+ae.length,p=0;p<ae.length;p++)c[le+p]=ae[p];else e.deps=c=ae;if(un()&&e.f&ve)for(p=le;p<c.length;p++)(c[p].reactions??=[]).push(e)}else c!==null&&le<c.length&&(ar(e,le),c.length=le);if(Qn()&&ce!==null&&!ye&&c!==null&&!(e.f&(q|Le|re)))for(p=0;p<ce.length;p++)Pi(ce[p],e);if(i!==null&&i!==e){if(Ke++,i.deps!==null)for(let d=0;d<r;d+=1)i.deps[d].rv=Ke;if(t!==null)for(const d of t)d.rv=Ke;ce!==null&&(n===null?n=ce:n.push(...ce))}return e.f&ke&&(e.f^=ke),h}catch(d){return ei(d)}finally{e.f^=$r,ae=t,le=r,ce=n,H=i,Pe=s,bt(a),ye=o,rt=u}}function da(e,t){let r=t.reactions;if(r!==null){var n=Ms.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&t.f&q&&(ae===null||!ae.includes(t))){var s=t;s.f&ve&&(s.f^=ve,s.f&=~it),sn(s),ai(s),ar(s,0)}}function ar(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)da(e,r[n])}function Ut(e){var t=e.f;if(!(t&Me)){z(e,Q);var r=P,n=tt;P=e,tt=!0;try{t&($e|Wn)?ha(e):Ei(e),yi(e);var i=Ni(e);e.teardown=typeof i=="function"?i:null,e.wv=Oi;var s;Nr&&Ws&&e.f&re&&e.deps}finally{tt=n,P=r}}}async function pa(){await Promise.resolve(),fe()}function E(e){var t=e.f,r=(t&q)!==0;if(H!==null&&!ye){var n=P!==null&&(P.f&Me)!==0;if(!n&&!Pe?.includes(e)){var i=H.deps;if(H.f&$r)e.rv<Ke&&(e.rv=Ke,ae===null&&i!==null&&i[le]===e?le++:ae===null?ae=[e]:ae.push(e));else{(H.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[H]:s.includes(H)||s.push(H)}}}if(Xe&&je.has(e))return je.get(e);if(r){var a=e;if(Xe){var o=a.v;return(!(a.f&Q)&&a.reactions!==null||Ii(a))&&(o=an(a)),je.set(a,o),o}var u=(a.f&ve)===0&&!ye&&H!==null&&(tt||(H.f&ve)!==0),l=a.deps===null;Vt(a)&&(u&&(a.f|=ve),oi(a)),u&&!l&&$i(a)}if(me?.has(e))return me.get(e);if(e.f&ke)throw e.v;return e.v}function $i(e){if(e.deps!==null){e.f|=ve;for(const t of e.deps)(t.reactions??=[]).push(e),t.f&q&&!(t.f&ve)&&$i(t)}}function Ii(e){if(e.v===Y)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(je.has(t)||t.f&q&&Ii(t))return!0;return!1}function br(e){var t=ye;try{return ye=!0,e()}finally{ye=t}}function va(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(_t in e)Rr(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&_t in r&&Rr(r)}}}function Rr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Rr(e[n],t)}catch{}const r=Kr(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=jn(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}const Li=new Set,Dr=new Set;function Bi(e){for(var t=0;t<e.length;t++)Li.add(e[t]);for(var r of Dr)r(e)}let wn=null;function Yt(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;wn=e;var a=0,o=wn===e&&e.__root;if(o){var u=i.indexOf(o);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var l=i.indexOf(t);if(l===-1)return;u<=l&&(a=u)}if(s=i[a]||e.target,s!==t){Rt(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=H,h=P;oe(null),Ae(null);try{for(var c,p=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var b=s["__"+n];b!=null&&(!s.disabled||e.target===s)&&b.call(s,e)}catch(N){c?p.push(N):c=N}if(e.cancelBubble||d===t||d===null)break;s=d}if(c){for(let N of p)queueMicrotask(()=>{throw N});throw c}}finally{e.__root=t,delete e.currentTarget,oe(f),Ae(h)}}}function Ci(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Ve(e,t){var r=P;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Xt(e,t){var r=(t&As)!==0,n=(t&Hs)!==0,i,s=!e.startsWith("<!>");return()=>{if($)return Ve(M,null),M;i===void 0&&(i=Ci(s?e:"<!>"+e),r||(i=Se(i)));var a=n||fi?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Se(a),u=a.lastChild;Ve(o,u)}else Ve(a,a);return a}}function Ri(){if($)return Ve(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),r=Ee();return e.append(t,r),Ve(t,r),e}function Je(e,t){if($){var r=P;(!(r.f&cr)||r.nodes.end===null)&&(r.nodes.end=M),gt();return}e!==null&&e.before(t)}const _a=["touchstart","touchmove"];function ma(e){return _a.includes(e)}function Zt(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Di(e,t){return Ui(e,t)}function ga(e,t){Br(),t.intro=t.intro??!1;const r=t.target,n=$,i=M;try{for(var s=Se(r);s&&(s.nodeType!==ot||s.data!==Gn);)s=xe(s);if(!s)throw nt;Oe(!0),ue(s);const a=Ui(e,{...t,anchor:s});return Oe(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==nt&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Us(),Br(),pi(r),Oe(!1),Di(e,t)}finally{Oe(n),ue(i)}}const lt=new Map;function Ui(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0}){Br();var o=new Set,u=h=>{for(var c=0;c<h.length;c++){var p=h[c];if(!o.has(p)){o.add(p);var d=ma(p);t.addEventListener(p,Yt,{passive:d});var b=lt.get(p);b===void 0?(document.addEventListener(p,Yt,{passive:d}),lt.set(p,1)):lt.set(p,b+1)}}};u(hr(Li)),Dr.add(u);var l=void 0,f=la(()=>{var h=r??t.appendChild(Ee());return Qs(h,{pending:()=>{}},c=>{if(s){dr({});var p=_e;p.c=s}if(i&&(n.$$events=i),$&&Ve(c,null),l=e(c,n)||{},$&&(P.nodes.end=M,M===null||M.nodeType!==ot||M.data!==Qr))throw jt(),nt;s&&pr()}),()=>{for(var c of o){t.removeEventListener(c,Yt);var p=lt.get(c);--p===0?(document.removeEventListener(c,Yt),lt.delete(c)):lt.set(c,p)}Dr.delete(u),h!==r&&h.parentNode?.removeChild(h)}});return Ur.set(l,f),l}let Ur=new WeakMap;function ba(e,t){const r=Ur.get(e);return r?(Ur.delete(e),r(t)):Promise.resolve()}class ya{anchor;#e=new Map;#t=new Map;#r=new Map;#s=new Set;#a=!0;constructor(t,r=!0){this.anchor=t,this.#a=r}#i=()=>{var t=G;if(this.#e.has(t)){var r=this.#e.get(t),n=this.#t.get(r);if(n)hn(n),this.#s.delete(r);else{var i=this.#r.get(r);i&&(this.#t.set(r,i.effect),this.#r.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#r.get(a);o&&(te(o.effect),this.#r.delete(a))}for(const[s,a]of this.#t){if(s===r||this.#s.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var l=document.createDocumentFragment();Ai(a,l),l.append(Ee()),this.#r.set(s,{effect:a,fragment:l})}else te(a);this.#s.delete(s),this.#t.delete(s)};this.#a||!n?(this.#s.add(s),et(a,o,!1)):o()}}};#n=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(te(i.effect),this.#r.delete(n))};ensure(t,r){var n=G,i=vi();if(r&&!this.#t.has(t)&&!this.#r.has(t))if(i){var s=document.createDocumentFragment(),a=Ee();s.append(a),this.#r.set(t,{effect:pe(()=>r(a)),fragment:s})}else this.#t.set(t,pe(()=>r(this.anchor)));if(this.#e.set(n,t),i){for(const[o,u]of this.#t)o===t?n.skipped_effects.delete(u):n.skipped_effects.add(u);for(const[o,u]of this.#r)o===t?n.skipped_effects.delete(u.effect):n.skipped_effects.add(u.effect);n.oncommit(this.#i),n.ondiscard(this.#n)}else $&&(this.anchor=M),this.#i()}}function Fr(e,t,r=!1){$&&gt();var n=new ya(e),i=r?mt:0;function s(a,o){if($){const l=qn(e)===fr;if(a===l){var u=rr();ue(u),n.anchor=u,Oe(!1),n.ensure(a,o),Oe(!0);return}}n.ensure(a,o)}fn(()=>{var a=!1;t((o,u=!0)=>{a=!0,s(u,o)}),a||s(!1,null)},i)}function Fi(e,t){return t}function Ea(e,t,r){for(var n=[],i=t.length,s,a=t.length,o=0;o<i;o++){let h=t[o];et(h,()=>{if(s){if(s.pending.delete(h),s.done.add(h),s.pending.size===0){var c=e.outrogroups;Gr(hr(s.done)),c.delete(s),c.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var u=n.length===0&&r!==null;if(u){var l=r,f=l.parentNode;pi(f),f.append(l),e.items.clear()}Gr(t,!u)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Gr(e,t=!0){for(var r=0;r<e.length;r++)te(e[r],t)}var Tn;function Gi(e,t,r,n,i,s=null){var a=e,o=new Map;$&&gt();var u=null,l=na(()=>{var b=r();return kn(b)?b:b==null?[]:hr(b)}),f,h=!0;function c(){d.fallback=u,xa(d,f,a,t,n),u!==null&&(f.length===0?u.f&Ue?(u.f^=Ue,It(u,null,a)):hn(u):et(u,()=>{u=null}))}var p=fn(()=>{f=E(l);var b=f.length;let N=!1;if($){var W=qn(a)===fr;W!==(b===0)&&(a=rr(),ue(a),Oe(!1),N=!0)}for(var B=new Set,R=G,Z=vi(),L=0;L<b;L+=1){$&&M.nodeType===ot&&M.data===Qr&&(a=M,N=!0,Oe(!1));var k=f[L],ne=n(k,L),j=h?null:o.get(ne);j?(j.v&&Et(j.v,k),j.i&&Et(j.i,L),Z&&R.skipped_effects.delete(j.e)):(j=wa(o,h?a:Tn??=Ee(),k,ne,L,i,t,r),h||(j.e.f|=Ue),o.set(ne,j)),B.add(ne)}if(b===0&&s&&!u&&(h?u=pe(()=>s(a)):(u=pe(()=>s(Tn??=Ee())),u.f|=Ue)),$&&b>0&&ue(rr()),!h)if(Z){for(const[Be,y]of o)B.has(Be)||R.skipped_effects.add(y.e);R.oncommit(c),R.ondiscard(()=>{})}else c();N&&Oe(!0),E(l)}),d={effect:p,items:o,outrogroups:null,fallback:u};h=!1,$&&(a=M)}function xa(e,t,r,n,i){var s=t.length,a=e.items,o=e.effect.first,u,l=null,f=[],h=[],c,p,d,b;for(b=0;b<s;b+=1){if(c=t[b],p=i(c,b),d=a.get(p).e,e.outrogroups!==null)for(const j of e.outrogroups)j.pending.delete(d),j.done.delete(d);if(d.f&Ue)if(d.f^=Ue,d===o)It(d,null,r);else{var N=l?l.next:o;d===e.effect.last&&(e.effect.last=d.prev),d.prev&&(d.prev.next=d.next),d.next&&(d.next.prev=d.prev),De(e,l,d),De(e,d,N),It(d,N,r),l=d,f=[],h=[],o=l.next;continue}if(d.f&he&&hn(d),d!==o){if(u!==void 0&&u.has(d)){if(f.length<h.length){var W=h[0],B;l=W.prev;var R=f[0],Z=f[f.length-1];for(B=0;B<f.length;B+=1)It(f[B],W,r);for(B=0;B<h.length;B+=1)u.delete(h[B]);De(e,R.prev,Z.next),De(e,l,R),De(e,Z,W),o=W,l=Z,b-=1,f=[],h=[]}else u.delete(d),It(d,o,r),De(e,d.prev,d.next),De(e,d,l===null?e.effect.first:l.next),De(e,l,d),l=d;continue}for(f=[],h=[];o!==null&&o!==d;)(u??=new Set).add(o),h.push(o),o=o.next;if(o===null)continue}d.f&Ue||f.push(d),l=d,o=d.next}if(e.outrogroups!==null){for(const j of e.outrogroups)j.pending.size===0&&(Gr(hr(j.done)),e.outrogroups?.delete(j));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||u!==void 0){var L=[];if(u!==void 0)for(d of u)d.f&he||L.push(d);for(;o!==null;)!(o.f&he)&&o!==e.fallback&&L.push(o),o=o.next;var k=L.length;if(k>0){var ne=null;Ea(e,L,ne)}}}function wa(e,t,r,n,i,s,a,o){var u=a&ws?a&Ss?st(r):on(r,!1,!1):null,l=a&Ts?st(i):null;return{v:u,i:l,e:pe(()=>(s(t,u??r,l??i,o),()=>{e.delete(n)}))}}function It(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&!(t.f&Ue)?t.nodes.start:r;n!==null;){var a=xe(n);if(s.before(n),n===i)return;n=a}}function De(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function Ta(e,t,r=!1,n=!1,i=!1){var s=e,a="";ir(()=>{var o=P;if(a===(a=t()??"")){$&&gt();return}if(o.nodes!==null&&(xi(o.nodes.start,o.nodes.end),o.nodes=null),a!==""){if($){M.data;for(var u=gt(),l=u;u!==null&&(u.nodeType!==ot||u.data!=="");)l=u,u=xe(u);if(u===null)throw jt(),nt;Ve(M,l),s=ue(u);return}var f=a+"";r?f=`<svg>${f}</svg>`:n&&(f=`<math>${f}</math>`);var h=Ci(f);if((r||n)&&(h=Se(h)),Ve(Se(h),h.lastChild),r||n)for(;Se(h);)s.before(Se(h));else s.before(h)}})}function ki(e,t){ln(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function Sa(e,t,r){ln(()=>{var n=br(()=>t(e,r?.())||{});if(r&&n?.update){var i=!1,s={};gr(()=>{var a=r();va(a),i&&nn(s,a)&&(s=a,n.update(a))}),i=!0}if(n?.destroy)return()=>n.destroy()})}const Sn=[...`
3
+ \r\f \v\uFEFF`];function Aa(e,t,r){var n=e==null?"":""+e;if(r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,a=0;(a=n.indexOf(i,a))>=0;){var o=a+s;(a===0||Sn.includes(n[a-1]))&&(o===n.length||Sn.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function ji(e,t,r,n,i,s){var a=e.__className;if($||a!==r||a===void 0){var o=Aa(r,n,s);(!$||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=r}else if(s&&i!==s)for(var u in s){var l=!!s[u];(i==null||l!==!!i[u])&&e.classList.toggle(u,l)}return s}const Ha=Symbol("is custom element"),Oa=Symbol("is html");function Ma(e,t,r,n){var i=Pa(e);$&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Is]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Na(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Pa(e){return e.__attributes??={[Ha]:e.nodeName.includes("-"),[Oa]:e.namespaceURI===Os}}var An=new Map;function Na(e){var t=e.getAttribute("is")||e.nodeName,r=An.get(t);if(r)return r;An.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=jn(i);for(var a in n)n[a].set&&r.push(a);i=Kr(i)}return r}function Hn(e,t){return e===t||e?.[_t]===t}function $a(e={},t,r,n){return ln(()=>{var i,s;return gr(()=>{i=s,s=[],br(()=>{e!==r(...s)&&(t(e,...s),i&&Hn(r(...i),e)&&t(null,...i))})}),()=>{vr(()=>{s&&Hn(r(...s),e)&&t(null,...s)})}}),e}function cn(e,t,r){if(e==null)return t(void 0),r&&r(void 0),Ge;const n=br(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const ft=[];function Ia(e,t){return{subscribe:yr(e,t).subscribe}}function yr(e,t=Ge){let r=null;const n=new Set;function i(o){if(nn(e,o)&&(e=o,r)){const u=!ft.length;for(const l of n)l[1](),ft.push(l,e);if(u){for(let l=0;l<ft.length;l+=2)ft[l][0](ft[l+1]);ft.length=0}}}function s(o){i(o(e))}function a(o,u=Ge){const l=[o,u];return n.add(l),n.size===1&&(r=t(i,s)||Ge),o(e),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:a}}function At(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 s=t.length<2;return Ia(r,(a,o)=>{let u=!1;const l=[];let f=0,h=Ge;const c=()=>{if(f)return;h();const d=t(n?l[0]:l,a,o);s?a(d):h=typeof d=="function"?d:Ge},p=i.map((d,b)=>cn(d,N=>{l[b]=N,f&=~(1<<b),u&&c()},()=>{f|=1<<b}));return u=!0,c(),function(){Vn(p),h(),u=!1}})}function La(e){let t;return cn(e,r=>t=r)(),t}let kr=Symbol();function Vi(e,t,r){const n=r[t]??={store:null,source:on(void 0),unsubscribe:Ge};if(n.store!==e&&!(kr in r))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=Ge;else{var i=!0;n.unsubscribe=cn(e,s=>{i?n.source.v=s:X(n.source,s)}),i=!1}return e&&kr in r?La(e):E(n.source)}function Xi(){const e={};function t(){gi(()=>{for(var r in e)e[r].unsubscribe();Rt(e,kr,{enumerable:!1,value:!0})})}return[e,t]}function ge(e,t,r,n){var i=n,s=!0,a=()=>(s&&(s=!1,i=n),i),o;o=e[t],o===void 0&&n!==void 0&&(o=a());var u;u=()=>{var c=e[t];return c===void 0?a():(s=!0,c)};var l=!1,f=mr(()=>(l=!1,u())),h=P;return function(c,p){if(arguments.length>0){const d=p?E(f):c;return X(f,d),l=!0,i!==void 0&&(i=d),c}return Xe&&l||h.f&Me?f.v:E(f)}}function Ba(e){return new Ca(e)}class Ca{#e;#t;constructor(t){var r=new Map,n=(s,a)=>{var o=on(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return E(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===$s?!0:(E(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return X(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#t=(t.hydrate?ga:Di)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&fe(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||Rt(this,s,{get(){return this.#t[s]},set(a){this.#t[s]=a},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{ba(this.#t)}}$set(t){this.#t.$set(t)}$on(t,r){this.#e[t]=this.#e[t]||[];const n=(...i)=>r.call(this,...i);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let Wi;typeof HTMLElement=="function"&&(Wi=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return s=>{const a=document.createElement("slot");i!=="default"&&(a.name=i),Je(s,a)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=Ra(this);for(const i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(const i of this.attributes){const s=this.$$g_p(i.name);s in this.$$d||(this.$$d[s]=Jt(s,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=Ba({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ua(()=>{gr(()=>{this.$$r=!0;for(const i of er(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const s=Jt(i,this.$$d[i],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,s)}this.$$r=!1})});for(const i in this.$$l)for(const s of this.$$l[i]){const a=this.$$c.$on(i,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Jt(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return er(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Jt(e,t,r,n){const i=r[e]?.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;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 Ra(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function dn(e,t,r,n,i,s){let a=class extends Wi{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return er(t).map(o=>(t[o].attribute||o).toLowerCase())}};return er(t).forEach(o=>{Rt(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(u){u=Jt(o,u,t),this.$$d[o]=u;var l=this.$$c;if(l){var f=vt(l,o)?.get;f?l[o]=u:l.$set({[o]:u})}}})}),n.forEach(o=>{Rt(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}class Da extends Error{constructor(t,r){super(r),this.code=t,this.name="ElevateApiError"}}const Ua=async e=>{const t=new URL(`${e.apiEndpoint}/elevate/playerInfo?language=${e.locale??""}`),r=new Headers({"Content-Type":"application/json"});e.userSession&&r.append("X-SessionId",e.userSession);const i=await(await fetch(t.href,{method:"GET",headers:r})).json();if(!i.success)throw new Da(i.errorCode,i.errorMessage);return i.data},Fa=async e=>{const t=new URL(`${e.apiEndpoint}/elevate/levels?language=${e.locale??""}`);return(await(await fetch(t.href,{method:"GET"})).json()).data},Ga=10,ka=12,ja=(e,t)=>{const r=[...e].sort((i,s)=>i.firstEntryPoints>s.firstEntryPoints?1:-1);let n=0;return r.forEach((i,s)=>{t>i.firstEntryPoints&&(n=s)}),n};var Va=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wa={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Va,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",a="second",o="minute",u="hour",l="day",f="week",h="month",c="quarter",p="year",d="date",b="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,W=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(x){var m=["th","st","nd","rd"],v=x%100;return"["+x+(m[(v-20)%10]||m[v]||m[0])+"]"}},R=function(x,m,v){var g=String(x);return!g||g.length>=m?x:""+Array(m+1-g.length).join(v)+x},Z={s:R,z:function(x){var m=-x.utcOffset(),v=Math.abs(m),g=Math.floor(v/60),_=v%60;return(m<=0?"+":"-")+R(g,2,"0")+":"+R(_,2,"0")},m:function x(m,v){if(m.date()<v.date())return-x(v,m);var g=12*(v.year()-m.year())+(v.month()-m.month()),_=m.clone().add(g,h),w=v-_<0,T=m.clone().add(g+(w?-1:1),h);return+(-(g+(v-_)/(w?_-T:T-_))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:h,y:p,w:f,d:l,D:d,h:u,m:o,s:a,ms:s,Q:c}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},L="en",k={};k[L]=B;var ne="$isDayjsObject",j=function(x){return x instanceof ie||!(!x||!x[ne])},Be=function x(m,v,g){var _;if(!m)return L;if(typeof m=="string"){var w=m.toLowerCase();k[w]&&(_=w),v&&(k[w]=v,_=w);var T=m.split("-");if(!_&&T.length>1)return x(T[0])}else{var I=m.name;k[I]=m,_=I}return!g&&_&&(L=_),_||!g&&L},y=function(x,m){if(j(x))return x.clone();var v=typeof m=="object"?m:{};return v.date=x,v.args=arguments,new ie(v)},S=Z;S.l=Be,S.i=j,S.w=function(x,m){return y(x,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var ie=function(){function x(v){this.$L=Be(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[ne]=!0}var m=x.prototype;return m.parse=function(v){this.$d=function(g){var _=g.date,w=g.utc;if(_===null)return new Date(NaN);if(S.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var T=_.match(N);if(T){var I=T[2]-1||0,F=(T[7]||"0").substring(0,3);return w?new Date(Date.UTC(T[1],I,T[3]||1,T[4]||0,T[5]||0,T[6]||0,F)):new Date(T[1],I,T[3]||1,T[4]||0,T[5]||0,T[6]||0,F)}}return new Date(_)}(v),this.init()},m.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return this.$d.toString()!==b},m.isSame=function(v,g){var _=y(v);return this.startOf(g)<=_&&_<=this.endOf(g)},m.isAfter=function(v,g){return y(v)<this.startOf(g)},m.isBefore=function(v,g){return this.endOf(g)<y(v)},m.$g=function(v,g,_){return S.u(v)?this[g]:this.set(_,v)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(v,g){var _=this,w=!!S.u(g)||g,T=S.p(v),I=function(qe,se){var Re=S.w(_.$u?Date.UTC(_.$y,se,qe):new Date(_.$y,se,qe),_);return w?Re:Re.endOf(l)},F=function(qe,se){return S.w(_.toDate()[qe].apply(_.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(se)),_)},C=this.$W,D=this.$M,K=this.$D,Ce="set"+(this.$u?"UTC":"");switch(T){case p:return w?I(1,0):I(31,11);case h:return w?I(1,D):I(0,D+1);case f:var Ye=this.$locale().weekStart||0,Pt=(C<Ye?C+7:C)-Ye;return I(w?K-Pt:K+(6-Pt),D);case l:case d:return F(Ce+"Hours",0);case u:return F(Ce+"Minutes",1);case o:return F(Ce+"Seconds",2);case a:return F(Ce+"Milliseconds",3);default:return this.clone()}},m.endOf=function(v){return this.startOf(v,!1)},m.$set=function(v,g){var _,w=S.p(v),T="set"+(this.$u?"UTC":""),I=(_={},_[l]=T+"Date",_[d]=T+"Date",_[h]=T+"Month",_[p]=T+"FullYear",_[u]=T+"Hours",_[o]=T+"Minutes",_[a]=T+"Seconds",_[s]=T+"Milliseconds",_)[w],F=w===l?this.$D+(g-this.$W):g;if(w===h||w===p){var C=this.clone().set(d,1);C.$d[I](F),C.init(),this.$d=C.set(d,Math.min(this.$D,C.daysInMonth())).$d}else I&&this.$d[I](F);return this.init(),this},m.set=function(v,g){return this.clone().$set(v,g)},m.get=function(v){return this[S.p(v)]()},m.add=function(v,g){var _,w=this;v=Number(v);var T=S.p(g),I=function(D){var K=y(w);return S.w(K.date(K.date()+Math.round(D*v)),w)};if(T===h)return this.set(h,this.$M+v);if(T===p)return this.set(p,this.$y+v);if(T===l)return I(1);if(T===f)return I(7);var F=(_={},_[o]=n,_[u]=i,_[a]=r,_)[T]||1,C=this.$d.getTime()+v*F;return S.w(C,this)},m.subtract=function(v,g){return this.add(-1*v,g)},m.format=function(v){var g=this,_=this.$locale();if(!this.isValid())return _.invalidDate||b;var w=v||"YYYY-MM-DDTHH:mm:ssZ",T=S.z(this),I=this.$H,F=this.$m,C=this.$M,D=_.weekdays,K=_.months,Ce=_.meridiem,Ye=function(se,Re,Nt,Wt){return se&&(se[Re]||se(g,w))||Nt[Re].slice(0,Wt)},Pt=function(se){return S.s(I%12||12,se,"0")},qe=Ce||function(se,Re,Nt){var Wt=se<12?"AM":"PM";return Nt?Wt.toLowerCase():Wt};return w.replace(W,function(se,Re){return Re||function(Nt){switch(Nt){case"YY":return String(g.$y).slice(-2);case"YYYY":return S.s(g.$y,4,"0");case"M":return C+1;case"MM":return S.s(C+1,2,"0");case"MMM":return Ye(_.monthsShort,C,K,3);case"MMMM":return Ye(K,C);case"D":return g.$D;case"DD":return S.s(g.$D,2,"0");case"d":return String(g.$W);case"dd":return Ye(_.weekdaysMin,g.$W,D,2);case"ddd":return Ye(_.weekdaysShort,g.$W,D,3);case"dddd":return D[g.$W];case"H":return String(I);case"HH":return S.s(I,2,"0");case"h":return Pt(1);case"hh":return Pt(2);case"a":return qe(I,F,!0);case"A":return qe(I,F,!1);case"m":return String(F);case"mm":return S.s(F,2,"0");case"s":return String(g.$s);case"ss":return S.s(g.$s,2,"0");case"SSS":return S.s(g.$ms,3,"0");case"Z":return T}return null}(se)||T.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(v,g,_){var w,T=this,I=S.p(g),F=y(v),C=(F.utcOffset()-this.utcOffset())*n,D=this-F,K=function(){return S.m(T,F)};switch(I){case p:w=K()/12;break;case h:w=K();break;case c:w=K()/3;break;case f:w=(D-C)/6048e5;break;case l:w=(D-C)/864e5;break;case u:w=D/i;break;case o:w=D/n;break;case a:w=D/r;break;default:w=D}return _?w:S.a(w)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return k[this.$L]},m.locale=function(v,g){if(!v)return this.$L;var _=this.clone(),w=Be(v,g,!0);return w&&(_.$L=w),_},m.clone=function(){return S.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},x}(),Mt=ie.prototype;return y.prototype=Mt,[["$ms",s],["$s",a],["$m",o],["$H",u],["$W",l],["$M",h],["$y",p],["$D",d]].forEach(function(x){Mt[x[1]]=function(m){return this.$g(m,x[0],x[1])}}),y.extend=function(x,m){return x.$i||(x(m,ie,y),x.$i=!0),y},y.locale=Be,y.isDayjs=j,y.unix=function(x){return y(1e3*x)},y.en=k[L],y.Ls=k,y.p={},y})})(Wa);const za=e=>{window.postMessage({type:"Loyalty:LoyaltyLevelClicked",tierName:e},window.location.href)};var Ya=function(t){return qa(t)&&!Za(t)};function qa(e){return!!e&&typeof e=="object"}function Za(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Ka(e)}var Ja=typeof Symbol=="function"&&Symbol.for,Qa=Ja?Symbol.for("react.element"):60103;function Ka(e){return e.$$typeof===Qa}function eo(e){return Array.isArray(e)?[]:{}}function Ft(e,t){return t.clone!==!1&&t.isMergeableObject(e)?xt(eo(e),e,t):e}function to(e,t,r){return e.concat(t).map(function(n){return Ft(n,r)})}function ro(e,t){if(!t.customMerge)return xt;var r=t.customMerge(e);return typeof r=="function"?r:xt}function no(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function On(e){return Object.keys(e).concat(no(e))}function zi(e,t){try{return t in e}catch{return!1}}function io(e,t){return zi(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function so(e,t,r){var n={};return r.isMergeableObject(e)&&On(e).forEach(function(i){n[i]=Ft(e[i],r)}),On(t).forEach(function(i){io(e,i)||(zi(e,i)&&r.isMergeableObject(t[i])?n[i]=ro(i,r)(e[i],t[i],r):n[i]=Ft(t[i],r))}),n}function xt(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||to,r.isMergeableObject=r.isMergeableObject||Ya,r.cloneUnlessOtherwiseSpecified=Ft;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):so(e,t,r):Ft(t,r)}xt.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return xt(n,i,r)},{})};var ao=xt,oo=ao;const uo=Xa(oo);var jr=function(e,t){return jr=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])},jr(e,t)};function Er(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");jr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Te=function(){return Te=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Te.apply(this,arguments)};function lo(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 Sr(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}function Ar(e,t){var r=t&&t.cache?t.cache:mo,n=t&&t.serializer?t.serializer:vo,i=t&&t.strategy?t.strategy:co;return i(e,{cache:r,serializer:n})}function fo(e){return e==null||typeof e=="number"||typeof e=="boolean"}function ho(e,t,r,n){var i=fo(n)?n:r(n),s=t.get(i);return typeof s>"u"&&(s=e.call(this,n),t.set(i,s)),s}function Yi(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),s=t.get(i);return typeof s>"u"&&(s=e.apply(this,n),t.set(i,s)),s}function qi(e,t,r,n,i){return r.bind(t,e,n,i)}function co(e,t){var r=e.length===1?ho:Yi;return qi(e,this,r,t.cache.create(),t.serializer)}function po(e,t){return qi(e,this,Yi,t.cache.create(),t.serializer)}var vo=function(){return JSON.stringify(arguments)},_o=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}(),mo={create:function(){return new _o}},Hr={variadic:po},or=function(){return or=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},or.apply(this,arguments)};var A;(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"})(A||(A={}));var U;(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"})(U||(U={}));var wt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(wt||(wt={}));function Mn(e){return e.type===U.literal}function go(e){return e.type===U.argument}function Zi(e){return e.type===U.number}function Ji(e){return e.type===U.date}function Qi(e){return e.type===U.time}function Ki(e){return e.type===U.select}function es(e){return e.type===U.plural}function bo(e){return e.type===U.pound}function ts(e){return e.type===U.tag}function rs(e){return!!(e&&typeof e=="object"&&e.type===wt.number)}function Vr(e){return!!(e&&typeof e=="object"&&e.type===wt.dateTime)}var ns=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,yo=/(?:[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 Eo(e){var t={};return e.replace(yo,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 V=function(){return V=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},V.apply(this,arguments)};var xo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function wo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(xo).filter(function(c){return c.length>0}),r=[],n=0,i=t;n<i.length;n++){var s=i[n],a=s.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var o=a[0],u=a.slice(1),l=0,f=u;l<f.length;l++){var h=f[l];if(h.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:u})}return r}function To(e){return e.replace(/^(.*?)-/,"")}var Pn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,is=/^(@+)?(\+|#+)?[rs]?$/g,So=/(\*)(0+)|(#+)(0+)|(0+)/g,ss=/^(0+)$/;function Nn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(is,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 as(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 Ao(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)),!ss.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function $n(e){var t={},r=as(e);return r||t}function Ho(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=To(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=V(V(V({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return V(V({},u),$n(l))},{}));continue;case"engineering":t=V(V(V({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return V(V({},u),$n(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(So,function(u,l,f,h,c,p){if(l)t.minimumIntegerDigits=f.length;else{if(h&&c)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(ss.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Pn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Pn,function(u,l,f,h,c,p){return f==="*"?t.minimumFractionDigits=l.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:c&&p?(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length+p.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var s=i.options[0];s==="w"?t=V(V({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=V(V({},t),Nn(s)));continue}if(is.test(i.stem)){t=V(V({},t),Nn(i.stem));continue}var a=as(i.stem);a&&(t=V(V({},t),a));var o=Ao(i.stem);o&&(t=V(V({},t),o))}return t}var qt={"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 Oo(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var s=0;n+1<e.length&&e.charAt(n+1)===i;)s++,n++;var a=1+(s&1),o=s<2?1:3+(s>>1),u="a",l=Mo(t);for((l=="H"||l=="k")&&(o=0);o-- >0;)r+=u;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function Mo(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=qt[n||""]||qt[r||""]||qt["".concat(r,"-001")]||qt["001"];return i[0]}var Or,Po=new RegExp("^".concat(ns.source,"*")),No=new RegExp("".concat(ns.source,"*$"));function O(e,t){return{start:e,end:t}}var $o=!!String.prototype.startsWith&&"_a".startsWith("a",1),Io=!!String.fromCodePoint,Lo=!!Object.fromEntries,Bo=!!String.prototype.codePointAt,Co=!!String.prototype.trimStart,Ro=!!String.prototype.trimEnd,Do=!!Number.isSafeInteger,Uo=Do?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Xr=!0;try{var Fo=us("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Xr=((Or=Fo.exec("a"))===null||Or===void 0?void 0:Or[0])==="a"}catch{Xr=!1}var In=$o?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Wr=Io?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,s=0,a;i>s;){if(a=t[s++],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},Ln=Lo?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var s=i[n],a=s[0],o=s[1];r[a]=o}return r},os=Bo?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),s;return i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?i:(i-55296<<10)+(s-56320)+65536}},Go=Co?function(t){return t.trimStart()}:function(t){return t.replace(Po,"")},ko=Ro?function(t){return t.trimEnd()}:function(t){return t.replace(No,"")};function us(e,t){return new RegExp(e,t)}var zr;if(Xr){var Bn=us("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");zr=function(t,r){var n;Bn.lastIndex=r;var i=Bn.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else zr=function(t,r){for(var n=[];;){var i=os(t,r);if(i===void 0||ls(i)||Wo(i))break;n.push(i),r+=i>=65536?2:1}return Wr.apply(void 0,n)};var jo=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 s=this.char();if(s===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(s===125&&t>0)break;if(s===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:U.pound,location:O(o,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(A.UNMATCHED_CLOSING_TAG,O(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&Yr(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:U.literal,value:"<".concat(i,"/>"),location:O(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,r,!0);if(s.err)return s;var a=s.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Yr(this.char()))return this.error(A.INVALID_TAG,O(o,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(A.UNMATCHED_CLOSING_TAG,O(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:U.tag,value:i,children:a,location:O(n,this.clonePosition())},err:null}:this.error(A.INVALID_TAG,O(o,this.clonePosition())))}else return this.error(A.UNCLOSED_TAG,O(n,this.clonePosition()))}else return this.error(A.INVALID_TAG,O(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Xo(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var s=this.tryParseQuote(r);if(s){i+=s;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=O(n,this.clonePosition());return{val:{type:U.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Vo(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 Wr.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(),Wr(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(A.EXPECT_ARGUMENT_CLOSING_BRACE,O(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(A.EMPTY_ARGUMENT,O(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(A.MALFORMED_ARGUMENT,O(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(A.EXPECT_ARGUMENT_CLOSING_BRACE,O(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:U.argument,value:i,location:O(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(A.EXPECT_ARGUMENT_CLOSING_BRACE,O(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(A.MALFORMED_ARGUMENT,O(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=zr(this.message,r),i=r+n.length;this.bumpTo(i);var s=this.clonePosition(),a=O(t,s);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var s,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(A.EXPECT_ARGUMENT_TYPE,O(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var c=ko(h.val);if(c.length===0)return this.error(A.EXPECT_ARGUMENT_STYLE,O(this.clonePosition(),this.clonePosition()));var p=O(f,this.clonePosition());l={style:c,styleLocation:p}}var d=this.tryParseArgumentClose(i);if(d.err)return d;var b=O(i,this.clonePosition());if(l&&In(l?.style,"::",0)){var N=Go(l.style.slice(2));if(o==="number"){var h=this.parseNumberSkeletonFromString(N,l.styleLocation);return h.err?h:{val:{type:U.number,value:n,location:b,style:h.val},err:null}}else{if(N.length===0)return this.error(A.EXPECT_DATE_TIME_SKELETON,b);var W=N;this.locale&&(W=Oo(N,this.locale));var c={type:wt.dateTime,pattern:W,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Eo(W):{}},B=o==="date"?U.date:U.time;return{val:{type:B,value:n,location:b,style:c},err:null}}}return{val:{type:o==="number"?U.number:o==="date"?U.date:U.time,value:n,location:b,style:(s=l?.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var R=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(A.EXPECT_SELECT_ARGUMENT_OPTIONS,O(R,or({},R)));this.bumpSpace();var Z=this.parseIdentifierIfPossible(),L=0;if(o!=="select"&&Z.value==="offset"){if(!this.bumpIf(":"))return this.error(A.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,O(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(A.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,A.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),Z=this.parseIdentifierIfPossible(),L=h.val}var k=this.tryParsePluralOrSelectOptions(t,o,r,Z);if(k.err)return k;var d=this.tryParseArgumentClose(i);if(d.err)return d;var ne=O(i,this.clonePosition());return o==="select"?{val:{type:U.select,value:n,options:Ln(k.val),location:ne},err:null}:{val:{type:U.plural,value:n,options:Ln(k.val),offset:L,pluralType:o==="plural"?"cardinal":"ordinal",location:ne},err:null}}default:return this.error(A.INVALID_ARGUMENT_TYPE,O(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(A.EXPECT_ARGUMENT_CLOSING_BRACE,O(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(A.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,O(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=wo(t)}catch{return this.error(A.INVALID_NUMBER_SKELETON,r)}return{val:{type:wt.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?Ho(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var s,a=!1,o=[],u=new Set,l=i.value,f=i.location;;){if(l.length===0){var h=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(A.EXPECT_PLURAL_ARGUMENT_SELECTOR,A.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;f=O(h,this.clonePosition()),l=this.message.slice(h.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?A.DUPLICATE_SELECT_ARGUMENT_SELECTOR:A.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);l==="other"&&(a=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?A.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:A.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,O(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,r,n);if(d.err)return d;var b=this.tryParseArgumentClose(p);if(b.err)return b;o.push([l,{value:d.val,location:O(p,this.clonePosition())}]),u.add(l),this.bumpSpace(),s=this.parseIdentifierIfPossible(),l=s.value,f=s.location}return o.length===0?this.error(r==="select"?A.EXPECT_SELECT_ARGUMENT_SELECTOR:A.EXPECT_PLURAL_ARGUMENT_SELECTOR,O(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(A.MISSING_OTHER_CLAUSE,O(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var s=!1,a=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)s=!0,a=a*10+(o-48),this.bump();else break}var u=O(i,this.clonePosition());return s?(a*=n,Uo(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=os(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(In(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()&&ls(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Yr(e){return e>=97&&e<=122||e>=65&&e<=90}function Vo(e){return Yr(e)||e===47}function Xo(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 ls(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Wo(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 qr(e){e.forEach(function(t){if(delete t.location,Ki(t)||es(t))for(var r in t.options)delete t.options[r].location,qr(t.options[r].value);else Zi(t)&&rs(t.style)||(Ji(t)||Qi(t))&&Vr(t.style)?delete t.style.location:ts(t)&&qr(t.children)})}function zo(e,t){t===void 0&&(t={}),t=or({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new jo(e,t).parse();if(r.err){var n=SyntaxError(A[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||qr(r.val),r.val}var Tt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Tt||(Tt={}));var xr=function(e){Er(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.code=n,s.originalMessage=i,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Cn=function(e){Er(t,e);function t(r,n,i,s){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Tt.INVALID_VALUE,s)||this}return t}(xr),Yo=function(e){Er(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Tt.INVALID_VALUE,i)||this}return t}(xr),qo=function(e){Er(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,'"'),Tt.MISSING_VALUE,n)||this}return t}(xr),ee;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ee||(ee={}));function Zo(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==ee.literal||r.type!==ee.literal?t.push(r):n.value+=r.value,t},[])}function Jo(e){return typeof e=="function"}function Qt(e,t,r,n,i,s,a){if(e.length===1&&Mn(e[0]))return[{type:ee.literal,value:e[0].value}];for(var o=[],u=0,l=e;u<l.length;u++){var f=l[u];if(Mn(f)){o.push({type:ee.literal,value:f.value});continue}if(bo(f)){typeof s=="number"&&o.push({type:ee.literal,value:r.getNumberFormat(t).format(s)});continue}var h=f.value;if(!(i&&h in i))throw new qo(h,a);var c=i[h];if(go(f)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),o.push({type:typeof c=="string"?ee.literal:ee.object,value:c});continue}if(Ji(f)){var p=typeof f.style=="string"?n.date[f.style]:Vr(f.style)?f.style.parsedOptions:void 0;o.push({type:ee.literal,value:r.getDateTimeFormat(t,p).format(c)});continue}if(Qi(f)){var p=typeof f.style=="string"?n.time[f.style]:Vr(f.style)?f.style.parsedOptions:n.time.medium;o.push({type:ee.literal,value:r.getDateTimeFormat(t,p).format(c)});continue}if(Zi(f)){var p=typeof f.style=="string"?n.number[f.style]:rs(f.style)?f.style.parsedOptions:void 0;p&&p.scale&&(c=c*(p.scale||1)),o.push({type:ee.literal,value:r.getNumberFormat(t,p).format(c)});continue}if(ts(f)){var d=f.children,b=f.value,N=i[b];if(!Jo(N))throw new Yo(b,"function",a);var W=Qt(d,t,r,n,i,s),B=N(W.map(function(L){return L.value}));Array.isArray(B)||(B=[B]),o.push.apply(o,B.map(function(L){return{type:typeof L=="string"?ee.literal:ee.object,value:L}}))}if(Ki(f)){var R=f.options[c]||f.options.other;if(!R)throw new Cn(f.value,c,Object.keys(f.options),a);o.push.apply(o,Qt(R.value,t,r,n,i));continue}if(es(f)){var R=f.options["=".concat(c)];if(!R){if(!Intl.PluralRules)throw new xr(`Intl.PluralRules is not available in this environment.
4
+ Try polyfilling it using "@formatjs/intl-pluralrules"
5
+ `,Tt.MISSING_INTL_API,a);var Z=r.getPluralRules(t,{type:f.pluralType}).select(c-(f.offset||0));R=f.options[Z]||f.options.other}if(!R)throw new Cn(f.value,c,Object.keys(f.options),a);o.push.apply(o,Qt(R.value,t,r,n,i,c-(f.offset||0)));continue}}return Zo(o)}function Qo(e,t){return t?Te(Te(Te({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=Te(Te({},e[n]),t[n]||{}),r},{})):e}function Ko(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Qo(e[n],t[n]),r},Te({},e)):e}function Mr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function eu(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ar(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,Sr([void 0],r,!1)))},{cache:Mr(e.number),strategy:Hr.variadic}),getDateTimeFormat:Ar(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,Sr([void 0],r,!1)))},{cache:Mr(e.dateTime),strategy:Hr.variadic}),getPluralRules:Ar(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,Sr([void 0],r,!1)))},{cache:Mr(e.pluralRules),strategy:Hr.variadic})}}var tu=function(){function e(t,r,n,i){r===void 0&&(r=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=s.formatToParts(u);if(l.length===1)return l[0].value;var f=l.reduce(function(h,c){return!h.length||c.type!==ee.literal||typeof h[h.length-1]!="string"?h.push(c.value):h[h.length-1]+=c.value,h},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Qt(s.ast,s.locales,s.formatters,s.formats,u,void 0,s.message)},this.resolvedOptions=function(){var u;return{locale:((u=s.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.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 o=lo(a,["formatters"]);this.ast=e.__parse(t,Te(Te({},o),{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=Ko(e.formats,n),this.formatters=i&&i.formatters||eu(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>"u")){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=zo,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 ru(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 s=r.slice(i,r.length).join(".");if(s in n){n=n[s];break}}n=n[r[i]]}else n=void 0;return n}const Fe={},nu=(e,t,r)=>r&&(t in Fe||(Fe[t]={}),e in Fe[t]||(Fe[t][e]=r),r),fs=(e,t)=>{if(t==null)return;if(t in Fe&&e in Fe[t])return Fe[t][e];const r=wr(t);for(let n=0;n<r.length;n++){const i=r[n],s=su(i,e);if(s)return nu(e,t,s)}};let pn;const Ht=yr({});function iu(e){return pn[e]||null}function hs(e){return e in pn}function su(e,t){if(!hs(e))return null;const r=iu(e);return ru(r,t)}function au(e){if(e==null)return;const t=wr(e);for(let r=0;r<t.length;r++){const n=t[r];if(hs(n))return n}}function cs(e,...t){delete Fe[e],Ht.update(r=>(r[e]=uo.all([r[e]||{},...t]),r))}At([Ht],([e])=>Object.keys(e));Ht.subscribe(e=>pn=e);const Kt={};function ou(e,t){Kt[e].delete(t),Kt[e].size===0&&delete Kt[e]}function ds(e){return Kt[e]}function uu(e){return wr(e).map(t=>{const r=ds(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function Zr(e){return e==null?!1:wr(e).some(t=>{var r;return(r=ds(t))==null?void 0:r.size})}function lu(e,t){return Promise.all(t.map(n=>(ou(e,n),n().then(i=>i.default||i)))).then(n=>cs(e,...n))}const $t={};function ps(e){if(!Zr(e))return e in $t?$t[e]:Promise.resolve();const t=uu(e);return $t[e]=Promise.all(t.map(([r,n])=>lu(r,n))).then(()=>{if(Zr(e))return ps(e);delete $t[e]}),$t[e]}const fu={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"}}},hu={fallbackLocale:null,loadingDelay:200,formats:fu,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},cu=hu;function St(){return cu}const Pr=yr(!1);var du=Object.defineProperty,pu=Object.defineProperties,vu=Object.getOwnPropertyDescriptors,Rn=Object.getOwnPropertySymbols,_u=Object.prototype.hasOwnProperty,mu=Object.prototype.propertyIsEnumerable,Dn=(e,t,r)=>t in e?du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gu=(e,t)=>{for(var r in t||(t={}))_u.call(t,r)&&Dn(e,r,t[r]);if(Rn)for(var r of Rn(t))mu.call(t,r)&&Dn(e,r,t[r]);return e},bu=(e,t)=>pu(e,vu(t));let Jr;const ur=yr(null);function Un(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function wr(e,t=St().fallbackLocale){const r=Un(e);return t?[...new Set([...r,...Un(t)])]:r}function ut(){return Jr??void 0}ur.subscribe(e=>{Jr=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const yu=e=>{if(e&&au(e)&&Zr(e)){const{loadingDelay:t}=St();let r;return typeof window<"u"&&ut()!=null&&t?r=window.setTimeout(()=>Pr.set(!0),t):Pr.set(!0),ps(e).then(()=>{ur.set(e)}).finally(()=>{clearTimeout(r),Pr.set(!1)})}return ur.set(e)},We=bu(gu({},ur),{set:yu}),Tr=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var Eu=Object.defineProperty,lr=Object.getOwnPropertySymbols,vs=Object.prototype.hasOwnProperty,_s=Object.prototype.propertyIsEnumerable,Fn=(e,t,r)=>t in e?Eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vn=(e,t)=>{for(var r in t||(t={}))vs.call(t,r)&&Fn(e,r,t[r]);if(lr)for(var r of lr(t))_s.call(t,r)&&Fn(e,r,t[r]);return e},Ot=(e,t)=>{var r={};for(var n in e)vs.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lr)for(var n of lr(e))t.indexOf(n)<0&&_s.call(e,n)&&(r[n]=e[n]);return r};const Gt=(e,t)=>{const{formats:r}=St();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},xu=Tr(e=>{var t=e,{locale:r,format:n}=t,i=Ot(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Gt("number",n)),new Intl.NumberFormat(r,i)}),wu=Tr(e=>{var t=e,{locale:r,format:n}=t,i=Ot(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Gt("date",n):Object.keys(i).length===0&&(i=Gt("date","short")),new Intl.DateTimeFormat(r,i)}),Tu=Tr(e=>{var t=e,{locale:r,format:n}=t,i=Ot(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Gt("time",n):Object.keys(i).length===0&&(i=Gt("time","short")),new Intl.DateTimeFormat(r,i)}),Su=(e={})=>{var t=e,{locale:r=ut()}=t,n=Ot(t,["locale"]);return xu(vn({locale:r},n))},Au=(e={})=>{var t=e,{locale:r=ut()}=t,n=Ot(t,["locale"]);return wu(vn({locale:r},n))},Hu=(e={})=>{var t=e,{locale:r=ut()}=t,n=Ot(t,["locale"]);return Tu(vn({locale:r},n))},Ou=Tr((e,t=ut())=>new tu(e,t,St().formats,{ignoreTag:St().ignoreTag})),Mu=(e,t={})=>{var r,n,i,s;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:o,locale:u=ut(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=fs(e,u);if(!f)f=(s=(i=(n=(r=St()).handleMissingMessage)==null?void 0:n.call(r,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?s:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!o)return f;let h=f;try{h=Ou(f,u).format(o)}catch(c){c instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,c.message)}return h},Pu=(e,t)=>Hu(t).format(e),Nu=(e,t)=>Au(t).format(e),$u=(e,t)=>Su(t).format(e),Iu=(e,t=ut())=>fs(e,t),ms=At([We,Ht],()=>Mu);At([We],()=>Pu);At([We],()=>Nu);At([We],()=>$u);At([We,Ht],()=>Iu);function gs({withLocale:e,translations:t}){We.subscribe(r=>{r==null&&(Ht.set(t),We.set(e))})}function bs(e,t){cs(e,t)}function ys(e){We.set(e)}const Lu=e=>{let t=J(void 0),r=J(void 0),n=J(void 0),i=J(void 0),s=J(!1),a=J(void 0);const o=async()=>{const{apiEndpoint:u,userSession:l,locale:f,loadLevels:h,onLevelLoaded:c}=e();if(!(!u||!l)){X(s,!0),X(a,void 0);try{const p=[Ua({apiEndpoint:u,userSession:l,locale:f}).then(d=>{const b=d.level;b.name=b.presentation?.displayName||b.name,b.spendablePoints=d.spendableWallet?.total.points||0,X(t,b,!0),X(n,d.loyaltyWallet?.total,!0),X(i,d.spendableWallet?.total,!0),c?.({elevateLevel:b}),c?.({elevateLevelWalletTotal:d.spendableWallet?.total,loyaltyWalletTotal:d.loyaltyWallet?.total})})];h&&p.push(Fa({apiEndpoint:u,userSession:l,locale:f}).then(d=>{X(r,d,!0)})),await Promise.all(p),await pa(),E(r)&&E(t)&&c?.({calculatedLevelFlag:ja(E(r),E(t).loyaltyPoints??0)})}catch(p){X(a,p,!0),console.error("Failed to load elevate info:",p)}finally{X(s,!1)}}};return Dt(()=>{const{apiEndpoint:u,userSession:l,locale:f,loadLevels:h}=e();o()}),Dt(()=>{const u=()=>{o()};return window.addEventListener("redeemRewardButton",u),()=>window.removeEventListener("redeemRewardButton",u)}),{get playerElevateLevel(){return E(t)},get levels(){return E(r)},get loyaltyWalletTotal(){return E(n)},get spendableWalletTotal(){return E(i)},get loading(){return E(s)},get error(){return E(a)},reload:o}},Bu={en:{prev:"Previous",next:"Next"},tr:{prev:"Önceki",next:"Sonraki"},da:{prev:"Forrige",next:"Næste"},de:{prev:"Zurück",next:"Weiter"},nl:{prev:"Vorige",next:"Volgende"},fr:{prev:"Précédent",next:"Suivant"},hu:{prev:"Előző",next:"Következő"}},Ct=10,Cu=7,Ru=4;var Du=Xt('<span class="loyalty-pagination__ellipsis svelte-1op0ean" aria-hidden="true">...</span>'),Uu=Xt('<button type="button"> </button>'),Fu=Xt('<div class="loyalty-pagination__pages svelte-1op0ean"><button class="loyalty-pagination__btn loyalty-pagination__btn--prev svelte-1op0ean" type="button"> </button> <!> <button class="loyalty-pagination__btn loyalty-pagination__btn--next svelte-1op0ean" type="button"> </button></div>'),Gu=Xt('<div class="loyalty-pagination svelte-1op0ean"><!></div>');const ku={hash:"svelte-1op0ean",code:`
6
+ @layer loyalty-pagination-component {.loyalty-pagination.svelte-1op0ean {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;box-sizing:border-box;width:100%;}
7
+
8
+ @media (min-width: 768px) {.loyalty-pagination.svelte-1op0ean {width:auto;margin-left:auto;justify-content:flex-end;padding-right:10px;}.loyalty-pagination__pages.svelte-1op0ean {justify-content:flex-end;}
9
+ }.loyalty-pagination__pages.svelte-1op0ean {display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:flex-start;}.loyalty-pagination__ellipsis.svelte-1op0ean {display:inline-flex;align-items:center;justify-content:center;color:var(--text-default, #dfe3e8);font-size:13px;width:24px;}.loyalty-pagination__btn.svelte-1op0ean {min-width:30px;height:30px;padding:4px 8px;border:none;border-radius:4px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));color:var(--text-subtle, #dfe3e8);font-size:13px;font-weight:400;cursor:pointer;}.loyalty-pagination__btn--active.svelte-1op0ean {background:var(--accent, #ffcc00);color:var(--text-on-color, #261d00);}.loyalty-pagination__btn.svelte-1op0ean:disabled {cursor:default;color:var(--text-muted, rgba(251, 251, 251, 0.15));}.loyalty-pagination__btn--prev.svelte-1op0ean,
10
+ .loyalty-pagination__btn--next.svelte-1op0ean {width:95px;}
11
+
12
+ @media (max-width: 767px) {.loyalty-pagination__btn--prev.svelte-1op0ean,
13
+ .loyalty-pagination__btn--next.svelte-1op0ean {width:90px;}
14
+ }.loyalty-pagination__btn--prev.svelte-1op0ean:not(:disabled),
15
+ .loyalty-pagination__btn--next.svelte-1op0ean:not(:disabled) {color:var(--text-default, #dfe3e8);}
16
+ }`};function _n(e,t){dr(t,!0),ki(e,ku);const r=()=>Vi(ms,"$_",n),[n,i]=Xi(),s=ge(t,"offset",7,0),a=ge(t,"limit",7,Ct),o=ge(t,"total",7,0),u=ge(t,"onPageChange",7,y=>{}),l=ge(t,"locale",7,"en");gs({withLocale:l(),translations:{}}),Object.entries(Bu).forEach(([y,S])=>{bs(y,S)}),Dt(()=>{ys(l()??"en")});const f=Ze(()=>Number(s())||0),h=Ze(()=>Number(a())||Ct),c=Ze(()=>Number(o())||0),p=Ze(()=>Math.max(1,Math.ceil(E(c)/Math.max(1,E(h))))),d=Ze(()=>E(h)>0?Math.floor(E(f)/E(h)):0);let b=J(!1);Dt(()=>{const y=window.matchMedia("(max-width: 767px)"),S=ie=>{X(b,ie.matches,!0)};return X(b,y.matches,!0),y.addEventListener("change",S),()=>y.removeEventListener("change",S)});const N=(y,S,ie)=>y<=(ie?Ru:Cu)?Array.from({length:y},(v,g)=>g):S<=1||S>=y-2?[0,1,"ellipsis",y-2,y-1]:[0,"ellipsis",S,"ellipsis",y-1],W=Ze(()=>N(E(p),E(d),E(b))),B=y=>u()(y*E(h)),R=()=>u()(Math.max(0,E(d)-1)*E(h)),Z=()=>u()(Math.min(E(p)-1,E(d)+1)*E(h));var L={get offset(){return s()},set offset(y=0){s(y),fe()},get limit(){return a()},set limit(y=Ct){a(y),fe()},get total(){return o()},set total(y=0){o(y),fe()},get onPageChange(){return u()},set onPageChange(y=S=>{}){u(y),fe()},get locale(){return l()},set locale(y="en"){l(y),fe()}},k=Gu(),ne=ct(k);{var j=y=>{var S=Fu(),ie=ct(S);ie.__click=R;var Mt=ct(ie,!0);ht(ie);var x=Cr(ie,2);Gi(x,17,()=>E(W),Fi,(g,_)=>{var w=Ri(),T=di(w);{var I=C=>{var D=Du();Je(C,D)},F=C=>{var D=Uu();let K;D.__click=()=>B(E(_));var Ce=ct(D,!0);ht(D),ir(()=>{K=ji(D,1,"loyalty-pagination__btn svelte-1op0ean",null,K,{"loyalty-pagination__btn--active":E(_)===E(d)}),Zt(Ce,E(_)+1)}),Je(C,D)};Fr(T,C=>{E(_)==="ellipsis"?C(I):C(F,!1)})}Je(g,w)});var m=Cr(x,2);m.__click=Z;var v=ct(m,!0);ht(m),ht(S),ir((g,_)=>{ie.disabled=E(d)<=0,Zt(Mt,g),m.disabled=E(d)>=E(p)-1,Zt(v,_)},[()=>r()("prev"),()=>r()("next")]),Je(y,S)};Fr(ne,y=>{E(p)>1&&y(j)})}ht(k),Je(e,k);var Be=pr(L);return i(),Be}Bi(["click"]);dn(_n,{offset:{},limit:{},total:{},onPageChange:{},locale:{}},[],[],!0);function Es(e,t){dr(t,!0);let r=ge(t,"offset",7,0),n=ge(t,"limit",7,Ct),i=ge(t,"total",7,0),s=ge(t,"onPageChange"),a=ge(t,"locale",7,"en");var o={get offset(){return r()},set offset(u=0){r(u),fe()},get limit(){return n()},set limit(u=Ct){n(u),fe()},get total(){return i()},set total(u=0){i(u),fe()},get onPageChange(){return s()},set onPageChange(u){s(u),fe()},get locale(){return a()},set locale(u="en"){a(u),fe()}};return _n(e,{get offset(){return r()},get limit(){return n()},get total(){return i()},get onPageChange(){return s()},get locale(){return a()}}),pr(o)}customElements.define("loyalty-pagination",dn(Es,{offset:{},limit:{},total:{},onPageChange:{},locale:{}},[],[],!1));const ju=Object.freeze(Object.defineProperty({__proto__:null,default:Es},Symbol.toStringTag,{value:"Module"}));exports.$format=ms;exports.ITEMS_LIMIT_DEFAULT=ka;exports.LoyaltyPagination=_n;exports.LoyaltyPagination_ce=ju;exports.MOBILE_LOAD_ITEMS=Ga;exports.action=Sa;exports.addNewMessages=bs;exports.append=Je;exports.append_styles=ki;exports.bind_this=$a;exports.child=ct;exports.comment=Ri;exports.createElevateData=Lu;exports.create_custom_element=dn;exports.delegate=Bi;exports.each=Gi;exports.first_child=di;exports.flushSync=fe;exports.from_html=Xt;exports.get=E;exports.html=Ta;exports.if_block=Fr;exports.index=Fi;exports.pop=pr;exports.prop=ge;exports.proxy=pt;exports.push=dr;exports.reset=ht;exports.sendLoyaltyLevelClicked=za;exports.set=X;exports.setLocale=ys;exports.set_attribute=Ma;exports.set_class=ji;exports.set_text=Zt;exports.setupI18n=gs;exports.setup_stores=Xi;exports.sibling=Cr;exports.state=J;exports.store_get=Vi;exports.template_effect=ir;exports.user_derived=Ze;exports.user_effect=Dt;exports.user_pre_effect=oa;