@everymatrix/player-account-balance-modal 1.87.26 → 1.87.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ "use strict";var hr=Object.defineProperty,cr=Object.defineProperties;var fr=Object.getOwnPropertyDescriptors;var un=Object.getOwnPropertySymbols;var dr=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable;var Nt=Math.pow,Rt=(e,t,n)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mt=(e,t)=>{for(var n in t||(t={}))dr.call(t,n)&&Rt(e,n,t[n]);if(un)for(var n of un(t))pr.call(t,n)&&Rt(e,n,t[n]);return e},Pt=(e,t)=>cr(e,fr(t));var se=(e,t,n)=>(Rt(e,typeof t!="symbol"?t+"":t,n),n);var It=(e,t,n)=>new Promise((r,o)=>{var i=f=>{try{a(n.next(f))}catch(l){o(l)}},u=f=>{try{a(n.throw(f))}catch(l){o(l)}},a=f=>f.done?r(f.value):Promise.resolve(f.value).then(i,u);a((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ue(){}function Rn(e){return e()}function ln(){return Object.create(null)}function ke(e){e.forEach(Rn)}function rn(e){return typeof e=="function"}function Nn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function mr(e){return Object.keys(e).length===0}function Mn(e,...t){if(e==null){for(const r of t)r(void 0);return ue}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function gr(e,t,n){e.$$.on_destroy.push(Mn(t,n))}function R(e,t){e.appendChild(t)}function br(e,t,n){const r=yr(e);if(!r.getElementById(t)){const o=G("style");o.id=t,o.textContent=n,vr(r,o)}}function yr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function vr(e,t){return R(e.head||e,t),t.sheet}function de(e,t,n){e.insertBefore(t,n||null)}function he(e){e.parentNode&&e.parentNode.removeChild(e)}function Pn(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function G(e){return document.createElement(e)}function ye(e){return document.createTextNode(e)}function ve(){return ye(" ")}function Er(){return ye("")}function bt(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function z(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function xr(e){return Array.from(e.childNodes)}function He(e,t){t=""+t,e.data!==t&&(e.data=t)}function _r(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let nt;function tt(e){nt=e}function Tr(){if(!nt)throw new Error("Function called outside component initialization");return nt}function Sr(e){Tr().$$.on_mount.push(e)}const Ie=[],Vt=[];let Fe=[];const hn=[],Br=Promise.resolve();let Xt=!1;function wr(){Xt||(Xt=!0,Br.then(k))}function zt(e){Fe.push(e)}const Dt=new Set;let Me=0;function k(){if(Me!==0)return;const e=nt;do{try{for(;Me<Ie.length;){const t=Ie[Me];Me++,tt(t),Ar(t.$$)}}catch(t){throw Ie.length=0,Me=0,t}for(tt(null),Ie.length=0,Me=0;Vt.length;)Vt.pop()();for(let t=0;t<Fe.length;t+=1){const n=Fe[t];Dt.has(n)||(Dt.add(n),n())}Fe.length=0}while(Ie.length);for(;hn.length;)hn.pop()();Xt=!1,Dt.clear(),tt(e)}function Ar(e){if(e.fragment!==null){e.update(),ke(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(zt)}}function Cr(e){const t=[],n=[];Fe.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Fe=t}const Hr=new Set;function Or(e,t){e&&e.i&&(Hr.delete(e),e.i(t))}function yt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Lr(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),zt(()=>{const i=e.$$.on_mount.map(Rn).filter(rn);e.$$.on_destroy?e.$$.on_destroy.push(...i):ke(i),e.$$.on_mount=[]}),o.forEach(zt)}function Rr(e,t){const n=e.$$;n.fragment!==null&&(Cr(n.after_update),ke(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Nr(e,t){e.$$.dirty[0]===-1&&(Ie.push(e),wr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Mr(e,t,n,r,o,i,u=null,a=[-1]){const f=nt;tt(e);const l=e.$$={fragment:null,ctx:[],props:i,update:ue,not_equal:o,bound:ln(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:ln(),dirty:a,skip_bound:!1,root:t.target||f.$$.root};u&&u(l.root);let d=!1;if(l.ctx=n?n(e,t.props||{},(g,y,..._)=>{const B=_.length?_[0]:y;return l.ctx&&o(l.ctx[g],l.ctx[g]=B)&&(!l.skip_bound&&l.bound[g]&&l.bound[g](B),d&&Nr(e,g)),y}):[],l.update(),d=!0,ke(l.before_update),l.fragment=r?r(l.ctx):!1,t.target){if(t.hydrate){const g=xr(t.target);l.fragment&&l.fragment.l(g),g.forEach(he)}else l.fragment&&l.fragment.c();t.intro&&Or(e.$$.fragment),Lr(e,t.target,t.anchor),k()}tt(f)}let In;typeof HTMLElement=="function"&&(In=class extends HTMLElement{constructor(t,n,r){super();se(this,"$$ctor");se(this,"$$s");se(this,"$$c");se(this,"$$cn",!1);se(this,"$$d",{});se(this,"$$r",!1);se(this,"$$p_d",{});se(this,"$$l",{});se(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const o=this.$$c.$on(t,n);this.$$l_u.set(n,o)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}connectedCallback(){return It(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return()=>{let u;return{c:function(){u=G("slot"),i!=="default"&&z(u,"name",i)},m:function(l,d){de(l,u,d)},d:function(l){l&&he(u)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=_r(this);for(const i of this.$$s)i in r&&(n[i]=[t(i)]);for(const i of this.attributes){const u=this.$$g_p(i.name);u in this.$$d||(this.$$d[u]=pt(u,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Pt(Mt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const o=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const u=pt(i,this.$$d[i],this.$$p_d,"toAttribute");u==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,u)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const i in this.$$l)for(const u of this.$$l[i]){const a=this.$$c.$on(i,u);this.$$l_u.set(u,a)}this.$$l={}}})}attributeChangedCallback(t,n,r){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=pt(t,r,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function pt(e,t,n,r){var i;const o=(i=n[e])==null?void 0:i.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(o){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(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Pr(e,t,n,r,o,i){let u=class extends In{constructor(){super(e,n,o),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Object.keys(t).forEach(a=>{Object.defineProperty(u.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(f){var l;f=pt(a,f,t),this.$$d[a]=f,(l=this.$$c)==null||l.$set({[a]:f})}})}),r.forEach(a=>{Object.defineProperty(u.prototype,a,{get(){var f;return(f=this.$$c)==null?void 0:f[a]}})}),e.element=u,u}class Ir{constructor(){se(this,"$$");se(this,"$$set")}$destroy(){Rr(this,1),this.$destroy=ue}$on(t,n){if(!rn(n))return ue;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!mr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Dr="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Dr);const De="__WIDGET_GLOBAL_STYLE_CACHE__";function Fr(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Ur(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(r=>r.text()).then(r=>{const o=document.createElement("style");o.innerHTML=r,e&&e.appendChild(o)}).catch(r=>{console.error("There was an error while trying to load client styling from URL",r)})}function Gr(e,t,n,r=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!r)return n=jr(e,t),n;window[De]||(window[De]={}),n=$r(e,t);const i=n.unsubscribe.bind(n),u=()=>{if(window[De][t]){const a=window[De][t];a.refCount>1?a.refCount=a.refCount-1:delete window[De][t]}i()};return n.unsubscribe=u,n}function jr(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,r=>{e&&(n.innerHTML=r,e.appendChild(n))})}function $r(e,t){return window.emMessageBus.subscribe(t,n=>{var a;if(!e)return;const r=e.getRootNode(),o=window[De];let i=(a=o[t])==null?void 0:a.sheet;i?o[t].refCount=o[t].refCount+1:(i=new CSSStyleSheet,i.replaceSync(n),o[t]={sheet:i,refCount:1});const u=r.adoptedStyleSheets||[];u.includes(i)||(r.adoptedStyleSheets=[...u,i])})}const Pe=[];function kr(e,t){return{subscribe:_t(e,t).subscribe}}function _t(e,t=ue){let n;const r=new Set;function o(a){if(Nn(e,a)&&(e=a,n)){const f=!Pe.length;for(const l of r)l[1](),Pe.push(l,e);if(f){for(let l=0;l<Pe.length;l+=2)Pe[l][0](Pe[l+1]);Pe.length=0}}}function i(a){o(a(e))}function u(a,f=ue){const l=[a,f];return r.add(l),r.size===1&&(n=t(o,i)||ue),a(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}function Ve(e,t,n){const r=!Array.isArray(e),o=r?[e]:e;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=t.length<2;return kr(n,(u,a)=>{let f=!1;const l=[];let d=0,g=ue;const y=()=>{if(d)return;g();const B=t(r?l[0]:l,u,a);i?u(B):g=rn(B)?B:ue},_=o.map((B,P)=>Mn(B,j=>{l[P]=j,d&=~(1<<P),f&&y()},()=>{d|=1<<P}));return f=!0,y(),function(){ke(_),g(),f=!1}})}var Vr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zr=function(t){return Wr(t)&&!Zr(t)};function Wr(e){return!!e&&typeof e=="object"}function Zr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Jr(e)}var qr=typeof Symbol=="function"&&Symbol.for,Qr=qr?Symbol.for("react.element"):60103;function Jr(e){return e.$$typeof===Qr}function Yr(e){return Array.isArray(e)?[]:{}}function rt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ue(Yr(e),e,t):e}function Kr(e,t,n){return e.concat(t).map(function(r){return rt(r,n)})}function eo(e,t){if(!t.customMerge)return Ue;var n=t.customMerge(e);return typeof n=="function"?n:Ue}function to(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function cn(e){return Object.keys(e).concat(to(e))}function Dn(e,t){try{return t in e}catch(n){return!1}}function no(e,t){return Dn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function ro(e,t,n){var r={};return n.isMergeableObject(e)&&cn(e).forEach(function(o){r[o]=rt(e[o],n)}),cn(t).forEach(function(o){no(e,o)||(Dn(e,o)&&n.isMergeableObject(t[o])?r[o]=eo(o,n)(e[o],t[o],n):r[o]=rt(t[o],n))}),r}function Ue(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Kr,n.isMergeableObject=n.isMergeableObject||zr,n.cloneUnlessOtherwiseSpecified=rt;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):ro(e,t,n):rt(t,n)}Ue.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Ue(r,o,n)},{})};var oo=Ue,io=oo;const ao=Xr(io);var Wt=function(e,t){return Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Wt(e,t)};function Tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Wt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var fe=function(){return fe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fe.apply(this,arguments)};function so(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ft(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Ut(e,t){var n=t&&t.cache?t.cache:mo,r=t&&t.serializer?t.serializer:fo,o=t&&t.strategy?t.strategy:ho;return o(e,{cache:n,serializer:r})}function uo(e){return e==null||typeof e=="number"||typeof e=="boolean"}function lo(e,t,n,r){var o=uo(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function Fn(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(o,i)),i}function Un(e,t,n,r,o){return n.bind(t,e,r,o)}function ho(e,t){var n=e.length===1?lo:Fn;return Un(e,this,n,t.cache.create(),t.serializer)}function co(e,t){return Un(e,this,Fn,t.cache.create(),t.serializer)}var fo=function(){return JSON.stringify(arguments)},po=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),mo={create:function(){return new po}},Gt={variadic:co},vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},vt.apply(this,arguments)};var H;(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"})(H||(H={}));var D;(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"})(D||(D={}));var Ge;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ge||(Ge={}));function fn(e){return e.type===D.literal}function go(e){return e.type===D.argument}function Gn(e){return e.type===D.number}function jn(e){return e.type===D.date}function $n(e){return e.type===D.time}function kn(e){return e.type===D.select}function Vn(e){return e.type===D.plural}function bo(e){return e.type===D.pound}function Xn(e){return e.type===D.tag}function zn(e){return!!(e&&typeof e=="object"&&e.type===Ge.number)}function Zt(e){return!!(e&&typeof e=="object"&&e.type===Ge.dateTime)}var Wn=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,yo=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function vo(e){var t={};return e.replace(yo,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var F=function(){return F=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},F.apply(this,arguments)};var Eo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function xo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Eo).filter(function(y){return y.length>0}),n=[],r=0,o=t;r<o.length;r++){var i=o[r],u=i.split("/");if(u.length===0)throw new Error("Invalid number skeleton");for(var a=u[0],f=u.slice(1),l=0,d=f;l<d.length;l++){var g=d[l];if(g.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:f})}return n}function _o(e){return e.replace(/^(.*?)-/,"")}var dn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Zn=/^(@+)?(\+|#+)?[rs]?$/g,To=/(\*)(0+)|(#+)(0+)|(0+)/g,qn=/^(0+)$/;function pn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Zn,function(n,r,o){return typeof o!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):o==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof o=="string"?o.length:0)),""}),t}function Qn(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 So(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!qn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function mn(e){var t={},n=Qn(e);return n||t}function Bo(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.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=_o(o.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=F(F(F({},t),{notation:"scientific"}),o.options.reduce(function(f,l){return F(F({},f),mn(l))},{}));continue;case"engineering":t=F(F(F({},t),{notation:"engineering"}),o.options.reduce(function(f,l){return F(F({},f),mn(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(o.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(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(To,function(f,l,d,g,y,_){if(l)t.minimumIntegerDigits=d.length;else{if(g&&y)throw new Error("We currently do not support maximum integer digits");if(_)throw new Error("We currently do not support exact integer digits")}return""});continue}if(qn.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(dn.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(dn,function(f,l,d,g,y,_){return d==="*"?t.minimumFractionDigits=l.length:g&&g[0]==="#"?t.maximumFractionDigits=g.length:y&&_?(t.minimumFractionDigits=y.length,t.maximumFractionDigits=y.length+_.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?t=F(F({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=F(F({},t),pn(i)));continue}if(Zn.test(o.stem)){t=F(F({},t),pn(o.stem));continue}var u=Qn(o.stem);u&&(t=F(F({},t),u));var a=So(o.stem);a&&(t=F(F({},t),a))}return t}var dt={"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 wo(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if(o==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var u=1+(i&1),a=i<2?1:3+(i>>1),f="a",l=Ao(t);for((l=="H"||l=="k")&&(a=0);a-- >0;)n+=f;for(;u-- >0;)n=l+n}else o==="J"?n+="H":n+=o}return n}function Ao(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var o=dt[r||""]||dt[n||""]||dt["".concat(n,"-001")]||dt["001"];return o[0]}var jt,Co=new RegExp("^".concat(Wn.source,"*")),Ho=new RegExp("".concat(Wn.source,"*$"));function L(e,t){return{start:e,end:t}}var Oo=!!String.prototype.startsWith&&"_a".startsWith("a",1),Lo=!!String.fromCodePoint,Ro=!!Object.fromEntries,No=!!String.prototype.codePointAt,Mo=!!String.prototype.trimStart,Po=!!String.prototype.trimEnd,Io=!!Number.isSafeInteger,Do=Io?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},qt=!0;try{var Fo=Yn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");qt=((jt=Fo.exec("a"))===null||jt===void 0?void 0:jt[0])==="a"}catch(e){qt=!1}var gn=Oo?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Qt=Lo?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",o=t.length,i=0,u;o>i;){if(u=t[i++],u>1114111)throw RangeError(u+" is not a valid code point");r+=u<65536?String.fromCharCode(u):String.fromCharCode(((u-=65536)>>10)+55296,u%1024+56320)}return r},bn=Ro?Object.fromEntries:function(t){for(var n={},r=0,o=t;r<o.length;r++){var i=o[r],u=i[0],a=i[1];n[u]=a}return n},Jn=No?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var o=t.charCodeAt(n),i;return o<55296||o>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},Uo=Mo?function(t){return t.trimStart()}:function(t){return t.replace(Co,"")},Go=Po?function(t){return t.trimEnd()}:function(t){return t.replace(Ho,"")};function Yn(e,t){return new RegExp(e,t)}var Jt;if(qt){var yn=Yn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Jt=function(t,n){var r;yn.lastIndex=n;var o=yn.exec(t);return(r=o[1])!==null&&r!==void 0?r:""}}else Jt=function(t,n){for(var r=[];;){var o=Jn(t,n);if(o===void 0||Kn(o)||Vo(o))break;r.push(o),n+=o>=65536?2:1}return Qt.apply(void 0,r)};var jo=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var u=this.parseArgument(t,r);if(u.err)return u;o.push(u.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),o.push({type:D.pound,location:L(a,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(H.UNMATCHED_CLOSING_TAG,L(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Yt(this.peek()||0)){var u=this.parseTag(t,n);if(u.err)return u;o.push(u.val)}else{var u=this.parseLiteral(t,n);if(u.err)return u;o.push(u.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:D.literal,value:"<".concat(o,"/>"),location:L(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var u=i.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Yt(this.char()))return this.error(H.INVALID_TAG,L(a,this.clonePosition()));var f=this.clonePosition(),l=this.parseTagName();return o!==l?this.error(H.UNMATCHED_CLOSING_TAG,L(f,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:D.tag,value:o,children:u,location:L(r,this.clonePosition())},err:null}:this.error(H.INVALID_TAG,L(a,this.clonePosition())))}else return this.error(H.UNCLOSED_TAG,L(r,this.clonePosition()))}else return this.error(H.INVALID_TAG,L(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ko(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),o="";;){var i=this.tryParseQuote(n);if(i){o+=i;continue}var u=this.tryParseUnquoted(t,n);if(u){o+=u;continue}var a=this.tryParseLeftAngleBracket();if(a){o+=a;continue}break}var f=L(r,this.clonePosition());return{val:{type:D.literal,value:o,location:f},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!$o(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return Qt.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),Qt(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(H.EMPTY_ARGUMENT,L(r,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(H.MALFORMED_ARGUMENT,L(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:D.argument,value:o,location:L(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition())):this.parseArgumentOptions(t,n,o,r);default:return this.error(H.MALFORMED_ARGUMENT,L(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Jt(this.message,n),o=n+r.length;this.bumpTo(o);var i=this.clonePosition(),u=L(t,i);return{value:r,location:u}},e.prototype.parseArgumentOptions=function(t,n,r,o){var i,u=this.clonePosition(),a=this.parseIdentifierIfPossible().value,f=this.clonePosition();switch(a){case"":return this.error(H.EXPECT_ARGUMENT_TYPE,L(u,f));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),g=this.parseSimpleArgStyleIfPossible();if(g.err)return g;var y=Go(g.val);if(y.length===0)return this.error(H.EXPECT_ARGUMENT_STYLE,L(this.clonePosition(),this.clonePosition()));var _=L(d,this.clonePosition());l={style:y,styleLocation:_}}var B=this.tryParseArgumentClose(o);if(B.err)return B;var P=L(o,this.clonePosition());if(l&&gn(l==null?void 0:l.style,"::",0)){var j=Uo(l.style.slice(2));if(a==="number"){var g=this.parseNumberSkeletonFromString(j,l.styleLocation);return g.err?g:{val:{type:D.number,value:r,location:P,style:g.val},err:null}}else{if(j.length===0)return this.error(H.EXPECT_DATE_TIME_SKELETON,P);var Z=j;this.locale&&(Z=wo(j,this.locale));var y={type:Ge.dateTime,pattern:Z,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?vo(Z):{}},U=a==="date"?D.date:D.time;return{val:{type:U,value:r,location:P,style:y},err:null}}}return{val:{type:a==="number"?D.number:a==="date"?D.date:D.time,value:r,location:P,style:(i=l==null?void 0:l.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(H.EXPECT_SELECT_ARGUMENT_OPTIONS,L(w,vt({},w)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),N=0;if(a!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,L(this.clonePosition(),this.clonePosition()));this.bumpSpace();var g=this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,H.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(g.err)return g;this.bumpSpace(),C=this.parseIdentifierIfPossible(),N=g.val}var M=this.tryParsePluralOrSelectOptions(t,a,n,C);if(M.err)return M;var B=this.tryParseArgumentClose(o);if(B.err)return B;var W=L(o,this.clonePosition());return a==="select"?{val:{type:D.select,value:r,options:bn(M.val),location:W},err:null}:{val:{type:D.plural,value:r,options:bn(M.val),offset:N,pluralType:a==="plural"?"cardinal":"ordinal",location:W},err:null}}default:return this.error(H.INVALID_ARGUMENT_TYPE,L(u,f))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,L(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(H.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,L(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=xo(t)}catch(o){return this.error(H.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ge.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Bo(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,o){for(var i,u=!1,a=[],f=new Set,l=o.value,d=o.location;;){if(l.length===0){var g=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var y=this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_SELECTOR,H.INVALID_PLURAL_ARGUMENT_SELECTOR);if(y.err)return y;d=L(g,this.clonePosition()),l=this.message.slice(g.offset,this.offset())}else break}if(f.has(l))return this.error(n==="select"?H.DUPLICATE_SELECT_ARGUMENT_SELECTOR:H.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(u=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?H.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:H.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,L(this.clonePosition(),this.clonePosition()));var B=this.parseMessage(t+1,n,r);if(B.err)return B;var P=this.tryParseArgumentClose(_);if(P.err)return P;a.push([l,{value:B.val,location:L(_,this.clonePosition())}]),f.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,d=i.location}return a.length===0?this.error(n==="select"?H.EXPECT_SELECT_ARGUMENT_SELECTOR:H.EXPECT_PLURAL_ARGUMENT_SELECTOR,L(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!u?this.error(H.MISSING_OTHER_CLAUSE,L(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,u=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)i=!0,u=u*10+(a-48),this.bump();else break}var f=L(o,this.clonePosition());return i?(u*=r,Do(u)?{val:u,err:null}:this.error(n,f)):this.error(t,f)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Jn(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(gn(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Kn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r!=null?r:null},e}();function Yt(e){return e>=97&&e<=122||e>=65&&e<=90}function $o(e){return Yt(e)||e===47}function ko(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 Kn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Vo(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 Kt(e){e.forEach(function(t){if(delete t.location,kn(t)||Vn(t))for(var n in t.options)delete t.options[n].location,Kt(t.options[n].value);else Gn(t)&&zn(t.style)||(jn(t)||$n(t))&&Zt(t.style)?delete t.style.location:Xn(t)&&Kt(t.children)})}function Xo(e,t){t===void 0&&(t={}),t=vt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new jo(e,t).parse();if(n.err){var r=SyntaxError(H[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Kt(n.val),n.val}var je;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(je||(je={}));var St=function(e){Tt(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),vn=function(e){Tt(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),je.INVALID_VALUE,i)||this}return t}(St),zo=function(e){Tt(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),je.INVALID_VALUE,o)||this}return t}(St),Wo=function(e){Tt(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),je.MISSING_VALUE,r)||this}return t}(St),ee;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ee||(ee={}));function Zo(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==ee.literal||n.type!==ee.literal?t.push(n):r.value+=n.value,t},[])}function qo(e){return typeof e=="function"}function mt(e,t,n,r,o,i,u){if(e.length===1&&fn(e[0]))return[{type:ee.literal,value:e[0].value}];for(var a=[],f=0,l=e;f<l.length;f++){var d=l[f];if(fn(d)){a.push({type:ee.literal,value:d.value});continue}if(bo(d)){typeof i=="number"&&a.push({type:ee.literal,value:n.getNumberFormat(t).format(i)});continue}var g=d.value;if(!(o&&g in o))throw new Wo(g,u);var y=o[g];if(go(d)){(!y||typeof y=="string"||typeof y=="number")&&(y=typeof y=="string"||typeof y=="number"?String(y):""),a.push({type:typeof y=="string"?ee.literal:ee.object,value:y});continue}if(jn(d)){var _=typeof d.style=="string"?r.date[d.style]:Zt(d.style)?d.style.parsedOptions:void 0;a.push({type:ee.literal,value:n.getDateTimeFormat(t,_).format(y)});continue}if($n(d)){var _=typeof d.style=="string"?r.time[d.style]:Zt(d.style)?d.style.parsedOptions:r.time.medium;a.push({type:ee.literal,value:n.getDateTimeFormat(t,_).format(y)});continue}if(Gn(d)){var _=typeof d.style=="string"?r.number[d.style]:zn(d.style)?d.style.parsedOptions:void 0;_&&_.scale&&(y=y*(_.scale||1)),a.push({type:ee.literal,value:n.getNumberFormat(t,_).format(y)});continue}if(Xn(d)){var B=d.children,P=d.value,j=o[P];if(!qo(j))throw new zo(P,"function",u);var Z=mt(B,t,n,r,o,i),U=j(Z.map(function(N){return N.value}));Array.isArray(U)||(U=[U]),a.push.apply(a,U.map(function(N){return{type:typeof N=="string"?ee.literal:ee.object,value:N}}))}if(kn(d)){var w=d.options[y]||d.options.other;if(!w)throw new vn(d.value,y,Object.keys(d.options),u);a.push.apply(a,mt(w.value,t,n,r,o));continue}if(Vn(d)){var w=d.options["=".concat(y)];if(!w){if(!Intl.PluralRules)throw new St(`Intl.PluralRules is not available in this environment.
2
+ Try polyfilling it using "@formatjs/intl-pluralrules"
3
+ `,je.MISSING_INTL_API,u);var C=n.getPluralRules(t,{type:d.pluralType}).select(y-(d.offset||0));w=d.options[C]||d.options.other}if(!w)throw new vn(d.value,y,Object.keys(d.options),u);a.push.apply(a,mt(w.value,t,n,r,o,y-(d.offset||0)));continue}}return Zo(a)}function Qo(e,t){return t?fe(fe(fe({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=fe(fe({},e[r]),t[r]||{}),n},{})):e}function Jo(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Qo(e[r],t[r]),n},fe({},e)):e}function $t(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Yo(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.number),strategy:Gt.variadic}),getDateTimeFormat:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.dateTime),strategy:Gt.variadic}),getPluralRules:Ut(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Ft([void 0],n,!1)))},{cache:$t(e.pluralRules),strategy:Gt.variadic})}}var Ko=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(f){var l=i.formatToParts(f);if(l.length===1)return l[0].value;var d=l.reduce(function(g,y){return!g.length||y.type!==ee.literal||typeof g[g.length-1]!="string"?g.push(y.value):g[g.length-1]+=y.value,g},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(f){return mt(i.ast,i.locales,i.formatters,i.formats,f,void 0,i.message)},this.resolvedOptions=function(){var f;return{locale:((f=i.resolvedLocale)===null||f===void 0?void 0:f.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var u=o||{};u.formatters;var a=so(u,["formatters"]);this.ast=e.__parse(t,fe(fe({},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=Jo(e.formats,r),this.formatters=o&&o.formatters||Yo(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Xo,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 ei(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let o=0;o<n.length;o++)if(typeof r=="object"){if(o>0){const i=n.slice(o,n.length).join(".");if(i in r){r=r[i];break}}r=r[n[o]]}else r=void 0;return r}const we={},ti=(e,t,n)=>n&&(t in we||(we[t]={}),e in we[t]||(we[t][e]=n),n),er=(e,t)=>{if(t==null)return;if(t in we&&e in we[t])return we[t][e];const n=Bt(t);for(let r=0;r<n.length;r++){const o=n[r],i=ri(o,e);if(i)return ti(e,t,i)}};let on;const it=_t({});function ni(e){return on[e]||null}function tr(e){return e in on}function ri(e,t){if(!tr(e))return null;const n=ni(e);return ei(n,t)}function oi(e){if(e==null)return;const t=Bt(e);for(let n=0;n<t.length;n++){const r=t[n];if(tr(r))return r}}function nr(e,...t){delete we[e],it.update(n=>(n[e]=ao.all([n[e]||{},...t]),n))}Ve([it],([e])=>Object.keys(e));it.subscribe(e=>on=e);const gt={};function ii(e,t){gt[e].delete(t),gt[e].size===0&&delete gt[e]}function rr(e){return gt[e]}function ai(e){return Bt(e).map(t=>{const n=rr(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function en(e){return e==null?!1:Bt(e).some(t=>{var n;return(n=rr(t))==null?void 0:n.size})}function si(e,t){return Promise.all(t.map(r=>(ii(e,r),r().then(o=>o.default||o)))).then(r=>nr(e,...r))}const et={};function or(e){if(!en(e))return e in et?et[e]:Promise.resolve();const t=ai(e);return et[e]=Promise.all(t.map(([n,r])=>si(n,r))).then(()=>{if(en(e))return or(e);delete et[e]}),et[e]}const ui={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"}}},li={fallbackLocale:null,loadingDelay:200,formats:ui,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},hi=li;function $e(){return hi}const kt=_t(!1);var ci=Object.defineProperty,fi=Object.defineProperties,di=Object.getOwnPropertyDescriptors,En=Object.getOwnPropertySymbols,pi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,xn=(e,t,n)=>t in e?ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gi=(e,t)=>{for(var n in t||(t={}))pi.call(t,n)&&xn(e,n,t[n]);if(En)for(var n of En(t))mi.call(t,n)&&xn(e,n,t[n]);return e},bi=(e,t)=>fi(e,di(t));let tn;const Et=_t(null);function _n(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function Bt(e,t=$e().fallbackLocale){const n=_n(e);return t?[...new Set([...n,..._n(t)])]:n}function Oe(){return tn!=null?tn:void 0}Et.subscribe(e=>{tn=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const yi=e=>{if(e&&oi(e)&&en(e)){const{loadingDelay:t}=$e();let n;return typeof window!="undefined"&&Oe()!=null&&t?n=window.setTimeout(()=>kt.set(!0),t):kt.set(!0),or(e).then(()=>{Et.set(e)}).finally(()=>{clearTimeout(n),kt.set(!1)})}return Et.set(e)},Xe=bi(gi({},Et),{set:yi}),wt=e=>{const t=Object.create(null);return r=>{const o=JSON.stringify(r);return o in t?t[o]:t[o]=e(r)}};var vi=Object.defineProperty,xt=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,Tn=(e,t,n)=>t in e?vi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,an=(e,t)=>{for(var n in t||(t={}))ir.call(t,n)&&Tn(e,n,t[n]);if(xt)for(var n of xt(t))ar.call(t,n)&&Tn(e,n,t[n]);return e},ze=(e,t)=>{var n={};for(var r in e)ir.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xt)for(var r of xt(e))t.indexOf(r)<0&&ar.call(e,r)&&(n[r]=e[r]);return n};const ot=(e,t)=>{const{formats:n}=$e();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Ei=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(o=ot("number",r)),new Intl.NumberFormat(n,o)}),xi=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?o=ot("date",r):Object.keys(o).length===0&&(o=ot("date","short")),new Intl.DateTimeFormat(n,o)}),_i=wt(e=>{var t=e,{locale:n,format:r}=t,o=ze(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?o=ot("time",r):Object.keys(o).length===0&&(o=ot("time","short")),new Intl.DateTimeFormat(n,o)}),Ti=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return Ei(an({locale:n},r))},Si=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return xi(an({locale:n},r))},Bi=(e={})=>{var t=e,{locale:n=Oe()}=t,r=ze(t,["locale"]);return _i(an({locale:n},r))},wi=wt((e,t=Oe())=>new Ko(e,t,$e().formats,{ignoreTag:$e().ignoreTag})),Ai=(e,t={})=>{var n,r,o,i;let u=t;typeof e=="object"&&(u=e,e=u.id);const{values:a,locale:f=Oe(),default:l}=u;if(f==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let d=er(e,f);if(!d)d=(i=(o=(r=(n=$e()).handleMissingMessage)==null?void 0:r.call(n,{locale:f,id:e,defaultValue:l}))!=null?o:l)!=null?i:e;else if(typeof d!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof d}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),d;if(!a)return d;let g=d;try{g=wi(d,f).format(a)}catch(y){y instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,y.message)}return g},Ci=(e,t)=>Bi(t).format(e),Hi=(e,t)=>Si(t).format(e),Oi=(e,t)=>Ti(t).format(e),Li=(e,t=Oe())=>er(e,t),Ri=Ve([Xe,it],()=>Ai);Ve([Xe],()=>Ci);Ve([Xe],()=>Hi);Ve([Xe],()=>Oi);Ve([Xe,it],()=>Li);function Sn(e,t){nr(e,t)}function Ni(e){Xe.set(e)}const Bn={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款",Loading:"載入中 ..."},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen",Loading:"Wird geladen ..."},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita",Loading:"Caricamento ..."},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt",Loading:"Chargement ..."},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır",Loading:"Yükleniyor ..."},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит",Loading:"Загружается ..."},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit",Loading:"Se încarcă ..."},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit",Loading:"Učitavanje ..."},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés",Loading:"Betöltés ..."},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać",Loading:"Ładowanie ..."},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit",Loading:"Nalaganje ..."},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit",Loading:"Učitavanje ..."},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."}};var nn={exports:{}};/** @license
4
+ * eventsource.js
5
+ * Available under MIT License (MIT)
6
+ * https://github.com/Yaffle/EventSource/
7
+ */(function(e,t){(function(n){var r=n.setTimeout,o=n.clearTimeout,i=n.XMLHttpRequest,u=n.XDomainRequest,a=n.ActiveXObject,f=n.EventSource,l=n.document,d=n.Promise,g=n.fetch,y=n.Response,_=n.TextDecoder,B=n.TextEncoder,P=n.AbortController;if(typeof window!="undefined"&&typeof l!="undefined"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(h){l.readyState="complete"},!1)),i==null&&a!=null&&(i=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(h){function v(){}return v.prototype=h,new v}),Date.now||(Date.now=function(){return new Date().getTime()}),P==null){var j=g;g=function(h,v){var s=v.signal;return j(h,{headers:v.headers,credentials:v.credentials,cache:v.cache}).then(function(c){var p=c.body.getReader();return s._reader=p,s._aborted&&s._reader.cancel(),{status:c.status,statusText:c.statusText,headers:c.headers,body:{getReader:function(){return p}}}})},P=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function Z(){this.bitsNeeded=0,this.codePoint=0}Z.prototype.decode=function(h){function v(A,O,T){if(T===1)return A>=128>>O&&A<<O<=2047;if(T===2)return A>=2048>>O&&A<<O<=55295||A>=57344>>O&&A<<O<=65535;if(T===3)return A>=65536>>O&&A<<O<=1114111;throw new Error}function s(A,O){if(A===6*1)return O>>6>15?3:O>31?2:1;if(A===6*2)return O>15?3:2;if(A===6*3)return 3;throw new Error}for(var c=65533,p="",m=this.bitsNeeded,E=this.codePoint,S=0;S<h.length;S+=1){var b=h[S];m!==0&&(b<128||b>191||!v(E<<6|b&63,m-6,s(m,E)))&&(m=0,E=c,p+=String.fromCharCode(E)),m===0?(b>=0&&b<=127?(m=0,E=b):b>=192&&b<=223?(m=6*1,E=b&31):b>=224&&b<=239?(m=6*2,E=b&15):b>=240&&b<=247?(m=6*3,E=b&7):(m=0,E=c),m!==0&&!v(E,m,s(m,E))&&(m=0,E=c)):(m-=6,E=E<<6|b&63),m===0&&(E<=65535?p+=String.fromCharCode(E):(p+=String.fromCharCode(55296+(E-65535-1>>10)),p+=String.fromCharCode(56320+(E-65535-1&1023))))}return this.bitsNeeded=m,this.codePoint=E,p};var U=function(){try{return new _().decode(new B().encode("test"),{stream:!0})==="test"}catch(h){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+h)}return!1};(_==null||B==null||!U())&&(_=Z);var w=function(){};function C(h){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=h,this._sendTimeout=0,this._abort=w}C.prototype.open=function(h,v){this._abort(!0);var s=this,c=this._xhr,p=1,m=0;this._abort=function(T){s._sendTimeout!==0&&(o(s._sendTimeout),s._sendTimeout=0),(p===1||p===2||p===3)&&(p=4,c.onload=w,c.onerror=w,c.onabort=w,c.onprogress=w,c.onreadystatechange=w,c.abort(),m!==0&&(o(m),m=0),T||(s.readyState=4,s.onabort(null),s.onreadystatechange())),p=0};var E=function(){if(p===1){var T=0,I="",Q=void 0;if("contentType"in c)T=200,I="OK",Q=c.contentType;else try{T=c.status,I=c.statusText,Q=c.getResponseHeader("Content-Type")}catch(Ye){T=0,I="",Q=void 0}T!==0&&(p=2,s.readyState=2,s.status=T,s.statusText=I,s._contentType=Q,s.onreadystatechange())}},S=function(){if(E(),p===2||p===3){p=3;var T="";try{T=c.responseText}catch(I){}s.readyState=3,s.responseText=T,s.onprogress()}},b=function(T,I){if((I==null||I.preventDefault==null)&&(I={preventDefault:w}),S(),p===1||p===2||p===3){if(p=4,m!==0&&(o(m),m=0),s.readyState=4,T==="load")s.onload(I);else if(T==="error")s.onerror(I);else if(T==="abort")s.onabort(I);else throw new TypeError;s.onreadystatechange()}},A=function(T){c!=null&&(c.readyState===4?(!("onload"in c)||!("onerror"in c)||!("onabort"in c))&&b(c.responseText===""?"error":"load",T):c.readyState===3?"onprogress"in c||S():c.readyState===2&&E())},O=function(){m=r(function(){O()},500),c.readyState===3&&S()};"onload"in c&&(c.onload=function(T){b("load",T)}),"onerror"in c&&(c.onerror=function(T){b("error",T)}),"onabort"in c&&(c.onabort=function(T){b("abort",T)}),"onprogress"in c&&(c.onprogress=S),"onreadystatechange"in c&&(c.onreadystatechange=function(T){A(T)}),("contentType"in c||!("ontimeout"in i.prototype))&&(v+=(v.indexOf("?")===-1?"?":"&")+"padding=true"),c.open(h,v,!0),"readyState"in c&&(m=r(function(){O()},0))},C.prototype.abort=function(){this._abort(!1)},C.prototype.getResponseHeader=function(h){return this._contentType},C.prototype.setRequestHeader=function(h,v){var s=this._xhr;"setRequestHeader"in s&&s.setRequestHeader(h,v)},C.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},C.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var h=this;h._sendTimeout=r(function(){h._sendTimeout=0,h.send()},4);return}var v=this._xhr;"withCredentials"in v&&(v.withCredentials=this.withCredentials);try{v.send(void 0)}catch(s){throw s}};function N(h){return h.replace(/[A-Z]/g,function(v){return String.fromCharCode(v.charCodeAt(0)+32)})}function M(h){for(var v=Object.create(null),s=h.split(`\r
8
+ `),c=0;c<s.length;c+=1){var p=s[c],m=p.split(": "),E=m.shift(),S=m.join(": ");v[N(E)]=S}this._map=v}M.prototype.get=function(h){return this._map[N(h)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function W(){}W.prototype.open=function(h,v,s,c,p,m,E){h.open("GET",p);var S=0;h.onprogress=function(){var A=h.responseText,O=A.slice(S);S+=O.length,s(O)},h.onerror=function(A){A.preventDefault(),c(new Error("NetworkError"))},h.onload=function(){c(null)},h.onabort=function(){c(null)},h.onreadystatechange=function(){if(h.readyState===i.HEADERS_RECEIVED){var A=h.status,O=h.statusText,T=h.getResponseHeader("Content-Type"),I=h.getAllResponseHeaders();v(A,O,T,new M(I))}},h.withCredentials=m;for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&h.setRequestHeader(b,E[b]);return h.send(),h};function Ee(h){this._headers=h}Ee.prototype.get=function(h){return this._headers.get(h)};function xe(){}xe.prototype.open=function(h,v,s,c,p,m,E){var S=null,b=new P,A=b.signal,O=new _;return g(p,{headers:E,credentials:m?"include":"same-origin",signal:A,cache:"no-store"}).then(function(T){return S=T.body.getReader(),v(T.status,T.statusText,T.headers.get("Content-Type"),new Ee(T.headers)),new d(function(I,Q){var Ye=function(){S.read().then(function(ne){if(ne.done)I(void 0);else{var J=O.decode(ne.value,{stream:!0});s(J),Ye()}}).catch(function(ne){Q(ne)})};Ye()})}).catch(function(T){if(T.name!=="AbortError")return T}).then(function(T){c(T)}),{abort:function(){S!=null&&S.cancel(),b.abort()}}};function ie(){this._listeners=Object.create(null)}function pe(h){r(function(){throw h},0)}ie.prototype.dispatchEvent=function(h){h.target=this;var v=this._listeners[h.type];if(v!=null)for(var s=v.length,c=0;c<s;c+=1){var p=v[c];try{typeof p.handleEvent=="function"?p.handleEvent(h):p.call(this,h)}catch(m){pe(m)}}},ie.prototype.addEventListener=function(h,v){h=String(h);var s=this._listeners,c=s[h];c==null&&(c=[],s[h]=c);for(var p=!1,m=0;m<c.length;m+=1)c[m]===v&&(p=!0);p||c.push(v)},ie.prototype.removeEventListener=function(h,v){h=String(h);var s=this._listeners,c=s[h];if(c!=null){for(var p=[],m=0;m<c.length;m+=1)c[m]!==v&&p.push(c[m]);p.length===0?delete s[h]:s[h]=p}};function q(h){this.type=h,this.target=void 0}function _e(h,v){q.call(this,h),this.data=v.data,this.lastEventId=v.lastEventId}_e.prototype=Object.create(q.prototype);function x(h,v){q.call(this,h),this.status=v.status,this.statusText=v.statusText,this.headers=v.headers}x.prototype=Object.create(q.prototype);function Te(h,v){q.call(this,h),this.error=v.error}Te.prototype=Object.create(q.prototype);var We=-1,ce=0,Se=1,Ae=2,Ze=-1,ae=0,Le=1,at=2,qe=3,st=/^text\/event\-stream(;.*)?$/i,At=1e3,ut=18e6,Qe=function(h,v){var s=h==null?v:parseInt(h,10);return s!==s&&(s=v),Je(s)},Je=function(h){return Math.min(Math.max(h,At),ut)},Be=function(h,v,s){try{typeof v=="function"&&v.call(h,s)}catch(c){pe(c)}};function te(h,v){ie.call(this),v=v||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Ht(this,h,v)}function lt(){return i!=null&&"withCredentials"in i.prototype||u==null?new i:new u}var Ct=g!=null&&y!=null&&"body"in y.prototype;function Ht(h,v,s){v=String(v);var c=!!s.withCredentials,p=s.lastEventIdQueryParameterName||"lastEventId",m=Je(1e3),E=Qe(s.heartbeatTimeout,45e3),S="",b=m,A=!1,O=0,T=s.headers||{},I=s.Transport,Q=Ct&&I==null?void 0:new C(I!=null?new I:lt()),Ye=I!=null&&typeof I!="string"?new I:Q==null?new xe:new W,ne=void 0,J=0,le=We,Re="",ct="",me="",ft="",Y=ae,Ot=0,Ce=0,ur=function(V,$,re,oe){if(le===ce)if(V===200&&re!=null&&st.test(re)){le=Se,A=Date.now(),b=m,h.readyState=Se;var K=new x("open",{status:V,statusText:$,headers:oe});h.dispatchEvent(K),Be(h,h.onopen,K)}else{var X="";V!==200?($&&($=$.replace(/\s+/g," ")),X="EventSource's response has a status "+V+" "+$+" that is not 200. Aborting the connection."):X="EventSource's response has a Content-Type specifying an unsupported type: "+(re==null?"-":re.replace(/\s+/g," "))+". Aborting the connection.",Lt();var K=new x("error",{status:V,statusText:$,headers:oe});h.dispatchEvent(K),Be(h,h.onerror,K),console.error(X)}},lr=function(V){if(le===Se){for(var $=-1,re=0;re<V.length;re+=1){var oe=V.charCodeAt(re);(oe===10||oe===13)&&($=re)}var K=($!==-1?ft:"")+V.slice(0,$+1);ft=($===-1?ft:"")+V.slice($+1),V!==""&&(A=Date.now(),O+=V.length);for(var X=0;X<K.length;X+=1){var oe=K.charCodeAt(X);if(Y===Ze&&oe===10)Y=ae;else if(Y===Ze&&(Y=ae),oe===13||oe===10){if(Y!==ae){Y===Le&&(Ce=X+1);var ge=K.slice(Ot,Ce-1),be=K.slice(Ce+(Ce<X&&K.charCodeAt(Ce)===32?1:0),X);ge==="data"?(Re+=`
9
+ `,Re+=be):ge==="id"?ct=be:ge==="event"?me=be:ge==="retry"?(m=Qe(be,m),b=m):ge==="heartbeatTimeout"&&(E=Qe(be,E),J!==0&&(o(J),J=r(function(){Ke()},E)))}if(Y===ae){if(Re!==""){S=ct,me===""&&(me="message");var Ne=new _e(me,{data:Re.slice(1),lastEventId:ct});if(h.dispatchEvent(Ne),me==="open"?Be(h,h.onopen,Ne):me==="message"?Be(h,h.onmessage,Ne):me==="error"&&Be(h,h.onerror,Ne),le===Ae)return}Re="",me=""}Y=oe===13?Ze:ae}else Y===ae&&(Ot=X,Y=Le),Y===Le?oe===58&&(Ce=X+1,Y=at):Y===at&&(Y=qe)}}},sn=function(V){if(le===Se||le===ce){le=We,J!==0&&(o(J),J=0),J=r(function(){Ke()},b),b=Je(Math.min(m*16,b*2)),h.readyState=ce;var $=new Te("error",{error:V});h.dispatchEvent($),Be(h,h.onerror,$),V!=null&&console.error(V)}},Lt=function(){le=Ae,ne!=null&&(ne.abort(),ne=void 0),J!==0&&(o(J),J=0),h.readyState=Ae},Ke=function(){if(J=0,le!==We){if(!A&&ne!=null)sn(new Error("No activity within "+E+" milliseconds. "+(le===ce?"No response received.":O+" chars received.")+" Reconnecting.")),ne!=null&&(ne.abort(),ne=void 0);else{var V=Math.max((A||Date.now())+E-Date.now(),1);A=!1,J=r(function(){Ke()},V)}return}A=!1,O=0,J=r(function(){Ke()},E),le=ce,Re="",me="",ct=S,ft="",Ot=0,Ce=0,Y=ae;var $=v;if(v.slice(0,5)!=="data:"&&v.slice(0,5)!=="blob:"&&S!==""){var re=v.indexOf("?");$=re===-1?v:v.slice(0,re+1)+v.slice(re+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(be,Ne){return Ne===p?"":be}),$+=(v.indexOf("?")===-1?"?":"&")+p+"="+encodeURIComponent(S)}var oe=h.withCredentials,K={};K.Accept="text/event-stream";var X=h.headers;if(X!=null)for(var ge in X)Object.prototype.hasOwnProperty.call(X,ge)&&(K[ge]=X[ge]);try{ne=Ye.open(Q,ur,lr,sn,$,oe,K)}catch(be){throw Lt(),be}};h.url=v,h.readyState=ce,h.withCredentials=c,h.headers=T,h._close=Lt,Ke()}te.prototype=Object.create(ie.prototype),te.prototype.CONNECTING=ce,te.prototype.OPEN=Se,te.prototype.CLOSED=Ae,te.prototype.close=function(){this._close()},te.CONNECTING=ce,te.OPEN=Se,te.CLOSED=Ae,te.prototype.withCredentials=void 0;var ht=f;i!=null&&(f==null||!("withCredentials"in f.prototype))&&(ht=te),function(h){{var v=h(t);v!==void 0&&(e.exports=v)}}(function(h){h.EventSourcePolyfill=te,h.NativeEventSource=f,h.EventSource=ht})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:Vr:globalThis)})(nn,nn.exports);var Mi=nn.exports;function Pi(e){br(e,"svelte-gv6dm2",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function wn(e,t,n){const r=e.slice();return r[51]=t[n],r}function An(e,t,n){const r=e.slice();return r[54]=t[n],r}function Ii(e){let t,n=(e[3].Total?e[5](e[3].Total[0].amount):"0")+"",r,o,i,u,a,f,l,d=e[2]&&Cn(e);return{c(){t=G("button"),r=ye(n),o=ve(),i=G("span"),i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>',u=ve(),d&&d.c(),a=Er(),z(t,"class","BalanceValue")},m(g,y){de(g,t,y),R(t,r),R(t,o),R(t,i),de(g,u,y),d&&d.m(g,y),de(g,a,y),f||(l=bt(t,"click",e[25]),f=!0)},p(g,y){y[0]&8&&n!==(n=(g[3].Total?g[5](g[3].Total[0].amount):"0")+"")&&He(r,n),g[2]?d?d.p(g,y):(d=Cn(g),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(g){g&&(he(t),he(u),he(a)),d&&d.d(g),f=!1,l()}}}function Di(e){let t,n=e[4]("Loading")+"",r;return{c(){t=G("p"),r=ye(n)},m(o,i){de(o,t,i),R(t,r)},p(o,i){i[0]&16&&n!==(n=o[4]("Loading")+"")&&He(r,n)},d(o){o&&he(t)}}}function Cn(e){let t,n,r,o,i,u,a=e[4]("Title")+"",f,l,d,g,y,_,B=e[4]("DepositButton")+"",P,j,Z,U=yt(Object.keys(e[3])),w=[];for(let C=0;C<U.length;C+=1)w[C]=On(wn(e,U,C));return{c(){t=G("div"),n=G("button"),r=ve(),o=G("div"),i=G("div"),u=G("p"),f=ye(a),l=ve(),d=G("div");for(let C=0;C<w.length;C+=1)w[C].c();g=ve(),y=G("div"),_=G("button"),P=ye(B),z(n,"class","BalanceModalClose"),z(u,"class","BalanceModalTitle"),z(i,"class","BalanceModalHeader"),z(d,"class","BalanceModalBody"),z(_,"class","BalanceModalAction"),z(y,"class","BalanceModalFooter"),z(o,"class","BalanceModal"),z(t,"class","BalanceModalWrapper")},m(C,N){de(C,t,N),R(t,n),R(t,r),R(t,o),R(o,i),R(i,u),R(u,f),R(o,l),R(o,d);for(let M=0;M<w.length;M+=1)w[M]&&w[M].m(d,null);R(o,g),R(o,y),R(y,_),R(_,P),j||(Z=[bt(n,"click",e[26]),bt(_,"click",e[27])],j=!0)},p(C,N){if(N[0]&16&&a!==(a=C[4]("Title")+"")&&He(f,a),N[0]&184){U=yt(Object.keys(C[3]));let M;for(M=0;M<U.length;M+=1){const W=wn(C,U,M);w[M]?w[M].p(W,N):(w[M]=On(W),w[M].c(),w[M].m(d,null))}for(;M<w.length;M+=1)w[M].d(1);w.length=U.length}N[0]&16&&B!==(B=C[4]("DepositButton")+"")&&He(P,B)},d(C){C&&he(t),Pn(w,C),j=!1,ke(Z)}}}function Hn(e){let t,n,r=e[4](e[51])+"",o,i,u=e[7](e[54])+"",a,f,l,d,g=e[5](e[54].amount)+"",y;return{c(){t=G("div"),n=G("p"),o=ye(r),i=ve(),a=ye(u),f=ve(),l=G("p"),d=G("span"),y=ye(g),z(n,"class","BalanceModalText"),z(d,"class","BalanceModalAmount"),z(l,"class","BalanceModalValue"),z(t,"class","BalanceModalRowLine")},m(_,B){de(_,t,B),R(t,n),R(n,o),R(n,i),R(n,a),R(t,f),R(t,l),R(l,d),R(d,y)},p(_,B){B[0]&24&&r!==(r=_[4](_[51])+"")&&He(o,r),B[0]&8&&u!==(u=_[7](_[54])+"")&&He(a,u),B[0]&8&&g!==(g=_[5](_[54].amount)+"")&&He(y,g)},d(_){_&&he(t)}}}function On(e){let t,n,r=yt(e[3][e[51]]),o=[];for(let i=0;i<r.length;i+=1)o[i]=Hn(An(e,r,i));return{c(){t=G("div");for(let i=0;i<o.length;i+=1)o[i].c();n=ve(),z(t,"class","BalanceModalRowBoth")},m(i,u){de(i,t,u);for(let a=0;a<o.length;a+=1)o[a]&&o[a].m(t,null);R(t,n)},p(i,u){if(u[0]&184){r=yt(i[3][i[51]]);let a;for(a=0;a<r.length;a+=1){const f=An(i,r,a);o[a]?o[a].p(f,u):(o[a]=Hn(f),o[a].c(),o[a].m(t,n))}for(;a<o.length;a+=1)o[a].d(1);o.length=r.length}},d(i){i&&he(t),Pn(o,i)}}}function Ln(e){let t,n,r;return{c(){t=G("button"),z(t,"class","ShowBalanceModalOverlay")},m(o,i){de(o,t,i),n||(r=bt(t,"click",e[28]),n=!0)},p:ue,d(o){o&&he(t),n=!1,r()}}}function Fi(e){let t,n,r;function o(f,l){return f[1]?Di:Ii}let i=o(e),u=i(e),a=e[2]&&Ln(e);return{c(){t=G("div"),n=G("div"),u.c(),r=ve(),a&&a.c(),z(n,"class","ShowBalance")},m(f,l){de(f,t,l),R(t,n),u.m(n,null),R(t,r),a&&a.m(t,null),e[29](t)},p(f,l){i===(i=o(f))&&u?u.p(f,l):(u.d(1),u=i(f),u&&(u.c(),u.m(n,null))),f[2]?a?a.p(f,l):(a=Ln(f),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i:ue,o:ue,d(f){f&&he(t),u.d(),a&&a.d(),e[29](null)}}}function Ui(e,t,n){let r;gr(e,Ri,s=>n(4,r=s));let{userid:o=""}=t,{session:i=""}=t,{endpoint:u=""}=t,{lang:a="en"}=t,{mbsource:f=""}=t,{clientstyling:l=""}=t,{clientstylingurl:d=""}=t,{translationurl:g=""}=t,{gmversion:y="gm16"}=t,{displaybalanceoption:_="All"}=t,{totalcalculationmode:B="totalCashAmount"}=t,{hideproducttype:P=""}=t,{currencylocale:j="en"}=t,{currencydisplay:Z="symbol"}=t,{maximumfractiondigits:U="2"}=t,{minimumfractiondigits:w="0"}=t,{customdisplayformat:C=""}=t,N,M,W=!0,Ee=!1,xe=!1,ie,pe="",q=[],_e;const x={},Te=["totalCashAmount","totalRealAmount"],We=()=>{fetch(g).then(s=>s.json()).then(s=>Object.keys(s).forEach(c=>Sn(c,s[c]))).catch(s=>console.log(s))};Object.keys(Bn).forEach(s=>Sn(s,Bn[s]));const ce=s=>{if(C)return Se(s);const c=j||a,p={style:"currency",currency:pe,useGrouping:!0,currencyDisplay:Z||"code",maximumFractionDigits:U===""||isNaN(Number(U))?2:Number(U),minimumFractionDigits:w===""||isNaN(Number(w))?0:Number(w)};return new Intl.NumberFormat(c,p).format(s)},Se=s=>{const c=[];let p="";for(const m of C)switch(m){default:p+=m;break;case"{":p&&c.push(p),p="";break;case"}":const[E,S]=p.split("|");if(p="",E.toLowerCase()==="currency")p=pe;else if(E.toLowerCase()==="amount"){let b=",",A=".",O=2;S&&(S[0]!==" "&&(b=S[0]),S[1]!==" "&&(A=S[1]),S[2]!==" "&&!isNaN(Number(S[2]))&&(O=Number(S[2])));let[T,I]=String(Math.floor(s*Nt(10,O))/Nt(10,O)).split(".");p+=T[0];for(let Q=1;Q<T.length;++Q)(T.length-Q)%3===0?p+=b+T[Q]:p+=T[Q];I&&(p+=A+I)}p&&c.push(p),p="";break}return c.push(p),c.join("")},Ae=()=>It(this,null,function*(){var c,p,m;n(1,W=!0);const s=new URL(`${u}/v1/player/${o}/account`);try{const E=yield fetch(s,{method:"GET",headers:{"X-SessionID":i}}),S=yield E.json();if(E.ok)q=S.items,pe=(c=q.find(b=>b.displayName==="Casino"))==null?void 0:c.currency,n(3,x.Total=[{amount:S.totalAmount[pe]}],x),n(3,x.Real=[{amount:(p=q.find(b=>b.displayName==="Casino"))==null?void 0:p.balanceAmount}],x),n(3,x.Bonus=[{amount:(m=q.find(b=>b.displayName==="UBS"))==null?void 0:m.balanceAmount}],x);else throw new Error("Failed to fetch balance data !")}catch(E){console.log("Balance error: ",E)}finally{n(1,W=!1)}}),Ze=()=>{n(1,W=!0);const s=new URL(`${u}/v2/player/${o}/balance`),c=new Headers;c.append("X-SessionID",i),fetch(s,{method:"GET",headers:c}).then(m=>m.json()).then(m=>{m[B]||n(8,B=Te[0]);const E=m.items.find(b=>b.type==="Real"&&b.walletAccountType==="Ordinary");if(pe=E.currency,xe=!!E.productType,n(3,x.Total=[{amount:0}],x),n(3,x.Real=[],x),n(3,x.Bonus=[],x),n(3,x.Credit=[],x),!xe){_e={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(3,x.Total[0].amount=m[B][pe],x);for(const b of m.items)switch(b.type){case"Bonus":x.Bonus.length===0?x.Bonus.push({amount:b.amount}):n(3,x.Bonus[0].amount+=b.amount,x);break;case"Real":if(b.creditLine&&x.Credit.length===0&&x.Credit.push({amount:b.creditLine}),B==="totalRealAmount")continue;x.Real.length===0?x.Real.push({amount:b.amount}):n(3,x.Real[0].amount+=b.amount,x);break}for(const[b,A]of Object.entries(x))A.length<1&&delete x[b];n(1,W=!1);return}_e={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let S=m.items;_&&_!=="All"&&(S=m.items.filter(b=>b.productType===_));for(const b of S){let A;switch(b.type){case"Bonus":A=x.Bonus.findIndex(O=>O.productType===b.productType),A>0?n(3,x.Bonus[A].amount+=b.amount,x):x.Bonus.push({amount:b.amount,productType:b.productType});break;case"Real":b.creditLine&&x.Credit.push({amount:b.creditLine,productType:b.productType}),A=x.Real.findIndex(O=>O.productType===b.productType),A>0?n(3,x.Real[A].amount+=b.amount,x):x.Real.push({amount:b.amount,productType:b.productType});break}}st();for(const[b,A]of Object.entries(x))A.length<1&&delete x[b];window.postMessage({type:"playerBalanceInfo",balance:m},window.location.href),n(1,W=!1)}).catch(()=>{throw n(1,W=!1),new Error("Failed to fetch balance data !")})},ae=()=>{if(ie&&ie.close(),i.length<1)return;let s,c;switch(y){case"gm16":s=new URL(`${u}/v2/player/${o}/information/updates`),c=E=>At(E);break;case"gmcore":s=new URL(`${u}/v1/player/${o}/balance/updates`),c=E=>at(E);break}const p={accept:"text/event-stream","X-SessionId":i},m=new Mi.EventSourcePolyfill(s,{headers:p});ie=m,m.addEventListener("message",c)},Le=s=>{let c;try{c=JSON.parse(s)}catch(p){console.log("Balance stream failed: ",p);return}return c},at=s=>{var E,S;const c=Le(s.data);if(!c){ae();return}let p="0";const m=c.balanceChange;q=q.map(b=>(m&&m[b.id]&&(b=Pt(Mt({},b),{balanceAmount:m[b.id].afterAmount})),p=(parseFloat(b==null?void 0:b.balanceAmount)+parseFloat(p)).toString(),b)),n(3,x.Real=[{amount:(E=q[0])==null?void 0:E.balanceAmount}],x),n(3,x.Bonus=[{amount:(S=q[1])==null?void 0:S.balanceAmount}],x),n(3,x.Total=[{amount:Number(p)}],x)},qe=(s,c,p)=>{let m=null;switch(p.walletAccountType){case"Ordinary":(p.afterAmount!==p.affectedAmount||c.lastOrdinaryAfterAmount===0)&&(c.lastOrdinaryAfterAmount=p.afterAmount,c.showCreditLineAfterAmount||(m=p.afterAmount));break;case"CreditLine":p.afterAmount!==0?(m=p.afterAmount,c.showCreditLineAfterAmount=!0):(m=c.lastOrdinaryAfterAmount,c.showCreditLineAfterAmount=!1);break;default:m=p.afterAmount}return m===null?s:m},st=()=>{switch(B){case"totalCashAmount":let s=0;for(const p of["Real","Bonus"])for(const m of x[p])s+=Math.max(m.amount,0);n(3,x.Total[0].amount=s,x);break;case"totalRealAmount":if(!xe)return;let c=0;for(const p of x.Real)c+=p.amount;n(3,x.Total[0].amount=c,x)}},At=s=>{const c=Le(s.data);if(!c){ae();return}if(Qe(c==null?void 0:c.type)||c.type!=="BALANCE_UPDATE_V2")return;const p=c.body.balanceChange;for(const[m,E]of Object.entries(p))if(B==="totalRealAmount"&&m==="Real"&&!xe&&n(3,x.Total[0].amount=qe(x.Total[0].amount,_e,E),x),!!x[m])for(const S of x[m]){if(!xe){S.amount=m==="Real"?qe(S.amount,_e,E):E.afterAmount;continue}E.productType===S.productType&&(S.amount=m==="Real"?qe(S.amount,_e[S.productType],E):E.afterAmount)}st()},ut=()=>{n(2,Ee=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&&gtag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Qe=s=>s==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,Je=()=>{Te.includes(B)||(console.error(`Unsupported value ('${B}') for totalcalculationmode parameter. Only the following values are supported ${Te}. Using default value ('${Te[0]}').`),n(8,B=Te[0]))},Be=s=>{const c=P.split(",").map(p=>p.trim());return!s.productType||c.includes(s.productType)?"":r(s.productType)},te=()=>{switch(Ni(a),Je(),y){case"gmcore":Ae();break;case"gm16":Ze();break;default:throw Error(`Invalid apiversion attribute: ${y}`)}},lt=s=>s.data&&s.data.type==="LogoutSuccessfull"&&ie.close();Sr(()=>(window.addEventListener("message",lt,!1),()=>{window.removeEventListener("message",lt),ie&&ie.close()}));const Ct=()=>n(2,Ee=!0),Ht=()=>n(2,Ee=!1),ht=()=>ut(),h=()=>n(2,Ee=!1);function v(s){Vt[s?"unshift":"push"](()=>{N=s,n(0,N)})}return e.$$set=s=>{"userid"in s&&n(9,o=s.userid),"session"in s&&n(10,i=s.session),"endpoint"in s&&n(11,u=s.endpoint),"lang"in s&&n(12,a=s.lang),"mbsource"in s&&n(13,f=s.mbsource),"clientstyling"in s&&n(14,l=s.clientstyling),"clientstylingurl"in s&&n(15,d=s.clientstylingurl),"translationurl"in s&&n(16,g=s.translationurl),"gmversion"in s&&n(17,y=s.gmversion),"displaybalanceoption"in s&&n(18,_=s.displaybalanceoption),"totalcalculationmode"in s&&n(8,B=s.totalcalculationmode),"hideproducttype"in s&&n(19,P=s.hideproducttype),"currencylocale"in s&&n(20,j=s.currencylocale),"currencydisplay"in s&&n(21,Z=s.currencydisplay),"maximumfractiondigits"in s&&n(22,U=s.maximumfractiondigits),"minimumfractiondigits"in s&&n(23,w=s.minimumfractiondigits),"customdisplayformat"in s&&n(24,C=s.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&400896&&u&&o&&i&&a&&y&&_&&te(),e.$$.dirty[0]&134656&&u&&o&&i&&y&&ae(),e.$$.dirty[0]&16385&&l&&N&&Fr(N,l),e.$$.dirty[0]&32769&&d&&N&&Ur(N,d),e.$$.dirty[0]&8193&&N&&Gr(N,`${f}.Style`,M),e.$$.dirty[0]&65536&&g&&We()},[N,W,Ee,x,r,ce,ut,Be,B,o,i,u,a,f,l,d,g,y,_,P,j,Z,U,w,C,Ct,Ht,ht,h,v]}class sr extends Ir{constructor(t){super(),Mr(this,t,Ui,Fi,Nn,{userid:9,session:10,endpoint:11,lang:12,mbsource:13,clientstyling:14,clientstylingurl:15,translationurl:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,hideproducttype:19,currencylocale:20,currencydisplay:21,maximumfractiondigits:22,minimumfractiondigits:23,customdisplayformat:24},Pi,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(t){this.$$set({userid:t}),k()}get session(){return this.$$.ctx[10]}set session(t){this.$$set({session:t}),k()}get endpoint(){return this.$$.ctx[11]}set endpoint(t){this.$$set({endpoint:t}),k()}get lang(){return this.$$.ctx[12]}set lang(t){this.$$set({lang:t}),k()}get mbsource(){return this.$$.ctx[13]}set mbsource(t){this.$$set({mbsource:t}),k()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),k()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),k()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),k()}get gmversion(){return this.$$.ctx[17]}set gmversion(t){this.$$set({gmversion:t}),k()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),k()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),k()}get hideproducttype(){return this.$$.ctx[19]}set hideproducttype(t){this.$$set({hideproducttype:t}),k()}get currencylocale(){return this.$$.ctx[20]}set currencylocale(t){this.$$set({currencylocale:t}),k()}get currencydisplay(){return this.$$.ctx[21]}set currencydisplay(t){this.$$set({currencydisplay:t}),k()}get maximumfractiondigits(){return this.$$.ctx[22]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),k()}get minimumfractiondigits(){return this.$$.ctx[23]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),k()}get customdisplayformat(){return this.$$.ctx[24]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),k()}}Pr(sr,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},hideproducttype:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=sr;
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModal-CoLTeWQ3.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal")&&customElements.define("player-account-balance-modal",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModal-mIgDjCsd.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal")&&customElements.define("player-account-balance-modal",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModal-BlnRw3qy.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModal-EpWuA9il.js").then(({ default: t }) => {
14
14
  !customElements.get("player-account-balance-modal") && customElements.define("player-account-balance-modal", t.element);
15
15
  });
16
16
  }
@@ -1,4 +1,4 @@
1
- import { P as a } from "../components/PlayerAccountBalanceModal-R_7aUobI.js";
1
+ import { P as a } from "../components/PlayerAccountBalanceModal-Ct0scvdD.js";
2
2
  function s(t) {
3
3
  return function(...n) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-balance-modal",
3
- "version": "1.87.26",
3
+ "version": "1.87.28",
4
4
  "type": "module",
5
5
  "main": "es2015/player-account-balance-modal.cjs",
6
6
  "module": "esnext/player-account-balance-modal.js",
@@ -1,9 +0,0 @@
1
- "use strict";var lr=Object.defineProperty,hr=Object.defineProperties;var cr=Object.getOwnPropertyDescriptors;var sn=Object.getOwnPropertySymbols;var fr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable;var Rt=Math.pow,Lt=(e,t,n)=>t in e?lr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nt=(e,t)=>{for(var n in t||(t={}))fr.call(t,n)&&Lt(e,n,t[n]);if(sn)for(var n of sn(t))dr.call(t,n)&&Lt(e,n,t[n]);return e},Mt=(e,t)=>hr(e,cr(t));var oe=(e,t,n)=>(Lt(e,typeof t!="symbol"?t+"":t,n),n);var Pt=(e,t,n)=>new Promise((r,i)=>{var o=f=>{try{s(n.next(f))}catch(l){i(l)}},u=f=>{try{s(n.throw(f))}catch(l){i(l)}},s=f=>f.done?r(f.value):Promise.resolve(f.value).then(o,u);s((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ae(){}function Ln(e){return e()}function un(){return Object.create(null)}function $e(e){e.forEach(Ln)}function nn(e){return typeof e=="function"}function Rn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function pr(e){return Object.keys(e).length===0}function Nn(e,...t){if(e==null){for(const r of t)r(void 0);return ae}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function mr(e,t,n){e.$$.on_destroy.push(Nn(t,n))}function M(e,t){e.appendChild(t)}function gr(e,t,n){const r=br(e);if(!r.getElementById(t)){const i=G("style");i.id=t,i.textContent=n,yr(r,i)}}function br(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function yr(e,t){return M(e.head||e,t),t.sheet}function de(e,t,n){e.insertBefore(t,n||null)}function he(e){e.parentNode&&e.parentNode.removeChild(e)}function Mn(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function G(e){return document.createElement(e)}function Ee(e){return document.createTextNode(e)}function xe(){return Ee(" ")}function vr(){return Ee("")}function pt(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function z(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Er(e){return Array.from(e.childNodes)}function He(e,t){t=""+t,e.data!==t&&(e.data=t)}function xr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let et;function Ke(e){et=e}function _r(){if(!et)throw new Error("Function called outside component initialization");return et}function Tr(e){_r().$$.on_mount.push(e)}const Ie=[],kt=[];let De=[];const ln=[],Br=Promise.resolve();let Vt=!1;function Sr(){Vt||(Vt=!0,Br.then(k))}function Xt(e){De.push(e)}const It=new Set;let Me=0;function k(){if(Me!==0)return;const e=et;do{try{for(;Me<Ie.length;){const t=Ie[Me];Me++,Ke(t),wr(t.$$)}}catch(t){throw Ie.length=0,Me=0,t}for(Ke(null),Ie.length=0,Me=0;kt.length;)kt.pop()();for(let t=0;t<De.length;t+=1){const n=De[t];It.has(n)||(It.add(n),n())}De.length=0}while(Ie.length);for(;ln.length;)ln.pop()();Vt=!1,It.clear(),Ke(e)}function wr(e){if(e.fragment!==null){e.update(),$e(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Xt)}}function Ar(e){const t=[],n=[];De.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),De=t}const Cr=new Set;function Hr(e,t){e&&e.i&&(Cr.delete(e),e.i(t))}function mt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Or(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),Xt(()=>{const o=e.$$.on_mount.map(Ln).filter(nn);e.$$.on_destroy?e.$$.on_destroy.push(...o):$e(o),e.$$.on_mount=[]}),i.forEach(Xt)}function Lr(e,t){const n=e.$$;n.fragment!==null&&(Ar(n.after_update),$e(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Rr(e,t){e.$$.dirty[0]===-1&&(Ie.push(e),Sr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Nr(e,t,n,r,i,o,u=null,s=[-1]){const f=et;Ke(e);const l=e.$$={fragment:null,ctx:[],props:o,update:ae,not_equal:i,bound:un(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:un(),dirty:s,skip_bound:!1,root:t.target||f.$$.root};u&&u(l.root);let d=!1;if(l.ctx=n?n(e,t.props||{},(m,b,..._)=>{const B=_.length?_[0]:b;return l.ctx&&i(l.ctx[m],l.ctx[m]=B)&&(!l.skip_bound&&l.bound[m]&&l.bound[m](B),d&&Rr(e,m)),b}):[],l.update(),d=!0,$e(l.before_update),l.fragment=r?r(l.ctx):!1,t.target){if(t.hydrate){const m=Er(t.target);l.fragment&&l.fragment.l(m),m.forEach(he)}else l.fragment&&l.fragment.c();t.intro&&Hr(e.$$.fragment),Or(e,t.target,t.anchor),k()}Ke(f)}let Pn;typeof HTMLElement=="function"&&(Pn=class extends HTMLElement{constructor(t,n,r){super();oe(this,"$$ctor");oe(this,"$$s");oe(this,"$$c");oe(this,"$$cn",!1);oe(this,"$$d",{});oe(this,"$$r",!1);oe(this,"$$p_d",{});oe(this,"$$l",{});oe(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return Pt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let u;return{c:function(){u=G("slot"),o!=="default"&&z(u,"name",o)},m:function(l,d){de(l,u,d)},d:function(l){l&&he(u)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=xr(this);for(const o of this.$$s)o in r&&(n[o]=[t(o)]);for(const o of this.attributes){const u=this.$$g_p(o.name);u in this.$$d||(this.$$d[u]=ct(u,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Mt(Nt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const u=ct(o,this.$$d[o],this.$$p_d,"toAttribute");u==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,u)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const u of this.$$l[o]){const s=this.$$c.$on(o,u);this.$$l_u.set(u,s)}this.$$l={}}})}attributeChangedCallback(t,n,r){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=ct(t,r,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function ct(e,t,n,r){var o;const i=(o=n[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Mr(e,t,n,r,i,o){let u=class extends Pn{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Object.keys(t).forEach(s=>{Object.defineProperty(u.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(f){var l;f=ct(s,f,t),this.$$d[s]=f,(l=this.$$c)==null||l.$set({[s]:f})}})}),r.forEach(s=>{Object.defineProperty(u.prototype,s,{get(){var f;return(f=this.$$c)==null?void 0:f[s]}})}),e.element=u,u}class Pr{constructor(){oe(this,"$$");oe(this,"$$set")}$destroy(){Lr(this,1),this.$destroy=ae}$on(t,n){if(!nn(n))return ae;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!pr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ir="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ir);function Dr(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Fr(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(r=>r.text()).then(r=>{const i=document.createElement("style");i.innerHTML=r,e&&e.appendChild(i)}).catch(r=>{console.error("There was an error while trying to load client styling from URL",r)})}function Ur(e,t,n){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(t,i=>{r.innerHTML=i,e&&e.appendChild(r)})}}const Pe=[];function Gr(e,t){return{subscribe:vt(e,t).subscribe}}function vt(e,t=ae){let n;const r=new Set;function i(s){if(Rn(e,s)&&(e=s,n)){const f=!Pe.length;for(const l of r)l[1](),Pe.push(l,e);if(f){for(let l=0;l<Pe.length;l+=2)Pe[l][0](Pe[l+1]);Pe.length=0}}}function o(s){i(s(e))}function u(s,f=ae){const l=[s,f];return r.add(l),r.size===1&&(n=t(i,o)||ae),s(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:u}}function ke(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return Gr(n,(u,s)=>{let f=!1;const l=[];let d=0,m=ae;const b=()=>{if(d)return;m();const B=t(r?l[0]:l,u,s);o?u(B):m=nn(B)?B:ae},_=i.map((B,I)=>Nn(B,j=>{l[I]=j,d&=~(1<<I),f&&b()},()=>{d|=1<<I}));return f=!0,b(),function(){$e(_),m(),f=!1}})}var jr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function $r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kr=function(t){return Vr(t)&&!Xr(t)};function Vr(e){return!!e&&typeof e=="object"}function Xr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Zr(e)}var zr=typeof Symbol=="function"&&Symbol.for,Wr=zr?Symbol.for("react.element"):60103;function Zr(e){return e.$$typeof===Wr}function qr(e){return Array.isArray(e)?[]:{}}function tt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Fe(qr(e),e,t):e}function Qr(e,t,n){return e.concat(t).map(function(r){return tt(r,n)})}function Jr(e,t){if(!t.customMerge)return Fe;var n=t.customMerge(e);return typeof n=="function"?n:Fe}function Yr(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function hn(e){return Object.keys(e).concat(Yr(e))}function In(e,t){try{return t in e}catch(n){return!1}}function Kr(e,t){return In(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function ei(e,t,n){var r={};return n.isMergeableObject(e)&&hn(e).forEach(function(i){r[i]=tt(e[i],n)}),hn(t).forEach(function(i){Kr(e,i)||(In(e,i)&&n.isMergeableObject(t[i])?r[i]=Jr(i,n)(e[i],t[i],n):r[i]=tt(t[i],n))}),r}function Fe(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Qr,n.isMergeableObject=n.isMergeableObject||kr,n.cloneUnlessOtherwiseSpecified=tt;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):ei(e,t,n):tt(t,n)}Fe.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Fe(r,i,n)},{})};var ti=Fe,ni=ti;const ri=$r(ni);var zt=function(e,t){return zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},zt(e,t)};function Et(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var fe=function(){return fe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},fe.apply(this,arguments)};function ii(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Dt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Ft(e,t){var n=t&&t.cache?t.cache:ci,r=t&&t.serializer?t.serializer:li,i=t&&t.strategy?t.strategy:si;return i(e,{cache:n,serializer:r})}function oi(e){return e==null||typeof e=="number"||typeof e=="boolean"}function ai(e,t,n,r){var i=oi(r)?r:n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.call(this,r),t.set(i,o)),o}function Dn(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.apply(this,r),t.set(i,o)),o}function Fn(e,t,n,r,i){return n.bind(t,e,r,i)}function si(e,t){var n=e.length===1?ai:Dn;return Fn(e,this,n,t.cache.create(),t.serializer)}function ui(e,t){return Fn(e,this,Dn,t.cache.create(),t.serializer)}var li=function(){return JSON.stringify(arguments)},hi=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),ci={create:function(){return new hi}},Ut={variadic:ui},gt=function(){return gt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},gt.apply(this,arguments)};var H;(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"})(H||(H={}));var D;(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"})(D||(D={}));var Ue;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ue||(Ue={}));function cn(e){return e.type===D.literal}function fi(e){return e.type===D.argument}function Un(e){return e.type===D.number}function Gn(e){return e.type===D.date}function jn(e){return e.type===D.time}function $n(e){return e.type===D.select}function kn(e){return e.type===D.plural}function di(e){return e.type===D.pound}function Vn(e){return e.type===D.tag}function Xn(e){return!!(e&&typeof e=="object"&&e.type===Ue.number)}function Wt(e){return!!(e&&typeof e=="object"&&e.type===Ue.dateTime)}var zn=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,pi=/(?:[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 mi(e){var t={};return e.replace(pi,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var F=function(){return F=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},F.apply(this,arguments)};var gi=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function bi(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(gi).filter(function(b){return b.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],u=o.split("/");if(u.length===0)throw new Error("Invalid number skeleton");for(var s=u[0],f=u.slice(1),l=0,d=f;l<d.length;l++){var m=d[l];if(m.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:f})}return n}function yi(e){return e.replace(/^(.*?)-/,"")}var fn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Wn=/^(@+)?(\+|#+)?[rs]?$/g,vi=/(\*)(0+)|(#+)(0+)|(0+)/g,Zn=/^(0+)$/;function dn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Wn,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function qn(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 Ei(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Zn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function pn(e){var t={},n=qn(e);return n||t}function xi(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=yi(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=F(F(F({},t),{notation:"scientific"}),i.options.reduce(function(f,l){return F(F({},f),pn(l))},{}));continue;case"engineering":t=F(F(F({},t),{notation:"engineering"}),i.options.reduce(function(f,l){return F(F({},f),pn(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(vi,function(f,l,d,m,b,_){if(l)t.minimumIntegerDigits=d.length;else{if(m&&b)throw new Error("We currently do not support maximum integer digits");if(_)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Zn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(fn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(fn,function(f,l,d,m,b,_){return d==="*"?t.minimumFractionDigits=l.length:m&&m[0]==="#"?t.maximumFractionDigits=m.length:b&&_?(t.minimumFractionDigits=b.length,t.maximumFractionDigits=b.length+_.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=F(F({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=F(F({},t),dn(o)));continue}if(Wn.test(i.stem)){t=F(F({},t),dn(i.stem));continue}var u=qn(i.stem);u&&(t=F(F({},t),u));var s=Ei(i.stem);s&&(t=F(F({},t),s))}return t}var ht={"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 _i(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var u=1+(o&1),s=o<2?1:3+(o>>1),f="a",l=Ti(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)n+=f;for(;u-- >0;)n=l+n}else i==="J"?n+="H":n+=i}return n}function Ti(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=ht[r||""]||ht[n||""]||ht["".concat(n,"-001")]||ht["001"];return i[0]}var Gt,Bi=new RegExp("^".concat(zn.source,"*")),Si=new RegExp("".concat(zn.source,"*$"));function O(e,t){return{start:e,end:t}}var wi=!!String.prototype.startsWith&&"_a".startsWith("a",1),Ai=!!String.fromCodePoint,Ci=!!Object.fromEntries,Hi=!!String.prototype.codePointAt,Oi=!!String.prototype.trimStart,Li=!!String.prototype.trimEnd,Ri=!!Number.isSafeInteger,Ni=Ri?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Zt=!0;try{var Mi=Jn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Zt=((Gt=Mi.exec("a"))===null||Gt===void 0?void 0:Gt[0])==="a"}catch(e){Zt=!1}var mn=wi?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},qt=Ai?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,u;i>o;){if(u=t[o++],u>1114111)throw RangeError(u+" is not a valid code point");r+=u<65536?String.fromCharCode(u):String.fromCharCode(((u-=65536)>>10)+55296,u%1024+56320)}return r},gn=Ci?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],u=o[0],s=o[1];n[u]=s}return n},Qn=Hi?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},Pi=Oi?function(t){return t.trimStart()}:function(t){return t.replace(Bi,"")},Ii=Li?function(t){return t.trimEnd()}:function(t){return t.replace(Si,"")};function Jn(e,t){return new RegExp(e,t)}var Qt;if(Zt){var bn=Jn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qt=function(t,n){var r;bn.lastIndex=n;var i=bn.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Qt=function(t,n){for(var r=[];;){var i=Qn(t,n);if(i===void 0||Yn(i)||Gi(i))break;r.push(i),n+=i>=65536?2:1}return qt.apply(void 0,r)};var Di=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var u=this.parseArgument(t,r);if(u.err)return u;i.push(u.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:D.pound,location:O(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(H.UNMATCHED_CLOSING_TAG,O(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Jt(this.peek()||0)){var u=this.parseTag(t,n);if(u.err)return u;i.push(u.val)}else{var u=this.parseLiteral(t,n);if(u.err)return u;i.push(u.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:D.literal,value:"<".concat(i,"/>"),location:O(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var u=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Jt(this.char()))return this.error(H.INVALID_TAG,O(s,this.clonePosition()));var f=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(H.UNMATCHED_CLOSING_TAG,O(f,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:D.tag,value:i,children:u,location:O(r,this.clonePosition())},err:null}:this.error(H.INVALID_TAG,O(s,this.clonePosition())))}else return this.error(H.UNCLOSED_TAG,O(r,this.clonePosition()))}else return this.error(H.INVALID_TAG,O(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Ui(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var u=this.tryParseUnquoted(t,n);if(u){i+=u;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var f=O(r,this.clonePosition());return{val:{type:D.literal,value:i,location:f},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Fi(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return qt.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),qt(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,O(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(H.EMPTY_ARGUMENT,O(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(H.MALFORMED_ARGUMENT,O(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,O(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:D.argument,value:i,location:O(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,O(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(H.MALFORMED_ARGUMENT,O(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Qt(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),u=O(t,o);return{value:r,location:u}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,u=this.clonePosition(),s=this.parseIdentifierIfPossible().value,f=this.clonePosition();switch(s){case"":return this.error(H.EXPECT_ARGUMENT_TYPE,O(u,f));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),m=this.parseSimpleArgStyleIfPossible();if(m.err)return m;var b=Ii(m.val);if(b.length===0)return this.error(H.EXPECT_ARGUMENT_STYLE,O(this.clonePosition(),this.clonePosition()));var _=O(d,this.clonePosition());l={style:b,styleLocation:_}}var B=this.tryParseArgumentClose(i);if(B.err)return B;var I=O(i,this.clonePosition());if(l&&mn(l==null?void 0:l.style,"::",0)){var j=Pi(l.style.slice(2));if(s==="number"){var m=this.parseNumberSkeletonFromString(j,l.styleLocation);return m.err?m:{val:{type:D.number,value:r,location:I,style:m.val},err:null}}else{if(j.length===0)return this.error(H.EXPECT_DATE_TIME_SKELETON,I);var W=j;this.locale&&(W=_i(j,this.locale));var b={type:Ue.dateTime,pattern:W,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?mi(W):{}},U=s==="date"?D.date:D.time;return{val:{type:U,value:r,location:I,style:b},err:null}}}return{val:{type:s==="number"?D.number:s==="date"?D.date:D.time,value:r,location:I,style:(o=l==null?void 0:l.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(H.EXPECT_SELECT_ARGUMENT_OPTIONS,O(w,gt({},w)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),P=0;if(s!=="select"&&A.value==="offset"){if(!this.bumpIf(":"))return this.error(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,O(this.clonePosition(),this.clonePosition()));this.bumpSpace();var m=this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,H.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(m.err)return m;this.bumpSpace(),A=this.parseIdentifierIfPossible(),P=m.val}var L=this.tryParsePluralOrSelectOptions(t,s,n,A);if(L.err)return L;var B=this.tryParseArgumentClose(i);if(B.err)return B;var Y=O(i,this.clonePosition());return s==="select"?{val:{type:D.select,value:r,options:gn(L.val),location:Y},err:null}:{val:{type:D.plural,value:r,options:gn(L.val),offset:P,pluralType:s==="plural"?"cardinal":"ordinal",location:Y},err:null}}default:return this.error(H.INVALID_ARGUMENT_TYPE,O(u,f))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(H.EXPECT_ARGUMENT_CLOSING_BRACE,O(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(H.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,O(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=bi(t)}catch(i){return this.error(H.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ue.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?xi(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,u=!1,s=[],f=new Set,l=i.value,d=i.location;;){if(l.length===0){var m=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var b=this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_SELECTOR,H.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;d=O(m,this.clonePosition()),l=this.message.slice(m.offset,this.offset())}else break}if(f.has(l))return this.error(n==="select"?H.DUPLICATE_SELECT_ARGUMENT_SELECTOR:H.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(u=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?H.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:H.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,O(this.clonePosition(),this.clonePosition()));var B=this.parseMessage(t+1,n,r);if(B.err)return B;var I=this.tryParseArgumentClose(_);if(I.err)return I;s.push([l,{value:B.val,location:O(_,this.clonePosition())}]),f.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,d=o.location}return s.length===0?this.error(n==="select"?H.EXPECT_SELECT_ARGUMENT_SELECTOR:H.EXPECT_PLURAL_ARGUMENT_SELECTOR,O(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!u?this.error(H.MISSING_OTHER_CLAUSE,O(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,u=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,u=u*10+(s-48),this.bump();else break}var f=O(i,this.clonePosition());return o?(u*=r,Ni(u)?{val:u,err:null}:this.error(n,f)):this.error(t,f)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Qn(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(mn(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Yn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r!=null?r:null},e}();function Jt(e){return e>=97&&e<=122||e>=65&&e<=90}function Fi(e){return Jt(e)||e===47}function Ui(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 Yn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Gi(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 Yt(e){e.forEach(function(t){if(delete t.location,$n(t)||kn(t))for(var n in t.options)delete t.options[n].location,Yt(t.options[n].value);else Un(t)&&Xn(t.style)||(Gn(t)||jn(t))&&Wt(t.style)?delete t.style.location:Vn(t)&&Yt(t.children)})}function ji(e,t){t===void 0&&(t={}),t=gt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Di(e,t).parse();if(n.err){var r=SyntaxError(H[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Yt(n.val),n.val}var Ge;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ge||(Ge={}));var xt=function(e){Et(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),yn=function(e){Et(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Ge.INVALID_VALUE,o)||this}return t}(xt),$i=function(e){Et(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ge.INVALID_VALUE,i)||this}return t}(xt),ki=function(e){Et(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Ge.MISSING_VALUE,r)||this}return t}(xt),J;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(J||(J={}));function Vi(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==J.literal||n.type!==J.literal?t.push(n):r.value+=n.value,t},[])}function Xi(e){return typeof e=="function"}function ft(e,t,n,r,i,o,u){if(e.length===1&&cn(e[0]))return[{type:J.literal,value:e[0].value}];for(var s=[],f=0,l=e;f<l.length;f++){var d=l[f];if(cn(d)){s.push({type:J.literal,value:d.value});continue}if(di(d)){typeof o=="number"&&s.push({type:J.literal,value:n.getNumberFormat(t).format(o)});continue}var m=d.value;if(!(i&&m in i))throw new ki(m,u);var b=i[m];if(fi(d)){(!b||typeof b=="string"||typeof b=="number")&&(b=typeof b=="string"||typeof b=="number"?String(b):""),s.push({type:typeof b=="string"?J.literal:J.object,value:b});continue}if(Gn(d)){var _=typeof d.style=="string"?r.date[d.style]:Wt(d.style)?d.style.parsedOptions:void 0;s.push({type:J.literal,value:n.getDateTimeFormat(t,_).format(b)});continue}if(jn(d)){var _=typeof d.style=="string"?r.time[d.style]:Wt(d.style)?d.style.parsedOptions:r.time.medium;s.push({type:J.literal,value:n.getDateTimeFormat(t,_).format(b)});continue}if(Un(d)){var _=typeof d.style=="string"?r.number[d.style]:Xn(d.style)?d.style.parsedOptions:void 0;_&&_.scale&&(b=b*(_.scale||1)),s.push({type:J.literal,value:n.getNumberFormat(t,_).format(b)});continue}if(Vn(d)){var B=d.children,I=d.value,j=i[I];if(!Xi(j))throw new $i(I,"function",u);var W=ft(B,t,n,r,i,o),U=j(W.map(function(P){return P.value}));Array.isArray(U)||(U=[U]),s.push.apply(s,U.map(function(P){return{type:typeof P=="string"?J.literal:J.object,value:P}}))}if($n(d)){var w=d.options[b]||d.options.other;if(!w)throw new yn(d.value,b,Object.keys(d.options),u);s.push.apply(s,ft(w.value,t,n,r,i));continue}if(kn(d)){var w=d.options["=".concat(b)];if(!w){if(!Intl.PluralRules)throw new xt(`Intl.PluralRules is not available in this environment.
2
- Try polyfilling it using "@formatjs/intl-pluralrules"
3
- `,Ge.MISSING_INTL_API,u);var A=n.getPluralRules(t,{type:d.pluralType}).select(b-(d.offset||0));w=d.options[A]||d.options.other}if(!w)throw new yn(d.value,b,Object.keys(d.options),u);s.push.apply(s,ft(w.value,t,n,r,i,b-(d.offset||0)));continue}}return Vi(s)}function zi(e,t){return t?fe(fe(fe({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=fe(fe({},e[r]),t[r]||{}),n},{})):e}function Wi(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=zi(e[r],t[r]),n},fe({},e)):e}function jt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Zi(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:jt(e.number),strategy:Ut.variadic}),getDateTimeFormat:Ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:jt(e.dateTime),strategy:Ut.variadic}),getPluralRules:Ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Dt([void 0],n,!1)))},{cache:jt(e.pluralRules),strategy:Ut.variadic})}}var qi=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(f){var l=o.formatToParts(f);if(l.length===1)return l[0].value;var d=l.reduce(function(m,b){return!m.length||b.type!==J.literal||typeof m[m.length-1]!="string"?m.push(b.value):m[m.length-1]+=b.value,m},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(f){return ft(o.ast,o.locales,o.formatters,o.formats,f,void 0,o.message)},this.resolvedOptions=function(){var f;return{locale:((f=o.resolvedLocale)===null||f===void 0?void 0:f.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var u=i||{};u.formatters;var s=ii(u,["formatters"]);this.ast=e.__parse(t,fe(fe({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Wi(e.formats,r),this.formatters=i&&i.formatters||Zi(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=ji,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 Qi(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const o=n.slice(i,n.length).join(".");if(o in r){r=r[o];break}}r=r[n[i]]}else r=void 0;return r}const Se={},Ji=(e,t,n)=>n&&(t in Se||(Se[t]={}),e in Se[t]||(Se[t][e]=n),n),Kn=(e,t)=>{if(t==null)return;if(t in Se&&e in Se[t])return Se[t][e];const n=_t(t);for(let r=0;r<n.length;r++){const i=n[r],o=Ki(i,e);if(o)return Ji(e,t,o)}};let rn;const rt=vt({});function Yi(e){return rn[e]||null}function er(e){return e in rn}function Ki(e,t){if(!er(e))return null;const n=Yi(e);return Qi(n,t)}function eo(e){if(e==null)return;const t=_t(e);for(let n=0;n<t.length;n++){const r=t[n];if(er(r))return r}}function tr(e,...t){delete Se[e],rt.update(n=>(n[e]=ri.all([n[e]||{},...t]),n))}ke([rt],([e])=>Object.keys(e));rt.subscribe(e=>rn=e);const dt={};function to(e,t){dt[e].delete(t),dt[e].size===0&&delete dt[e]}function nr(e){return dt[e]}function no(e){return _t(e).map(t=>{const n=nr(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Kt(e){return e==null?!1:_t(e).some(t=>{var n;return(n=nr(t))==null?void 0:n.size})}function ro(e,t){return Promise.all(t.map(r=>(to(e,r),r().then(i=>i.default||i)))).then(r=>tr(e,...r))}const Ye={};function rr(e){if(!Kt(e))return e in Ye?Ye[e]:Promise.resolve();const t=no(e);return Ye[e]=Promise.all(t.map(([n,r])=>ro(n,r))).then(()=>{if(Kt(e))return rr(e);delete Ye[e]}),Ye[e]}const io={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"}}},oo={fallbackLocale:null,loadingDelay:200,formats:io,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},ao=oo;function je(){return ao}const $t=vt(!1);var so=Object.defineProperty,uo=Object.defineProperties,lo=Object.getOwnPropertyDescriptors,vn=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,co=Object.prototype.propertyIsEnumerable,En=(e,t,n)=>t in e?so(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fo=(e,t)=>{for(var n in t||(t={}))ho.call(t,n)&&En(e,n,t[n]);if(vn)for(var n of vn(t))co.call(t,n)&&En(e,n,t[n]);return e},po=(e,t)=>uo(e,lo(t));let en;const bt=vt(null);function xn(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function _t(e,t=je().fallbackLocale){const n=xn(e);return t?[...new Set([...n,...xn(t)])]:n}function Oe(){return en!=null?en:void 0}bt.subscribe(e=>{en=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const mo=e=>{if(e&&eo(e)&&Kt(e)){const{loadingDelay:t}=je();let n;return typeof window!="undefined"&&Oe()!=null&&t?n=window.setTimeout(()=>$t.set(!0),t):$t.set(!0),rr(e).then(()=>{bt.set(e)}).finally(()=>{clearTimeout(n),$t.set(!1)})}return bt.set(e)},Ve=po(fo({},bt),{set:mo}),Tt=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var go=Object.defineProperty,yt=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,or=Object.prototype.propertyIsEnumerable,_n=(e,t,n)=>t in e?go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,on=(e,t)=>{for(var n in t||(t={}))ir.call(t,n)&&_n(e,n,t[n]);if(yt)for(var n of yt(t))or.call(t,n)&&_n(e,n,t[n]);return e},Xe=(e,t)=>{var n={};for(var r in e)ir.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yt)for(var r of yt(e))t.indexOf(r)<0&&or.call(e,r)&&(n[r]=e[r]);return n};const nt=(e,t)=>{const{formats:n}=je();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},bo=Tt(e=>{var t=e,{locale:n,format:r}=t,i=Xe(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=nt("number",r)),new Intl.NumberFormat(n,i)}),yo=Tt(e=>{var t=e,{locale:n,format:r}=t,i=Xe(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=nt("date",r):Object.keys(i).length===0&&(i=nt("date","short")),new Intl.DateTimeFormat(n,i)}),vo=Tt(e=>{var t=e,{locale:n,format:r}=t,i=Xe(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=nt("time",r):Object.keys(i).length===0&&(i=nt("time","short")),new Intl.DateTimeFormat(n,i)}),Eo=(e={})=>{var t=e,{locale:n=Oe()}=t,r=Xe(t,["locale"]);return bo(on({locale:n},r))},xo=(e={})=>{var t=e,{locale:n=Oe()}=t,r=Xe(t,["locale"]);return yo(on({locale:n},r))},_o=(e={})=>{var t=e,{locale:n=Oe()}=t,r=Xe(t,["locale"]);return vo(on({locale:n},r))},To=Tt((e,t=Oe())=>new qi(e,t,je().formats,{ignoreTag:je().ignoreTag})),Bo=(e,t={})=>{var n,r,i,o;let u=t;typeof e=="object"&&(u=e,e=u.id);const{values:s,locale:f=Oe(),default:l}=u;if(f==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let d=Kn(e,f);if(!d)d=(o=(i=(r=(n=je()).handleMissingMessage)==null?void 0:r.call(n,{locale:f,id:e,defaultValue:l}))!=null?i:l)!=null?o:e;else if(typeof d!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof d}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),d;if(!s)return d;let m=d;try{m=To(d,f).format(s)}catch(b){b instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,b.message)}return m},So=(e,t)=>_o(t).format(e),wo=(e,t)=>xo(t).format(e),Ao=(e,t)=>Eo(t).format(e),Co=(e,t=Oe())=>Kn(e,t),Ho=ke([Ve,rt],()=>Bo);ke([Ve],()=>So);ke([Ve],()=>wo);ke([Ve],()=>Ao);ke([Ve,rt],()=>Co);function Tn(e,t){tr(e,t)}function Oo(e){Ve.set(e)}const Bn={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款",Loading:"載入中 ..."},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen",Loading:"Wird geladen ..."},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita",Loading:"Caricamento ..."},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt",Loading:"Chargement ..."},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır",Loading:"Yükleniyor ..."},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит",Loading:"Загружается ..."},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit",Loading:"Se încarcă ..."},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit",Loading:"Učitavanje ..."},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés",Loading:"Betöltés ..."},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać",Loading:"Ładowanie ..."},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit",Loading:"Nalaganje ..."},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit",Loading:"Učitavanje ..."},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar",Loading:"Carregando ..."},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito",Loading:"Cargando ..."},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit",Loading:"Loading ..."}};var tn={exports:{}};/** @license
4
- * eventsource.js
5
- * Available under MIT License (MIT)
6
- * https://github.com/Yaffle/EventSource/
7
- */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,u=n.XDomainRequest,s=n.ActiveXObject,f=n.EventSource,l=n.document,d=n.Promise,m=n.fetch,b=n.Response,_=n.TextDecoder,B=n.TextEncoder,I=n.AbortController;if(typeof window!="undefined"&&typeof l!="undefined"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(c){l.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(c){function a(){}return a.prototype=c,new a}),Date.now||(Date.now=function(){return new Date().getTime()}),I==null){var j=m;m=function(c,a){var p=a.signal;return j(c,{headers:a.headers,credentials:a.credentials,cache:a.cache}).then(function(h){var g=h.body.getReader();return p._reader=g,p._aborted&&p._reader.cancel(),{status:h.status,statusText:h.statusText,headers:h.headers,body:{getReader:function(){return g}}}})},I=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function W(){this.bitsNeeded=0,this.codePoint=0}W.prototype.decode=function(c){function a(C,R,S){if(S===1)return C>=128>>R&&C<<R<=2047;if(S===2)return C>=2048>>R&&C<<R<=55295||C>=57344>>R&&C<<R<=65535;if(S===3)return C>=65536>>R&&C<<R<=1114111;throw new Error}function p(C,R){if(C===6*1)return R>>6>15?3:R>31?2:1;if(C===6*2)return R>15?3:2;if(C===6*3)return 3;throw new Error}for(var h=65533,g="",y=this.bitsNeeded,E=this.codePoint,v=0;v<c.length;v+=1){var T=c[v];y!==0&&(T<128||T>191||!a(E<<6|T&63,y-6,p(y,E)))&&(y=0,E=h,g+=String.fromCharCode(E)),y===0?(T>=0&&T<=127?(y=0,E=T):T>=192&&T<=223?(y=6*1,E=T&31):T>=224&&T<=239?(y=6*2,E=T&15):T>=240&&T<=247?(y=6*3,E=T&7):(y=0,E=h),y!==0&&!a(E,y,p(y,E))&&(y=0,E=h)):(y-=6,E=E<<6|T&63),y===0&&(E<=65535?g+=String.fromCharCode(E):(g+=String.fromCharCode(55296+(E-65535-1>>10)),g+=String.fromCharCode(56320+(E-65535-1&1023))))}return this.bitsNeeded=y,this.codePoint=E,g};var U=function(){try{return new _().decode(new B().encode("test"),{stream:!0})==="test"}catch(c){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+c)}return!1};(_==null||B==null||!U())&&(_=W);var w=function(){};function A(c){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=c,this._sendTimeout=0,this._abort=w}A.prototype.open=function(c,a){this._abort(!0);var p=this,h=this._xhr,g=1,y=0;this._abort=function(S){p._sendTimeout!==0&&(i(p._sendTimeout),p._sendTimeout=0),(g===1||g===2||g===3)&&(g=4,h.onload=w,h.onerror=w,h.onabort=w,h.onprogress=w,h.onreadystatechange=w,h.abort(),y!==0&&(i(y),y=0),S||(p.readyState=4,p.onabort(null),p.onreadystatechange())),g=0};var E=function(){if(g===1){var S=0,N="",ge=void 0;if("contentType"in h)S=200,N="OK",ge=h.contentType;else try{S=h.status,N=h.statusText,ge=h.getResponseHeader("Content-Type")}catch(Qe){S=0,N="",ge=void 0}S!==0&&(g=2,p.readyState=2,p.status=S,p.statusText=N,p._contentType=ge,p.onreadystatechange())}},v=function(){if(E(),g===2||g===3){g=3;var S="";try{S=h.responseText}catch(N){}p.readyState=3,p.responseText=S,p.onprogress()}},T=function(S,N){if((N==null||N.preventDefault==null)&&(N={preventDefault:w}),v(),g===1||g===2||g===3){if(g=4,y!==0&&(i(y),y=0),p.readyState=4,S==="load")p.onload(N);else if(S==="error")p.onerror(N);else if(S==="abort")p.onabort(N);else throw new TypeError;p.onreadystatechange()}},C=function(S){h!=null&&(h.readyState===4?(!("onload"in h)||!("onerror"in h)||!("onabort"in h))&&T(h.responseText===""?"error":"load",S):h.readyState===3?"onprogress"in h||v():h.readyState===2&&E())},R=function(){y=r(function(){R()},500),h.readyState===3&&v()};"onload"in h&&(h.onload=function(S){T("load",S)}),"onerror"in h&&(h.onerror=function(S){T("error",S)}),"onabort"in h&&(h.onabort=function(S){T("abort",S)}),"onprogress"in h&&(h.onprogress=v),"onreadystatechange"in h&&(h.onreadystatechange=function(S){C(S)}),("contentType"in h||!("ontimeout"in o.prototype))&&(a+=(a.indexOf("?")===-1?"?":"&")+"padding=true"),h.open(c,a,!0),"readyState"in h&&(y=r(function(){R()},0))},A.prototype.abort=function(){this._abort(!1)},A.prototype.getResponseHeader=function(c){return this._contentType},A.prototype.setRequestHeader=function(c,a){var p=this._xhr;"setRequestHeader"in p&&p.setRequestHeader(c,a)},A.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},A.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var c=this;c._sendTimeout=r(function(){c._sendTimeout=0,c.send()},4);return}var a=this._xhr;"withCredentials"in a&&(a.withCredentials=this.withCredentials);try{a.send(void 0)}catch(p){throw p}};function P(c){return c.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)+32)})}function L(c){for(var a=Object.create(null),p=c.split(`\r
8
- `),h=0;h<p.length;h+=1){var g=p[h],y=g.split(": "),E=y.shift(),v=y.join(": ");a[P(E)]=v}this._map=a}L.prototype.get=function(c){return this._map[P(c)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function Y(){}Y.prototype.open=function(c,a,p,h,g,y,E){c.open("GET",g);var v=0;c.onprogress=function(){var C=c.responseText,R=C.slice(v);v+=R.length,p(R)},c.onerror=function(C){C.preventDefault(),h(new Error("NetworkError"))},c.onload=function(){h(null)},c.onabort=function(){h(null)},c.onreadystatechange=function(){if(c.readyState===o.HEADERS_RECEIVED){var C=c.status,R=c.statusText,S=c.getResponseHeader("Content-Type"),N=c.getAllResponseHeaders();a(C,R,S,new L(N))}},c.withCredentials=y;for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&c.setRequestHeader(T,E[T]);return c.send(),c};function _e(c){this._headers=c}_e.prototype.get=function(c){return this._headers.get(c)};function pe(){}pe.prototype.open=function(c,a,p,h,g,y,E){var v=null,T=new I,C=T.signal,R=new _;return m(g,{headers:E,credentials:y?"include":"same-origin",signal:C,cache:"no-store"}).then(function(S){return v=S.body.getReader(),a(S.status,S.statusText,S.headers.get("Content-Type"),new _e(S.headers)),new d(function(N,ge){var Qe=function(){v.read().then(function(ee){if(ee.done)N(void 0);else{var Z=R.decode(ee.value,{stream:!0});p(Z),Qe()}}).catch(function(ee){ge(ee)})};Qe()})}).catch(function(S){if(S.name!=="AbortError")return S}).then(function(S){h(S)}),{abort:function(){v!=null&&v.cancel(),T.abort()}}};function re(){this._listeners=Object.create(null)}function se(c){r(function(){throw c},0)}re.prototype.dispatchEvent=function(c){c.target=this;var a=this._listeners[c.type];if(a!=null)for(var p=a.length,h=0;h<p;h+=1){var g=a[h];try{typeof g.handleEvent=="function"?g.handleEvent(c):g.call(this,c)}catch(y){se(y)}}},re.prototype.addEventListener=function(c,a){c=String(c);var p=this._listeners,h=p[c];h==null&&(h=[],p[c]=h);for(var g=!1,y=0;y<h.length;y+=1)h[y]===a&&(g=!0);g||h.push(a)},re.prototype.removeEventListener=function(c,a){c=String(c);var p=this._listeners,h=p[c];if(h!=null){for(var g=[],y=0;y<h.length;y+=1)h[y]!==a&&g.push(h[y]);g.length===0?delete p[c]:p[c]=g}};function ie(c){this.type=c,this.target=void 0}function x(c,a){ie.call(this,c),this.data=a.data,this.lastEventId=a.lastEventId}x.prototype=Object.create(ie.prototype);function me(c,a){ie.call(this,c),this.status=a.status,this.statusText=a.statusText,this.headers=a.headers}me.prototype=Object.create(ie.prototype);function it(c,a){ie.call(this,c),this.error=a.error}it.prototype=Object.create(ie.prototype);var ze=-1,ce=0,Te=1,we=2,Ae=-1,ue=0,We=1,Le=2,ot=3,Bt=/^text\/event\-stream(;.*)?$/i,at=1e3,St=18e6,Ze=function(c,a){var p=c==null?a:parseInt(c,10);return p!==p&&(p=a),qe(p)},qe=function(c){return Math.min(Math.max(c,at),St)},Be=function(c,a,p){try{typeof a=="function"&&a.call(c,p)}catch(h){se(h)}};function K(c,a){re.call(this),a=a||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Ct(this,c,a)}function wt(){return o!=null&&"withCredentials"in o.prototype||u==null?new o:new u}var At=m!=null&&b!=null&&"body"in b.prototype;function Ct(c,a,p){a=String(a);var h=!!p.withCredentials,g=p.lastEventIdQueryParameterName||"lastEventId",y=qe(1e3),E=Ze(p.heartbeatTimeout,45e3),v="",T=y,C=!1,R=0,S=p.headers||{},N=p.Transport,ge=At&&N==null?void 0:new A(N!=null?new N:wt()),Qe=N!=null&&typeof N!="string"?new N:ge==null?new pe:new Y,ee=void 0,Z=0,le=ze,Re="",ut="",be="",lt="",q=ue,Ht=0,Ce=0,sr=function(V,$,te,ne){if(le===ce)if(V===200&&te!=null&&Bt.test(te)){le=Te,C=Date.now(),T=y,c.readyState=Te;var Q=new me("open",{status:V,statusText:$,headers:ne});c.dispatchEvent(Q),Be(c,c.onopen,Q)}else{var X="";V!==200?($&&($=$.replace(/\s+/g," ")),X="EventSource's response has a status "+V+" "+$+" that is not 200. Aborting the connection."):X="EventSource's response has a Content-Type specifying an unsupported type: "+(te==null?"-":te.replace(/\s+/g," "))+". Aborting the connection.",Ot();var Q=new me("error",{status:V,statusText:$,headers:ne});c.dispatchEvent(Q),Be(c,c.onerror,Q),console.error(X)}},ur=function(V){if(le===Te){for(var $=-1,te=0;te<V.length;te+=1){var ne=V.charCodeAt(te);(ne===10||ne===13)&&($=te)}var Q=($!==-1?lt:"")+V.slice(0,$+1);lt=($===-1?lt:"")+V.slice($+1),V!==""&&(C=Date.now(),R+=V.length);for(var X=0;X<Q.length;X+=1){var ne=Q.charCodeAt(X);if(q===Ae&&ne===10)q=ue;else if(q===Ae&&(q=ue),ne===13||ne===10){if(q!==ue){q===We&&(Ce=X+1);var ye=Q.slice(Ht,Ce-1),ve=Q.slice(Ce+(Ce<X&&Q.charCodeAt(Ce)===32?1:0),X);ye==="data"?(Re+=`
9
- `,Re+=ve):ye==="id"?ut=ve:ye==="event"?be=ve:ye==="retry"?(y=Ze(ve,y),T=y):ye==="heartbeatTimeout"&&(E=Ze(ve,E),Z!==0&&(i(Z),Z=r(function(){Je()},E)))}if(q===ue){if(Re!==""){v=ut,be===""&&(be="message");var Ne=new x(be,{data:Re.slice(1),lastEventId:ut});if(c.dispatchEvent(Ne),be==="open"?Be(c,c.onopen,Ne):be==="message"?Be(c,c.onmessage,Ne):be==="error"&&Be(c,c.onerror,Ne),le===we)return}Re="",be=""}q=ne===13?Ae:ue}else q===ue&&(Ht=X,q=We),q===We?ne===58&&(Ce=X+1,q=Le):q===Le&&(q=ot)}}},an=function(V){if(le===Te||le===ce){le=ze,Z!==0&&(i(Z),Z=0),Z=r(function(){Je()},T),T=qe(Math.min(y*16,T*2)),c.readyState=ce;var $=new it("error",{error:V});c.dispatchEvent($),Be(c,c.onerror,$),V!=null&&console.error(V)}},Ot=function(){le=we,ee!=null&&(ee.abort(),ee=void 0),Z!==0&&(i(Z),Z=0),c.readyState=we},Je=function(){if(Z=0,le!==ze){if(!C&&ee!=null)an(new Error("No activity within "+E+" milliseconds. "+(le===ce?"No response received.":R+" chars received.")+" Reconnecting.")),ee!=null&&(ee.abort(),ee=void 0);else{var V=Math.max((C||Date.now())+E-Date.now(),1);C=!1,Z=r(function(){Je()},V)}return}C=!1,R=0,Z=r(function(){Je()},E),le=ce,Re="",be="",ut=v,lt="",Ht=0,Ce=0,q=ue;var $=a;if(a.slice(0,5)!=="data:"&&a.slice(0,5)!=="blob:"&&v!==""){var te=a.indexOf("?");$=te===-1?a:a.slice(0,te+1)+a.slice(te+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(ve,Ne){return Ne===g?"":ve}),$+=(a.indexOf("?")===-1?"?":"&")+g+"="+encodeURIComponent(v)}var ne=c.withCredentials,Q={};Q.Accept="text/event-stream";var X=c.headers;if(X!=null)for(var ye in X)Object.prototype.hasOwnProperty.call(X,ye)&&(Q[ye]=X[ye]);try{ee=Qe.open(ge,sr,ur,an,$,ne,Q)}catch(ve){throw Ot(),ve}};c.url=a,c.readyState=ce,c.withCredentials=h,c.headers=S,c._close=Ot,Je()}K.prototype=Object.create(re.prototype),K.prototype.CONNECTING=ce,K.prototype.OPEN=Te,K.prototype.CLOSED=we,K.prototype.close=function(){this._close()},K.CONNECTING=ce,K.OPEN=Te,K.CLOSED=we,K.prototype.withCredentials=void 0;var st=f;o!=null&&(f==null||!("withCredentials"in f.prototype))&&(st=K),function(c){{var a=c(t);a!==void 0&&(e.exports=a)}}(function(c){c.EventSourcePolyfill=K,c.NativeEventSource=f,c.EventSource=st})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:jr:globalThis)})(tn,tn.exports);var Lo=tn.exports;function Ro(e){gr(e,"svelte-gv6dm2",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function Sn(e,t,n){const r=e.slice();return r[51]=t[n],r}function wn(e,t,n){const r=e.slice();return r[54]=t[n],r}function No(e){let t,n=(e[3].Total?e[5](e[3].Total[0].amount):"0")+"",r,i,o,u,s,f,l,d=e[2]&&An(e);return{c(){t=G("button"),r=Ee(n),i=xe(),o=G("span"),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>',u=xe(),d&&d.c(),s=vr(),z(t,"class","BalanceValue")},m(m,b){de(m,t,b),M(t,r),M(t,i),M(t,o),de(m,u,b),d&&d.m(m,b),de(m,s,b),f||(l=pt(t,"click",e[25]),f=!0)},p(m,b){b[0]&8&&n!==(n=(m[3].Total?m[5](m[3].Total[0].amount):"0")+"")&&He(r,n),m[2]?d?d.p(m,b):(d=An(m),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null)},d(m){m&&(he(t),he(u),he(s)),d&&d.d(m),f=!1,l()}}}function Mo(e){let t,n=e[4]("Loading")+"",r;return{c(){t=G("p"),r=Ee(n)},m(i,o){de(i,t,o),M(t,r)},p(i,o){o[0]&16&&n!==(n=i[4]("Loading")+"")&&He(r,n)},d(i){i&&he(t)}}}function An(e){let t,n,r,i,o,u,s=e[4]("Title")+"",f,l,d,m,b,_,B=e[4]("DepositButton")+"",I,j,W,U=mt(Object.keys(e[3])),w=[];for(let A=0;A<U.length;A+=1)w[A]=Hn(Sn(e,U,A));return{c(){t=G("div"),n=G("button"),r=xe(),i=G("div"),o=G("div"),u=G("p"),f=Ee(s),l=xe(),d=G("div");for(let A=0;A<w.length;A+=1)w[A].c();m=xe(),b=G("div"),_=G("button"),I=Ee(B),z(n,"class","BalanceModalClose"),z(u,"class","BalanceModalTitle"),z(o,"class","BalanceModalHeader"),z(d,"class","BalanceModalBody"),z(_,"class","BalanceModalAction"),z(b,"class","BalanceModalFooter"),z(i,"class","BalanceModal"),z(t,"class","BalanceModalWrapper")},m(A,P){de(A,t,P),M(t,n),M(t,r),M(t,i),M(i,o),M(o,u),M(u,f),M(i,l),M(i,d);for(let L=0;L<w.length;L+=1)w[L]&&w[L].m(d,null);M(i,m),M(i,b),M(b,_),M(_,I),j||(W=[pt(n,"click",e[26]),pt(_,"click",e[27])],j=!0)},p(A,P){if(P[0]&16&&s!==(s=A[4]("Title")+"")&&He(f,s),P[0]&184){U=mt(Object.keys(A[3]));let L;for(L=0;L<U.length;L+=1){const Y=Sn(A,U,L);w[L]?w[L].p(Y,P):(w[L]=Hn(Y),w[L].c(),w[L].m(d,null))}for(;L<w.length;L+=1)w[L].d(1);w.length=U.length}P[0]&16&&B!==(B=A[4]("DepositButton")+"")&&He(I,B)},d(A){A&&he(t),Mn(w,A),j=!1,$e(W)}}}function Cn(e){let t,n,r=e[4](e[51])+"",i,o,u=e[7](e[54])+"",s,f,l,d,m=e[5](e[54].amount)+"",b;return{c(){t=G("div"),n=G("p"),i=Ee(r),o=xe(),s=Ee(u),f=xe(),l=G("p"),d=G("span"),b=Ee(m),z(n,"class","BalanceModalText"),z(d,"class","BalanceModalAmount"),z(l,"class","BalanceModalValue"),z(t,"class","BalanceModalRowLine")},m(_,B){de(_,t,B),M(t,n),M(n,i),M(n,o),M(n,s),M(t,f),M(t,l),M(l,d),M(d,b)},p(_,B){B[0]&24&&r!==(r=_[4](_[51])+"")&&He(i,r),B[0]&8&&u!==(u=_[7](_[54])+"")&&He(s,u),B[0]&8&&m!==(m=_[5](_[54].amount)+"")&&He(b,m)},d(_){_&&he(t)}}}function Hn(e){let t,n,r=mt(e[3][e[51]]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Cn(wn(e,r,o));return{c(){t=G("div");for(let o=0;o<i.length;o+=1)i[o].c();n=xe(),z(t,"class","BalanceModalRowBoth")},m(o,u){de(o,t,u);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(t,null);M(t,n)},p(o,u){if(u[0]&184){r=mt(o[3][o[51]]);let s;for(s=0;s<r.length;s+=1){const f=wn(o,r,s);i[s]?i[s].p(f,u):(i[s]=Cn(f),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(o){o&&he(t),Mn(i,o)}}}function On(e){let t,n,r;return{c(){t=G("button"),z(t,"class","ShowBalanceModalOverlay")},m(i,o){de(i,t,o),n||(r=pt(t,"click",e[28]),n=!0)},p:ae,d(i){i&&he(t),n=!1,r()}}}function Po(e){let t,n,r;function i(f,l){return f[1]?Mo:No}let o=i(e),u=o(e),s=e[2]&&On(e);return{c(){t=G("div"),n=G("div"),u.c(),r=xe(),s&&s.c(),z(n,"class","ShowBalance")},m(f,l){de(f,t,l),M(t,n),u.m(n,null),M(t,r),s&&s.m(t,null),e[29](t)},p(f,l){o===(o=i(f))&&u?u.p(f,l):(u.d(1),u=o(f),u&&(u.c(),u.m(n,null))),f[2]?s?s.p(f,l):(s=On(f),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},i:ae,o:ae,d(f){f&&he(t),u.d(),s&&s.d(),e[29](null)}}}function Io(e,t,n){let r;mr(e,Ho,a=>n(4,r=a));let{userid:i=""}=t,{session:o=""}=t,{endpoint:u=""}=t,{lang:s="en"}=t,{mbsource:f=""}=t,{clientstyling:l=""}=t,{clientstylingurl:d=""}=t,{translationurl:m=""}=t,{gmversion:b="gm16"}=t,{displaybalanceoption:_="All"}=t,{totalcalculationmode:B="totalCashAmount"}=t,{hideproducttype:I=""}=t,{currencylocale:j="en"}=t,{currencydisplay:W="symbol"}=t,{maximumfractiondigits:U="2"}=t,{minimumfractiondigits:w="0"}=t,{customdisplayformat:A=""}=t,P,L=!0,Y=!1,_e=!1,pe,re="",se=[],ie;const x={},me=["totalCashAmount","totalRealAmount"],it=()=>{fetch(m).then(a=>a.json()).then(a=>Object.keys(a).forEach(p=>Tn(p,a[p]))).catch(a=>console.log(a))};Object.keys(Bn).forEach(a=>Tn(a,Bn[a]));const ze=a=>{if(A)return ce(a);const p=j||s,h={style:"currency",currency:re,useGrouping:!0,currencyDisplay:W||"code",maximumFractionDigits:U===""||isNaN(Number(U))?2:Number(U),minimumFractionDigits:w===""||isNaN(Number(w))?0:Number(w)};return new Intl.NumberFormat(p,h).format(a)},ce=a=>{const p=[];let h="";for(const g of A)switch(g){default:h+=g;break;case"{":h&&p.push(h),h="";break;case"}":const[y,E]=h.split("|");if(h="",y.toLowerCase()==="currency")h=re;else if(y.toLowerCase()==="amount"){let v=",",T=".",C=2;E&&(E[0]!==" "&&(v=E[0]),E[1]!==" "&&(T=E[1]),E[2]!==" "&&!isNaN(Number(E[2]))&&(C=Number(E[2])));let[R,S]=String(Math.floor(a*Rt(10,C))/Rt(10,C)).split(".");h+=R[0];for(let N=1;N<R.length;++N)(R.length-N)%3===0?h+=v+R[N]:h+=R[N];S&&(h+=T+S)}h&&p.push(h),h="";break}return p.push(h),p.join("")},Te=()=>Pt(this,null,function*(){var p,h,g;n(1,L=!0);const a=new URL(`${u}/v1/player/${i}/account`);try{const y=yield fetch(a,{method:"GET",headers:{"X-SessionID":o}}),E=yield y.json();if(y.ok)se=E.items,re=(p=se.find(v=>v.displayName==="Casino"))==null?void 0:p.currency,n(3,x.Total=[{amount:E.totalAmount[re]}],x),n(3,x.Real=[{amount:(h=se.find(v=>v.displayName==="Casino"))==null?void 0:h.balanceAmount}],x),n(3,x.Bonus=[{amount:(g=se.find(v=>v.displayName==="UBS"))==null?void 0:g.balanceAmount}],x);else throw new Error("Failed to fetch balance data !")}catch(y){console.log("Balance error: ",y)}finally{n(1,L=!1)}}),we=()=>{n(1,L=!0);const a=new URL(`${u}/v2/player/${i}/balance`),p=new Headers;p.append("X-SessionID",o),fetch(a,{method:"GET",headers:p}).then(g=>g.json()).then(g=>{g[B]||n(8,B=me[0]);const y=g.items.find(v=>v.type==="Real"&&v.walletAccountType==="Ordinary");if(re=y.currency,_e=!!y.productType,n(3,x.Total=[{amount:0}],x),n(3,x.Real=[],x),n(3,x.Bonus=[],x),n(3,x.Credit=[],x),!_e){ie={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(3,x.Total[0].amount=g[B][re],x);for(const v of g.items)switch(v.type){case"Bonus":x.Bonus.length===0?x.Bonus.push({amount:v.amount}):n(3,x.Bonus[0].amount+=v.amount,x);break;case"Real":if(v.creditLine&&x.Credit.length===0&&x.Credit.push({amount:v.creditLine}),B==="totalRealAmount")continue;x.Real.length===0?x.Real.push({amount:v.amount}):n(3,x.Real[0].amount+=v.amount,x);break}for(const[v,T]of Object.entries(x))T.length<1&&delete x[v];n(1,L=!1);return}ie={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let E=g.items;_&&_!=="All"&&(E=g.items.filter(v=>v.productType===_));for(const v of E){let T;switch(v.type){case"Bonus":T=x.Bonus.findIndex(C=>C.productType===v.productType),T>0?n(3,x.Bonus[T].amount+=v.amount,x):x.Bonus.push({amount:v.amount,productType:v.productType});break;case"Real":v.creditLine&&x.Credit.push({amount:v.creditLine,productType:v.productType}),T=x.Real.findIndex(C=>C.productType===v.productType),T>0?n(3,x.Real[T].amount+=v.amount,x):x.Real.push({amount:v.amount,productType:v.productType});break}}ot();for(const[v,T]of Object.entries(x))T.length<1&&delete x[v];window.postMessage({type:"playerBalanceInfo",balance:g},window.location.href),n(1,L=!1)}).catch(()=>{throw n(1,L=!1),new Error("Failed to fetch balance data !")})},Ae=()=>{if(pe&&pe.close(),o.length<1)return;let a,p;switch(b){case"gm16":a=new URL(`${u}/v2/player/${i}/information/updates`),p=y=>Bt(y);break;case"gmcore":a=new URL(`${u}/v1/player/${i}/balance/updates`),p=y=>We(y);break}const h={accept:"text/event-stream","X-SessionId":o},g=new Lo.EventSourcePolyfill(a,{headers:h});pe=g,g.addEventListener("message",p)},ue=a=>{let p;try{p=JSON.parse(a)}catch(h){console.log("Balance stream failed: ",h);return}return p},We=a=>{var y,E;const p=ue(a.data);if(!p){Ae();return}let h="0";const g=p.balanceChange;se=se.map(v=>(g&&g[v.id]&&(v=Mt(Nt({},v),{balanceAmount:g[v.id].afterAmount})),h=(parseFloat(v==null?void 0:v.balanceAmount)+parseFloat(h)).toString(),v)),n(3,x.Real=[{amount:(y=se[0])==null?void 0:y.balanceAmount}],x),n(3,x.Bonus=[{amount:(E=se[1])==null?void 0:E.balanceAmount}],x),n(3,x.Total=[{amount:Number(h)}],x)},Le=(a,p,h)=>{let g=null;switch(h.walletAccountType){case"Ordinary":(h.afterAmount!==h.affectedAmount||p.lastOrdinaryAfterAmount===0)&&(p.lastOrdinaryAfterAmount=h.afterAmount,p.showCreditLineAfterAmount||(g=h.afterAmount));break;case"CreditLine":h.afterAmount!==0?(g=h.afterAmount,p.showCreditLineAfterAmount=!0):(g=p.lastOrdinaryAfterAmount,p.showCreditLineAfterAmount=!1);break;default:g=h.afterAmount}return g===null?a:g},ot=()=>{switch(B){case"totalCashAmount":let a=0;for(const h of["Real","Bonus"])for(const g of x[h])a+=Math.max(g.amount,0);n(3,x.Total[0].amount=a,x);break;case"totalRealAmount":if(!_e)return;let p=0;for(const h of x.Real)p+=h.amount;n(3,x.Total[0].amount=p,x)}},Bt=a=>{const p=ue(a.data);if(!p){Ae();return}if(St(p==null?void 0:p.type)||p.type!=="BALANCE_UPDATE_V2")return;const h=p.body.balanceChange;for(const[g,y]of Object.entries(h))if(B==="totalRealAmount"&&g==="Real"&&!_e&&n(3,x.Total[0].amount=Le(x.Total[0].amount,ie,y),x),!!x[g])for(const E of x[g]){if(!_e){E.amount=g==="Real"?Le(E.amount,ie,y):y.afterAmount;continue}y.productType===E.productType&&(E.amount=g==="Real"?Le(E.amount,ie[E.productType],y):y.afterAmount)}ot()},at=()=>{n(2,Y=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&&gtag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},St=a=>a==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,Ze=()=>{me.includes(B)||(console.error(`Unsupported value ('${B}') for totalcalculationmode parameter. Only the following values are supported ${me}. Using default value ('${me[0]}').`),n(8,B=me[0]))},qe=a=>{const p=I.split(",").map(h=>h.trim());return!a.productType||p.includes(a.productType)?"":r(a.productType)},Be=()=>{switch(Oo(s),Ze(),b){case"gmcore":Te();break;case"gm16":we();break;default:throw Error(`Invalid apiversion attribute: ${b}`)}},K=a=>a.data&&a.data.type==="LogoutSuccessfull"&&pe.close();Tr(()=>(window.addEventListener("message",K,!1),()=>{window.removeEventListener("message",K),pe&&pe.close()}));const wt=()=>n(2,Y=!0),At=()=>n(2,Y=!1),Ct=()=>at(),st=()=>n(2,Y=!1);function c(a){kt[a?"unshift":"push"](()=>{P=a,n(0,P)})}return e.$$set=a=>{"userid"in a&&n(9,i=a.userid),"session"in a&&n(10,o=a.session),"endpoint"in a&&n(11,u=a.endpoint),"lang"in a&&n(12,s=a.lang),"mbsource"in a&&n(13,f=a.mbsource),"clientstyling"in a&&n(14,l=a.clientstyling),"clientstylingurl"in a&&n(15,d=a.clientstylingurl),"translationurl"in a&&n(16,m=a.translationurl),"gmversion"in a&&n(17,b=a.gmversion),"displaybalanceoption"in a&&n(18,_=a.displaybalanceoption),"totalcalculationmode"in a&&n(8,B=a.totalcalculationmode),"hideproducttype"in a&&n(19,I=a.hideproducttype),"currencylocale"in a&&n(20,j=a.currencylocale),"currencydisplay"in a&&n(21,W=a.currencydisplay),"maximumfractiondigits"in a&&n(22,U=a.maximumfractiondigits),"minimumfractiondigits"in a&&n(23,w=a.minimumfractiondigits),"customdisplayformat"in a&&n(24,A=a.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&400896&&u&&i&&o&&s&&b&&_&&Be(),e.$$.dirty[0]&134656&&u&&i&&o&&b&&Ae(),e.$$.dirty[0]&16385&&l&&P&&Dr(P,l),e.$$.dirty[0]&32769&&d&&P&&Fr(P,d),e.$$.dirty[0]&8193&&P&&Ur(P,`${f}.Style`),e.$$.dirty[0]&65536&&m&&it()},[P,L,Y,x,r,ze,at,qe,B,i,o,u,s,f,l,d,m,b,_,I,j,W,U,w,A,wt,At,Ct,st,c]}class ar extends Pr{constructor(t){super(),Nr(this,t,Io,Po,Rn,{userid:9,session:10,endpoint:11,lang:12,mbsource:13,clientstyling:14,clientstylingurl:15,translationurl:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,hideproducttype:19,currencylocale:20,currencydisplay:21,maximumfractiondigits:22,minimumfractiondigits:23,customdisplayformat:24},Ro,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(t){this.$$set({userid:t}),k()}get session(){return this.$$.ctx[10]}set session(t){this.$$set({session:t}),k()}get endpoint(){return this.$$.ctx[11]}set endpoint(t){this.$$set({endpoint:t}),k()}get lang(){return this.$$.ctx[12]}set lang(t){this.$$set({lang:t}),k()}get mbsource(){return this.$$.ctx[13]}set mbsource(t){this.$$set({mbsource:t}),k()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),k()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),k()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),k()}get gmversion(){return this.$$.ctx[17]}set gmversion(t){this.$$set({gmversion:t}),k()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),k()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),k()}get hideproducttype(){return this.$$.ctx[19]}set hideproducttype(t){this.$$set({hideproducttype:t}),k()}get currencylocale(){return this.$$.ctx[20]}set currencylocale(t){this.$$set({currencylocale:t}),k()}get currencydisplay(){return this.$$.ctx[21]}set currencydisplay(t){this.$$set({currencydisplay:t}),k()}get maximumfractiondigits(){return this.$$.ctx[22]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),k()}get minimumfractiondigits(){return this.$$.ctx[23]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),k()}get customdisplayformat(){return this.$$.ctx[24]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),k()}}Mr(ar,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},hideproducttype:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=ar;