@everymatrix/loyalty-shop 0.1.23 → 0.1.25
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.
- package/components/LoyaltyPagination-BISbknCY.cjs +14 -0
- package/components/{LoyaltyPagination-o3rQCgms.js → LoyaltyPagination-BZk1S01e.js} +1493 -1467
- package/components/{LoyaltyPagination-D7m97E0W.js → LoyaltyPagination-CfB2kCYx.js} +819 -793
- package/components/LoyaltyPagination-n22faI_k.cjs +14 -0
- package/components/{LoyaltyPointsCard-5kjF6xRz.cjs → LoyaltyPointsCard-Bk2oWu8Y.cjs} +1 -1
- package/components/{LoyaltyPointsCard-46BqNZEK.cjs → LoyaltyPointsCard-C4TY5Odb.cjs} +1 -1
- package/components/{LoyaltyPointsCard-SZEIZzo0.js → LoyaltyPointsCard-DgrWMn_V.js} +1 -1
- package/components/{LoyaltyPointsCard-CdBEe40I.js → LoyaltyPointsCard-jP0P8jiI.js} +1 -1
- package/components/{LoyaltyShop-WqEP7fBO.cjs → LoyaltyShop-9D4_2iLM.cjs} +1 -1
- package/components/{LoyaltyShop-DTaj_V0H.cjs → LoyaltyShop-BYXBV-P0.cjs} +1 -1
- package/components/{LoyaltyShop-Jn3qrA-n.js → LoyaltyShop-CUN0MKDN.js} +4 -4
- package/components/{LoyaltyShop-ttYCQMVa.js → LoyaltyShop-D-Gsl4ZM.js} +4 -4
- package/components/{LoyaltyShopItem-CJk-XfSP.cjs → LoyaltyShopItem-CC3RrQxC.cjs} +1 -1
- package/components/{LoyaltyShopItem-6udy8eXZ.js → LoyaltyShopItem-DF8vUi7m.js} +3 -3
- package/components/{LoyaltyShopItem-IvsEBlK0.cjs → LoyaltyShopItem-WgDbYlQa.cjs} +1 -1
- package/components/{LoyaltyShopItem-DVSebOOP.js → LoyaltyShopItem-bTc7oBXE.js} +3 -3
- package/es2015/loyalty-shop.cjs +1 -1
- package/es2015/loyalty-shop.js +2 -2
- package/esnext/loyalty-shop.cjs +1 -1
- package/esnext/loyalty-shop.js +2 -2
- package/package.json +1 -1
- package/components/LoyaltyPagination-ChnSUs6d.cjs +0 -14
- package/components/LoyaltyPagination-DzmuO9_8.cjs +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as me, c as G, p as K, a as ve, b as o, s as fe, d as Z, A as N, B as he, C as ye, E as J, F as g, G as ge, H as _e, m as t, f as we, g as be, i as T, h as E, j as W, I as xe, J as Ee, K as Re, L as ke, k as i, l as Se, n as L, q as b, o as R, r as C, t as U, v as k, M as Ie, w as M, u as S, x as Ne, $ as Te, N as Le, O as q } from "./LoyaltyPagination-
|
|
2
|
-
import { L as Ce } from "./LoyaltyPointsCard-
|
|
1
|
+
import { z as me, c as G, p as K, a as ve, b as o, s as fe, d as Z, A as N, B as he, C as ye, E as J, F as g, G as ge, H as _e, m as t, f as we, g as be, i as T, h as E, j as W, I as xe, J as Ee, K as Re, L as ke, k as i, l as Se, n as L, q as b, o as R, r as C, t as U, v as k, M as Ie, w as M, u as S, x as Ne, $ as Te, N as Le, O as q } from "./LoyaltyPagination-CfB2kCYx.js";
|
|
2
|
+
import { L as Ce } from "./LoyaltyPointsCard-DgrWMn_V.js";
|
|
3
3
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
4
4
|
}, globalThis.customElements = { define() {
|
|
5
5
|
}, get() {
|
|
@@ -17,7 +17,7 @@ if (typeof window < "u") {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
customElements.define = f(customElements.define), import("./LoyaltyPointsCard-
|
|
20
|
+
customElements.define = f(customElements.define), import("./LoyaltyPointsCard-DgrWMn_V.js").then((a) => a.a).then((a) => {
|
|
21
21
|
const l = a.default || a;
|
|
22
22
|
customElements.get("loyalty-points-card") || customElements.define("loyalty-points-card", l.element || l);
|
|
23
23
|
}).catch((a) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-BISbknCY.cjs"),G=require("./LoyaltyPointsCard-C4TY5Odb.cjs");if(typeof window<"u"){let m=function(n){return function(...o){try{return n.apply(this,o)}catch(l){if(l instanceof DOMException&&l.message.includes("has already been used with this registry")||l instanceof Error&&l.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw l}}};customElements.define=m(customElements.define),Promise.resolve().then(()=>require("./LoyaltyPointsCard-C4TY5Odb.cjs")).then(n=>n.LoyaltyPointsCard_ce).then(n=>{const o=n.default||n;customElements.get("loyalty-points-card")||customElements.define("loyalty-points-card",o.element||o)}).catch(n=>{console.error("BOOT ERROR:",n)})}const K={en:{tokens:"Tokens",buyNow:"Buy Now",back:"Back"},tr:{tokens:"Tokens",buyNow:"Şimdi Satın Al",back:"Geri"},da:{tokens:"Tokens",buyNow:"Køb nu",back:"Tilbage"},de:{tokens:"Token",buyNow:"Jetzt kaufen",back:"Zurück"},nl:{tokens:"Tokens",buyNow:"Nu kopen",back:"Terug"},fr:{tokens:"Jetons",buyNow:"Acheter",back:"Retour"},hu:{tokens:"Tokenek",buyNow:"Vásárlás",back:"Vissza"}},W="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='800px'%20height='800px'%20viewBox='0%200%20120%20120'%20fill='none'%3e%3crect%20width='120'%20height='120'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M33.2503%2038.4816C33.2603%2037.0472%2034.4199%2035.8864%2035.8543%2035.875H83.1463C84.5848%2035.875%2085.7503%2037.0431%2085.7503%2038.4816V80.5184C85.7403%2081.9528%2084.5807%2083.1136%2083.1463%2083.125H35.8543C34.4158%2083.1236%2033.2503%2081.957%2033.2503%2080.5184V38.4816ZM80.5006%2041.1251H38.5006V77.8751L62.8921%2053.4783C63.9172%2052.4536%2065.5788%2052.4536%2066.6039%2053.4783L80.5006%2067.4013V41.1251ZM43.75%2051.6249C43.75%2054.5244%2046.1005%2056.8749%2049%2056.8749C51.8995%2056.8749%2054.25%2054.5244%2054.25%2051.6249C54.25%2048.7254%2051.8995%2046.3749%2049%2046.3749C46.1005%2046.3749%2043.75%2048.7254%2043.75%2051.6249Z'%20fill='%23687787'/%3e%3c/svg%3e";var Y=e.from_html('<img class="loyalty-shop-item__image svelte-ravnpu"/>'),Q=e.from_html('<div class="loyalty-shop-item__card loyalty-shop-item__card--description svelte-ravnpu"><p class="loyalty-shop-item__description svelte-ravnpu"> </p></div>'),X=e.from_html('<div class="loyalty-shop-item svelte-ravnpu"><div class="loyalty-shop-item__card svelte-ravnpu"><!> <span class="loyalty-shop-item__title svelte-ravnpu"> </span> <span class="loyalty-shop-item__points svelte-ravnpu"> </span> <button class="loyalty-shop-item__button svelte-ravnpu" type="button"> </button></div> <!> <!></div>');const $={hash:"svelte-ravnpu",code:`.loyalty-shop-item.svelte-ravnpu {display:flex;flex-direction:column;gap:12px;}.loyalty-shop-item__card.svelte-ravnpu {display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:10px;border:1px solid var(--border-default, rgba(251, 251, 251, 0.15));background-color:var(--app-container-bg-default, #022652);}.loyalty-shop-item__card--description.svelte-ravnpu {min-height:120px;}.loyalty-shop-item__image.svelte-ravnpu {width:100%;height:170px;border-radius:6px;}.loyalty-shop-item__title.svelte-ravnpu {color:var(--text-default, #ffffff);font-size:12px;font-weight:400;}.loyalty-shop-item__points.svelte-ravnpu {color:var(--text-subtle, #dfe3e8);font-size:14px;font-weight:400;}.loyalty-shop-item__button.svelte-ravnpu {margin-top:auto;width:100%;height:37px;padding:8px 16px;border:none;border-radius:6px;background:var(--button-primary-bg-default, #ffcc00);color:var(--button-primary-text-default, #261d00);font-size:12px;font-weight:400;cursor:pointer;}.loyalty-shop-item__button.svelte-ravnpu:disabled {opacity:0.4;cursor:default;}.loyalty-shop-item__description.svelte-ravnpu {color:var(--text-subtle, #dfe3e8);font-size:12px;line-height:1.4;margin:0;font-weight:500;min-height:120px;}
|
|
2
2
|
|
|
3
3
|
@media (min-width: 768px) {.loyalty-shop-item__image.svelte-ravnpu {height:clamp(170px, 30vw, 400px);object-fit:cover;}
|
|
4
4
|
}`};function b(m,n){e.push(n,!0),e.append_styles(m,$);const o=()=>e.store_get(e.$format,"$_",l),[l,y]=e.setup_stores(),i=e.prop(n,"apiEndpoint",7,""),d=e.prop(n,"userSession",7,""),c=e.prop(n,"locale",7,""),h=e.prop(n,"itemId",7,""),r=e.prop(n,"elevateReward"),v=e.prop(n,"translationUrl");e.setupI18n({withLocale:c(),translations:{}}),Object.entries(K).forEach(([t,a])=>{e.addNewMessages(t,a)});let s=e.state(e.proxy(r())),g=e.state(!1),w=e.state("");const x=e.user_derived(()=>e.get(s)?.presentation?.assets?.[0]??""),S=e.user_derived(()=>e.get(s)?.presentation?.displayName??e.get(s)?.displayName??""),E=e.user_derived(()=>e.get(s)?.presentation?.description??""),k=e.user_derived(()=>e.get(s)?.available==="true"),U=()=>{let t=new URL(v(),window.location.href);fetch(t.href).then(a=>a.json()).then(a=>{Object.keys(a).forEach(f=>{e.addNewMessages(f,a[f])})}).catch(a=>{console.log("loyalty shop item translation url err:",a)})};e.user_pre_effect(()=>{v()&&U()}),e.user_effect(()=>{if(r()){e.set(s,r(),!0);return}if(!i()||!h())return;let t=!1;return e.fetchShopItem({apiEndpoint:i(),userSession:d(),locale:c()},h()).then(a=>{t||e.set(s,a,!0)}).catch(a=>console.error("Failed to load shop item:",a)),()=>{t=!0}});const M=()=>{e.get(g)||!e.get(k)||!e.get(s)||e.sendRedeemRewardRequested(e.get(s).displayName||e.get(s).presentation.displayName,e.get(s).id)},O=async()=>{if(!i()||!e.get(s)||e.get(g))return;e.set(g,!0),e.set(w,"");const t=e.get(s).id;try{await e.redeemReward({apiEndpoint:i(),userSession:d()},t),e.sendRedeemRewardSuccess(t),e.dispatchRedeemRewardButton()}catch(a){e.set(w,a?.message??"Redeem failed",!0),e.sendRedeemRewardFailed(t,a)}finally{e.set(g,!1)}};e.user_effect(()=>{const t=a=>{a.data?.type===e.EVENT_TYPES.REDEEM_REWARD_CONFIRMED&&a.data?.id===e.get(s)?.id&&O()};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});var P={get apiEndpoint(){return i()},set apiEndpoint(t=""){i(t),e.flushSync()},get userSession(){return d()},set userSession(t=""){d(t),e.flushSync()},get locale(){return c()},set locale(t=""){c(t),e.flushSync()},get itemId(){return h()},set itemId(t=""){h(t),e.flushSync()},get elevateReward(){return r()},set elevateReward(t){r(t),e.flushSync()},get translationUrl(){return v()},set translationUrl(t){v(t),e.flushSync()}},R=e.comment(),z=e.first_child(R);{var V=t=>{var a=X(),f=e.child(a),I=e.child(f);{var D=p=>{var u=Y();e.template_effect(()=>{e.set_attribute(u,"src",e.get(x)||W),e.set_attribute(u,"alt",e.get(S))}),e.append(p,u)};e.if_block(I,p=>{e.get(x)&&p(D)})}var N=e.sibling(I,2),A=e.only_child(N,!0),T=e.sibling(N,2),B=e.only_child(T),_=e.sibling(T,2),H=e.only_child(_,!0);e.reset(f);var L=e.sibling(f,2);G.LoyaltyPointsCard(L,{get apiEndpoint(){return i()},get userSession(){return d()},get locale(){return c()}});var q=e.sibling(L,2);{var Z=p=>{var u=Q(),F=e.child(u),J=e.only_child(F,!0);e.reset(u),e.template_effect(()=>e.set_text(J,e.get(E))),e.append(p,u)};e.if_block(q,p=>{e.get(E)&&p(Z)})}e.reset(a),e.template_effect((p,u)=>{e.set_text(A,e.get(S)),e.set_text(B,`${e.get(s).points??""}
|
|
@@ -14,8 +14,8 @@ var q = (g, a, o) => new Promise((d, _) => {
|
|
|
14
14
|
}, c = (l) => l.done ? d(l.value) : Promise.resolve(l.value).then(u, v);
|
|
15
15
|
c((o = o.apply(g, a)).next());
|
|
16
16
|
});
|
|
17
|
-
import { z as ve, c as Y, p as Q, a as fe, b as p, s as he, d as G, A as C, B as ye, C as ge, E as K, F as b, G as _e, H as we, m as s, f as be, g as xe, i as U, h as S, j as X, I as Ee, J as Re, K as ke, L as Se, k as m, l as Ie, n as M, q as E, o as I, r as O, t as z, v as N, M as Ne, w as j, u as T, x as Te, $ as Le, N as Ce, O as W } from "./LoyaltyPagination-
|
|
18
|
-
import { L as Ue } from "./LoyaltyPointsCard-
|
|
17
|
+
import { z as ve, c as Y, p as Q, a as fe, b as p, s as he, d as G, A as C, B as ye, C as ge, E as K, F as b, G as _e, H as we, m as s, f as be, g as xe, i as U, h as S, j as X, I as Ee, J as Re, K as ke, L as Se, k as m, l as Ie, n as M, q as E, o as I, r as O, t as z, v as N, M as Ne, w as j, u as T, x as Te, $ as Le, N as Ce, O as W } from "./LoyaltyPagination-BZk1S01e.js";
|
|
18
|
+
import { L as Ue } from "./LoyaltyPointsCard-jP0P8jiI.js";
|
|
19
19
|
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
20
20
|
}, globalThis.customElements = { define() {
|
|
21
21
|
}, get() {
|
|
@@ -33,7 +33,7 @@ if (typeof window != "undefined") {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
customElements.define = g(customElements.define), import("./LoyaltyPointsCard-
|
|
36
|
+
customElements.define = g(customElements.define), import("./LoyaltyPointsCard-jP0P8jiI.js").then((a) => a.a).then((a) => {
|
|
37
37
|
const o = a.default || a;
|
|
38
38
|
customElements.get("loyalty-points-card") || customElements.define("loyalty-points-card", o.element || o);
|
|
39
39
|
}).catch((a) => {
|
package/es2015/loyalty-shop.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const s=require("../components/LoyaltyShop-
|
|
1
|
+
typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const s=require("../components/LoyaltyShop-BYXBV-P0.cjs");if(typeof window!="undefined"){let o=function(e){return function(...n){try{return e.apply(this,n)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t instanceof Error&&t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=o(customElements.define),Promise.resolve().then(()=>require("../components/LoyaltyShop-BYXBV-P0.cjs")).then(e=>e.LoyaltyShop_ce).then(e=>{const n=e.default||e;customElements.get("loyalty-shop")||customElements.define("loyalty-shop",n.element||n)}).catch(e=>{console.error("BOOT ERROR:",e)})}module.exports=s.LoyaltyShop;
|
package/es2015/loyalty-shop.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as a } from "../components/LoyaltyShop-
|
|
1
|
+
import { L as a } from "../components/LoyaltyShop-CUN0MKDN.js";
|
|
2
2
|
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -16,7 +16,7 @@ if (typeof window != "undefined") {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
customElements.define = s(customElements.define), import("../components/LoyaltyShop-
|
|
19
|
+
customElements.define = s(customElements.define), import("../components/LoyaltyShop-CUN0MKDN.js").then((e) => e.a).then((e) => {
|
|
20
20
|
const n = e.default || e;
|
|
21
21
|
customElements.get("loyalty-shop") || customElements.define("loyalty-shop", n.element || n);
|
|
22
22
|
}).catch((e) => {
|
package/esnext/loyalty-shop.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const s=require("../components/LoyaltyShop-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const s=require("../components/LoyaltyShop-9D4_2iLM.cjs");if(typeof window<"u"){let o=function(e){return function(...n){try{return e.apply(this,n)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t instanceof Error&&t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=o(customElements.define),Promise.resolve().then(()=>require("../components/LoyaltyShop-9D4_2iLM.cjs")).then(e=>e.LoyaltyShop_ce).then(e=>{const n=e.default||e;customElements.get("loyalty-shop")||customElements.define("loyalty-shop",n.element||n)}).catch(e=>{console.error("BOOT ERROR:",e)})}module.exports=s.LoyaltyShop;
|
package/esnext/loyalty-shop.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as a } from "../components/LoyaltyShop-
|
|
1
|
+
import { L as a } from "../components/LoyaltyShop-D-Gsl4ZM.js";
|
|
2
2
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -16,7 +16,7 @@ if (typeof window < "u") {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
customElements.define = s(customElements.define), import("../components/LoyaltyShop-
|
|
19
|
+
customElements.define = s(customElements.define), import("../components/LoyaltyShop-D-Gsl4ZM.js").then((e) => e.a).then((e) => {
|
|
20
20
|
const n = e.default || e;
|
|
21
21
|
customElements.get("loyalty-shop") || customElements.define("loyalty-shop", n.element || n);
|
|
22
22
|
}).catch((e) => {
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
var po=Object.defineProperty,vo=Object.defineProperties;var mo=Object.getOwnPropertyDescriptors;var Yi=Object.getOwnPropertySymbols;var _o=Object.prototype.hasOwnProperty,go=Object.prototype.propertyIsEnumerable;var zi=e=>{throw TypeError(e)};var Un=(e,t,r)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yr=(e,t)=>{for(var r in t||(t={}))_o.call(t,r)&&Un(e,r,t[r]);if(Yi)for(var r of Yi(t))go.call(t,r)&&Un(e,r,t[r]);return e},zr=(e,t)=>vo(e,mo(t));var z=(e,t,r)=>Un(e,typeof t!="symbol"?t+"":t,r),Fn=(e,t,r)=>t.has(e)||zi("Cannot "+r);var h=(e,t,r)=>(Fn(e,t,"read from private field"),r?r.call(e):t.get(e)),$=(e,t,r)=>t.has(e)?zi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),M=(e,t,r,n)=>(Fn(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),B=(e,t,r)=>(Fn(e,t,"access private method"),r);var nt=(e,t,r)=>new Promise((n,i)=>{var s=u=>{try{a(r.next(u))}catch(l){i(l)}},o=u=>{try{a(r.throw(u))}catch(l){i(l)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,o);a((r=r.apply(e,t)).next())});typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const bo="5";var bs,ys,Es;typeof window!="undefined"&&((Es=(ys=(bs=window.__svelte)!=null?bs:window.__svelte={}).v)!=null?Es:ys.v=new Set).add(bo);const yo=1,Eo=2,Ts=4,xo=8,wo=16,To=1,So=2,Ss="[",Si="[!",qi="[?",Ai="]",nr={},ie=Symbol("uninitialized"),Ao="http://www.w3.org/1999/xhtml",As=!1;var Hs=Array.isArray,Ho=Array.prototype.indexOf,ln=Array.prototype.includes,An=Array.from,fn=Object.keys,ir=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Mo=Object.getOwnPropertyDescriptors,Oo=Object.prototype,Po=Array.prototype,Ms=Object.getPrototypeOf,Zi=Object.isExtensible;const lt=()=>{};function Os(e){for(var t=0;t<e.length;t++)e[t]()}function Ps(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const ae=2,sr=4,Gr=8,Ns=1<<24,ke=16,Le=32,et=64,Kn=128,Hi=256,Ie=512,se=1024,ne=2048,Ve=4096,pe=8192,ye=16384,Dt=32768,hn=1<<25,ar=65536,cn=1<<17,No=1<<18,Ut=1<<19,$s=1<<20,Qe=1<<25,Lt=65536,dn=1<<21,zt=1<<22,gt=1<<23,Jr=Symbol("$state"),Is=Symbol("component"),$o=Symbol("legacy props"),Io=Symbol(""),Qr=Symbol("attributes"),ei=Symbol("class"),Bo=Symbol("style"),Er=Symbol("text"),kr=new class extends Error{constructor(){super(...arguments);z(this,"name","StaleReactionError");z(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var xs;const Ro=!!((xs=globalThis.document)!=null&&xs.contentType)&&globalThis.document.contentType.includes("xml"),Hn=3,jr=8;function Lo(){console.warn("https://svelte.dev/e/derived_inert")}function Mn(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Co(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let U=!1;function ut(e){U=e}let L;function Ee(e){if(e===null)throw Mn(),nr;return L=e}function On(){return Ee(rt(L))}function pn(e){if(U){if(rt(L)!==null)throw Mn(),nr;L=e}}function Do(e=1){if(U){for(var t=e,r=L;t--;)r=rt(r);L=r}}function vn(e=!0){for(var t=0,r=L;;){if(r.nodeType===jr){var n=r.data;if(n===Ai){if(t===0)return r;t-=1}else(n===Ss||n===Si||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=rt(r);e&&r.remove(),r=i}}function Bs(e){if(!e||e.nodeType!==jr)throw Mn(),nr;return e.data}function Rs(e){return e===this.v}function Ls(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Cs(e){return!Ls(e,this.v)}function Uo(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Fo(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Go(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ko(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function jo(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Vo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Xo(){throw new Error("https://svelte.dev/e/hydration_failed")}function Wo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Yo(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function zo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function qo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}let Zo=!1,ve=null;function or(e){ve=e}function Pn(e,t=!1,r){ve={p:ve,i:!1,c:null,e:null,s:e,x:null,r:I,l:null}}function Nn(e){var t=ve,r=t.e;if(r!==null){t.e=null;for(var n of r)ua(n)}return e!==void 0&&(t.x=e),t.i=!0,ve=t.p,Mi(e)}function Mi(e={}){return ir(e,Is,{value:!0}),e}function Ds(){return!0}let At=[];function Us(){var e=At;At=[],Os(e)}function mt(e){if(At.length===0&&!Mr){var t=At;queueMicrotask(()=>{t===At&&Us()})}At.push(e)}function Jo(){for(;At.length>0;)Us()}const Qo=-7169;function ee(e,t){e.f=e.f&Qo|t}function Oi(e){e.f&Ie||e.deps===null?ee(e,se):ee(e,Ve)}function Fs(e){if(e!==null)for(const t of e)!(t.f&ae)||!(t.f&Lt)||(t.f^=Lt,Fs(t.deps))}function Gs(e,t,r){e.f&ne?t.add(e):e.f&Ve&&r.add(e),Fs(e.deps),ee(e,se)}function Pi(e,t,r){if(e==null)return t(void 0),r&&r(void 0),lt;const n=ki(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const Gt=[];function Ko(e,t){return{subscribe:$n(e,t).subscribe}}function $n(e,t=lt){let r=null;const n=new Set;function i(a){if(Ls(e,a)&&(e=a,r)){const u=!Gt.length;for(const l of n)l[1](),Gt.push(l,e);if(u){for(let l=0;l<Gt.length;l+=2)Gt[l][0](Gt[l+1]);Gt.length=0}}}function s(a){i(a(e))}function o(a,u=lt){const l=[a,u];return n.add(l),n.size===1&&(r=t(i,s)||lt),a(e),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:o}}function pr(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 Ko(r,(o,a)=>{let u=!1;const l=[];let f=0,d=lt;const c=()=>{if(f)return;d();const v=t(n?l[0]:l,o,a);s?o(v):d=typeof v=="function"?v:lt},p=i.map((v,_)=>Pi(v,m=>{l[_]=m,f&=~(1<<_),u&&c()},()=>{f|=1<<_}));return u=!0,c(),function(){Os(p),d(),u=!1}})}function eu(e){let t;return Pi(e,r=>t=r)(),t}let ti=Symbol("unmounted");function ks(e,t,r){var s;const n=(s=r[t])!=null?s:r[t]={store:null,source:Bi(void 0),unsubscribe:lt};if(n.store!==e&&!(ti in r))if(n.unsubscribe(),n.store=e!=null?e:null,e==null)n.source.v=void 0,n.unsubscribe=lt;else{var i=!0;n.unsubscribe=Pi(e,o=>{i?n.source.v=o:re(n.source,o)}),i=!1}return e&&ti in r?eu(e):H(n.source)}function js(){const e={};function t(){oa(()=>{for(var r in e)e[r].unsubscribe();ir(e,ti,{enumerable:!1,value:!0})})}return[e,t]}function In(e){var t=R,r=I;Ce(null),tt(null);try{return e()}finally{Ce(t),tt(r)}}function tu(e,t,r,n){const i=Bn;var s=e.filter(p=>!p.settled),o=t.map(i);if(r.length===0&&s.length===0){n(o);return}var a=I,u=ru(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(p=>p.promise)):null;function f(p){if(!(a.f&ye)){u();try{n([...o,...p])}catch(v){Ze(v,a)}mn()}}var d=Vs();if(r.length===0){l.then(()=>f([])).finally(d);return}function c(){Promise.all(r.map(p=>nu(p))).then(f).catch(p=>Ze(p,a)).finally(d)}l?l.then(()=>{u(),c(),mn()}):c()}function ru(){var e=I,t=R,r=ve,n=N;return function(s=!0){tt(e),Ce(t),or(r),s&&!(e.f&ye)&&(n==null||n.activate(),n==null||n.apply())}}function mn(e=!0){tt(null),Ce(null),or(null),e&&(N==null||N.deactivate())}function Vs(){var e=I,t=e.b,r=N,n=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,r),r.increment(n,e),()=>{t==null||t.update_pending_count(-1,r),r.decrement(n,e)}}function Bn(e){var t=ae|ne;return I!==null&&(I.f|=Ut),{ctx:ve,deps:null,effects:null,equals:Rs,f:t,fn:e,reactions:null,rv:0,v:ie,wv:0,parent:I,ac:null}}const xr=Symbol("obsolete");function nu(e,t,r){let n=I;n===null&&Uo();var i=void 0,s=Ct(ie),o=!R,a=new Set;return mu(()=>{var p,v;var u=I,l=Ps();i=l.promise;try{Promise.resolve(e()).then(l.resolve,_=>{_!==kr&&l.reject(_)}).finally(mn)}catch(_){l.reject(_),mn()}var f=N;if(o){if(u.f&Dt)var d=Vs();if((p=n.b)!=null&&p.is_rendered())(v=f.async_deriveds.get(u))==null||v.reject(xr);else for(const _ of a.values())_.reject(xr);a.add(l),f.async_deriveds.set(u,l)}const c=(_,m=void 0)=>{d==null||d(),a.delete(l),m!==xr&&(f.activate(),m?(s.f|=gt,ur(s,m)):(s.f>&&(s.f^=gt),ur(s,_)),f.deactivate())};l.promise.then(c,_=>c(null,_||"unknown"))}),oa(()=>{for(const u of a)u.reject(xr)}),new Promise(u=>{function l(f){function d(){f===i?u(s):l(i)}f.then(d,d)}l(i)})}function Tt(e){const t=Bn(e);return pa(t),t}function iu(e){const t=Bn(e);return t.equals=Cs,t}function su(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)me(t[r])}}function Ni(e){var t,r=I,n=e.parent;if(!ft&&n!==null&&e.v!==ie&&n.f&(ye|pe))return Lo(),e.v;tt(n);try{e.f&=~Lt,su(e),t=ga(e)}finally{tt(r)}return t}function Xs(e){var t=Ni(e);if(!e.equals(t)&&(e.wv=ma(),(!(N!=null&&N.is_fork)||e.deps===null)&&(N!==null?(N.capture(e,t,!0),Hr==null||Hr.capture(e,t,!0)):e.v=t,e.deps===null))){ee(e,se);return}ft||(oe!==null?(Ci()||N!=null&&N.is_fork)&&oe.set(e,t):Oi(e))}function au(e){var t;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),r.ac!==null&&In(()=>{r.ac.abort(kr),r.ac=null}),r.fn!==null&&(r.teardown=lt),$r(r,0),Fi(r))}function Ws(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&lr(t)}let Gn=null,kt=null,N=null,Hr=null,oe=null,ri=null,Mr=!1,kn=!1,Xt=null,Kr=null;var Ji=0;let ou=1;var Zt,pt,Ot,Jt,Qt,Kt,it,er,ge,Rr,st,Ue,Ye,tr,Pt,G,ni,wr,ii,Ys,zs,Vt,uu,Tr;const wn=class wn{constructor(){$(this,G);z(this,"id",ou++);$(this,Zt,!1);z(this,"linked",!0);$(this,pt,null);$(this,Ot,null);z(this,"async_deriveds",new Map);z(this,"current",new Map);z(this,"previous",new Map);$(this,Jt,new Set);$(this,Qt,new Set);$(this,Kt,0);$(this,it,new Map);$(this,er,null);$(this,ge,[]);$(this,Rr,[]);$(this,st,new Set);$(this,Ue,new Set);$(this,Ye,new Map);$(this,tr,new Set);z(this,"is_fork",!1);$(this,Pt,!1);kt===null?Gn=kt=this:(M(kt,Ot,this),M(this,pt,kt)),kt=this}skip_effect(t){h(this,Ye).has(t)||h(this,Ye).set(t,{d:[],m:[]}),h(this,tr).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=h(this,Ye).get(t);if(n){h(this,Ye).delete(t);for(var i of n.d)ee(i,ne),r(i);for(i of n.m)ee(i,Ve),r(i)}h(this,tr).add(t)}capture(t,r,n=!1){t.v!==ie&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f>||(this.current.set(t,[r,n]),oe==null||oe.set(t,r)),this.is_fork||(t.v=r)}activate(){N=this}deactivate(){N=null,oe=null}flush(){try{kn=!0,N=this,B(this,G,wr).call(this)}finally{Ji=0,ri=null,Xt=null,Kr=null,kn=!1,N=null,oe=null,Ke.clear()}}discard(){var t;for(const r of h(this,Qt))r(this);h(this,Qt).clear();for(const r of this.async_deriveds.values())r.reject(xr);B(this,G,Tr).call(this),(t=h(this,er))==null||t.resolve()}register_created_effect(t){h(this,Rr).push(t)}increment(t,r){var n;if(M(this,Kt,h(this,Kt)+1),t){let i=(n=h(this,it).get(r))!=null?n:0;h(this,it).set(r,i+1)}}decrement(t,r){var n;if(M(this,Kt,h(this,Kt)-1),t){let i=(n=h(this,it).get(r))!=null?n:0;i===1?h(this,it).delete(r):h(this,it).set(r,i-1)}h(this,Pt)||(M(this,Pt,!0),mt(()=>{M(this,Pt,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)h(this,st).add(n);for(const n of r)h(this,Ue).add(n);t.clear(),r.clear()}oncommit(t){h(this,Jt).add(t)}ondiscard(t){h(this,Qt).add(t)}settled(){var t;return((t=h(this,er))!=null?t:M(this,er,Ps())).promise}static ensure(){if(N===null){const t=N=new wn;!kn&&!Mr&&mt(()=>{h(t,Zt)||t.flush()})}return N}apply(){{oe=null;return}}schedule(t){var i;if(ri=t,(i=t.b)!=null&&i.is_pending&&t.f&(sr|Gr|Ns)&&!(t.f&Dt)){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(Xt!==null&&r===I&&(R===null||!(R.f&ae)))return;if(n&(et|Le)){if(!(n&se))return;r.f^=se}}h(this,ge).push(r)}};Zt=new WeakMap,pt=new WeakMap,Ot=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Kt=new WeakMap,it=new WeakMap,er=new WeakMap,ge=new WeakMap,Rr=new WeakMap,st=new WeakMap,Ue=new WeakMap,Ye=new WeakMap,tr=new WeakMap,Pt=new WeakMap,G=new WeakSet,ni=function(){if(this.is_fork)return!0;for(const n of h(this,it).keys()){for(var t=n,r=!1;t.parent!==null;){if(h(this,Ye).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},wr=function(){var u,l,f,d;M(this,Zt,!0),Ji++>1e3&&(B(this,G,Tr).call(this),lu());for(const c of h(this,st))h(this,Ue).delete(c),ee(c,ne),this.schedule(c);for(const c of h(this,Ue))ee(c,Ve),this.schedule(c);const t=h(this,ge);M(this,ge,[]),this.apply();var r=Xt=[],n=[],i=Kr=[];for(const c of t)try{B(this,G,ii).call(this,c,r,n)}catch(p){throw Js(c),B(this,G,ni).call(this)||this.discard(),p}if(N=null,i.length>0){var s=wn.ensure();for(const c of i)s.schedule(c)}if(Xt=null,Kr=null,B(this,G,ni).call(this)){B(this,G,Vt).call(this,n),B(this,G,Vt).call(this,r);for(const[c,p]of h(this,Ye))Zs(c,p);i.length>0&&B(u=N,G,wr).call(u);return}const o=B(this,G,Ys).call(this);if(o){B(this,G,Vt).call(this,n),B(this,G,Vt).call(this,r),B(l=o,G,zs).call(l,this);return}h(this,st).clear(),h(this,Ue).clear();for(const c of h(this,Jt))c(this);h(this,Jt).clear(),Hr=this,Qi(n),Qi(r),Hr=null,(f=h(this,er))==null||f.resolve();var a=N;if(h(this,Kt)===0&&(h(this,ge).length===0||a!==null)&&B(this,G,Tr).call(this),h(this,ge).length>0)if(a!==null){const c=a;h(c,ge).push(...h(this,ge).filter(p=>!h(c,ge).includes(p)))}else a=this;a!==null&&(Ke.clear(),B(d=a,G,wr).call(d))},ii=function(t,r,n){t.f^=se;for(var i=t.first;i!==null;){var s=i.f,o=(s&(Le|et))!==0,a=o&&(s&se)!==0,u=a||(s&pe)!==0||h(this,Ye).has(i);if(!u&&i.fn!==null){o?i.f^=se:s&sr?r.push(i):Vr(i)&&(s&ke&&h(this,Ue).add(i),lr(i));var l=i.first;if(l!==null){i=l;continue}}for(;i!==null;){var f=i.next;if(f!==null){i=f;break}i=i.parent}}},Ys=function(){for(var t=h(this,pt);t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=h(t,pt)}return null},zs=function(t){var n;for(const[i,s]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,s);for(const[i,s]of t.async_deriveds){const o=this.async_deriveds.get(i);o&&s.promise.then(o.resolve).catch(o.reject)}t.async_deriveds.clear(),this.transfer_effects(h(t,st),h(t,Ue));const r=i=>{var s=i.reactions;if(s!==null&&!(i.f&ae&&!(i.f&(ne|Ve))))for(const u of s){var o=u.f;if(o&ae)r(u);else{var a=u;o&(zt|ke)&&!this.async_deriveds.has(a)&&(h(this,Ue).delete(a),ee(a,ne),this.schedule(a))}}};for(const i of this.current.keys())r(i);this.oncommit(()=>t.discard()),B(n=t,G,Tr).call(n),N=this,B(this,G,wr).call(this)},Vt=function(t){for(var r=0;r<t.length;r+=1)Gs(t[r],h(this,st),h(this,Ue))},uu=function(){var d;for(let c=Gn;c!==null;c=h(c,Ot)){var t=c.id<this.id,r=[];for(const[p,[v,_]]of this.current){if(c.current.has(p)){var n=c.current.get(p)[0];if(t&&v!==n)c.current.set(p,[v,_]);else continue}r.push(p)}if(t)for(const[p,v]of this.async_deriveds){const _=c.async_deriveds.get(p);_&&v.promise.then(_.resolve).catch(_.reject)}var i=[...c.current.keys()].filter(p=>!c.current.get(p)[1]);if(!(!h(c,Zt)||i.length===0)){var s=i.filter(p=>!this.current.has(p));if(s.length===0)t&&c.discard();else if(r.length>0){if(t)for(const p of h(this,tr))c.unskip_effect(p,v=>{var _;v.f&(ke|zt)?c.schedule(v):B(_=c,G,Vt).call(_,[v])});c.activate();var o=new Set,a=new Map;for(var u of r)qs(u,s,o,a);a=new Map;var l=[...c.current].filter(([p,v])=>{const _=this.current.get(p);return _?_[0]!==v[0]||_[1]!==v[1]:!0}).map(([p])=>p);if(l.length>0)for(const p of h(this,Rr))!(p.f&(ye|pe|cn))&&$i(p,l,a)&&(p.f&(zt|ke)?(ee(p,ne),c.schedule(p)):h(c,st).add(p));if(h(c,ge).length>0&&!h(c,Pt)){c.apply();for(var f of h(c,ge))B(d=c,G,ii).call(d,f,[],[]);M(c,ge,[])}c.deactivate()}}}},Tr=function(){if(this.linked){var t=h(this,pt),r=h(this,Ot);t===null?Gn=r:M(t,Ot,r),r===null?kt=t:M(r,pt,t),this.linked=!1}};let bt=wn;function He(e){var t=Mr;Mr=!0;try{for(var r;;){if(Jo(),N===null)return r;N.flush()}}finally{Mr=t}}function lu(){try{Vo()}catch(e){Ze(e,ri)}}let De=null;function Qi(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if(!(n.f&(ye|pe))&&Vr(n)&&(De=new Set,lr(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&ha(n),(De==null?void 0:De.size)>0)){Ke.clear();for(const i of De){if(i.f&(ye|pe))continue;const s=[i];let o=i.parent;for(;o!==null;)De.has(o)&&(De.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const u=s[a];u.f&(ye|pe)||lr(u)}}De.clear()}}De=null}}function qs(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&ae?qs(i,t,r,n):s&(zt|ke)&&!(s&ne)&&$i(i,t,n)&&(ee(i,ne),Ii(i))}}function $i(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(ln.call(t,i))return!0;if(i.f&ae&&$i(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Ii(e){N.schedule(e)}function Zs(e,t){if(!(e.f&Le&&e.f&se)){e.f&ne?t.d.push(e):e.f&Ve&&t.m.push(e),ee(e,se);for(var r=e.first;r!==null;)Zs(r,t),r=r.next}}function Js(e){ee(e,se);for(var t=e.first;t!==null;)Js(t),t=t.next}let _n=new Set;const Ke=new Map;let Qs=!1;function Ct(e,t){var r={f:0,v:e,reactions:null,equals:Rs,rv:0,wv:0};return r}function ue(e,t){const r=Ct(e);return pa(r),r}function Bi(e,t=!1,r=!0){const n=Ct(e);return t||(n.equals=Cs),n}function re(e,t,r=!1){R!==null&&(!je||R.f&cn)&&Ds()&&R.f&(ae|ke|zt|cn)&&(Re===null||!Re.has(e))&&zo();let n=r?Wt(t):t;return ur(e,n,Kr)}function ur(e,t,r=null){if(!e.equals(t)){ft?Ke.set(e,t):Ke.has(e)||Ke.set(e,e.v);var n=bt.ensure();if(n.capture(e,t),e.f&ae){const i=e;e.f&ne&&Ni(i),oe===null&&Oi(i)}e.wv=ma(),Ks(e,ne,r),I!==null&&I.f&se&&!(I.f&(Le|et))&&(Oe===null?bu([e]):Oe.push(e)),!n.is_fork&&_n.size>0&&!Qs&&fu()}return t}function fu(){Qs=!1;for(const e of _n){e.f&se&&ee(e,Ve);let t;try{t=Vr(e)}catch(r){t=!0}t&&lr(e)}_n.clear()}function Or(e){re(e,e.v+1)}function Ks(e,t,r){var n=e.reactions;if(n!==null)for(var i=n.length,s=0;s<i;s++){var o=n[s],a=o.f,u=(a&ne)===0;if(u&&ee(o,t),a&cn)_n.add(o);else if(a&ae){var l=o;oe==null||oe.delete(l),a&Lt||(a&Ie&&(I===null||!(I.f&dn))&&(o.f|=Lt),Ks(l,Ve,r))}else if(u){var f=o;a&ke&&De!==null&&De.add(f),r!==null?r.push(f):Ii(f)}}}function Wt(e){if(typeof e!="object"||e===null||Jr in e||Is in e)return e;const t=Ms(e);if(t!==Oo&&t!==Po)return e;var r=new Map,n=Hs(e),i=ue(0),s=Rt,o=a=>{if(Rt===s)return a();var u=R,l=Rt;Ce(null),ts(s);var f=a();return Ce(u),ts(l),f};return n&&r.set("length",ue(e.length)),new Proxy(e,{defineProperty(a,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Wo();var f=r.get(u);return f===void 0?o(()=>{var d=ue(l.value);return r.set(u,d),d}):re(f,l.value,!0),!0},deleteProperty(a,u){var l=r.get(u);if(l===void 0){if(u in a){const f=o(()=>ue(ie));r.set(u,f),Or(i)}}else re(l,ie),Or(i);return!0},get(a,u,l){var p;if(u===Jr)return e;var f=r.get(u),d=u in a;if(f===void 0&&(!d||(p=Yt(a,u))!=null&&p.writable)&&(f=o(()=>{var v=Wt(d?a[u]:ie),_=ue(v);return _}),r.set(u,f)),f!==void 0){var c=H(f);return c===ie?void 0:c}return Reflect.get(a,u,l)},getOwnPropertyDescriptor(a,u){var l=Reflect.getOwnPropertyDescriptor(a,u);if(l&&"value"in l){var f=r.get(u);f&&(l.value=H(f))}else if(l===void 0){var d=r.get(u),c=d==null?void 0:d.v;if(d!==void 0&&c!==ie)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return l},has(a,u){var c;if(u===Jr)return!0;var l=r.get(u),f=l!==void 0&&l.v!==ie||Reflect.has(a,u);if(l!==void 0||I!==null&&(!f||(c=Yt(a,u))!=null&&c.writable)){l===void 0&&(l=o(()=>{var p=f?Wt(a[u]):ie,v=ue(p);return v}),r.set(u,l));var d=H(l);if(d===ie)return!1}return f},set(a,u,l,f){var O;var d=r.get(u),c=u in a;if(n&&u==="length")for(var p=l;p<d.v;p+=1){var v=r.get(p+"");v!==void 0?re(v,ie):p in a&&(v=o(()=>ue(ie)),r.set(p+"",v))}if(d===void 0)(!c||(O=Yt(a,u))!=null&&O.writable)&&(d=o(()=>ue(void 0)),re(d,Wt(l)),r.set(u,d));else{c=d.v!==ie;var _=o(()=>Wt(l));re(d,_)}var m=Reflect.getOwnPropertyDescriptor(a,u);if(m!=null&&m.set&&m.set.call(f,l),!c){if(n&&typeof u=="string"){var T=r.get("length"),F=Number(u);Number.isInteger(F)&&F>=T.v&&re(T,F+1)}Or(i)}return!0},ownKeys(a){H(i);var u=Reflect.ownKeys(a).filter(d=>{var c=r.get(d);return c===void 0||c.v!==ie});for(var[l,f]of r)f.v!==ie&&!(l in a)&&u.push(l);return u},setPrototypeOf(){Yo()}})}var Ki,ea,ta,ra;function si(){if(Ki===void 0){Ki=window,ea=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;ta=Yt(t,"firstChild").get,ra=Yt(t,"nextSibling").get,Zi(e)&&(e[ei]=void 0,e[Qr]=null,e[Bo]=void 0,e.__e=void 0),Zi(r)&&(r[Er]=void 0)}}function Be(e=""){return document.createTextNode(e)}function yt(e){return ta.call(e)}function rt(e){return ra.call(e)}function gn(e,t){if(!U)return yt(e);var r=yt(L);if(r===null)r=L.appendChild(Be());else if(t&&r.nodeType!==Hn){var n=Be();return r==null||r.before(n),Ee(n),n}return t&&Li(r),Ee(r),r}function na(e,t=!1){if(!U){var r=yt(e);return r instanceof Comment&&r.data===""?rt(r):r}if(t){if((L==null?void 0:L.nodeType)!==Hn){var n=Be();return L==null||L.before(n),Ee(n),n}Li(L)}return L}function en(e,t=!1){if(!U)return yt(e);var r=gn(e,t);return pn(e),r}function ai(e,t=1,r=!1){let n=U?L:e;for(var i;t--;)i=n,n=rt(n);if(!U)return n;if(r){if((n==null?void 0:n.nodeType)!==Hn){var s=Be();return n===null?i==null||i.after(s):n.before(s),Ee(s),s}Li(n)}return Ee(n),n}function ia(e){e.textContent=""}function sa(){return!1}function Ri(e,t,r){return r?document.createElement(e,{is:r}):document.createElement(e)}function Li(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Hn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function hu(e){var t=I;if(t===null)return R.f|=gt,e;if(!(t.f&Dt)&&!(t.f&sr))throw e;Ze(e,t)}function Ze(e,t){if(!(t!==null&&t.f&ye)){for(;t!==null;){if(t.f&Kn&&!(t.f&(ye|hn))){if(!(t.f&Dt))throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}function aa(e){I===null&&(R===null&&jo(),ko()),ft&&Go()}function cu(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Xe(e,t){var o;var r=I;r!==null&&r.f&pe&&(e|=pe);var n={ctx:ve,deps:null,nodes:null,f:e|ne|Ie,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};N==null||N.register_created_effect(n);var i=n;if(e&sr)Xt!==null?Xt.push(n):bt.ensure().schedule(n);else if(t!==null){try{lr(n)}catch(a){throw me(n),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&Ut)&&(i=i.first,e&ke&&e&ar&&i!==null&&(i.f|=ar))}if(i!==null&&(i.parent=r,r!==null&&cu(i,r),R!==null&&R.f&ae&&!(e&et))){var s=R;((o=s.effects)!=null?o:s.effects=[]).push(i)}return n}function Ci(){return R!==null&&!je}function oa(e){const t=Xe(Gr,null);return ee(t,se),t.teardown=e,t}function Nr(e){var i;aa();var t=I.f,r=!R&&(t&Le)!==0&&ve!==null&&!ve.i;if(r){var n=ve;((i=n.e)!=null?i:n.e=[]).push(e)}else return ua(e)}function ua(e){return Xe(sr|$s,e)}function du(e){return aa(),Xe(Gr|$s,e)}function pu(e){bt.ensure();const t=Xe(et|Ut,e);return()=>{me(t)}}function vu(e){bt.ensure();const t=Xe(et|Ut,e);return(r={})=>new Promise(n=>{r.outro?Bt(t,()=>{me(t),n(void 0)}):(me(t),n(void 0))})}function la(e){return Xe(sr,e)}function mu(e){return Xe(zt|Ut,e)}function Di(e,t=0){return Xe(Gr|t,e)}function oi(e,t=[],r=[],n=[]){tu(n,t,r,i=>{Xe(Gr,()=>{e(...i.map(H))})})}function Ui(e,t=0){var r=Xe(ke|t,e);return r}function $e(e){return Xe(Le|Ut,e)}function fa(e){var t=e.teardown;if(t!==null){const r=ft,n=R;es(!0),Ce(null);try{t.call(null)}catch(i){Ze(i,e.parent)}finally{es(r),Ce(n)}}}function Fi(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&In(()=>{i.abort(kr)});var n=r.next;r.f&et?r.parent=null:me(r,t),r=n}}function _u(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Le||me(t),t=r}}function me(e,t=!0){var r=!1;(t||e.f&No)&&e.nodes!==null&&e.nodes.end!==null&&(gu(e.nodes.start,e.nodes.end),r=!0),e.f|=hn,Fi(e,t&&!r),$r(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();fa(e),e.f^=hn,e.f|=ye;var i=e.parent;i!==null&&i.first!==null&&ha(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function gu(e,t){for(;e!==null;){var r=e===t?null:rt(e);e.remove(),e=r}}function ha(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 Bt(e,t,r=!0){var n=[];e.f|=Hi,ca(e,n,!0);var i=()=>{r&&me(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function ca(e,t,r){if(!(e.f&pe)){e.f^=pe;var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next;if(!(i.f&et)){var o=(i.f&ar)!==0||(i.f&Le)!==0&&(e.f&ke)!==0;ca(i,t,o?r:!1)}i=s}}}function bn(e){e.f&=~Hi,da(e,!0)}function da(e,t){if(!(e.f&Hi)&&e.f&pe){e.f^=pe,e.f&se||(ee(e,ne),bt.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&ar)!==0||(r.f&Le)!==0;da(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function Gi(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:rt(r);t.append(r),r=i}}let tn=!1,ft=!1;function es(e){ft=e}let R=null,je=!1;function Ce(e){R=e}let I=null;function tt(e){I=e}let Re=null;function pa(e){R!==null&&(Re!=null?Re:Re=new Set).add(e)}let be=null,Ae=0,Oe=null;function bu(e){Oe=e}let va=1,Ht=0,Rt=Ht;function ts(e){Rt=e}function ma(){return++va}function Vr(e){var t=e.f;if(t&ne)return!0;if(t&ae&&(e.f&=~Lt),t&Ve){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Vr(s)&&Xs(s),s.wv>e.wv)return!0}t&Ie&&oe===null&&ee(e,se)}return!1}function _a(e,t,r=!0){var n=e.reactions;if(n!==null&&!(Re!==null&&Re.has(e)))for(var i=0;i<n.length;i++){var s=n[i];s.f&ae?_a(s,t,!1):t===s&&(r?ee(s,ne):s.f&se&&ee(s,Ve),Ii(s))}}function ga(e){var t=be,r=Ae,n=Oe,i=R,s=Re,o=ve,a=je,u=Rt,l=e.f;be=null,Ae=0,Oe=null,R=l&(Le|et)?null:e,Re=null,or(e.ctx),je=!1,Rt=++Ht,e.ac!==null&&(In(()=>{e.ac.abort(kr)}),e.ac=null);try{e.f|=dn;var f=e.fn,d=f();e.f|=Dt;var c=rs(e);if(Ds()&&Oe!==null&&!je&&c!==null&&!(e.f&(ae|Ve|ne)))for(var p=0;p<Oe.length;p++)_a(Oe[p],e);if(i!==null&&i!==e){if(Ht++,i.deps!==null)for(let v=0;v<r;v+=1)i.deps[v].rv=Ht;if(t!==null)for(const v of t)v.rv=Ht;Oe!==null&&(n===null?n=Oe:n.push(...Oe))}return e.f>&&(e.f^=gt),d}catch(v){return rs(e),hu(v)}finally{e.f^=dn,be=t,Ae=r,Oe=n,R=i,Re=s,or(o),je=a,Rt=u}}function rs(e){var i,s;var t=e.deps,r=N==null?void 0:N.is_fork;if(be!==null){var n;if(r||$r(e,Ae),t!==null&&Ae>0)for(t.length=Ae+be.length,n=0;n<be.length;n++)t[Ae+n]=be[n];else e.deps=t=be;if(Ci()&&e.f&Ie)for(n=Ae;n<t.length;n++)((s=(i=t[n]).reactions)!=null?s:i.reactions=[]).push(e)}else!r&&t!==null&&Ae<t.length&&($r(e,Ae),t.length=Ae);return t}function yu(e,t){let r=t.reactions;if(r!==null){var n=Ho.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&ae&&(be===null||!ln.call(be,t))){var s=t;s.f&Ie&&(s.f^=Ie,s.f&=~Lt),s.v!==ie&&Oi(s),s.ac!==null&&In(()=>{s.ac.abort(kr),s.ac=null,ee(s,ne)}),au(s),$r(s,0)}}function $r(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)yu(e,r[n])}function lr(e){var t=e.f;if(!(t&ye)){ee(e,se);var r=I,n=tn;I=e,tn=(t&(Le|et))===0;try{t&(ke|Ns)?_u(e):Fi(e),fa(e);var i=ga(e);e.teardown=typeof i=="function"?i:null,e.wv=va;var s;As&&Zo&&e.f&ne&&e.deps}finally{tn=n,I=r}}}function Eu(){return nt(this,null,function*(){yield Promise.resolve(),He()})}function H(e){var f;var t=e.f,r=(t&ae)!==0;if(R!==null&&!je){var n=I!==null&&(I.f&ye)!==0;if(!n&&(Re===null||!Re.has(e))){var i=R.deps;if(R.f&dn)e.rv<Ht&&(e.rv=Ht,be===null&&i!==null&&i[Ae]===e?Ae++:be===null?be=[e]:be.push(e));else{(f=R.deps)!=null||(R.deps=[]),ln.call(R.deps,e)||R.deps.push(e);var s=e.reactions;s===null?e.reactions=[R]:ln.call(s,R)||s.push(R)}}}if(ft&&Ke.has(e))return Ke.get(e);if(r){var o=e;if(ft){var a=o.v;return(!(o.f&se)&&o.reactions!==null||ya(o))&&(a=Ni(o)),Ke.set(o,a),a}var u=(o.f&Ie)===0&&!je&&R!==null&&(tn||(R.f&Ie)!==0),l=(o.f&Dt)===0;Vr(o)&&(u&&(o.f|=Ie),Xs(o)),u&&!l&&(Ws(o),ba(o))}if(oe!=null&&oe.has(e))return oe.get(e);if(e.f>)throw e.v;return e.v}function ba(e){var t;if(e.f|=Ie,e.deps!==null)for(const r of e.deps)((t=r.reactions)!=null?t:r.reactions=[]).push(e),r.f&ae&&!(r.f&Ie)&&(Ws(r),ba(r))}function ya(e){if(e.v===ie)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ke.has(t)||t.f&ae&&ya(t))return!0;return!1}function ki(e){var t=je;try{return je=!0,e()}finally{je=t}}const Mt=Symbol("events"),Ea=new Set,ui=new Set;function rn(e,t,r){var n;((n=t[Mt])!=null?n:t[Mt]={})[e]=r}function xa(e){for(var t=0;t<e.length;t++)Ea.add(e[t]);for(var r of ui)r(e)}let jn=null,Vn=!1;function ns(e){var _,m;var t=this,r=t.ownerDocument,n=e.type,i=((_=e.composedPath)==null?void 0:_.call(e))||[],s=i[0]||e.target;jn=e,Vn||(Vn=!0,setTimeout(()=>{Vn=!1,jn=null}));var o=0,a=jn===e&&e[Mt];if(a){var u=i.indexOf(a);if(u!==-1&&(t===document||t===window)){e[Mt]=t;return}var l=i.indexOf(t);if(l===-1)return;u<=l&&(o=u)}if(s=i[o]||e.target,s!==t){ir(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=R,d=I;Ce(null),tt(null);try{for(var c,p=[];s!==null&&s!==t;){try{var v=(m=s[Mt])==null?void 0:m[n];v!=null&&(!s.disabled||e.target===s)&&v.call(s,e)}catch(T){c?p.push(T):c=T}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(c){for(let T of p)queueMicrotask(()=>{throw T});throw c}}finally{e[Mt]=t,delete e.currentTarget,Ce(f),tt(d)}}}var ws;const Xn=((ws=globalThis==null?void 0:globalThis.window)==null?void 0:ws.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function xu(e){var t;return(t=Xn==null?void 0:Xn.createHTML(e))!=null?t:e}function wu(e){var t=Ri("template");return t.innerHTML=xu(e.replaceAll("<!>","<!---->")),t.content}function qt(e,t){var r=I;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Xr(e,t){var r=(t&To)!==0,n=(t&So)!==0,i,s=!e.startsWith("<!>");return()=>{if(U)return qt(L,null),L;i===void 0&&(i=wu(s?e:"<!>"+e),r||(i=yt(i)));var o=n||ea?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=yt(o),u=o.lastChild;qt(a,u)}else qt(o,o);return o}}function wa(){if(U)return qt(L,null),L;var e=document.createDocumentFragment(),t=document.createComment(""),r=Be();return e.append(t,r),qt(t,r),e}function St(e,t){if(U){var r=I;(!(r.f&Dt)||r.nodes.end===null)&&(r.nodes.end=L),On();return}e!==null&&e.before(t)}const Tu=["touchstart","touchmove"];function Su(e){return Tu.includes(e)}function Au(e){let t=0,r=Ct(0),n;return()=>{Ci()&&(H(r),Di(()=>(t===0&&(n=ki(()=>e(()=>Or(r)))),t+=1,()=>{mt(()=>{t-=1,t===0&&(n==null||n(),n=void 0,Or(r))})})))}}var Hu=ar|Ut;function Mu(e,t,r,n){new Ou(e,t,r,n)}var xe,Lr,Pe,Nt,he,we,ce,Te,ze,$t,vt,rr,Cr,Dr,at,Tn,k,Ta,Sa,li,Aa,fi,Sr,nn,hi,ci;class Ou{constructor(t,r,n,i){$(this,k);z(this,"parent");z(this,"is_pending",!1);z(this,"transform_error");$(this,xe);$(this,Lr,U?L:null);$(this,Pe);$(this,Nt);$(this,he);$(this,we,null);$(this,ce,null);$(this,Te,null);$(this,ze,null);$(this,$t,0);$(this,vt,0);$(this,rr,!1);$(this,Cr,new Set);$(this,Dr,new Set);$(this,at,null);$(this,Tn,Au(()=>(M(this,at,Ct(h(this,$t))),()=>{M(this,at,null)})));var s,o;M(this,xe,t),M(this,Pe,r),M(this,Nt,a=>{var u=I;u.b=this,u.f|=Kn,n(a)}),this.parent=I.b,this.transform_error=(o=i!=null?i:(s=this.parent)==null?void 0:s.transform_error)!=null?o:a=>a,M(this,he,Ui(()=>{if(U){const a=h(this,Lr);On();const u=a.data===Si;if(a.data.startsWith(qi)){const f=JSON.parse(a.data.slice(qi.length));B(this,k,Sa).call(this,f)}else u?B(this,k,Aa).call(this):B(this,k,Ta).call(this)}else B(this,k,fi).call(this)},Hu)),U&&M(this,xe,L)}defer_effect(t){Gs(t,h(this,Cr),h(this,Dr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!h(this,Pe).pending}update_pending_count(t,r){B(this,k,hi).call(this,t,r),M(this,$t,h(this,$t)+t),!(!h(this,at)||h(this,rr))&&(M(this,rr,!0),mt(()=>{M(this,rr,!1),h(this,at)&&ur(h(this,at),h(this,$t))}))}get_effect_pending(){return h(this,Tn).call(this),H(h(this,at))}error(t){if(!h(this,Pe).onerror&&!h(this,Pe).failed)throw t;N!=null&&N.is_fork?(h(this,we)&&N.skip_effect(h(this,we)),h(this,ce)&&N.skip_effect(h(this,ce)),h(this,Te)&&N.skip_effect(h(this,Te)),N.oncommit(()=>{B(this,k,ci).call(this,t)})):B(this,k,ci).call(this,t)}}xe=new WeakMap,Lr=new WeakMap,Pe=new WeakMap,Nt=new WeakMap,he=new WeakMap,we=new WeakMap,ce=new WeakMap,Te=new WeakMap,ze=new WeakMap,$t=new WeakMap,vt=new WeakMap,rr=new WeakMap,Cr=new WeakMap,Dr=new WeakMap,at=new WeakMap,Tn=new WeakMap,k=new WeakSet,Ta=function(){try{M(this,we,$e(()=>h(this,Nt).call(this,h(this,xe))))}catch(t){this.error(t)}},Sa=function(t){const r=h(this,Pe).failed,{reset:n,invoke_onerror:i}=B(this,k,li).call(this,t);mt(i),r&&M(this,Te,$e(()=>{r(h(this,xe),()=>t,()=>n)}))},li=function(t){var r=!1,n=!1;const i=()=>{if(r){Co();return}r=!0,n&&qo(),h(this,Te)!==null&&Bt(h(this,Te),()=>{M(this,Te,null)}),B(this,k,nn).call(this,()=>{B(this,k,fi).call(this)})};return{reset:i,invoke_onerror:()=>{var o,a;try{n=!0,(a=(o=h(this,Pe)).onerror)==null||a.call(o,t,i),n=!1}catch(u){Ze(u,h(this,he)&&h(this,he).parent)}}}},Aa=function(){const t=h(this,Pe).pending;t&&(this.is_pending=!0,M(this,ce,$e(()=>t(h(this,xe)))),mt(()=>{var r=M(this,ze,document.createDocumentFragment()),n=Be(),i=!1;if(r.append(n),M(this,we,B(this,k,nn).call(this,()=>{try{return $e(()=>h(this,Nt).call(this,n))}catch(s){try{this.error(s),i=!0}catch(o){Ze(o,h(this,he).parent)}return null}})),h(this,we)===null){M(this,ze,null),i&&B(this,k,Sr).call(this,N);return}h(this,vt)===0&&(h(this,xe).before(r),M(this,ze,null),Bt(h(this,ce),()=>{M(this,ce,null)}),B(this,k,Sr).call(this,N))}))},fi=function(){try{if(this.is_pending=this.has_pending_snippet(),M(this,vt,0),M(this,$t,0),M(this,we,$e(()=>{h(this,Nt).call(this,h(this,xe))})),h(this,vt)>0){var t=M(this,ze,document.createDocumentFragment());Gi(h(this,we),t);const r=h(this,Pe).pending;M(this,ce,$e(()=>r(h(this,xe))))}else B(this,k,Sr).call(this,N)}catch(r){this.error(r)}},Sr=function(t){this.is_pending=!1,t.transfer_effects(h(this,Cr),h(this,Dr))},nn=function(t){var r=I,n=R,i=ve;tt(h(this,he)),Ce(h(this,he)),or(h(this,he).ctx);try{return bt.ensure(),t()}finally{tt(r),Ce(n),or(i)}},hi=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&B(n=this.parent,k,hi).call(n,t,r);return}M(this,vt,h(this,vt)+t),h(this,vt)===0&&(B(this,k,Sr).call(this,r),h(this,ce)&&Bt(h(this,ce),()=>{M(this,ce,null)}),h(this,ze)&&(h(this,xe).before(h(this,ze)),M(this,ze,null)))},ci=function(t){h(this,we)&&(me(h(this,we)),M(this,we,null)),h(this,ce)&&(me(h(this,ce)),M(this,ce,null)),h(this,Te)&&(me(h(this,Te)),M(this,Te,null)),U&&(Ee(h(this,Lr)),Do(),Ee(vn()));let r=h(this,Pe).failed;const n=i=>{const{reset:s,invoke_onerror:o}=B(this,k,li).call(this,i);o(),r&&M(this,Te,B(this,k,nn).call(this,()=>{try{return $e(()=>{var a=I;a.b=this,a.f|=Kn,r(h(this,xe),()=>i,()=>s)})}catch(a){return Ze(a,h(this,he).parent),null}}))};mt(()=>{var i;try{i=this.transform_error(t)}catch(s){Ze(s,h(this,he)&&h(this,he).parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(n,s=>Ze(s,h(this,he)&&h(this,he).parent)):n(i)})};function sn(e,t){var n;var r=t==null?"":typeof t=="object"?`${t}`:t;r!==((n=e[Er])!=null?n:e[Er]=e.nodeValue)&&(e[Er]=r,e.nodeValue=`${r}`)}function Ha(e,t){return Ma(e,t)}function Pu(e,t){var o;si(),t.intro=(o=t.intro)!=null?o:!1;const r=t.target,n=U,i=L;try{for(var s=yt(r);s&&(s.nodeType!==jr||s.data!==Ss);)s=rt(s);if(!s)throw nr;ut(!0),Ee(s);const a=Ma(e,zr(Yr({},t),{anchor:s}));return ut(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(u=>u.startsWith("https://svelte.dev/e/")))throw a;return a!==nr&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Xo(),si(),ia(r),ut(!1),Ha(e,t)}finally{ut(n),Ee(i)}}const qr=new Map;function Ma(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:a}){si();var u=void 0,l=vu(()=>{var f=r!=null?r:t.appendChild(Be());Mu(f,{pending:()=>{}},p=>{Pn({});var v=ve;if(s&&(v.c=s),i&&(n.$$events=i),U&&qt(p,null),u=e(p,n)||Mi(),U&&(I.nodes.end=L,L===null||L.nodeType!==jr||L.data!==Ai))throw Mn(),nr;Nn()},a);var d=new Set,c=p=>{for(var v=0;v<p.length;v++){var _=p[v];if(!d.has(_)){d.add(_);var m=Su(_);for(const O of[t,document]){var T=qr.get(O);T===void 0&&(T=new Map,qr.set(O,T));var F=T.get(_);F===void 0?(O.addEventListener(_,ns,{passive:m}),T.set(_,1)):T.set(_,F+1)}}}};return c(An(Ea)),ui.add(c),()=>{var m;for(var p of d)for(const T of[t,document]){var v=qr.get(T),_=v.get(p);--_==0?(T.removeEventListener(p,ns),v.delete(p),v.size===0&&qr.delete(T)):v.set(p,_)}ui.delete(c),f!==r&&((m=f.parentNode)==null||m.removeChild(f))}});return di.set(u,l),u}let di=new WeakMap;function Nu(e,t){const r=di.get(e);return r?(di.delete(e),r(t)):Promise.resolve()}var Fe,qe,Se,It,Ur,Fr,Sn;class $u{constructor(t,r=!0){z(this,"anchor");$(this,Fe,new Map);$(this,qe,new Map);$(this,Se,new Map);$(this,It,new Set);$(this,Ur,!0);$(this,Fr,t=>{if(h(this,Fe).has(t)){var r=h(this,Fe).get(t),n=h(this,qe).get(r);if(n)bn(n),h(this,It).delete(r);else{var i=h(this,Se).get(r);i&&(bn(i.effect),h(this,qe).set(r,i.effect),h(this,Se).delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,o]of h(this,Fe)){if(h(this,Fe).delete(s),s===t)break;const a=h(this,Se).get(o);a&&(me(a.effect),h(this,Se).delete(o))}for(const[s,o]of h(this,qe)){if(s===r||h(this,It).has(s))continue;const a=()=>{if(Array.from(h(this,Fe).values()).includes(s)){var l=document.createDocumentFragment();Gi(o,l),l.append(Be()),h(this,Se).set(s,{effect:o,fragment:l})}else me(o);h(this,It).delete(s),h(this,qe).delete(s)};h(this,Ur)||!n?(h(this,It).add(s),Bt(o,a,!1)):a()}}});$(this,Sn,t=>{h(this,Fe).delete(t);const r=Array.from(h(this,Fe).values());for(const[n,i]of h(this,Se))r.includes(n)||(me(i.effect),h(this,Se).delete(n))});this.anchor=t,M(this,Ur,r)}ensure(t,r){var n=N,i=sa();if(r&&!h(this,qe).has(t)&&!h(this,Se).has(t))if(i){var s=document.createDocumentFragment(),o=Be();s.append(o),h(this,Se).set(t,{effect:$e(()=>r(o)),fragment:s})}else h(this,qe).set(t,$e(()=>r(this.anchor)));if(h(this,Fe).set(n,t),i){for(const[a,u]of h(this,qe))a===t?n.unskip_effect(u):n.skip_effect(u);for(const[a,u]of h(this,Se))a===t?n.unskip_effect(u.effect):n.skip_effect(u.effect);n.oncommit(h(this,Fr)),n.ondiscard(h(this,Sn))}else U&&(this.anchor=L),h(this,Fr).call(this,n)}}Fe=new WeakMap,qe=new WeakMap,Se=new WeakMap,It=new WeakMap,Ur=new WeakMap,Fr=new WeakMap,Sn=new WeakMap;function pi(e,t,r=!1){var n;U&&(n=L,On());var i=new $u(e),s=r?ar:0;function o(a,u){if(U){var l=Bs(n);if(a!==parseInt(l.substring(1))){var f=vn();Ee(f),i.anchor=f,ut(!1),i.ensure(a,u),ut(!0);return}}i.ensure(a,u)}Ui(()=>{var a=!1;t((u,l=0)=>{a=!0,o(l,u)}),a||o(-1,null)},s)}function Oa(e,t){return t}function Iu(e,t,r){var d;for(var n=[],i=t.length,s,o=t.length,a=0;a<i;a++){let c=t[a];Bt(c,()=>{if(s){if(s.pending.delete(c),s.done.add(c),s.pending.size===0){var p=e.outrogroups;vi(e,An(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=n.length===0&&r!==null&&e.pending.size===0;if(u){var l=r,f=l.parentNode;ia(f),f.append(l),e.items.clear()}vi(e,t,!u)}else s={pending:new Set(t),done:new Set},((d=e.outrogroups)!=null?d:e.outrogroups=new Set).add(s)}function vi(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const o of e.pending.values())for(const a of o)n.add(e.items.get(a).e)}for(var i=0;i<t.length;i++){var s=t[i];if(n!=null&&n.has(s)){s.f|=Qe;const o=document.createDocumentFragment();Gi(s,o)}else me(t[i],r)}}var jt;function Pa(e,t,r,n,i,s=null){var o=e,a=new Map,u=(t&Ts)!==0;if(u){var l=e;o=U?Ee(yt(l)):l.appendChild(Be())}U&&On();var f=null,d=iu(()=>{var O=r();return Hs(O)?O:O==null?[]:An(O)}),c,p=new Map,v=!0;function _(O){F.effect.f&ye||(F.pending.delete(O),F.fallback=f,Bu(F,c,o,t,n),f!==null&&(c.length===0?f.f&Qe?(f.f^=Qe,Ar(f,null,o)):bn(f):Bt(f,()=>{f=null})))}function m(O){F.pending.delete(O)}var T=Ui(()=>{c=H(d);var O=c.length;let W=!1;if(U){var Z=Bs(o)===Si;Z!==(O===0)&&(o=vn(),Ee(o),ut(!1),W=!0)}for(var j=new Set,te=N,Me=sa(),le=0;le<O;le+=1){U&&L.nodeType===jr&&L.data===Ai&&(o=L,W=!0,ut(!1));var x=c[le],A=n(x,le),X=v?null:a.get(A);X?(X.v&&ur(X.v,x),X.i&&ur(X.i,le),Me&&te.unskip_effect(X.e)):(X=Ru(a,v?o:jt!=null?jt:jt=Be(),x,A,le,i,t,r),v||(X.e.f|=Qe),a.set(A,X)),j.add(A)}if(O===0&&s&&!f&&(v?f=$e(()=>s(o)):(f=$e(()=>s(jt!=null?jt:jt=Be())),f.f|=Qe)),O>j.size&&Fo(),U&&O>0&&Ee(vn()),!v)if(p.set(te,j),Me){for(const[We,S]of a)j.has(We)||te.skip_effect(S.e);te.oncommit(_),te.ondiscard(m)}else _(te);W&&ut(!0),H(d)}),F={effect:T,items:a,pending:p,outrogroups:null,fallback:f};v=!1,U&&(o=L)}function br(e){for(;e!==null&&!(e.f&Le);)e=e.next;return e}function Bu(e,t,r,n,i){var x,A,X,We,S,y,g,E,b;var s=(n&xo)!==0,o=t.length,a=e.items,u=br(e.effect.first),l,f=null,d,c=[],p=[],v,_,m,T;if(s)for(T=0;T<o;T+=1)v=t[T],_=i(v,T),m=a.get(_).e,m.f&Qe||((A=(x=m.nodes)==null?void 0:x.a)==null||A.measure(),(d!=null?d:d=new Set).add(m));for(T=0;T<o;T+=1){if(v=t[T],_=i(v,T),m=a.get(_).e,e.outrogroups!==null)for(const w of e.outrogroups)w.pending.delete(m),w.done.delete(m);if(m.f&pe&&(bn(m),s&&((We=(X=m.nodes)==null?void 0:X.a)==null||We.unfix(),(d!=null?d:d=new Set).delete(m))),m.f&Qe)if(m.f^=Qe,m===u)Ar(m,null,r);else{var F=f?f.next:u;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),dt(e,f,m),dt(e,m,F),Ar(m,F,r),f=m,c=[],p=[],u=br(f.next);continue}if(m!==u){if(l!==void 0&&l.has(m)){if(c.length<p.length){var O=p[0],W;f=O.prev;var Z=c[0],j=c[c.length-1];for(W=0;W<c.length;W+=1)Ar(c[W],O,r);for(W=0;W<p.length;W+=1)l.delete(p[W]);dt(e,Z.prev,j.next),dt(e,f,Z),dt(e,j,O),u=O,f=j,T-=1,c=[],p=[]}else l.delete(m),Ar(m,u,r),dt(e,m.prev,m.next),dt(e,m,f===null?e.effect.first:f.next),dt(e,f,m),f=m;continue}for(c=[],p=[];u!==null&&u!==m;)(l!=null?l:l=new Set).add(u),p.push(u),u=br(u.next);if(u===null)continue}m.f&Qe||c.push(m),f=m,u=br(m.next)}if(e.outrogroups!==null){for(const w of e.outrogroups)w.pending.size===0&&(vi(e,An(w.done)),(S=e.outrogroups)==null||S.delete(w));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||l!==void 0){var te=[];if(l!==void 0)for(m of l)m.f&pe||te.push(m);for(;u!==null;)!(u.f&pe)&&u!==e.fallback&&te.push(u),u=br(u.next);var Me=te.length;if(Me>0){var le=n&Ts&&o===0?r:null;if(s){for(T=0;T<Me;T+=1)(g=(y=te[T].nodes)==null?void 0:y.a)==null||g.measure();for(T=0;T<Me;T+=1)(b=(E=te[T].nodes)==null?void 0:E.a)==null||b.fix()}Iu(e,te,le)}}s&&mt(()=>{var w,P;if(d!==void 0)for(m of d)(P=(w=m.nodes)==null?void 0:w.a)==null||P.apply()})}function Ru(e,t,r,n,i,s,o,a){var u=o&yo?o&wo?Ct(r):Bi(r,!1,!1):null,l=o&Eo?Ct(i):null;return{v:u,i:l,e:$e(()=>(s(t,u!=null?u:r,l!=null?l:i,a),()=>{e.delete(n)}))}}function Ar(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&!(t.f&Qe)?t.nodes.start:r;n!==null;){var o=rt(n);if(s.before(n),n===i)return;n=o}}function dt(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function Na(e,t){la(()=>{var i,s,o,a;e=(o=(s=(i=I==null?void 0:I.parent)==null?void 0:i.nodes)==null?void 0:s.start)!=null?o:e;var r=e.getRootNode(),n=r.host?r:(a=r.head)!=null?a:r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const u=Ri("style");u.id=t.hash,u.textContent=t.code,n.appendChild(u)}})}const is=[...`
|
|
3
|
-
\r\f \v\uFEFF`];function Lu(e,t,r){var n=e==null?"":""+e;if(r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||is.includes(n[o-1]))&&(a===n.length||is.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function $a(e,t,r,n,i,s){var o=e[ei];if(U||o!==r||o===void 0){var a=Lu(r,n,s);(!U||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):e.className=a),e[ei]=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 Cu=Symbol("is custom element"),Du=Symbol("is html"),Uu=Ro?"link":"LINK";function Fu(e,t,r,n){var i=Gu(e);U&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Uu)||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Io]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ku(e).has(t)?e[t]=r:e.setAttribute(t,r))}function Gu(e){var t;return(t=e[Qr])!=null?t:e[Qr]={[Cu]:e.nodeName.includes("-"),[Du]:e.namespaceURI===Ao}}var ss=new Map;function ku(e){var t=e.getAttribute("is")||e.nodeName,r=ss.get(t);if(r)return r;ss.set(t,r=new Set);for(var n,i=e,s=Element.prototype;s!==i;){n=Mo(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.add(o);i=Ms(i)}return r}function Wn(e,t){return e===t||(e==null?void 0:e[Jr])===t}function ju(e=Mi(),t,r,n){var i=ve.r,s=I;return la(()=>{var o,a;return Di(()=>{o=a,a=[],ki(()=>{Wn(r(...a),e)||(t(e,...a),o&&Wn(r(...o),e)&&t(null,...o))})}),()=>{let u=s;for(;u!==i&&u.parent!==null&&u.parent.f&hn;)u=u.parent;const l=()=>{a&&Wn(r(...a),e)&&t(null,...a)},f=u.teardown;u.teardown=()=>{l(),f==null||f()}}}),e}function Ge(e,t,r,n){var i=n,s=!0,o=()=>(s&&(s=!1,i=n),i),a;a=e[t],a===void 0&&n!==void 0&&(a=o());var u;u=()=>{var c=e[t];return c===void 0?o():(s=!0,c)};var l=!1,f=Bn(()=>(l=!1,u())),d=I;return function(c,p){if(arguments.length>0){const v=p?H(f):c;return re(f,v),l=!0,i!==void 0&&(i=v),c}return ft&&l||d.f&ye?f.v:H(f)}}function Vu(e){return new Xu(e)}var ot,Ne;class Xu{constructor(t){$(this,ot);$(this,Ne);var s,o;var r=new Map,n=(a,u)=>{var l=Bi(u,!1,!1);return r.set(a,l),l};const i=new Proxy(zr(Yr({},t.props||{}),{$$events:{}}),{get(a,u){var l;return H((l=r.get(u))!=null?l:n(u,Reflect.get(a,u)))},has(a,u){var l;return u===$o?!0:(H((l=r.get(u))!=null?l:n(u,Reflect.get(a,u))),Reflect.has(a,u))},set(a,u,l){var f;return re((f=r.get(u))!=null?f:n(u,l),l),Reflect.set(a,u,l)}});M(this,Ne,(t.hydrate?Pu:Ha)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:(s=t.intro)!=null?s:!1,recover:t.recover,transformError:t.transformError})),(!((o=t==null?void 0:t.props)!=null&&o.$$host)||t.sync===!1)&&He(),M(this,ot,i.$$events);for(const a of Object.keys(h(this,Ne)))a==="$set"||a==="$destroy"||a==="$on"||ir(this,a,{get(){return h(this,Ne)[a]},set(u){h(this,Ne)[a]=u},enumerable:!0});h(this,Ne).$set=a=>{Object.assign(i,a)},h(this,Ne).$destroy=()=>{Nu(h(this,Ne))}}$set(t){h(this,Ne).$set(t)}$on(t,r){h(this,ot)[t]=h(this,ot)[t]||[];const n=(...i)=>r.call(this,...i);return h(this,ot)[t].push(n),()=>{h(this,ot)[t]=h(this,ot)[t].filter(i=>i!==n)}}$destroy(){h(this,Ne).$destroy()}}ot=new WeakMap,Ne=new WeakMap;let Ia;typeof HTMLElement=="function"&&(Ia=class extends HTMLElement{constructor(t,r,n){super();z(this,"$$ctor");z(this,"$$s");z(this,"$$c");z(this,"$$cn",!1);z(this,"$$d",{});z(this,"$$r",!1);z(this,"$$p_d",{});z(this,"$$l",{});z(this,"$$l_u",new Map);z(this,"$$me");z(this,"$$shadowRoot",null);this.$$ctor=t,this.$$s=r,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}connectedCallback(){return nt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let r=function(s){return o=>{const a=Ri("slot");s!=="default"&&(a.name=s),St(o,a)}};var t=r;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=Wu(this);for(const s of this.$$s)s in i&&(s==="default"&&!this.$$d.children?(this.$$d.children=r(s),n.default=!0):n[s]=r(s));for(const s of this.attributes){const o=this.$$g_p(s.name);o in this.$$d||(this.$$d[o]=an(o,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=Vu({component:this.$$ctor,target:this.$$shadowRoot||this,props:zr(Yr({},this.$$d),{$$slots:n,$$host:this})}),this.$$me=pu(()=>{Di(()=>{var s;this.$$r=!0;for(const o of fn(this.$$c)){if(!((s=this.$$p_d[o])!=null&&s.reflect))continue;this.$$d[o]=this.$$c[o];const a=an(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1})});for(const s in this.$$l)for(const o of this.$$l[s]){const a=this.$$c.$on(s,o);this.$$l_u.set(o,a)}this.$$l={}}})}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=an(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return fn(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function an(e,t,r,n){var s;const i=(s=r[e])==null?void 0:s.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Wu(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ji(e,t,r,n,i,s){let o=class extends Ia{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return fn(t).map(a=>(t[a].attribute||a).toLowerCase())}};return fn(t).forEach(a=>{ir(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var d;u=an(a,u,t),this.$$d[a]=u;var l=this.$$c;if(l){var f=(d=Yt(l,a))==null?void 0:d.get;f?l[a]=u:l.$set({[a]:u})}}})}),n.forEach(a=>{ir(o.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),e.element=o,o}class Ba extends Error{constructor(t,r){super(r),this.code=t,this.name="ElevateApiError"}}const Yu=e=>nt(exports,null,function*(){var s;const t=new URL(`${e.apiEndpoint}/elevate/playerInfo?language=${(s=e.locale)!=null?s:""}`),r=new Headers({"Content-Type":"application/json"});e.userSession&&r.append("X-SessionId",e.userSession);const i=yield(yield fetch(t.href,{method:"GET",headers:r})).json();if(!i.success)throw new Ba(i.errorCode,i.errorMessage);return i.data}),zu=e=>nt(exports,null,function*(){var i;const t=new URL(`${e.apiEndpoint}/elevate/levels?language=${(i=e.locale)!=null?i:""}`);return(yield(yield fetch(t.href,{method:"GET"})).json()).data}),qu={REDEEM_REWARD_CONFIRMED:"Loyalty:RedeemRewardConfirmed",BACK_BUTTON_CLICKED:"Loyalty:BackButtonClicked"},Zu="shop",Ju=10,Ra=12,Qu="DD/MM/YYYY HH:mm:ss",La=e=>{const t=new Headers({"Content-Type":"application/json"});return e&&t.append("X-SessionId",e),t},Ku=(n,...i)=>nt(exports,[n,...i],function*(e,t=0,r=Ra){var u;const s=new URL(`${e.apiEndpoint}/elevate/shop`);return s.searchParams.set("language",(u=e.locale)!=null?u:""),s.searchParams.set("pagination",`offset=${t},limit=${r}`),yield(yield fetch(s.href,{method:"GET",headers:La(e.userSession)})).json()}),el=(e,t)=>nt(exports,null,function*(){var s,o;const r=new URL(`${e.apiEndpoint}/elevate/shop`);return r.searchParams.set("language",(s=e.locale)!=null?s:""),r.searchParams.set("filter",`id=${t}`),(o=(yield(yield fetch(r.href,{method:"GET",headers:La(e.userSession)})).json()).data)==null?void 0:o[0]}),tl=(e,t)=>nt(exports,null,function*(){var o,a;const r=new URL(`${e.apiEndpoint}/elevate/redeem`),n=new Headers({"Content-Type":"application/json-patch+json"});e.userSession&&n.append("X-SessionId",e.userSession);const s=yield(yield fetch(r.href,{method:"PUT",headers:n,body:JSON.stringify({giftID:t})})).json();if(!s.success)throw new Ba((o=s.errorCode)!=null?o:"",(a=s.errorMessage)!=null?a:"Redeem failed")}),rl=(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 nl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Da={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(nl,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",f="week",d="month",c="quarter",p="year",v="date",_="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|YYYY|YY|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,F={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(S){var y=["th","st","nd","rd"],g=S%100;return"["+S+(y[(g-20)%10]||y[g]||y[0])+"]"}},O=function(S,y,g){var E=String(S);return!E||E.length>=y?S:""+Array(y+1-E.length).join(g)+S},W={s:O,z:function(S){var y=-S.utcOffset(),g=Math.abs(y),E=Math.floor(g/60),b=g%60;return(y<=0?"+":"-")+O(E,2,"0")+":"+O(b,2,"0")},m:function S(y,g){if(y.date()<g.date())return-S(g,y);var E=12*(g.year()-y.year())+(g.month()-y.month()),b=y.clone().add(E,d),w=g-b<0,P=y.clone().add(E+(w?-1:1),d);return+(-(E+(g-b)/(w?b-P:P-b))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:d,y:p,w:f,d:l,D:v,h:u,m:a,s:o,ms:s,Q:c}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},Z="en",j={};j[Z]=F;var te="$isDayjsObject",Me=function(S){return S instanceof X||!(!S||!S[te])},le=function S(y,g,E){var b;if(!y)return Z;if(typeof y=="string"){var w=y.toLowerCase();j[w]&&(b=w),g&&(j[w]=g,b=w);var P=y.split("-");if(!b&&P.length>1)return S(P[0])}else{var V=y.name;j[V]=y,b=V}return!E&&b&&(Z=b),b||!E&&Z},x=function(S,y){if(Me(S))return S.clone();var g=typeof y=="object"?y:{};return g.date=S,g.args=arguments,new X(g)},A=W;A.l=le,A.i=Me,A.w=function(S,y){return x(S,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var X=function(){function S(g){this.$L=le(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[te]=!0}var y=S.prototype;return y.parse=function(g){this.$d=function(E){var b=E.date,w=E.utc;if(b===null)return new Date(NaN);if(A.u(b))return new Date;if(b instanceof Date)return new Date(b);if(typeof b=="string"&&!/Z$/i.test(b)){var P=b.match(m);if(P){var V=P[2]-1||0,J=(P[7]||"0").substring(0,3);return w?new Date(Date.UTC(P[1],V,P[3]||1,P[4]||0,P[5]||0,P[6]||0,J)):new Date(P[1],V,P[3]||1,P[4]||0,P[5]||0,P[6]||0,J)}}return new Date(b)}(g),this.init()},y.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},y.$utils=function(){return A},y.isValid=function(){return this.$d.toString()!==_},y.isSame=function(g,E){var b=x(g);return this.startOf(E)<=b&&b<=this.endOf(E)},y.isAfter=function(g,E){return x(g)<this.startOf(E)},y.isBefore=function(g,E){return this.endOf(E)<x(g)},y.$g=function(g,E,b){return A.u(g)?this[E]:this.set(b,g)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(g,E){var b=this,w=!!A.u(E)||E,P=A.p(g),V=function(wt,_e){var ct=A.w(b.$u?Date.UTC(b.$y,_e,wt):new Date(b.$y,_e,wt),b);return w?ct:ct.endOf(l)},J=function(wt,_e){return A.w(b.toDate()[wt].apply(b.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(_e)),b)},Y=this.$W,Q=this.$M,fe=this.$D,ht="set"+(this.$u?"UTC":"");switch(P){case p:return w?V(1,0):V(31,11);case d:return w?V(1,Q):V(0,Q+1);case f:var xt=this.$locale().weekStart||0,_r=(Y<xt?Y+7:Y)-xt;return V(w?fe-_r:fe+(6-_r),Q);case l:case v:return J(ht+"Hours",0);case u:return J(ht+"Minutes",1);case a:return J(ht+"Seconds",2);case o:return J(ht+"Milliseconds",3);default:return this.clone()}},y.endOf=function(g){return this.startOf(g,!1)},y.$set=function(g,E){var b,w=A.p(g),P="set"+(this.$u?"UTC":""),V=(b={},b[l]=P+"Date",b[v]=P+"Date",b[d]=P+"Month",b[p]=P+"FullYear",b[u]=P+"Hours",b[a]=P+"Minutes",b[o]=P+"Seconds",b[s]=P+"Milliseconds",b)[w],J=w===l?this.$D+(E-this.$W):E;if(w===d||w===p){var Y=this.clone().set(v,1);Y.$d[V](J),Y.init(),this.$d=Y.set(v,Math.min(this.$D,Y.daysInMonth())).$d}else V&&this.$d[V](J);return this.init(),this},y.set=function(g,E){return this.clone().$set(g,E)},y.get=function(g){return this[A.p(g)]()},y.add=function(g,E){var b,w=this;g=Number(g);var P=A.p(E),V=function(Q){var fe=x(w);return A.w(fe.date(fe.date()+Math.round(Q*g)),w)};if(P===d)return this.set(d,this.$M+g);if(P===p)return this.set(p,this.$y+g);if(P===l)return V(1);if(P===f)return V(7);var J=(b={},b[a]=n,b[u]=i,b[o]=r,b)[P]||1,Y=this.$d.getTime()+g*J;return A.w(Y,this)},y.subtract=function(g,E){return this.add(-1*g,E)},y.format=function(g){var E=this,b=this.$locale();if(!this.isValid())return b.invalidDate||_;var w=g||"YYYY-MM-DDTHH:mm:ssZ",P=A.z(this),V=this.$H,J=this.$m,Y=this.$M,Q=b.weekdays,fe=b.months,ht=b.meridiem,xt=function(_e,ct,gr,Wr){return _e&&(_e[ct]||_e(E,w))||gr[ct].slice(0,Wr)},_r=function(_e){return A.s(V%12||12,_e,"0")},wt=ht||function(_e,ct,gr){var Wr=_e<12?"AM":"PM";return gr?Wr.toLowerCase():Wr};return w.replace(T,function(_e,ct){return ct||function(gr){switch(gr){case"YY":return String(E.$y).slice(-2);case"YYYY":return A.s(E.$y,4,"0");case"M":return Y+1;case"MM":return A.s(Y+1,2,"0");case"MMM":return xt(b.monthsShort,Y,fe,3);case"MMMM":return xt(fe,Y);case"D":return E.$D;case"DD":return A.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return xt(b.weekdaysMin,E.$W,Q,2);case"ddd":return xt(b.weekdaysShort,E.$W,Q,3);case"dddd":return Q[E.$W];case"H":return String(V);case"HH":return A.s(V,2,"0");case"h":return _r(1);case"hh":return _r(2);case"a":return wt(V,J,!0);case"A":return wt(V,J,!1);case"m":return String(J);case"mm":return A.s(J,2,"0");case"s":return String(E.$s);case"ss":return A.s(E.$s,2,"0");case"SSS":return A.s(E.$ms,3,"0");case"Z":return P}return null}(_e)||P.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(g,E,b){var w,P=this,V=A.p(E),J=x(g),Y=(J.utcOffset()-this.utcOffset())*n,Q=this-J,fe=function(){return A.m(P,J)};switch(V){case p:w=fe()/12;break;case d:w=fe();break;case c:w=fe()/3;break;case f:w=(Q-Y)/6048e5;break;case l:w=(Q-Y)/864e5;break;case u:w=Q/i;break;case a:w=Q/n;break;case o:w=Q/r;break;default:w=Q}return b?w:A.a(w)},y.daysInMonth=function(){return this.endOf(d).$D},y.$locale=function(){return j[this.$L]},y.locale=function(g,E){if(!g)return this.$L;var b=this.clone(),w=le(g,E,!0);return w&&(b.$L=w),b},y.clone=function(){return A.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},S}(),We=X.prototype;return x.prototype=We,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",p],["$D",v]].forEach(function(S){We[S[1]]=function(y){return this.$g(y,S[0],S[1])}}),x.extend=function(S,y){return S.$i||(S(y,X,x),S.$i=!0),x},x.locale=le,x.isDayjs=Me,x.unix=function(S){return x(1e3*S)},x.en=j[Z],x.Ls=j,x.p={},x})})(Da);var il=Da.exports;const sl=Ca(il),al=(e,t="DD/MM/YYYY")=>{const r=sl(e);return r.isValid()?r.format(t):""},ol=(e,t)=>{window.postMessage({type:"Loyalty:RewardItemClicked",name:e,id:t},window.location.href)},ul=(e,t)=>{window.postMessage({type:"Loyalty:RedeemRewardRequested",name:e,id:t},window.location.href)},ll=e=>{window.postMessage({type:"Loyalty:RedeemRewardSuccess",itemId:e},window.location.href)},fl=(e,t)=>{window.postMessage({type:"Loyalty:RedeemRewardFailed",itemId:e,res:t},window.location.href)},hl=()=>{window.dispatchEvent(new CustomEvent("redeemRewardButton"))};var cl=function(t){return dl(t)&&!pl(t)};function dl(e){return!!e&&typeof e=="object"}function pl(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||_l(e)}var vl=typeof Symbol=="function"&&Symbol.for,ml=vl?Symbol.for("react.element"):60103;function _l(e){return e.$$typeof===ml}function gl(e){return Array.isArray(e)?[]:{}}function Ir(e,t){return t.clone!==!1&&t.isMergeableObject(e)?fr(gl(e),e,t):e}function bl(e,t,r){return e.concat(t).map(function(n){return Ir(n,r)})}function yl(e,t){if(!t.customMerge)return fr;var r=t.customMerge(e);return typeof r=="function"?r:fr}function El(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function as(e){return Object.keys(e).concat(El(e))}function Ua(e,t){try{return t in e}catch(r){return!1}}function xl(e,t){return Ua(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function wl(e,t,r){var n={};return r.isMergeableObject(e)&&as(e).forEach(function(i){n[i]=Ir(e[i],r)}),as(t).forEach(function(i){xl(e,i)||(Ua(e,i)&&r.isMergeableObject(t[i])?n[i]=yl(i,r)(e[i],t[i],r):n[i]=Ir(t[i],r))}),n}function fr(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||bl,r.isMergeableObject=r.isMergeableObject||cl,r.cloneUnlessOtherwiseSpecified=Ir;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):wl(e,t,r):Ir(t,r)}fr.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return fr(n,i,r)},{})};var Tl=fr,Sl=Tl;const Al=Ca(Sl);var mi=function(e,t){return mi=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])},mi(e,t)};function Rn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");mi(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Je=function(){return Je=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},Je.apply(this,arguments)};function Hl(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 Yn(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 zn(e,t){var r=t&&t.cache?t.cache:Bl,n=t&&t.serializer?t.serializer:$l,i=t&&t.strategy?t.strategy:Pl;return i(e,{cache:r,serializer:n})}function Ml(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Ol(e,t,r,n){var i=Ml(n)?n:r(n),s=t.get(i);return typeof s=="undefined"&&(s=e.call(this,n),t.set(i,s)),s}function Fa(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),s=t.get(i);return typeof s=="undefined"&&(s=e.apply(this,n),t.set(i,s)),s}function Ga(e,t,r,n,i){return r.bind(t,e,n,i)}function Pl(e,t){var r=e.length===1?Ol:Fa;return Ga(e,this,r,t.cache.create(),t.serializer)}function Nl(e,t){return Ga(e,this,Fa,t.cache.create(),t.serializer)}var $l=function(){return JSON.stringify(arguments)},Il=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}(),Bl={create:function(){return new Il}},qn={variadic:Nl},yn=function(){return yn=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},yn.apply(this,arguments)};var C;(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"})(C||(C={}));var q;(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"})(q||(q={}));var hr;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(hr||(hr={}));function os(e){return e.type===q.literal}function Rl(e){return e.type===q.argument}function ka(e){return e.type===q.number}function ja(e){return e.type===q.date}function Va(e){return e.type===q.time}function Xa(e){return e.type===q.select}function Wa(e){return e.type===q.plural}function Ll(e){return e.type===q.pound}function Ya(e){return e.type===q.tag}function za(e){return!!(e&&typeof e=="object"&&e.type===hr.number)}function _i(e){return!!(e&&typeof e=="object"&&e.type===hr.dateTime)}var qa=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Cl=/(?:[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 Dl(e){var t={};return e.replace(Cl,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 K=function(){return K=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},K.apply(this,arguments)};var Ul=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Fl(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Ul).filter(function(c){return c.length>0}),r=[],n=0,i=t;n<i.length;n++){var s=i[n],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var a=o[0],u=o.slice(1),l=0,f=u;l<f.length;l++){var d=f[l];if(d.length===0)throw new Error("Invalid number skeleton")}r.push({stem:a,options:u})}return r}function Gl(e){return e.replace(/^(.*?)-/,"")}var us=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Za=/^(@+)?(\+|#+)?[rs]?$/g,kl=/(\*)(0+)|(#+)(0+)|(0+)/g,Ja=/^(0+)$/;function ls(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Za,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 Qa(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 jl(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)),!Ja.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function fs(e){var t={},r=Qa(e);return r||t}function Vl(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=Gl(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=K(K(K({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return K(K({},u),fs(l))},{}));continue;case"engineering":t=K(K(K({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return K(K({},u),fs(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(kl,function(u,l,f,d,c,p){if(l)t.minimumIntegerDigits=f.length;else{if(d&&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(Ja.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(us.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(us,function(u,l,f,d,c,p){return f==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.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=K(K({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=K(K({},t),ls(s)));continue}if(Za.test(i.stem)){t=K(K({},t),ls(i.stem));continue}var o=Qa(i.stem);o&&(t=K(K({},t),o));var a=jl(i.stem);a&&(t=K(K({},t),a))}return t}var Zr={"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 Xl(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 o=1+(s&1),a=s<2?1:3+(s>>1),u="a",l=Wl(t);for((l=="H"||l=="k")&&(a=0);a-- >0;)r+=u;for(;o-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function Wl(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=Zr[n||""]||Zr[r||""]||Zr["".concat(r,"-001")]||Zr["001"];return i[0]}var Zn,Yl=new RegExp("^".concat(qa.source,"*")),zl=new RegExp("".concat(qa.source,"*$"));function D(e,t){return{start:e,end:t}}var ql=!!String.prototype.startsWith&&"_a".startsWith("a",1),Zl=!!String.fromCodePoint,Jl=!!Object.fromEntries,Ql=!!String.prototype.codePointAt,Kl=!!String.prototype.trimStart,ef=!!String.prototype.trimEnd,tf=!!Number.isSafeInteger,rf=tf?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},gi=!0;try{var nf=eo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");gi=((Zn=nf.exec("a"))===null||Zn===void 0?void 0:Zn[0])==="a"}catch(e){gi=!1}var hs=ql?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},bi=Zl?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,s=0,o;i>s;){if(o=t[s++],o>1114111)throw RangeError(o+" is not a valid code point");n+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return n},cs=Jl?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var s=i[n],o=s[0],a=s[1];r[o]=a}return r},Ka=Ql?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}},sf=Kl?function(t){return t.trimStart()}:function(t){return t.replace(Yl,"")},af=ef?function(t){return t.trimEnd()}:function(t){return t.replace(zl,"")};function eo(e,t){return new RegExp(e,t)}var yi;if(gi){var ds=eo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");yi=function(t,r){var n;ds.lastIndex=r;var i=ds.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else yi=function(t,r){for(var n=[];;){var i=Ka(t,r);if(i===void 0||to(i)||ff(i))break;n.push(i),r+=i>=65536?2:1}return bi.apply(void 0,n)};var of=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 o=this.parseArgument(t,n);if(o.err)return o;i.push(o.val)}else{if(s===125&&t>0)break;if(s===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:q.pound,location:D(a,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(C.UNMATCHED_CLOSING_TAG,D(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&Ei(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;i.push(o.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:q.literal,value:"<".concat(i,"/>"),location:D(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,r,!0);if(s.err)return s;var o=s.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Ei(this.char()))return this.error(C.INVALID_TAG,D(a,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(C.UNMATCHED_CLOSING_TAG,D(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:q.tag,value:i,children:o,location:D(n,this.clonePosition())},err:null}:this.error(C.INVALID_TAG,D(a,this.clonePosition())))}else return this.error(C.UNCLOSED_TAG,D(n,this.clonePosition()))}else return this.error(C.INVALID_TAG,D(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&lf(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 o=this.tryParseUnquoted(t,r);if(o){i+=o;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var u=D(n,this.clonePosition());return{val:{type:q.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!uf(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 bi.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(),bi(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(C.EMPTY_ARGUMENT,D(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(C.MALFORMED_ARGUMENT,D(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:q.argument,value:i,location:D(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(C.MALFORMED_ARGUMENT,D(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=yi(this.message,r),i=r+n.length;this.bumpTo(i);var s=this.clonePosition(),o=D(t,s);return{value:n,location:o}},e.prototype.parseArgumentOptions=function(t,r,n,i){var s,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(a){case"":return this.error(C.EXPECT_ARGUMENT_TYPE,D(o,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var c=af(d.val);if(c.length===0)return this.error(C.EXPECT_ARGUMENT_STYLE,D(this.clonePosition(),this.clonePosition()));var p=D(f,this.clonePosition());l={style:c,styleLocation:p}}var v=this.tryParseArgumentClose(i);if(v.err)return v;var _=D(i,this.clonePosition());if(l&&hs(l==null?void 0:l.style,"::",0)){var m=sf(l.style.slice(2));if(a==="number"){var d=this.parseNumberSkeletonFromString(m,l.styleLocation);return d.err?d:{val:{type:q.number,value:n,location:_,style:d.val},err:null}}else{if(m.length===0)return this.error(C.EXPECT_DATE_TIME_SKELETON,_);var T=m;this.locale&&(T=Xl(m,this.locale));var c={type:hr.dateTime,pattern:T,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Dl(T):{}},F=a==="date"?q.date:q.time;return{val:{type:F,value:n,location:_,style:c},err:null}}}return{val:{type:a==="number"?q.number:a==="date"?q.date:q.time,value:n,location:_,style:(s=l==null?void 0:l.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(C.EXPECT_SELECT_ARGUMENT_OPTIONS,D(O,yn({},O)));this.bumpSpace();var W=this.parseIdentifierIfPossible(),Z=0;if(a!=="select"&&W.value==="offset"){if(!this.bumpIf(":"))return this.error(C.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,D(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(C.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,C.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),W=this.parseIdentifierIfPossible(),Z=d.val}var j=this.tryParsePluralOrSelectOptions(t,a,r,W);if(j.err)return j;var v=this.tryParseArgumentClose(i);if(v.err)return v;var te=D(i,this.clonePosition());return a==="select"?{val:{type:q.select,value:n,options:cs(j.val),location:te},err:null}:{val:{type:q.plural,value:n,options:cs(j.val),offset:Z,pluralType:a==="plural"?"cardinal":"ordinal",location:te},err:null}}default:return this.error(C.INVALID_ARGUMENT_TYPE,D(o,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE,D(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(C.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,D(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=Fl(t)}catch(i){return this.error(C.INVALID_NUMBER_SKELETON,r)}return{val:{type:hr.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?Vl(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var s,o=!1,a=[],u=new Set,l=i.value,f=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(C.EXPECT_PLURAL_ARGUMENT_SELECTOR,C.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;f=D(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?C.DUPLICATE_SELECT_ARGUMENT_SELECTOR:C.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);l==="other"&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?C.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:C.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,D(this.clonePosition(),this.clonePosition()));var v=this.parseMessage(t+1,r,n);if(v.err)return v;var _=this.tryParseArgumentClose(p);if(_.err)return _;a.push([l,{value:v.val,location:D(p,this.clonePosition())}]),u.add(l),this.bumpSpace(),s=this.parseIdentifierIfPossible(),l=s.value,f=s.location}return a.length===0?this.error(r==="select"?C.EXPECT_SELECT_ARGUMENT_SELECTOR:C.EXPECT_PLURAL_ARGUMENT_SELECTOR,D(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(C.MISSING_OTHER_CLAUSE,D(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var s=!1,o=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)s=!0,o=o*10+(a-48),this.bump();else break}var u=D(i,this.clonePosition());return s?(o*=n,rf(o)?{val:o,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=Ka(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(hs(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()&&to(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n!=null?n:null},e}();function Ei(e){return e>=97&&e<=122||e>=65&&e<=90}function uf(e){return Ei(e)||e===47}function lf(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 to(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ff(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function xi(e){e.forEach(function(t){if(delete t.location,Xa(t)||Wa(t))for(var r in t.options)delete t.options[r].location,xi(t.options[r].value);else ka(t)&&za(t.style)||(ja(t)||Va(t))&&_i(t.style)?delete t.style.location:Ya(t)&&xi(t.children)})}function hf(e,t){t===void 0&&(t={}),t=yn({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new of(e,t).parse();if(r.err){var n=SyntaxError(C[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||xi(r.val),r.val}var cr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(cr||(cr={}));var Ln=function(e){Rn(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),ps=function(e){Rn(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('", "'),'"'),cr.INVALID_VALUE,s)||this}return t}(Ln),cf=function(e){Rn(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),cr.INVALID_VALUE,i)||this}return t}(Ln),df=function(e){Rn(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,'"'),cr.MISSING_VALUE,n)||this}return t}(Ln),de;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(de||(de={}));function pf(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==de.literal||r.type!==de.literal?t.push(r):n.value+=r.value,t},[])}function vf(e){return typeof e=="function"}function on(e,t,r,n,i,s,o){if(e.length===1&&os(e[0]))return[{type:de.literal,value:e[0].value}];for(var a=[],u=0,l=e;u<l.length;u++){var f=l[u];if(os(f)){a.push({type:de.literal,value:f.value});continue}if(Ll(f)){typeof s=="number"&&a.push({type:de.literal,value:r.getNumberFormat(t).format(s)});continue}var d=f.value;if(!(i&&d in i))throw new df(d,o);var c=i[d];if(Rl(f)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),a.push({type:typeof c=="string"?de.literal:de.object,value:c});continue}if(ja(f)){var p=typeof f.style=="string"?n.date[f.style]:_i(f.style)?f.style.parsedOptions:void 0;a.push({type:de.literal,value:r.getDateTimeFormat(t,p).format(c)});continue}if(Va(f)){var p=typeof f.style=="string"?n.time[f.style]:_i(f.style)?f.style.parsedOptions:n.time.medium;a.push({type:de.literal,value:r.getDateTimeFormat(t,p).format(c)});continue}if(ka(f)){var p=typeof f.style=="string"?n.number[f.style]:za(f.style)?f.style.parsedOptions:void 0;p&&p.scale&&(c=c*(p.scale||1)),a.push({type:de.literal,value:r.getNumberFormat(t,p).format(c)});continue}if(Ya(f)){var v=f.children,_=f.value,m=i[_];if(!vf(m))throw new cf(_,"function",o);var T=on(v,t,r,n,i,s),F=m(T.map(function(Z){return Z.value}));Array.isArray(F)||(F=[F]),a.push.apply(a,F.map(function(Z){return{type:typeof Z=="string"?de.literal:de.object,value:Z}}))}if(Xa(f)){var O=f.options[c]||f.options.other;if(!O)throw new ps(f.value,c,Object.keys(f.options),o);a.push.apply(a,on(O.value,t,r,n,i));continue}if(Wa(f)){var O=f.options["=".concat(c)];if(!O){if(!Intl.PluralRules)throw new Ln(`Intl.PluralRules is not available in this environment.
|
|
4
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
5
|
-
`,cr.MISSING_INTL_API,o);var W=r.getPluralRules(t,{type:f.pluralType}).select(c-(f.offset||0));O=f.options[W]||f.options.other}if(!O)throw new ps(f.value,c,Object.keys(f.options),o);a.push.apply(a,on(O.value,t,r,n,i,c-(f.offset||0)));continue}}return pf(a)}function mf(e,t){return t?Je(Je(Je({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=Je(Je({},e[n]),t[n]||{}),r},{})):e}function _f(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=mf(e[n],t[n]),r},Je({},e)):e}function Jn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function gf(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:zn(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,Yn([void 0],r,!1)))},{cache:Jn(e.number),strategy:qn.variadic}),getDateTimeFormat:zn(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,Yn([void 0],r,!1)))},{cache:Jn(e.dateTime),strategy:qn.variadic}),getPluralRules:zn(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,Yn([void 0],r,!1)))},{cache:Jn(e.pluralRules),strategy:qn.variadic})}}var bf=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(d,c){return!d.length||c.type!==de.literal||typeof d[d.length-1]!="string"?d.push(c.value):d[d.length-1]+=c.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return on(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 o=i||{};o.formatters;var a=Hl(o,["formatters"]);this.ast=e.__parse(t,Je(Je({},a),{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=_f(e.formats,n),this.formatters=i&&i.formatters||gf(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=hf,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 yf(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 _t={},Ef=(e,t,r)=>r&&(t in _t||(_t[t]={}),e in _t[t]||(_t[t][e]=r),r),ro=(e,t)=>{if(t==null)return;if(t in _t&&e in _t[t])return _t[t][e];const r=Cn(t);for(let n=0;n<r.length;n++){const i=r[n],s=wf(i,e);if(s)return Ef(e,t,s)}};let Vi;const vr=$n({});function xf(e){return Vi[e]||null}function no(e){return e in Vi}function wf(e,t){if(!no(e))return null;const r=xf(e);return yf(r,t)}function Tf(e){if(e==null)return;const t=Cn(e);for(let r=0;r<t.length;r++){const n=t[r];if(no(n))return n}}function io(e,...t){delete _t[e],vr.update(r=>(r[e]=Al.all([r[e]||{},...t]),r))}pr([vr],([e])=>Object.keys(e));vr.subscribe(e=>Vi=e);const un={};function Sf(e,t){un[e].delete(t),un[e].size===0&&delete un[e]}function so(e){return un[e]}function Af(e){return Cn(e).map(t=>{const r=so(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function wi(e){return e==null?!1:Cn(e).some(t=>{var r;return(r=so(t))==null?void 0:r.size})}function Hf(e,t){return Promise.all(t.map(n=>(Sf(e,n),n().then(i=>i.default||i)))).then(n=>io(e,...n))}const yr={};function ao(e){if(!wi(e))return e in yr?yr[e]:Promise.resolve();const t=Af(e);return yr[e]=Promise.all(t.map(([r,n])=>Hf(r,n))).then(()=>{if(wi(e))return ao(e);delete yr[e]}),yr[e]}const Mf={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"}}},Of={fallbackLocale:null,loadingDelay:200,formats:Mf,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Pf=Of;function dr(){return Pf}const Qn=$n(!1);var Nf=Object.defineProperty,$f=Object.defineProperties,If=Object.getOwnPropertyDescriptors,vs=Object.getOwnPropertySymbols,Bf=Object.prototype.hasOwnProperty,Rf=Object.prototype.propertyIsEnumerable,ms=(e,t,r)=>t in e?Nf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lf=(e,t)=>{for(var r in t||(t={}))Bf.call(t,r)&&ms(e,r,t[r]);if(vs)for(var r of vs(t))Rf.call(t,r)&&ms(e,r,t[r]);return e},Cf=(e,t)=>$f(e,If(t));let Ti;const En=$n(null);function _s(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function Cn(e,t=dr().fallbackLocale){const r=_s(e);return t?[...new Set([...r,..._s(t)])]:r}function Ft(){return Ti!=null?Ti:void 0}En.subscribe(e=>{Ti=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Df=e=>{if(e&&Tf(e)&&wi(e)){const{loadingDelay:t}=dr();let r;return typeof window!="undefined"&&Ft()!=null&&t?r=window.setTimeout(()=>Qn.set(!0),t):Qn.set(!0),ao(e).then(()=>{En.set(e)}).finally(()=>{clearTimeout(r),Qn.set(!1)})}return En.set(e)},Et=Cf(Lf({},En),{set:Df}),Dn=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var Uf=Object.defineProperty,xn=Object.getOwnPropertySymbols,oo=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,gs=(e,t,r)=>t in e?Uf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xi=(e,t)=>{for(var r in t||(t={}))oo.call(t,r)&&gs(e,r,t[r]);if(xn)for(var r of xn(t))uo.call(t,r)&&gs(e,r,t[r]);return e},mr=(e,t)=>{var r={};for(var n in e)oo.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xn)for(var n of xn(e))t.indexOf(n)<0&&uo.call(e,n)&&(r[n]=e[n]);return r};const Br=(e,t)=>{const{formats:r}=dr();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Ff=Dn(e=>{var t=e,{locale:r,format:n}=t,i=mr(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Br("number",n)),new Intl.NumberFormat(r,i)}),Gf=Dn(e=>{var t=e,{locale:r,format:n}=t,i=mr(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Br("date",n):Object.keys(i).length===0&&(i=Br("date","short")),new Intl.DateTimeFormat(r,i)}),kf=Dn(e=>{var t=e,{locale:r,format:n}=t,i=mr(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Br("time",n):Object.keys(i).length===0&&(i=Br("time","short")),new Intl.DateTimeFormat(r,i)}),jf=(e={})=>{var t=e,{locale:r=Ft()}=t,n=mr(t,["locale"]);return Ff(Xi({locale:r},n))},Vf=(e={})=>{var t=e,{locale:r=Ft()}=t,n=mr(t,["locale"]);return Gf(Xi({locale:r},n))},Xf=(e={})=>{var t=e,{locale:r=Ft()}=t,n=mr(t,["locale"]);return kf(Xi({locale:r},n))},Wf=Dn((e,t=Ft())=>new bf(e,t,dr().formats,{ignoreTag:dr().ignoreTag})),Yf=(e,t={})=>{var r,n,i,s;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:a,locale:u=Ft(),default:l}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=ro(e,u);if(!f)f=(s=(i=(n=(r=dr()).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(!a)return f;let d=f;try{d=Wf(f,u).format(a)}catch(c){c instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,c.message)}return d},zf=(e,t)=>Xf(t).format(e),qf=(e,t)=>Vf(t).format(e),Zf=(e,t)=>jf(t).format(e),Jf=(e,t=Ft())=>ro(e,t),lo=pr([Et,vr],()=>Yf);pr([Et],()=>zf);pr([Et],()=>qf);pr([Et],()=>Zf);pr([Et,vr],()=>Jf);function fo({withLocale:e,translations:t}){Et.subscribe(r=>{r==null&&(vr.set(t),Et.set(e))})}function ho(e,t){io(e,t)}function Qf(e){Et.set(e)}const Kf=e=>{let t=ue(void 0),r=ue(void 0),n=ue(void 0),i=ue(void 0),s=ue(!1),o=ue(void 0);const a=()=>nt(exports,null,function*(){var p;const{apiEndpoint:u,userSession:l,locale:f,loadLevels:d,onLevelLoaded:c}=e();if(!(!u||!l)){re(s,!0),re(o,void 0);try{const v=[Yu({apiEndpoint:u,userSession:l,locale:f}).then(_=>{var T,F,O,W,Z,j;const m=_.level;m.name=((T=m.presentation)==null?void 0:T.displayName)||m.name,m.spendablePoints=((F=_.spendableWallet)==null?void 0:F.total.points)||0,re(t,m,!0),re(n,(O=_.loyaltyWallet)==null?void 0:O.total,!0),re(i,(W=_.spendableWallet)==null?void 0:W.total,!0),c==null||c({elevateLevel:m}),c==null||c({elevateLevelWalletTotal:(Z=_.spendableWallet)==null?void 0:Z.total,loyaltyWalletTotal:(j=_.loyaltyWallet)==null?void 0:j.total})})];d&&v.push(zu({apiEndpoint:u,userSession:l,locale:f}).then(_=>{re(r,_,!0)})),yield Promise.all(v),yield Eu(),H(r)&&H(t)&&(c==null||c({calculatedLevelFlag:rl(H(r),(p=H(t).loyaltyPoints)!=null?p:0)}))}catch(v){re(o,v,!0),console.error("Failed to load elevate info:",v)}finally{re(s,!1)}}});return Nr(()=>{const{apiEndpoint:u,userSession:l,locale:f,loadLevels:d}=e();a()}),Nr(()=>{const u=()=>{a()};return window.addEventListener("redeemRewardButton",u),()=>window.removeEventListener("redeemRewardButton",u)}),{get playerElevateLevel(){return H(t)},get levels(){return H(r)},get loyaltyWalletTotal(){return H(n)},get spendableWalletTotal(){return H(i)},get loading(){return H(s)},get error(){return H(o)},reload:a}},eh={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ő"}},Pr=10,th=7,rh=4;var nh=Xr('<span class="loyalty-pagination__ellipsis svelte-1op0ean" aria-hidden="true">...</span>'),ih=Xr('<button type="button"> </button>'),sh=Xr('<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>'),ah=Xr('<div class="loyalty-pagination svelte-1op0ean"><!></div>');const oh={hash:"svelte-1op0ean",code:`.loyalty-pagination.svelte-1op0ean {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;box-sizing:border-box;width:100%;}
|
|
6
|
-
|
|
7
|
-
@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;}
|
|
8
|
-
}.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,
|
|
9
|
-
.loyalty-pagination__btn--next.svelte-1op0ean {width:95px;}
|
|
10
|
-
|
|
11
|
-
@media (max-width: 767px) {.loyalty-pagination__btn--prev.svelte-1op0ean,
|
|
12
|
-
.loyalty-pagination__btn--next.svelte-1op0ean {width:90px;}
|
|
13
|
-
}.loyalty-pagination__btn--prev.svelte-1op0ean:not(:disabled),
|
|
14
|
-
.loyalty-pagination__btn--next.svelte-1op0ean:not(:disabled) {color:var(--text-default, #dfe3e8);}`};function Wi(e,t){Pn(t,!0),Na(e,oh);const r=()=>ks(lo,"$_",n),[n,i]=js(),s=Ge(t,"offset",7,0),o=Ge(t,"limit",7,Pr),a=Ge(t,"total",7,0),u=Ge(t,"onPageChange",7,x=>{}),l=Ge(t,"locale",7,"en");fo({withLocale:l(),translations:{}}),Object.entries(eh).forEach(([x,A])=>{ho(x,A)}),Nr(()=>{var x;Qf((x=l())!=null?x:"en")});const f=Tt(()=>Number(s())||0),d=Tt(()=>Number(o())||Pr),c=Tt(()=>Number(a())||0),p=Tt(()=>Math.max(1,Math.ceil(H(c)/Math.max(1,H(d))))),v=Tt(()=>H(d)>0?Math.floor(H(f)/H(d)):0);let _=ue(!1);Nr(()=>{const x=window.matchMedia("(max-width: 767px)"),A=X=>{re(_,X.matches,!0)};return re(_,x.matches,!0),x.addEventListener("change",A),()=>x.removeEventListener("change",A)});const m=(x,A,X)=>x<=(X?rh:th)?Array.from({length:x},(g,E)=>E):A<=1||A>=x-2?[0,1,"ellipsis",x-2,x-1]:[0,"ellipsis",A,"ellipsis",x-1],T=Tt(()=>m(H(p),H(v),H(_))),F=x=>u()(x*H(d)),O=()=>u()(Math.max(0,H(v)-1)*H(d)),W=()=>u()(Math.min(H(p)-1,H(v)+1)*H(d));var Z={get offset(){return s()},set offset(x=0){s(x),He()},get limit(){return o()},set limit(x=Pr){o(x),He()},get total(){return a()},set total(x=0){a(x),He()},get onPageChange(){return u()},set onPageChange(x=A=>{}){u(x),He()},get locale(){return l()},set locale(x="en"){l(x),He()}},j=ah(),te=gn(j);{var Me=x=>{var A=sh(),X=gn(A),We=en(X,!0),S=ai(X,2);Pa(S,17,()=>H(T),Oa,(E,b)=>{var w=wa(),P=na(w);{var V=Y=>{var Q=nh();St(Y,Q)},J=Y=>{var Q=ih();let fe;var ht=en(Q,!0);oi(()=>{fe=$a(Q,1,"loyalty-pagination__btn svelte-1op0ean",null,fe,{"loyalty-pagination__btn--active":H(b)===H(v)}),sn(ht,H(b)+1)}),rn("click",Q,()=>F(H(b))),St(Y,Q)};pi(P,Y=>{H(b)==="ellipsis"?Y(V):Y(J,-1)})}St(E,w)});var y=ai(S,2),g=en(y,!0);pn(A),oi((E,b)=>{X.disabled=H(v)<=0,sn(We,E),y.disabled=H(v)>=H(p)-1,sn(g,b)},[()=>r()("prev"),()=>r()("next")]),rn("click",X,O),rn("click",y,W),St(x,A)};pi(te,x=>{H(p)>1&&x(Me)})}pn(j),St(e,j);var le=Nn(Z);return i(),le}xa(["click"]);ji(Wi,{offset:{},limit:{},total:{},onPageChange:{},locale:{}},[],[],{mode:"open"});function co(e,t){Pn(t,!0);let r=Ge(t,"offset",7,0),n=Ge(t,"limit",7,Pr),i=Ge(t,"total",7,0),s=Ge(t,"onPageChange"),o=Ge(t,"locale",7,"en");var a={get offset(){return r()},set offset(u=0){r(u),He()},get limit(){return n()},set limit(u=Pr){n(u),He()},get total(){return i()},set total(u=0){i(u),He()},get onPageChange(){return s()},set onPageChange(u){s(u),He()},get locale(){return o()},set locale(u="en"){o(u),He()}};return Wi(e,{get offset(){return r()},get limit(){return n()},get total(){return i()},get onPageChange(){return s()},get locale(){return o()}}),Nn(a)}customElements.define("loyalty-pagination",ji(co,{offset:{},limit:{},total:{},onPageChange:{},locale:{}},[],[]));const uh=Object.freeze(Object.defineProperty({__proto__:null,default:co},Symbol.toStringTag,{value:"Module"}));exports.$format=lo;exports.DATE_FORMATS=Qu;exports.EVENT_TYPES=qu;exports.ITEMS_LIMIT_DEFAULT=Ra;exports.LoyaltyPagination=Wi;exports.LoyaltyPagination_ce=uh;exports.MOBILE_LOAD_ITEMS=Ju;exports.SOURCE=Zu;exports.addNewMessages=ho;exports.append=St;exports.append_styles=Na;exports.bind_this=ju;exports.child=gn;exports.comment=wa;exports.createElevateData=Kf;exports.create_custom_element=ji;exports.delegate=xa;exports.delegated=rn;exports.dispatchRedeemRewardButton=hl;exports.each=Pa;exports.fetchShopItem=el;exports.fetchShopRewards=Ku;exports.first_child=na;exports.flushSync=He;exports.formatDate=al;exports.from_html=Xr;exports.get=H;exports.if_block=pi;exports.index=Oa;exports.only_child=en;exports.pop=Nn;exports.prop=Ge;exports.proxy=Wt;exports.push=Pn;exports.redeemReward=tl;exports.reset=pn;exports.sendRedeemRewardFailed=fl;exports.sendRedeemRewardRequested=ul;exports.sendRedeemRewardSuccess=ll;exports.sendRewardItemClicked=ol;exports.set=re;exports.set_attribute=Fu;exports.set_class=$a;exports.set_text=sn;exports.setupI18n=fo;exports.setup_stores=js;exports.sibling=ai;exports.state=ue;exports.store_get=ks;exports.template_effect=oi;exports.user_derived=Tt;exports.user_effect=Nr;exports.user_pre_effect=du;
|