@everymatrix/player-account-balance-modal 1.0.16 → 1.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/PlayerAccountBalanceModal-BO3qvQ1w.cjs +15 -0
- package/components/PlayerAccountBalanceModal-D-V7QQvO.js +5148 -0
- package/es2015/player-account-balance-modal.cjs +1 -0
- package/es2015/player-account-balance-modal.js +16 -0
- package/package.json +15 -35
- package/README.md +0 -30
- package/dist/player-account-balance-modal.js +0 -2
- package/dist/player-account-balance-modal.js.map +0 -1
- package/index.html +0 -21
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -67
- package/src/PlayerAccountBalanceModal.svelte +0 -411
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -4
- package/src/translations.js +0 -137
- package/stories/PlayerAccountBalanceModal.stories.js +0 -13
- package/tsconfig.json +0 -6
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";var or=Object.defineProperty,sr=Object.defineProperties;var lr=Object.getOwnPropertyDescriptors;var ln=Object.getOwnPropertySymbols;var ur=Object.prototype.hasOwnProperty,cr=Object.prototype.propertyIsEnumerable;var Ot=(e,t,n)=>t in e?or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pt=(e,t)=>{for(var n in t||(t={}))ur.call(t,n)&&Ot(e,n,t[n]);if(ln)for(var n of ln(t))cr.call(t,n)&&Ot(e,n,t[n]);return e},Nt=(e,t)=>sr(e,lr(t));var we=(e,t,n)=>Ot(e,typeof t!="symbol"?t+"":t,n);var bt=(e,t,n)=>new Promise((r,a)=>{var i=c=>{try{l(n.next(c))}catch(s){a(s)}},o=c=>{try{l(n.throw(c))}catch(s){a(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,o);l((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Se(){}function Hn(e){return e()}function un(){return Object.create(null)}function et(e){e.forEach(Hn)}function en(e){return typeof e=="function"}function Mn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function hr(e){return Object.keys(e).length===0}function Cn(e,...t){if(e==null){for(const r of t)r(void 0);return Se}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function fr(e,t,n){e.$$.on_destroy.push(Cn(t,n))}function h(e,t){e.appendChild(t)}function dr(e,t,n){const r=pr(e);if(!r.getElementById(t)){const a=_("style");a.id=t,a.textContent=n,br(r,a)}}function pr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function br(e,t){return h(e.head||e,t),t.sheet}function xe(e,t,n){e.insertBefore(t,n||null)}function ge(e){e.parentNode&&e.parentNode.removeChild(e)}function _(e){return document.createElement(e)}function P(e){return document.createTextNode(e)}function W(){return P(" ")}function mr(){return P("")}function Et(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function E(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function vr(e){return Array.from(e.childNodes)}function z(e,t){t=""+t,e.data!==t&&(e.data=t)}function yr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let lt;function st(e){lt=e}function gr(){if(!lt)throw new Error("Function called outside component initialization");return lt}function xr(e){gr().$$.on_mount.push(e)}const Ze=[],Gt=[];let qe=[];const cn=[],Er=Promise.resolve();let jt=!1;function _r(){jt||(jt=!0,Er.then(ve))}function Vt(e){qe.push(e)}const It=new Set;let ze=0;function ve(){if(ze!==0)return;const e=lt;do{try{for(;ze<Ze.length;){const t=Ze[ze];ze++,st(t),Br(t.$$)}}catch(t){throw Ze.length=0,ze=0,t}for(st(null),Ze.length=0,ze=0;Gt.length;)Gt.pop()();for(let t=0;t<qe.length;t+=1){const n=qe[t];It.has(n)||(It.add(n),n())}qe.length=0}while(Ze.length);for(;cn.length;)cn.pop()();jt=!1,It.clear(),st(e)}function Br(e){if(e.fragment!==null){e.update(),et(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Vt)}}function Tr(e){const t=[],n=[];qe.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),qe=t}const wr=new Set;function Sr(e,t){e&&e.i&&(wr.delete(e),e.i(t))}function Ar(e,t,n){const{fragment:r,after_update:a}=e.$$;r&&r.m(t,n),Vt(()=>{const i=e.$$.on_mount.map(Hn).filter(en);e.$$.on_destroy?e.$$.on_destroy.push(...i):et(i),e.$$.on_mount=[]}),a.forEach(Vt)}function Hr(e,t){const n=e.$$;n.fragment!==null&&(Tr(n.after_update),et(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Mr(e,t){e.$$.dirty[0]===-1&&(Ze.push(e),_r(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Cr(e,t,n,r,a,i,o=null,l=[-1]){const c=lt;st(e);const s=e.$$={fragment:null,ctx:[],props:i,update:Se,not_equal:a,bound:un(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:un(),dirty:l,skip_bound:!1,root:t.target||c.$$.root};o&&o(s.root);let f=!1;if(s.ctx=n?n(e,t.props||{},(d,p,...v)=>{const y=v.length?v[0]:p;return s.ctx&&a(s.ctx[d],s.ctx[d]=y)&&(!s.skip_bound&&s.bound[d]&&s.bound[d](y),f&&Mr(e,d)),p}):[],s.update(),f=!0,et(s.before_update),s.fragment=r?r(s.ctx):!1,t.target){if(t.hydrate){const d=vr(t.target);s.fragment&&s.fragment.l(d),d.forEach(ge)}else s.fragment&&s.fragment.c();t.intro&&Sr(e.$$.fragment),Ar(e,t.target,t.anchor),ve()}st(c)}let On;typeof HTMLElement=="function"&&(On=class extends HTMLElement{constructor(t,n,r){super();we(this,"$$ctor");we(this,"$$s");we(this,"$$c");we(this,"$$cn",!1);we(this,"$$d",{});we(this,"$$r",!1);we(this,"$$p_d",{});we(this,"$$l",{});we(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 a=this.$$c.$on(t,n);this.$$l_u.set(n,a)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const a=this.$$l_u.get(n);a&&(a(),this.$$l_u.delete(n))}}connectedCallback(){return bt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return()=>{let o;return{c:function(){o=_("slot"),i!=="default"&&E(o,"name",i)},m:function(s,f){xe(s,o,f)},d:function(s){s&&ge(o)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=yr(this);for(const i of this.$$s)i in r&&(n[i]=[t(i)]);for(const i of this.attributes){const o=this.$$g_p(i.name);o in this.$$d||(this.$$d[o]=vt(o,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:Nt(Pt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const a=()=>{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 o=vt(i,this.$$d[i],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,o)}this.$$r=!1};this.$$c.$$.after_update.push(a),a();for(const i in this.$$l)for(const o of this.$$l[i]){const l=this.$$c.$on(i,o);this.$$l_u.set(o,l)}this.$$l={}}})}attributeChangedCallback(t,n,r){var a;this.$$r||(t=this.$$g_p(t),this.$$d[t]=vt(t,r,this.$$p_d,"toProp"),(a=this.$$c)==null||a.$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 vt(e,t,n,r){var i;const a=(i=n[e])==null?void 0:i.type;if(t=a==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(a){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(a){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Or(e,t,n,r,a,i){let o=class extends On{constructor(){super(e,n,a),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(o.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(c){var s;c=vt(l,c,t),this.$$d[l]=c,(s=this.$$c)==null||s.$set({[l]:c})}})}),r.forEach(l=>{Object.defineProperty(o.prototype,l,{get(){var c;return(c=this.$$c)==null?void 0:c[l]}})}),e.element=o,o}class Pr{constructor(){we(this,"$$");we(this,"$$set")}$destroy(){Hr(this,1),this.$destroy=Se}$on(t,n){if(!en(n))return Se;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const a=r.indexOf(n);a!==-1&&r.splice(a,1)}}$set(t){this.$$set&&!hr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Nr="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Nr);const We=[];function Ir(e,t){return{subscribe:Tt(e,t).subscribe}}function Tt(e,t=Se){let n;const r=new Set;function a(l){if(Mn(e,l)&&(e=l,n)){const c=!We.length;for(const s of r)s[1](),We.push(s,e);if(c){for(let s=0;s<We.length;s+=2)We[s][0](We[s+1]);We.length=0}}}function i(l){a(l(e))}function o(l,c=Se){const s=[l,c];return r.add(s),r.size===1&&(n=t(a,i)||Se),l(e),()=>{r.delete(s),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:o}}function tt(e,t,n){const r=!Array.isArray(e),a=r?[e]:e;if(!a.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=t.length<2;return Ir(n,(o,l)=>{let c=!1;const s=[];let f=0,d=Se;const p=()=>{if(f)return;d();const y=t(r?s[0]:s,o,l);i?o(y):d=en(y)?y:Se},v=a.map((y,w)=>Cn(y,S=>{s[w]=S,f&=~(1<<w),c&&p()},()=>{f|=1<<w}));return c=!0,p(),function(){et(v),d(),c=!1}})}var Rr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dr=function(t){return Fr(t)&&!Ur(t)};function Fr(e){return!!e&&typeof e=="object"}function Ur(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||jr(e)}var $r=typeof Symbol=="function"&&Symbol.for,Gr=$r?Symbol.for("react.element"):60103;function jr(e){return e.$$typeof===Gr}function Vr(e){return Array.isArray(e)?[]:{}}function ut(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Qe(Vr(e),e,t):e}function kr(e,t,n){return e.concat(t).map(function(r){return ut(r,n)})}function Xr(e,t){if(!t.customMerge)return Qe;var n=t.customMerge(e);return typeof n=="function"?n:Qe}function zr(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function hn(e){return Object.keys(e).concat(zr(e))}function Pn(e,t){try{return t in e}catch(n){return!1}}function Wr(e,t){return Pn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Zr(e,t,n){var r={};return n.isMergeableObject(e)&&hn(e).forEach(function(a){r[a]=ut(e[a],n)}),hn(t).forEach(function(a){Wr(e,a)||(Pn(e,a)&&n.isMergeableObject(t[a])?r[a]=Xr(a,n)(e[a],t[a],n):r[a]=ut(t[a],n))}),r}function Qe(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||kr,n.isMergeableObject=n.isMergeableObject||Dr,n.cloneUnlessOtherwiseSpecified=ut;var r=Array.isArray(t),a=Array.isArray(e),i=r===a;return i?r?n.arrayMerge(e,t,n):Zr(e,t,n):ut(t,n)}Qe.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,a){return Qe(r,a,n)},{})};var qr=Qe,Qr=qr;const Jr=Lr(Qr);var kt=function(e,t){return kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},kt(e,t)};function wt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var G=function(){return G=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},G.apply(this,arguments)};function Yr(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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function Rt(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;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))}var I;(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"})(I||(I={}));var ne;(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"})(ne||(ne={}));var Je;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Je||(Je={}));function fn(e){return e.type===ne.literal}function Kr(e){return e.type===ne.argument}function Nn(e){return e.type===ne.number}function In(e){return e.type===ne.date}function Rn(e){return e.type===ne.time}function Ln(e){return e.type===ne.select}function Dn(e){return e.type===ne.plural}function ea(e){return e.type===ne.pound}function Fn(e){return e.type===ne.tag}function Un(e){return!!(e&&typeof e=="object"&&e.type===Je.number)}function Xt(e){return!!(e&&typeof e=="object"&&e.type===Je.dateTime)}var $n=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ta=/(?:[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 na(e){var t={};return e.replace(ta,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 ra=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function aa(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ra).filter(function(p){return p.length>0}),n=[],r=0,a=t;r<a.length;r++){var i=a[r],o=i.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var l=o[0],c=o.slice(1),s=0,f=c;s<f.length;s++){var d=f[s];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:l,options:c})}return n}function ia(e){return e.replace(/^(.*?)-/,"")}var dn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Gn=/^(@+)?(\+|#+)?[rs]?$/g,oa=/(\*)(0+)|(#+)(0+)|(0+)/g,jn=/^(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(Gn,function(n,r,a){return typeof a!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):a==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof a=="string"?a.length:0)),""}),t}function Vn(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 sa(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)),!jn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function bn(e){var t={},n=Vn(e);return n||t}function la(e){for(var t={},n=0,r=e;n<r.length;n++){var a=r[n];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.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=ia(a.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=G(G(G({},t),{notation:"scientific"}),a.options.reduce(function(c,s){return G(G({},c),bn(s))},{}));continue;case"engineering":t=G(G(G({},t),{notation:"engineering"}),a.options.reduce(function(c,s){return G(G({},c),bn(s))},{}));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(a.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(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(oa,function(c,s,f,d,p,v){if(s)t.minimumIntegerDigits=f.length;else{if(d&&p)throw new Error("We currently do not support maximum integer digits");if(v)throw new Error("We currently do not support exact integer digits")}return""});continue}if(jn.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(dn.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(dn,function(c,s,f,d,p,v){return f==="*"?t.minimumFractionDigits=s.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:p&&v?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+v.length):(t.minimumFractionDigits=s.length,t.maximumFractionDigits=s.length),""});var i=a.options[0];i==="w"?t=G(G({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=G(G({},t),pn(i)));continue}if(Gn.test(a.stem)){t=G(G({},t),pn(a.stem));continue}var o=Vn(a.stem);o&&(t=G(G({},t),o));var l=sa(a.stem);l&&(t=G(G({},t),l))}return t}var mt={"001":["H","h"],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","hB","h","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","hB","h","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","hB","h","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"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["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 ua(e,t){for(var n="",r=0;r<e.length;r++){var a=e.charAt(r);if(a==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===a;)i++,r++;var o=1+(i&1),l=i<2?1:3+(i>>1),c="a",s=ca(t);for((s=="H"||s=="k")&&(l=0);l-- >0;)n+=c;for(;o-- >0;)n=s+n}else a==="J"?n+="H":n+=a}return n}function ca(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 a=mt[r||""]||mt[n||""]||mt["".concat(n,"-001")]||mt["001"];return a[0]}var Lt,ha=new RegExp("^".concat($n.source,"*")),fa=new RegExp("".concat($n.source,"*$"));function L(e,t){return{start:e,end:t}}var da=!!String.prototype.startsWith&&"_a".startsWith("a",1),pa=!!String.fromCodePoint,ba=!!Object.fromEntries,ma=!!String.prototype.codePointAt,va=!!String.prototype.trimStart,ya=!!String.prototype.trimEnd,ga=!!Number.isSafeInteger,xa=ga?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},zt=!0;try{var Ea=Xn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");zt=((Lt=Ea.exec("a"))===null||Lt===void 0?void 0:Lt[0])==="a"}catch(e){zt=!1}var mn=da?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Wt=pa?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",a=t.length,i=0,o;a>i;){if(o=t[i++],o>1114111)throw RangeError(o+" is not a valid code point");r+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return r},vn=ba?Object.fromEntries:function(t){for(var n={},r=0,a=t;r<a.length;r++){var i=a[r],o=i[0],l=i[1];n[o]=l}return n},kn=ma?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var a=t.charCodeAt(n),i;return a<55296||a>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},_a=va?function(t){return t.trimStart()}:function(t){return t.replace(ha,"")},Ba=ya?function(t){return t.trimEnd()}:function(t){return t.replace(fa,"")};function Xn(e,t){return new RegExp(e,t)}var Zt;if(zt){var yn=Xn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Zt=function(t,n){var r;yn.lastIndex=n;var a=yn.exec(t);return(r=a[1])!==null&&r!==void 0?r:""}}else Zt=function(t,n){for(var r=[];;){var a=kn(t,n);if(a===void 0||zn(a)||Aa(a))break;r.push(a),n+=a>=65536?2:1}return Wt.apply(void 0,r)};var Ta=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 a=[];!this.isEOF();){var i=this.char();if(i===123){var o=this.parseArgument(t,r);if(o.err)return o;a.push(o.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var l=this.clonePosition();this.bump(),a.push({type:ne.pound,location:L(l,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(I.UNMATCHED_CLOSING_TAG,L(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&qt(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;a.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;a.push(o.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ne.literal,value:"<".concat(a,"/>"),location:L(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var o=i.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!qt(this.char()))return this.error(I.INVALID_TAG,L(l,this.clonePosition()));var c=this.clonePosition(),s=this.parseTagName();return a!==s?this.error(I.UNMATCHED_CLOSING_TAG,L(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ne.tag,value:a,children:o,location:L(r,this.clonePosition())},err:null}:this.error(I.INVALID_TAG,L(l,this.clonePosition())))}else return this.error(I.UNCLOSED_TAG,L(r,this.clonePosition()))}else return this.error(I.INVALID_TAG,L(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Sa(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),a="";;){var i=this.tryParseQuote(n);if(i){a+=i;continue}var o=this.tryParseUnquoted(t,n);if(o){a+=o;continue}var l=this.tryParseLeftAngleBracket();if(l){a+=l;continue}break}var c=L(r,this.clonePosition());return{val:{type:ne.literal,value:a,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!wa(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 Wt.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(),Wt(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(I.EMPTY_ARGUMENT,L(r,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(I.MALFORMED_ARGUMENT,L(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ne.argument,value:a,location:L(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,L(r,this.clonePosition())):this.parseArgumentOptions(t,n,a,r);default:return this.error(I.MALFORMED_ARGUMENT,L(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Zt(this.message,n),a=n+r.length;this.bumpTo(a);var i=this.clonePosition(),o=L(t,i);return{value:r,location:o}},e.prototype.parseArgumentOptions=function(t,n,r,a){var i,o=this.clonePosition(),l=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(l){case"":return this.error(I.EXPECT_ARGUMENT_TYPE,L(o,c));case"number":case"date":case"time":{this.bumpSpace();var s=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var p=Ba(d.val);if(p.length===0)return this.error(I.EXPECT_ARGUMENT_STYLE,L(this.clonePosition(),this.clonePosition()));var v=L(f,this.clonePosition());s={style:p,styleLocation:v}}var y=this.tryParseArgumentClose(a);if(y.err)return y;var w=L(a,this.clonePosition());if(s&&mn(s==null?void 0:s.style,"::",0)){var S=_a(s.style.slice(2));if(l==="number"){var d=this.parseNumberSkeletonFromString(S,s.styleLocation);return d.err?d:{val:{type:ne.number,value:r,location:w,style:d.val},err:null}}else{if(S.length===0)return this.error(I.EXPECT_DATE_TIME_SKELETON,w);var j=S;this.locale&&(j=ua(S,this.locale));var p={type:Je.dateTime,pattern:j,location:s.styleLocation,parsedOptions:this.shouldParseSkeletons?na(j):{}},q=l==="date"?ne.date:ne.time;return{val:{type:q,value:r,location:w,style:p},err:null}}}return{val:{type:l==="number"?ne.number:l==="date"?ne.date:ne.time,value:r,location:w,style:(i=s==null?void 0:s.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var A=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(I.EXPECT_SELECT_ARGUMENT_OPTIONS,L(A,G({},A)));this.bumpSpace();var O=this.parseIdentifierIfPossible(),U=0;if(l!=="select"&&O.value==="offset"){if(!this.bumpIf(":"))return this.error(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,L(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,I.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),O=this.parseIdentifierIfPossible(),U=d.val}var Z=this.tryParsePluralOrSelectOptions(t,l,n,O);if(Z.err)return Z;var y=this.tryParseArgumentClose(a);if(y.err)return y;var Y=L(a,this.clonePosition());return l==="select"?{val:{type:ne.select,value:r,options:vn(Z.val),location:Y},err:null}:{val:{type:ne.plural,value:r,options:vn(Z.val),offset:U,pluralType:l==="plural"?"cardinal":"ordinal",location:Y},err:null}}default:return this.error(I.INVALID_ARGUMENT_TYPE,L(o,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(I.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 a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(I.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,L(a,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=aa(t)}catch(a){return this.error(I.INVALID_NUMBER_SKELETON,n)}return{val:{type:Je.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?la(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,a){for(var i,o=!1,l=[],c=new Set,s=a.value,f=a.location;;){if(s.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_SELECTOR,I.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;f=L(d,this.clonePosition()),s=this.message.slice(d.offset,this.offset())}else break}if(c.has(s))return this.error(n==="select"?I.DUPLICATE_SELECT_ARGUMENT_SELECTOR:I.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);s==="other"&&(o=!0),this.bumpSpace();var v=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?I.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:I.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,L(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,n,r);if(y.err)return y;var w=this.tryParseArgumentClose(v);if(w.err)return w;l.push([s,{value:y.val,location:L(v,this.clonePosition())}]),c.add(s),this.bumpSpace(),i=this.parseIdentifierIfPossible(),s=i.value,f=i.location}return l.length===0?this.error(n==="select"?I.EXPECT_SELECT_ARGUMENT_SELECTOR:I.EXPECT_PLURAL_ARGUMENT_SELECTOR,L(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(I.MISSING_OTHER_CLAUSE,L(this.clonePosition(),this.clonePosition())):{val:l,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)i=!0,o=o*10+(l-48),this.bump();else break}var c=L(a,this.clonePosition());return i?(o*=r,xa(o)?{val:o,err:null}:this.error(n,c)):this.error(t,c)},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=kn(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()&&zn(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 qt(e){return e>=97&&e<=122||e>=65&&e<=90}function wa(e){return qt(e)||e===47}function Sa(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 zn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Aa(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 Qt(e){e.forEach(function(t){if(delete t.location,Ln(t)||Dn(t))for(var n in t.options)delete t.options[n].location,Qt(t.options[n].value);else Nn(t)&&Un(t.style)||(In(t)||Rn(t))&&Xt(t.style)?delete t.style.location:Fn(t)&&Qt(t.children)})}function Ha(e,t){t===void 0&&(t={}),t=G({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ta(e,t).parse();if(n.err){var r=SyntaxError(I[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Qt(n.val),n.val}function Dt(e,t){var n=t&&t.cache?t.cache:Ia,r=t&&t.serializer?t.serializer:Na,a=t&&t.strategy?t.strategy:Ca;return a(e,{cache:n,serializer:r})}function Ma(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Wn(e,t,n,r){var a=Ma(r)?r:n(r),i=t.get(a);return typeof i=="undefined"&&(i=e.call(this,r),t.set(a,i)),i}function Zn(e,t,n){var r=Array.prototype.slice.call(arguments,3),a=n(r),i=t.get(a);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(a,i)),i}function tn(e,t,n,r,a){return n.bind(t,e,r,a)}function Ca(e,t){var n=e.length===1?Wn:Zn;return tn(e,this,n,t.cache.create(),t.serializer)}function Oa(e,t){return tn(e,this,Zn,t.cache.create(),t.serializer)}function Pa(e,t){return tn(e,this,Wn,t.cache.create(),t.serializer)}var Na=function(){return JSON.stringify(arguments)};function nn(){this.cache=Object.create(null)}nn.prototype.get=function(e){return this.cache[e]};nn.prototype.set=function(e,t){this.cache[e]=t};var Ia={create:function(){return new nn}},Ft={variadic:Oa,monadic:Pa},Ye;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ye||(Ye={}));var St=function(e){wt(t,e);function t(n,r,a){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),gn=function(e){wt(t,e);function t(n,r,a,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(a).join('", "'),'"'),Ye.INVALID_VALUE,i)||this}return t}(St),Ra=function(e){wt(t,e);function t(n,r,a){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ye.INVALID_VALUE,a)||this}return t}(St),La=function(e){wt(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,'"'),Ye.MISSING_VALUE,r)||this}return t}(St),ye;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ye||(ye={}));function Da(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==ye.literal||n.type!==ye.literal?t.push(n):r.value+=n.value,t},[])}function Fa(e){return typeof e=="function"}function yt(e,t,n,r,a,i,o){if(e.length===1&&fn(e[0]))return[{type:ye.literal,value:e[0].value}];for(var l=[],c=0,s=e;c<s.length;c++){var f=s[c];if(fn(f)){l.push({type:ye.literal,value:f.value});continue}if(ea(f)){typeof i=="number"&&l.push({type:ye.literal,value:n.getNumberFormat(t).format(i)});continue}var d=f.value;if(!(a&&d in a))throw new La(d,o);var p=a[d];if(Kr(f)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),l.push({type:typeof p=="string"?ye.literal:ye.object,value:p});continue}if(In(f)){var v=typeof f.style=="string"?r.date[f.style]:Xt(f.style)?f.style.parsedOptions:void 0;l.push({type:ye.literal,value:n.getDateTimeFormat(t,v).format(p)});continue}if(Rn(f)){var v=typeof f.style=="string"?r.time[f.style]:Xt(f.style)?f.style.parsedOptions:r.time.medium;l.push({type:ye.literal,value:n.getDateTimeFormat(t,v).format(p)});continue}if(Nn(f)){var v=typeof f.style=="string"?r.number[f.style]:Un(f.style)?f.style.parsedOptions:void 0;v&&v.scale&&(p=p*(v.scale||1)),l.push({type:ye.literal,value:n.getNumberFormat(t,v).format(p)});continue}if(Fn(f)){var y=f.children,w=f.value,S=a[w];if(!Fa(S))throw new Ra(w,"function",o);var j=yt(y,t,n,r,a,i),q=S(j.map(function(U){return U.value}));Array.isArray(q)||(q=[q]),l.push.apply(l,q.map(function(U){return{type:typeof U=="string"?ye.literal:ye.object,value:U}}))}if(Ln(f)){var A=f.options[p]||f.options.other;if(!A)throw new gn(f.value,p,Object.keys(f.options),o);l.push.apply(l,yt(A.value,t,n,r,a));continue}if(Dn(f)){var A=f.options["=".concat(p)];if(!A){if(!Intl.PluralRules)throw new St(`Intl.PluralRules is not available in this environment.
|
|
2
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
+
`,Ye.MISSING_INTL_API,o);var O=n.getPluralRules(t,{type:f.pluralType}).select(p-(f.offset||0));A=f.options[O]||f.options.other}if(!A)throw new gn(f.value,p,Object.keys(f.options),o);l.push.apply(l,yt(A.value,t,n,r,a,p-(f.offset||0)));continue}}return Da(l)}function Ua(e,t){return t?G(G(G({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=G(G({},e[r]),t[r]||{}),n},{})):e}function $a(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Ua(e[r],t[r]),n},G({},e)):e}function Ut(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Ga(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Dt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Rt([void 0],n,!1)))},{cache:Ut(e.number),strategy:Ft.variadic}),getDateTimeFormat:Dt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Rt([void 0],n,!1)))},{cache:Ut(e.dateTime),strategy:Ft.variadic}),getPluralRules:Dt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Rt([void 0],n,!1)))},{cache:Ut(e.pluralRules),strategy:Ft.variadic})}}var ja=function(){function e(t,n,r,a){var i=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var s=i.formatToParts(c);if(s.length===1)return s[0].value;var f=s.reduce(function(d,p){return!d.length||p.type!==ye.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(c){return yt(i.ast,i.locales,i.formatters,i.formats,c,void 0,i.message)},this.resolvedOptions=function(){var c;return{locale:((c=i.resolvedLocale)===null||c===void 0?void 0:c.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 o=a||{};o.formatters;var l=Yr(o,["formatters"]);this.ast=e.__parse(t,G(G({},l),{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=$a(e.formats,r),this.formatters=a&&a.formatters||Ga(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=Ha,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 Va(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let a=0;a<n.length;a++)if(typeof r=="object"){if(a>0){const i=n.slice(a,n.length).join(".");if(i in r){r=r[i];break}}r=r[n[a]]}else r=void 0;return r}const Ue={},ka=(e,t,n)=>n&&(t in Ue||(Ue[t]={}),e in Ue[t]||(Ue[t][e]=n),n),qn=(e,t)=>{if(t==null)return;if(t in Ue&&e in Ue[t])return Ue[t][e];const n=At(t);for(let r=0;r<n.length;r++){const a=n[r],i=za(a,e);if(i)return ka(e,t,i)}};let rn;const ht=Tt({});function Xa(e){return rn[e]||null}function Qn(e){return e in rn}function za(e,t){if(!Qn(e))return null;const n=Xa(e);return Va(n,t)}function Wa(e){if(e==null)return;const t=At(e);for(let n=0;n<t.length;n++){const r=t[n];if(Qn(r))return r}}function Jn(e,...t){delete Ue[e],ht.update(n=>(n[e]=Jr.all([n[e]||{},...t]),n))}tt([ht],([e])=>Object.keys(e));ht.subscribe(e=>rn=e);const gt={};function Za(e,t){gt[e].delete(t),gt[e].size===0&&delete gt[e]}function Yn(e){return gt[e]}function qa(e){return At(e).map(t=>{const n=Yn(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Jt(e){return e==null?!1:At(e).some(t=>{var n;return(n=Yn(t))==null?void 0:n.size})}function Qa(e,t){return Promise.all(t.map(r=>(Za(e,r),r().then(a=>a.default||a)))).then(r=>Jn(e,...r))}const ot={};function Kn(e){if(!Jt(e))return e in ot?ot[e]:Promise.resolve();const t=qa(e);return ot[e]=Promise.all(t.map(([n,r])=>Qa(n,r))).then(()=>{if(Jt(e))return Kn(e);delete ot[e]}),ot[e]}const Ja={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"}}},Ya={fallbackLocale:null,loadingDelay:200,formats:Ja,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Ka=Ya;function Ke(){return Ka}const $t=Tt(!1);var ei=Object.defineProperty,ti=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,xn=Object.getOwnPropertySymbols,ri=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,En=(e,t,n)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ii=(e,t)=>{for(var n in t||(t={}))ri.call(t,n)&&En(e,n,t[n]);if(xn)for(var n of xn(t))ai.call(t,n)&&En(e,n,t[n]);return e},oi=(e,t)=>ti(e,ni(t));let Yt;const _t=Tt(null);function _n(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function At(e,t=Ke().fallbackLocale){const n=_n(e);return t?[...new Set([...n,..._n(t)])]:n}function je(){return Yt!=null?Yt:void 0}_t.subscribe(e=>{Yt=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const si=e=>{if(e&&Wa(e)&&Jt(e)){const{loadingDelay:t}=Ke();let n;return typeof window!="undefined"&&je()!=null&&t?n=window.setTimeout(()=>$t.set(!0),t):$t.set(!0),Kn(e).then(()=>{_t.set(e)}).finally(()=>{clearTimeout(n),$t.set(!1)})}return _t.set(e)},nt=oi(ii({},_t),{set:si}),Ht=e=>{const t=Object.create(null);return r=>{const a=JSON.stringify(r);return a in t?t[a]:t[a]=e(r)}};var li=Object.defineProperty,Bt=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable,Bn=(e,t,n)=>t in e?li(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,an=(e,t)=>{for(var n in t||(t={}))er.call(t,n)&&Bn(e,n,t[n]);if(Bt)for(var n of Bt(t))tr.call(t,n)&&Bn(e,n,t[n]);return e},rt=(e,t)=>{var n={};for(var r in e)er.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bt)for(var r of Bt(e))t.indexOf(r)<0&&tr.call(e,r)&&(n[r]=e[r]);return n};const ct=(e,t)=>{const{formats:n}=Ke();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},ui=Ht(e=>{var t=e,{locale:n,format:r}=t,a=rt(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(a=ct("number",r)),new Intl.NumberFormat(n,a)}),ci=Ht(e=>{var t=e,{locale:n,format:r}=t,a=rt(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?a=ct("date",r):Object.keys(a).length===0&&(a=ct("date","short")),new Intl.DateTimeFormat(n,a)}),hi=Ht(e=>{var t=e,{locale:n,format:r}=t,a=rt(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?a=ct("time",r):Object.keys(a).length===0&&(a=ct("time","short")),new Intl.DateTimeFormat(n,a)}),fi=(e={})=>{var t=e,{locale:n=je()}=t,r=rt(t,["locale"]);return ui(an({locale:n},r))},di=(e={})=>{var t=e,{locale:n=je()}=t,r=rt(t,["locale"]);return ci(an({locale:n},r))},pi=(e={})=>{var t=e,{locale:n=je()}=t,r=rt(t,["locale"]);return hi(an({locale:n},r))},bi=Ht((e,t=je())=>new ja(e,t,Ke().formats,{ignoreTag:Ke().ignoreTag})),mi=(e,t={})=>{var n,r,a,i;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:l,locale:c=je(),default:s}=o;if(c==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=qn(e,c);if(!f)f=(i=(a=(r=(n=Ke()).handleMissingMessage)==null?void 0:r.call(n,{locale:c,id:e,defaultValue:s}))!=null?a:s)!=null?i:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!l)return f;let d=f;try{d=bi(f,c).format(l)}catch(p){p instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,p.message)}return d},vi=(e,t)=>pi(t).format(e),yi=(e,t)=>di(t).format(e),gi=(e,t)=>fi(t).format(e),xi=(e,t=je())=>qn(e,t),Ei=tt([nt,ht],()=>mi);tt([nt],()=>vi);tt([nt],()=>yi);tt([nt],()=>gi);tt([nt,ht],()=>xi);function Tn(e,t){Jn(e,t)}function _i(e){nt.set(e)}const wn={en:{balanceTitle:"Your Balance",totalBalance:"Total Balance",cashBalance:"Cash Balance",bonusBalance:"Bonus Balance",depositButton:"Deposit"},"zh-hk":{balanceTitle:"您的餘額",totalBalance:"總餘額",cashBalance:"現金餘額",bonusBalance:"獎金餘額",depositButton:"訂金"},de:{balanceTitle:"Dein Kontostand",totalBalance:"Gesamtsaldo",cashBalance:"Barguthaben",bonusBalance:"Bonusguthaben",depositButton:"Anzahlung"},it:{balanceTitle:"Il tuo bilancio",totalBalance:"Saldo totale",cashBalance:"Saldo in contanti",bonusBalance:"Saldo bonus",depositButton:"Depositare"},fr:{balanceTitle:"Votre solde",totalBalance:"Solde total",cashBalance:"Encaisse",bonusBalance:"Solde du bonus",depositButton:"Dépôt"},es:{balanceTitle:"Saldos",totalBalance:"Saldo Total",cashBalance:"Saldo Disponible",bonusBalance:"Saldo de Bonos",depositButton:"Deposita"},tr:{balanceTitle:"Bakiyeniz",totalBalance:"Toplam Bakiye",cashBalance:"Nakit dengesi",bonusBalance:"Bonus Bakiyesi",depositButton:"Depozito"},ru:{balanceTitle:"Ваш баланс",totalBalance:"Итоговый баланс",cashBalance:"Денежных баланс",bonusBalance:"Бонусный баланс",depositButton:"Депозит"},ro:{balanceTitle:"Balanta Ta",totalBalance:"Balanta Totala",cashBalance:"Balanta Cash",bonusBalance:"Balanta Bonus",depositButton:"Depunere"},hr:{balanceTitle:"Vaše stanje",totalBalance:"Ukupno stanje",cashBalance:"Stanje novca",bonusBalance:"Stanje bonusa",depositButton:"Uplata"},hu:{balanceTitle:"Az egyensúlyod",totalBalance:"Teljes egyenleg",cashBalance:"Pénzforgalmi egyenleg",bonusBalance:"Bónuszegyenleg",depositButton:"Letét"},pl:{balanceTitle:"Twój balans",totalBalance:"Saldo całkowite",cashBalance:"Saldo środków pieniężnych",bonusBalance:"Saldo bonusowe",depositButton:"Depozyt"},pt:{balanceTitle:"Seu Saldo",totalBalance:"Saldo total",cashBalance:"Saldo de caixa",bonusBalance:"Saldo de bônus",depositButton:"Depósito"},sl:{balanceTitle:"Vaše stanje",totalBalance:"Skupno stanje",cashBalance:"Stanje gotovine",bonusBalance:"Bonus stanje",depositButton:"Polog"},sr:{balanceTitle:"Стање",totalBalance:"Укупно стање",cashBalance:"Новчано стање",bonusBalance:"Бонус Баланце",depositButton:"Депозит"},"pt-br":{balanceTitle:"Seu balanço",totalBalance:"Balanço total",cashBalance:"Saldo de caixa",bonusBalance:"Saldo em títulos",depositButton:"Depósito"},"es-mx":{balanceTitle:"Su saldo",totalBalance:"Saldo total",cashBalance:"Saldo en efectivo",bonusBalance:"Saldo en bonos",depositButton:"Depósito"}};var Kt={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,a=n.clearTimeout,i=n.XMLHttpRequest,o=n.XDomainRequest,l=n.ActiveXObject,c=n.EventSource,s=n.document,f=n.Promise,d=n.fetch,p=n.Response,v=n.TextDecoder,y=n.TextEncoder,w=n.AbortController;if(typeof window!="undefined"&&typeof s!="undefined"&&!("readyState"in s)&&s.body==null&&(s.readyState="loading",window.addEventListener("load",function(u){s.readyState="complete"},!1)),i==null&&l!=null&&(i=function(){return new l("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(u){function b(){}return b.prototype=u,new b}),Date.now||(Date.now=function(){return new Date().getTime()}),w==null){var S=d;d=function(u,b){var x=b.signal;return S(u,{headers:b.headers,credentials:b.credentials,cache:b.cache}).then(function(m){var H=m.body.getReader();return x._reader=H,x._aborted&&x._reader.cancel(),{status:m.status,statusText:m.statusText,headers:m.headers,body:{getReader:function(){return H}}}})},w=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function j(){this.bitsNeeded=0,this.codePoint=0}j.prototype.decode=function(u){function b(J,te,M){if(M===1)return J>=128>>te&&J<<te<=2047;if(M===2)return J>=2048>>te&&J<<te<=55295||J>=57344>>te&&J<<te<=65535;if(M===3)return J>=65536>>te&&J<<te<=1114111;throw new Error}function x(J,te){if(J===6*1)return te>>6>15?3:te>31?2:1;if(J===6*2)return te>15?3:2;if(J===6*3)return 3;throw new Error}for(var m=65533,H="",T=this.bitsNeeded,B=this.codePoint,C=0;C<u.length;C+=1){var R=u[C];T!==0&&(R<128||R>191||!b(B<<6|R&63,T-6,x(T,B)))&&(T=0,B=m,H+=String.fromCharCode(B)),T===0?(R>=0&&R<=127?(T=0,B=R):R>=192&&R<=223?(T=6*1,B=R&31):R>=224&&R<=239?(T=6*2,B=R&15):R>=240&&R<=247?(T=6*3,B=R&7):(T=0,B=m),T!==0&&!b(B,T,x(T,B))&&(T=0,B=m)):(T-=6,B=B<<6|R&63),T===0&&(B<=65535?H+=String.fromCharCode(B):(H+=String.fromCharCode(55296+(B-65535-1>>10)),H+=String.fromCharCode(56320+(B-65535-1&1023))))}return this.bitsNeeded=T,this.codePoint=B,H};var q=function(){try{return new v().decode(new y().encode("test"),{stream:!0})==="test"}catch(u){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+u)}return!1};(v==null||y==null||!q())&&(v=j);var A=function(){};function O(u){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=A,this.onload=A,this.onerror=A,this.onreadystatechange=A,this._contentType="",this._xhr=u,this._sendTimeout=0,this._abort=A}O.prototype.open=function(u,b){this._abort(!0);var x=this,m=this._xhr,H=1,T=0;this._abort=function(M){x._sendTimeout!==0&&(a(x._sendTimeout),x._sendTimeout=0),(H===1||H===2||H===3)&&(H=4,m.onload=A,m.onerror=A,m.onabort=A,m.onprogress=A,m.onreadystatechange=A,m.abort(),T!==0&&(a(T),T=0),M||(x.readyState=4,x.onabort(null),x.onreadystatechange())),H=0};var B=function(){if(H===1){var M=0,re="",Ne=void 0;if("contentType"in m)M=200,re="OK",Ne=m.contentType;else try{M=m.status,re=m.statusText,Ne=m.getResponseHeader("Content-Type")}catch(at){M=0,re="",Ne=void 0}M!==0&&(H=2,x.readyState=2,x.status=M,x.statusText=re,x._contentType=Ne,x.onreadystatechange())}},C=function(){if(B(),H===2||H===3){H=3;var M="";try{M=m.responseText}catch(re){}x.readyState=3,x.responseText=M,x.onprogress()}},R=function(M,re){if((re==null||re.preventDefault==null)&&(re={preventDefault:A}),C(),H===1||H===2||H===3){if(H=4,T!==0&&(a(T),T=0),x.readyState=4,M==="load")x.onload(re);else if(M==="error")x.onerror(re);else if(M==="abort")x.onabort(re);else throw new TypeError;x.onreadystatechange()}},J=function(M){m!=null&&(m.readyState===4?(!("onload"in m)||!("onerror"in m)||!("onabort"in m))&&R(m.responseText===""?"error":"load",M):m.readyState===3?"onprogress"in m||C():m.readyState===2&&B())},te=function(){T=r(function(){te()},500),m.readyState===3&&C()};"onload"in m&&(m.onload=function(M){R("load",M)}),"onerror"in m&&(m.onerror=function(M){R("error",M)}),"onabort"in m&&(m.onabort=function(M){R("abort",M)}),"onprogress"in m&&(m.onprogress=C),"onreadystatechange"in m&&(m.onreadystatechange=function(M){J(M)}),("contentType"in m||!("ontimeout"in i.prototype))&&(b+=(b.indexOf("?")===-1?"?":"&")+"padding=true"),m.open(u,b,!0),"readyState"in m&&(T=r(function(){te()},0))},O.prototype.abort=function(){this._abort(!1)},O.prototype.getResponseHeader=function(u){return this._contentType},O.prototype.setRequestHeader=function(u,b){var x=this._xhr;"setRequestHeader"in x&&x.setRequestHeader(u,b)},O.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},O.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&s!=null&&s.readyState!=null&&s.readyState!=="complete"){var u=this;u._sendTimeout=r(function(){u._sendTimeout=0,u.send()},4);return}var b=this._xhr;"withCredentials"in b&&(b.withCredentials=this.withCredentials);try{b.send(void 0)}catch(x){throw x}};function U(u){return u.replace(/[A-Z]/g,function(b){return String.fromCharCode(b.charCodeAt(0)+32)})}function Z(u){for(var b=Object.create(null),x=u.split(`\r
|
|
8
|
+
`),m=0;m<x.length;m+=1){var H=x[m],T=H.split(": "),B=T.shift(),C=T.join(": ");b[U(B)]=C}this._map=b}Z.prototype.get=function(u){return this._map[U(u)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function Y(){}Y.prototype.open=function(u,b,x,m,H,T,B){u.open("GET",H);var C=0;u.onprogress=function(){var J=u.responseText,te=J.slice(C);C+=te.length,x(te)},u.onerror=function(J){J.preventDefault(),m(new Error("NetworkError"))},u.onload=function(){m(null)},u.onabort=function(){m(null)},u.onreadystatechange=function(){if(u.readyState===i.HEADERS_RECEIVED){var J=u.status,te=u.statusText,M=u.getResponseHeader("Content-Type"),re=u.getAllResponseHeaders();b(J,te,M,new Z(re))}},u.withCredentials=T;for(var R in B)Object.prototype.hasOwnProperty.call(B,R)&&u.setRequestHeader(R,B[R]);return u.send(),u};function D(u){this._headers=u}D.prototype.get=function(u){return this._headers.get(u)};function $(){}$.prototype.open=function(u,b,x,m,H,T,B){var C=null,R=new w,J=R.signal,te=new v;return d(H,{headers:B,credentials:T?"include":"same-origin",signal:J,cache:"no-store"}).then(function(M){return C=M.body.getReader(),b(M.status,M.statusText,M.headers.get("Content-Type"),new D(M.headers)),new f(function(re,Ne){var at=function(){C.read().then(function(Ee){if(Ee.done)re(void 0);else{var pe=te.decode(Ee.value,{stream:!0});x(pe),at()}}).catch(function(Ee){Ne(Ee)})};at()})}).catch(function(M){if(M.name!=="AbortError")return M}).then(function(M){m(M)}),{abort:function(){C!=null&&C.cancel(),R.abort()}}};function N(){this._listeners=Object.create(null)}function V(u){r(function(){throw u},0)}N.prototype.dispatchEvent=function(u){u.target=this;var b=this._listeners[u.type];if(b!=null)for(var x=b.length,m=0;m<x;m+=1){var H=b[m];try{typeof H.handleEvent=="function"?H.handleEvent(u):H.call(this,u)}catch(T){V(T)}}},N.prototype.addEventListener=function(u,b){u=String(u);var x=this._listeners,m=x[u];m==null&&(m=[],x[u]=m);for(var H=!1,T=0;T<m.length;T+=1)m[T]===b&&(H=!0);H||m.push(b)},N.prototype.removeEventListener=function(u,b){u=String(u);var x=this._listeners,m=x[u];if(m!=null){for(var H=[],T=0;T<m.length;T+=1)m[T]!==b&&H.push(m[T]);H.length===0?delete x[u]:x[u]=H}};function k(u){this.type=u,this.target=void 0}function ae(u,b){k.call(this,u),this.data=b.data,this.lastEventId=b.lastEventId}ae.prototype=Object.create(k.prototype);function oe(u,b){k.call(this,u),this.status=b.status,this.statusText=b.statusText,this.headers=b.headers}oe.prototype=Object.create(k.prototype);function se(u,b){k.call(this,u),this.error=b.error}se.prototype=Object.create(k.prototype);var ie=-1,X=0,ee=1,Ae=2,De=-1,he=0,Ce=1,Oe=2,$e=3,Ve=/^text\/event\-stream(;.*)?$/i,Fe=1e3,g=18e6,F=function(u,b){var x=u==null?b:parseInt(u,10);return x!==x&&(x=b),K(x)},K=function(u){return Math.min(Math.max(u,Fe),g)},de=function(u,b,x){try{typeof b=="function"&&b.call(u,x)}catch(m){V(m)}};function Q(u,b){N.call(this),b=b||{},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,ft(this,u,b)}function Te(){return i!=null&&"withCredentials"in i.prototype||o==null?new i:new o}var le=d!=null&&p!=null&&"body"in p.prototype;function ft(u,b,x){b=String(b);var m=!!x.withCredentials,H=x.lastEventIdQueryParameterName||"lastEventId",T=K(1e3),B=F(x.heartbeatTimeout,45e3),C="",R=T,J=!1,te=0,M=x.headers||{},re=x.Transport,Ne=le&&re==null?void 0:new O(re!=null?new re:Te()),at=re!=null&&typeof re!="string"?new re:Ne==null?new $:new Y,Ee=void 0,pe=0,He=ie,ke="",dt="",Ie="",pt="",be=he,Mt=0,Ge=0,ar=function(ce,ue,_e,Be){if(He===X)if(ce===200&&_e!=null&&Ve.test(_e)){He=ee,J=Date.now(),R=T,u.readyState=ee;var me=new oe("open",{status:ce,statusText:ue,headers:Be});u.dispatchEvent(me),de(u,u.onopen,me)}else{var fe="";ce!==200?(ue&&(ue=ue.replace(/\s+/g," ")),fe="EventSource's response has a status "+ce+" "+ue+" that is not 200. Aborting the connection."):fe="EventSource's response has a Content-Type specifying an unsupported type: "+(_e==null?"-":_e.replace(/\s+/g," "))+". Aborting the connection.",Ct();var me=new oe("error",{status:ce,statusText:ue,headers:Be});u.dispatchEvent(me),de(u,u.onerror,me),console.error(fe)}},ir=function(ce){if(He===ee){for(var ue=-1,_e=0;_e<ce.length;_e+=1){var Be=ce.charCodeAt(_e);(Be===10||Be===13)&&(ue=_e)}var me=(ue!==-1?pt:"")+ce.slice(0,ue+1);pt=(ue===-1?pt:"")+ce.slice(ue+1),ce!==""&&(J=Date.now(),te+=ce.length);for(var fe=0;fe<me.length;fe+=1){var Be=me.charCodeAt(fe);if(be===De&&Be===10)be=he;else if(be===De&&(be=he),Be===13||Be===10){if(be!==he){be===Ce&&(Ge=fe+1);var Re=me.slice(Mt,Ge-1),Le=me.slice(Ge+(Ge<fe&&me.charCodeAt(Ge)===32?1:0),fe);Re==="data"?(ke+=`
|
|
9
|
+
`,ke+=Le):Re==="id"?dt=Le:Re==="event"?Ie=Le:Re==="retry"?(T=F(Le,T),R=T):Re==="heartbeatTimeout"&&(B=F(Le,B),pe!==0&&(a(pe),pe=r(function(){it()},B)))}if(be===he){if(ke!==""){C=dt,Ie===""&&(Ie="message");var Xe=new ae(Ie,{data:ke.slice(1),lastEventId:dt});if(u.dispatchEvent(Xe),Ie==="open"?de(u,u.onopen,Xe):Ie==="message"?de(u,u.onmessage,Xe):Ie==="error"&&de(u,u.onerror,Xe),He===Ae)return}ke="",Ie=""}be=Be===13?De:he}else be===he&&(Mt=fe,be=Ce),be===Ce?Be===58&&(Ge=fe+1,be=Oe):be===Oe&&(be=$e)}}},sn=function(ce){if(He===ee||He===X){He=ie,pe!==0&&(a(pe),pe=0),pe=r(function(){it()},R),R=K(Math.min(T*16,R*2)),u.readyState=X;var ue=new se("error",{error:ce});u.dispatchEvent(ue),de(u,u.onerror,ue),ce!=null&&console.error(ce)}},Ct=function(){He=Ae,Ee!=null&&(Ee.abort(),Ee=void 0),pe!==0&&(a(pe),pe=0),u.readyState=Ae},it=function(){if(pe=0,He!==ie){if(!J&&Ee!=null)sn(new Error("No activity within "+B+" milliseconds. "+(He===X?"No response received.":te+" chars received.")+" Reconnecting.")),Ee!=null&&(Ee.abort(),Ee=void 0);else{var ce=Math.max((J||Date.now())+B-Date.now(),1);J=!1,pe=r(function(){it()},ce)}return}J=!1,te=0,pe=r(function(){it()},B),He=X,ke="",Ie="",dt=C,pt="",Mt=0,Ge=0,be=he;var ue=b;if(b.slice(0,5)!=="data:"&&b.slice(0,5)!=="blob:"&&C!==""){var _e=b.indexOf("?");ue=_e===-1?b:b.slice(0,_e+1)+b.slice(_e+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Le,Xe){return Xe===H?"":Le}),ue+=(b.indexOf("?")===-1?"?":"&")+H+"="+encodeURIComponent(C)}var Be=u.withCredentials,me={};me.Accept="text/event-stream";var fe=u.headers;if(fe!=null)for(var Re in fe)Object.prototype.hasOwnProperty.call(fe,Re)&&(me[Re]=fe[Re]);try{Ee=at.open(Ne,ar,ir,sn,ue,Be,me)}catch(Le){throw Ct(),Le}};u.url=b,u.readyState=X,u.withCredentials=m,u.headers=M,u._close=Ct,it()}Q.prototype=Object.create(N.prototype),Q.prototype.CONNECTING=X,Q.prototype.OPEN=ee,Q.prototype.CLOSED=Ae,Q.prototype.close=function(){this._close()},Q.CONNECTING=X,Q.OPEN=ee,Q.CLOSED=Ae,Q.prototype.withCredentials=void 0;var Pe=c;i!=null&&(c==null||!("withCredentials"in c.prototype))&&(Pe=Q),function(u){{var b=u(t);b!==void 0&&(e.exports=b)}}(function(u){u.EventSourcePolyfill=Q,u.NativeEventSource=c,u.EventSource=Pe})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:Rr:globalThis)})(Kt,Kt.exports);var Bi=Kt.exports;/*!
|
|
10
|
+
* currency.js - v2.0.4
|
|
11
|
+
* http://scurker.github.io/currency.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2021 Jason Wilson
|
|
14
|
+
* Released under MIT license
|
|
15
|
+
*/var Ti={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:Hi,fromCents:!1},nr=function(t){return Math.round(t)},on=function(t){return Math.pow(10,t)},wi=function(t,n){return nr(t/n)*n},Si=/(\d)(?=(\d{3})+\b)/g,Ai=/(\d)(?=(\d\d)+\d\b)/g;function Me(e,t){var n=this;if(!(n instanceof Me))return new Me(e,t);var r=Object.assign({},Ti,t),a=on(r.precision),i=xt(e,r);n.intValue=i,n.value=i/a,r.increment=r.increment||1/a,r.useVedic?r.groups=Ai:r.groups=Si,this.s=r,this.p=a}function xt(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=0,a=t.decimal,i=t.errorOnInvalid,o=t.precision,l=t.fromCents,c=on(o),s=typeof e=="number",f=e instanceof Me;if(f&&l)return e.intValue;if(s||f)r=f?e.value:e;else if(typeof e=="string"){var d=new RegExp("[^-\\d"+a+"]","g"),p=new RegExp("\\"+a,"g");r=e.replace(/\((.*)\)/,"-$1").replace(d,"").replace(p,"."),r=r||0}else{if(i)throw Error("Invalid Input");r=0}return l||(r*=c,r=r.toFixed(4)),n?nr(r):r}function Hi(e,t){var n=t.pattern,r=t.negativePattern,a=t.symbol,i=t.separator,o=t.decimal,l=t.groups,c=(""+e).replace(/^-/,"").split("."),s=c[0],f=c[1];return(e.value>=0?n:r).replace("!",a).replace("#",s.replace(l,"$1"+i)+(f?o+f:""))}Me.prototype={add:function(t){var n=this.intValue,r=this.s,a=this.p;return Me((n+=xt(t,r))/(r.fromCents?1:a),r)},subtract:function(t){var n=this.intValue,r=this.s,a=this.p;return Me((n-=xt(t,r))/(r.fromCents?1:a),r)},multiply:function(t){var n=this.intValue,r=this.s;return Me((n*=t)/(r.fromCents?1:on(r.precision)),r)},divide:function(t){var n=this.intValue,r=this.s;return Me(n/=xt(t,r,!1),r)},distribute:function(t){for(var n=this.intValue,r=this.p,a=this.s,i=[],o=Math[n>=0?"floor":"ceil"](n/t),l=Math.abs(n-o*t),c=a.fromCents?1:r;t!==0;t--){var s=Me(o/c,a);l-- >0&&(s=s[n>=0?"add":"subtract"](1/c)),i.push(s)}return i},dollars:function(){return~~this.value},cents:function(){var t=this.intValue,n=this.p;return~~(t%n)},format:function(t){var n=this.s;return typeof t=="function"?t(this,n):n.format(this,Object.assign({},n,t))},toString:function(){var t=this.intValue,n=this.p,r=this.s;return wi(t/n,r.increment).toFixed(r.precision)},toJSON:function(){return this.value}};function Mi(e){dr(e,"svelte-1yd9b3x",'.svelte-1yd9b3x.svelte-1yd9b3x,.svelte-1yd9b3x.svelte-1yd9b3x::before,.svelte-1yd9b3x.svelte-1yd9b3x::after{font-family:inherit}:host{font-family:inherit}button.svelte-1yd9b3x.svelte-1yd9b3x{font-family:inherit}p.svelte-1yd9b3x.svelte-1yd9b3x{padding:0;margin:0}.ShowBalance.svelte-1yd9b3x.svelte-1yd9b3x{position:relative}.ShowBalance.svelte-1yd9b3x .BalanceValue.svelte-1yd9b3x{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance.svelte-1yd9b3x .BalanceValue svg.svelte-1yd9b3x{width:16px}.ShowBalance.svelte-1yd9b3x .BalanceValue span.svelte-1yd9b3x{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance.svelte-1yd9b3x .BalanceValue.svelte-1yd9b3x{font-size:12px}.ShowBalance.svelte-1yd9b3x .BalanceValue svg.svelte-1yd9b3x{width:12px}}.BalanceModalWrapper.svelte-1yd9b3x.svelte-1yd9b3x{background-color:var(--emfe-w-color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper.svelte-1yd9b3x.svelte-1yd9b3x:before{content:"";background:var(--emfe-w-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.svelte-1yd9b3x.svelte-1yd9b3x{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer}.BalanceModalClose.svelte-1yd9b3x.svelte-1yd9b3x:before{content:"";background:var(--emfe-w-color-secondary, var(--emfe-w-color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose.svelte-1yd9b3x.svelte-1yd9b3x:after{content:"";background:var(--emfe-w-color-secondary, var(--emfe-w-color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal.svelte-1yd9b3x.svelte-1yd9b3x{position:relative;width:280px}.BalanceModalHeader.svelte-1yd9b3x.svelte-1yd9b3x{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader.svelte-1yd9b3x .BalanceModalTitle.svelte-1yd9b3x{font-size:16px;font-weight:bold;color:var(--emfe-w-header-contrast, var(--emfe-w-color-contrast, #07072A))}.BalanceModalRowBoth.svelte-1yd9b3x.svelte-1yd9b3x{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emfe-w-color-gray-100, #E6E6E6)}.BalanceModalRowBoth.svelte-1yd9b3x.svelte-1yd9b3x:last-child{border-bottom:none}.BalanceModalRowBoth.svelte-1yd9b3x .BalanceModalRowLine.svelte-1yd9b3x{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth.svelte-1yd9b3x .BalanceModalText.svelte-1yd9b3x{color:var(--emfe-w-header-contrast, var(--emfe-w-color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth.svelte-1yd9b3x .BalanceModalValue.svelte-1yd9b3x{font-size:14px;font-weight:bold;color:var(--emfe-w-header-contrast, var(--emfe-w-color-contrast, #07072A))}.BalanceModalRow.svelte-1yd9b3x.svelte-1yd9b3x{display:flex;justify-content:space-between;align-items:center;padding:20px 0;border-bottom:1px solid var(--emfe-w-color-gray-100, #E6E6E6)}.BalanceModalRow.svelte-1yd9b3x.svelte-1yd9b3x:last-child{border-bottom:none}.BalanceModalRow.svelte-1yd9b3x .BalanceModalText.svelte-1yd9b3x{color:var(--emfe-w-header-contrast, var(--emfe-w-color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRow.svelte-1yd9b3x .BalanceModalValue.svelte-1yd9b3x{font-size:14px;font-weight:bold;color:var(--emfe-w-header-contrast, var(--emfe-w-color-contrast, #07072A))}.BalanceModalFooter.svelte-1yd9b3x.svelte-1yd9b3x{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter.svelte-1yd9b3x .BalanceModalAction.svelte-1yd9b3x{background:var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter.svelte-1yd9b3x .BalanceModalAction.svelte-1yd9b3x:hover{background:var(--emfe-w-header-contrast, var(--emfe-w-color-background, #07072A))}.ShowBalanceModalOverlay.svelte-1yd9b3x.svelte-1yd9b3x{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function Sn(e){let t,n,r,a,i,o,l=e[8]("balanceTitle")+"",c,s,f,d,p,v=e[8]("totalBalance")+"",y,w,S,j,q,A,O,U,Z,Y,D,$,N=e[8]("depositButton")+"",V,k,ae;function oe(X,ee){return X[0]=="gm16"?Oi:Ci}let se=oe(e),ie=se(e);return{c(){t=_("div"),n=_("div"),r=W(),a=_("div"),i=_("div"),o=_("p"),c=P(l),s=W(),f=_("div"),d=_("div"),p=_("p"),y=P(v),w=W(),S=_("p"),j=_("span"),q=P(e[4]),A=W(),O=_("span"),U=P(e[5]),Z=W(),ie.c(),Y=W(),D=_("div"),$=_("button"),V=P(N),E(n,"class","BalanceModalClose svelte-1yd9b3x"),E(o,"class","BalanceModalTitle svelte-1yd9b3x"),E(i,"class","BalanceModalHeader svelte-1yd9b3x"),E(p,"class","BalanceModalText svelte-1yd9b3x"),E(j,"class","BalanceModalAmount svelte-1yd9b3x"),E(O,"class","BalanceModalCurrency svelte-1yd9b3x"),E(S,"class","BalanceModalValue svelte-1yd9b3x"),E(d,"class","BalanceModalRow svelte-1yd9b3x"),E(f,"class","BalanceModalBody svelte-1yd9b3x"),E($,"class","BalanceModalAction svelte-1yd9b3x"),E(D,"class","BalanceModalFooter svelte-1yd9b3x"),E(a,"class","BalanceModal svelte-1yd9b3x"),E(t,"class","BalanceModalWrapper svelte-1yd9b3x")},m(X,ee){xe(X,t,ee),h(t,n),h(t,r),h(t,a),h(a,i),h(i,o),h(o,c),h(a,s),h(a,f),h(f,d),h(d,p),h(p,y),h(d,w),h(d,S),h(S,j),h(j,q),h(S,A),h(S,O),h(O,U),h(f,Z),ie.m(f,null),h(a,Y),h(a,D),h(D,$),h($,V),k||(ae=[Et(n,"click",e[24]),Et($,"click",e[25])],k=!0)},p(X,ee){ee[0]&256&&l!==(l=X[8]("balanceTitle")+"")&&z(c,l),ee[0]&256&&v!==(v=X[8]("totalBalance")+"")&&z(y,v),ee[0]&16&&z(q,X[4]),ee[0]&32&&z(U,X[5]),se===(se=oe(X))&&ie?ie.p(X,ee):(ie.d(1),ie=se(X),ie&&(ie.c(),ie.m(f,null))),ee[0]&256&&N!==(N=X[8]("depositButton")+"")&&z(V,N)},d(X){X&&ge(t),ie.d(),k=!1,et(ae)}}}function Ci(e){var N,V;let t,n,r=e[8]("cashBalance")+"",a,i,o,l,c=e[11]((N=e[6][0])==null?void 0:N.balanceAmount)+"",s,f,d,p,v,y,w,S=e[8]("bonusBalance")+"",j,q,A,O,U=e[11]((V=e[6][1])==null?void 0:V.balanceAmount)+"",Z,Y,D,$;return{c(){t=_("div"),n=_("p"),a=P(r),i=W(),o=_("p"),l=_("span"),s=P(c),f=W(),d=_("span"),p=P(e[5]),v=W(),y=_("div"),w=_("p"),j=P(S),q=W(),A=_("p"),O=_("span"),Z=P(U),Y=W(),D=_("span"),$=P(e[5]),E(n,"class","BalanceModalText svelte-1yd9b3x"),E(l,"class","BalanceModalAmount svelte-1yd9b3x"),E(d,"class","BalanceModalCurrency svelte-1yd9b3x"),E(o,"class","BalanceModalValue svelte-1yd9b3x"),E(t,"class","BalanceModalRow svelte-1yd9b3x"),E(w,"class","BalanceModalText svelte-1yd9b3x"),E(O,"class","BalanceModalAmount svelte-1yd9b3x"),E(D,"class","BalanceModalCurrency svelte-1yd9b3x"),E(A,"class","BalanceModalValue svelte-1yd9b3x"),E(y,"class","BalanceModalRow svelte-1yd9b3x")},m(k,ae){xe(k,t,ae),h(t,n),h(n,a),h(t,i),h(t,o),h(o,l),h(l,s),h(o,f),h(o,d),h(d,p),xe(k,v,ae),xe(k,y,ae),h(y,w),h(w,j),h(y,q),h(y,A),h(A,O),h(O,Z),h(A,Y),h(A,D),h(D,$)},p(k,ae){var oe,se;ae[0]&256&&r!==(r=k[8]("cashBalance")+"")&&z(a,r),ae[0]&64&&c!==(c=k[11]((oe=k[6][0])==null?void 0:oe.balanceAmount)+"")&&z(s,c),ae[0]&32&&z(p,k[5]),ae[0]&256&&S!==(S=k[8]("bonusBalance")+"")&&z(j,S),ae[0]&64&&U!==(U=k[11]((se=k[6][1])==null?void 0:se.balanceAmount)+"")&&z(Z,U),ae[0]&32&&z($,k[5])},d(k){k&&(ge(t),ge(v),ge(y))}}}function Oi(e){let t;function n(i,o){if(i[1]==="Casino"||i[1]==="Sports")return Ni;if(i[1]==="All")return Pi}let r=n(e),a=r&&r(e);return{c(){a&&a.c(),t=mr()},m(i,o){a&&a.m(i,o),xe(i,t,o)},p(i,o){r===(r=n(i))&&a?a.p(i,o):(a&&a.d(1),a=r&&r(i),a&&(a.c(),a.m(t.parentNode,t)))},d(i){i&&ge(t),a&&a.d(i)}}}function Pi(e){let t,n,r,a=e[8]("cashBalance")+"",i,o,l,c,s,f=e[11](e[7].Casino.Real)+"",d,p,v,y,w,S,j,q=e[8]("cashBalance")+"",A,O,U,Z,Y,D=e[11](e[7].Sports.Real)+"",$,N,V,k,ae,oe,se,ie,X=e[8]("bonusBalance")+"",ee,Ae,De,he,Ce,Oe=e[11](e[7].Casino.Bonus)+"",$e,Ve,Fe,g,F,K,de,Q=e[8]("bonusBalance")+"",Te,le,ft,Pe,u,b=e[11](e[7].Sports.Bonus)+"",x,m,H,T;return{c(){t=_("div"),n=_("div"),r=_("p"),i=P(a),o=P(" Casino"),l=W(),c=_("p"),s=_("span"),d=P(f),p=W(),v=_("span"),y=P(e[5]),w=W(),S=_("div"),j=_("p"),A=P(q),O=P(" Sports"),U=W(),Z=_("p"),Y=_("span"),$=P(D),N=W(),V=_("span"),k=P(e[5]),ae=W(),oe=_("div"),se=_("div"),ie=_("p"),ee=P(X),Ae=P(" Casino"),De=W(),he=_("p"),Ce=_("span"),$e=P(Oe),Ve=W(),Fe=_("span"),g=P(e[5]),F=W(),K=_("div"),de=_("p"),Te=P(Q),le=P(" Sports"),ft=W(),Pe=_("p"),u=_("span"),x=P(b),m=W(),H=_("span"),T=P(e[5]),E(r,"class","BalanceModalText svelte-1yd9b3x"),E(s,"class","BalanceModalAmount svelte-1yd9b3x"),E(v,"class","BalanceModalCurrency svelte-1yd9b3x"),E(c,"class","BalanceModalValue svelte-1yd9b3x"),E(n,"class","BalanceModalRowLine svelte-1yd9b3x"),E(j,"class","BalanceModalText svelte-1yd9b3x"),E(Y,"class","BalanceModalAmount svelte-1yd9b3x"),E(V,"class","BalanceModalCurrency svelte-1yd9b3x"),E(Z,"class","BalanceModalValue svelte-1yd9b3x"),E(S,"class","BalanceModalRowLine svelte-1yd9b3x"),E(t,"class","BalanceModalRowBoth svelte-1yd9b3x"),E(ie,"class","BalanceModalText svelte-1yd9b3x"),E(Ce,"class","BalanceModalAmount svelte-1yd9b3x"),E(Fe,"class","BalanceModalCurrency svelte-1yd9b3x"),E(he,"class","BalanceModalValue svelte-1yd9b3x"),E(se,"class","BalanceModalRowLine svelte-1yd9b3x"),E(de,"class","BalanceModalText svelte-1yd9b3x"),E(u,"class","BalanceModalAmount svelte-1yd9b3x"),E(H,"class","BalanceModalCurrency svelte-1yd9b3x"),E(Pe,"class","BalanceModalValue svelte-1yd9b3x"),E(K,"class","BalanceModalRowLine svelte-1yd9b3x"),E(oe,"class","BalanceModalRowBoth svelte-1yd9b3x")},m(B,C){xe(B,t,C),h(t,n),h(n,r),h(r,i),h(r,o),h(n,l),h(n,c),h(c,s),h(s,d),h(c,p),h(c,v),h(v,y),h(t,w),h(t,S),h(S,j),h(j,A),h(j,O),h(S,U),h(S,Z),h(Z,Y),h(Y,$),h(Z,N),h(Z,V),h(V,k),xe(B,ae,C),xe(B,oe,C),h(oe,se),h(se,ie),h(ie,ee),h(ie,Ae),h(se,De),h(se,he),h(he,Ce),h(Ce,$e),h(he,Ve),h(he,Fe),h(Fe,g),h(oe,F),h(oe,K),h(K,de),h(de,Te),h(de,le),h(K,ft),h(K,Pe),h(Pe,u),h(u,x),h(Pe,m),h(Pe,H),h(H,T)},p(B,C){C[0]&256&&a!==(a=B[8]("cashBalance")+"")&&z(i,a),C[0]&128&&f!==(f=B[11](B[7].Casino.Real)+"")&&z(d,f),C[0]&32&&z(y,B[5]),C[0]&256&&q!==(q=B[8]("cashBalance")+"")&&z(A,q),C[0]&128&&D!==(D=B[11](B[7].Sports.Real)+"")&&z($,D),C[0]&32&&z(k,B[5]),C[0]&256&&X!==(X=B[8]("bonusBalance")+"")&&z(ee,X),C[0]&128&&Oe!==(Oe=B[11](B[7].Casino.Bonus)+"")&&z($e,Oe),C[0]&32&&z(g,B[5]),C[0]&256&&Q!==(Q=B[8]("bonusBalance")+"")&&z(Te,Q),C[0]&128&&b!==(b=B[11](B[7].Sports.Bonus)+"")&&z(x,b),C[0]&32&&z(T,B[5])},d(B){B&&(ge(t),ge(ae),ge(oe))}}}function Ni(e){let t,n,r=e[8]("cashBalance")+"",a,i,o,l,c=e[7][e[1]?e[1]:"Casino"].Real+"",s,f,d,p,v,y,w,S=e[8]("bonusBalance")+"",j,q,A,O,U=e[7][e[1]?e[1]:"Casino"].Bonus+"",Z,Y,D,$;return{c(){t=_("div"),n=_("p"),a=P(r),i=W(),o=_("p"),l=_("span"),s=P(c),f=W(),d=_("span"),p=P(e[5]),v=W(),y=_("div"),w=_("p"),j=P(S),q=W(),A=_("p"),O=_("span"),Z=P(U),Y=W(),D=_("span"),$=P(e[5]),E(n,"class","BalanceModalText svelte-1yd9b3x"),E(l,"class","BalanceModalAmount svelte-1yd9b3x"),E(d,"class","BalanceModalCurrency svelte-1yd9b3x"),E(o,"class","BalanceModalValue svelte-1yd9b3x"),E(t,"class","BalanceModalRow svelte-1yd9b3x"),E(w,"class","BalanceModalText svelte-1yd9b3x"),E(O,"class","BalanceModalAmount svelte-1yd9b3x"),E(D,"class","BalanceModalCurrency svelte-1yd9b3x"),E(A,"class","BalanceModalValue svelte-1yd9b3x"),E(y,"class","BalanceModalRow svelte-1yd9b3x")},m(N,V){xe(N,t,V),h(t,n),h(n,a),h(t,i),h(t,o),h(o,l),h(l,s),h(o,f),h(o,d),h(d,p),xe(N,v,V),xe(N,y,V),h(y,w),h(w,j),h(y,q),h(y,A),h(A,O),h(O,Z),h(A,Y),h(A,D),h(D,$)},p(N,V){V[0]&256&&r!==(r=N[8]("cashBalance")+"")&&z(a,r),V[0]&130&&c!==(c=N[7][N[1]?N[1]:"Casino"].Real+"")&&z(s,c),V[0]&32&&z(p,N[5]),V[0]&256&&S!==(S=N[8]("bonusBalance")+"")&&z(j,S),V[0]&130&&U!==(U=N[7][N[1]?N[1]:"Casino"].Bonus+"")&&z(Z,U),V[0]&32&&z($,N[5])},d(N){N&&(ge(t),ge(v),ge(y))}}}function An(e){let t,n,r;return{c(){t=_("div"),E(t,"class","ShowBalanceModalOverlay svelte-1yd9b3x")},m(a,i){xe(a,t,i),n||(r=Et(t,"click",e[26]),n=!0)},p:Se,d(a){a&&ge(t),n=!1,r()}}}function Ii(e){let t,n,r,a,i,o,l,c,s,f,d,p,v=e[3]&&Sn(e),y=e[3]&&An(e);return{c(){t=_("div"),n=_("div"),r=_("p"),a=P(e[4]),i=W(),o=P(e[5]),l=W(),c=_("span"),c.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435" class="svelte-1yd9b3x"><defs class="svelte-1yd9b3x"><style class="svelte-1yd9b3x">.a{fill:var(--emfe-w-color-white, #FFFFFF);}</style></defs><path class="a svelte-1yd9b3x" 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>',s=W(),v&&v.c(),f=W(),y&&y.c(),E(c,"class","svelte-1yd9b3x"),E(r,"class","BalanceValue svelte-1yd9b3x"),E(r,"part","BalanceValue"),E(n,"class","ShowBalance svelte-1yd9b3x"),E(n,"part","ShowBalance"),E(t,"class","svelte-1yd9b3x")},m(w,S){xe(w,t,S),h(t,n),h(n,r),h(r,a),h(r,i),h(r,o),h(r,l),h(r,c),h(n,s),v&&v.m(n,null),h(t,f),y&&y.m(t,null),e[27](t),d||(p=Et(r,"click",e[23]),d=!0)},p(w,S){S[0]&16&&z(a,w[4]),S[0]&32&&z(o,w[5]),w[3]?v?v.p(w,S):(v=Sn(w),v.c(),v.m(n,null)):v&&(v.d(1),v=null),w[3]?y?y.p(w,S):(y=An(w),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i:Se,o:Se,d(w){w&&ge(t),v&&v.d(),y&&y.d(),e[27](null),d=!1,p()}}}function Ri(e,t){return Nt(Pt({},e),{balanceAmount:t})}function Li(e,t,n){let r;fr(e,Ei,g=>n(8,r=g));let{userid:a=""}=t,{session:i=""}=t,{endpoint:o=""}=t,{lang:l="en"}=t,{clientstyling:c=""}=t,{clientstylingurl:s=""}=t,{translationurl:f=""}=t,{customlocaleidentifier:d=""}=t,{gmversion:p=""}=t,{displaybalanceoption:v="All"}=t,{currencyseparator:y=""}=t,{currencydecimal:w=""}=t,{currencyprecision:S=""}=t,j=!1,q="",A="",O,U=[],Z="0",Y,D=!1;const $={Casino:{Real:0,Bonus:0},Sports:{Real:0,Bonus:0}},N=()=>{fetch(f).then(F=>F.json()).then(F=>{Object.keys(F).forEach(K=>{Tn(K,F[K])})}).catch(F=>{console.log(F)})};Object.keys(wn).forEach(g=>{Tn(g,wn[g])});const V=g=>{switch(g){case"balance":n(3,j=!0);break;case"closebalance":n(3,j=!1);break}},k=g=>bt(this,null,function*(){try{D=!0;const F=yield fetch(g,{method:"GET",headers:{"X-SessionID":i}}),K=yield F.json();if(F.ok)D=!1,n(6,U=K.items),n(5,A=Object.keys(K.totalAmount)[0]),n(4,q=ee(K.totalAmount[A]));else throw D=!1,new Error("Failed to fetch balance data !")}catch(F){D=!1,console.log("Balance error: ",F)}finally{D=!1}}),ae=g=>bt(this,null,function*(){try{D=!0,v=="Casino"&&g.searchParams.append("productType","Casino"),v=="Sports"&&g.searchParams.append("productType","Sports"),v==="All"&&(g.searchParams.append("productType","Casino"),g.searchParams.append("productType","Sports"));const F=yield fetch(g,{method:"GET",headers:{"X-SessionID":i}}),K=yield F.json();if(F.ok){D=!1;for(const de of K.items){const{type:Q,amount:Te,productType:le}=de;v==="Casino"?n(7,$.Casino[Q]=Te,$):v==="Sports"?n(7,$.Sports[Q]=Te,$):v==="All"&&le&&Q&&n(7,$[le][Q]=Te,$)}n(5,A=Object.keys(K.totalAmount)[0]),n(4,q=ee(K.totalAmount[A]))}else throw D=!1,new Error("Failed to fetch balance data !")}catch(F){D=!1,console.log("Balance error: ",F)}finally{D=!1}}),oe=(g,F)=>{if(i.length>0){let K=new Bi.EventSourcePolyfill(g,{headers:{accept:"text/event-stream","X-SessionId":F}});Y&&Y.close(),Y=K,K.addEventListener("message",de=>{Z="0";try{let{balanceChange:Q,currency:Te}=JSON.parse(de.data);if(p==="gmcore")n(6,U=U.map(le=>(Q&&Q[le.id]&&(le=Ri(le,Q[le.id].afterAmount)),Z=(parseFloat(le==null?void 0:le.balanceAmount)+parseFloat(Z)).toString(),le))),n(4,q=ee(Number(Z)));else if(p==="gm16"){for(let le in Q)n(7,$.Casino[le]=Q[le].afterAmount,$);n(4,q=ee($.Casino.Bonus+$.Casino.Real))}Te=Te}catch(Q){console.log("Balance stream failed: ",Q),oe(`${o}/v1/player/${a}/balance/updates`,i)}})}else Y&&Y.close()},se=()=>{V("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},ie=()=>{switch(_i(l),p){case"gmcore":k(new URL(`${o}/v1/player/${a}/account`));break;case"gm16":ae(new URL(`${o}/v1/player/${a}/balance`));break;default:throw Error(`Invalid apiversion attribute: ${p}`)}},X=()=>{let g;return d.includes(l)&&(g=d),g},ee=g=>{let F;return d?F=new Intl.NumberFormat(X(),{useGrouping:!0}).format(g):y&&w?F=Me(g,{separator:y,decimal:w,symbol:"",precision:parseInt(S||"2",10)}).format():F=Me(g,{separator:".",decimal:",",symbol:"",precision:parseInt(S||"2",10)}).format(),F},Ae=g=>{if(g.data)switch(g.data.type){case"LogoutSuccessfull":Y.close();break}},De=()=>{let g=document.createElement("style");g.innerHTML=c,O.appendChild(g)},he=()=>{let g=new URL(s),F=document.createElement("style");fetch(g.href).then(K=>K.text()).then(K=>{F.innerHTML=K,setTimeout(()=>{O.appendChild(F)},1)})};xr(()=>(window.addEventListener("message",Ae,!1),()=>{window.removeEventListener("message",Ae),Y&&Y.close()}));const Ce=()=>V("balance"),Oe=()=>V("closebalance"),$e=()=>se(),Ve=()=>V("closebalance");function Fe(g){Gt[g?"unshift":"push"](()=>{O=g,n(2,O)})}return e.$$set=g=>{"userid"in g&&n(12,a=g.userid),"session"in g&&n(13,i=g.session),"endpoint"in g&&n(14,o=g.endpoint),"lang"in g&&n(15,l=g.lang),"clientstyling"in g&&n(16,c=g.clientstyling),"clientstylingurl"in g&&n(17,s=g.clientstylingurl),"translationurl"in g&&n(18,f=g.translationurl),"customlocaleidentifier"in g&&n(19,d=g.customlocaleidentifier),"gmversion"in g&&n(0,p=g.gmversion),"displaybalanceoption"in g&&n(1,v=g.displaybalanceoption),"currencyseparator"in g&&n(20,y=g.currencyseparator),"currencydecimal"in g&&n(21,w=g.currencydecimal),"currencyprecision"in g&&n(22,S=g.currencyprecision)},e.$$.update=()=>{e.$$.dirty[0]&32768&&l&&X(),e.$$.dirty[0]&61443&&o&&a&&i&&l&&p&&v&&ie(),e.$$.dirty[0]&28672&&o&&a&&i&&oe(`${o}/v1/player/${a}/balance/updates`,i),e.$$.dirty[0]&65540&&c&&O&&De(),e.$$.dirty[0]&131076&&s&&O&&he(),e.$$.dirty[0]&262144&&f&&N()},[p,v,O,j,q,A,U,$,r,V,se,ee,a,i,o,l,c,s,f,d,y,w,S,Ce,Oe,$e,Ve,Fe]}class rr extends Pr{constructor(t){super(),Cr(this,t,Li,Ii,Mn,{userid:12,session:13,endpoint:14,lang:15,clientstyling:16,clientstylingurl:17,translationurl:18,customlocaleidentifier:19,gmversion:0,displaybalanceoption:1,currencyseparator:20,currencydecimal:21,currencyprecision:22},Mi,[-1,-1])}get userid(){return this.$$.ctx[12]}set userid(t){this.$$set({userid:t}),ve()}get session(){return this.$$.ctx[13]}set session(t){this.$$set({session:t}),ve()}get endpoint(){return this.$$.ctx[14]}set endpoint(t){this.$$set({endpoint:t}),ve()}get lang(){return this.$$.ctx[15]}set lang(t){this.$$set({lang:t}),ve()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(t){this.$$set({clientstyling:t}),ve()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),ve()}get translationurl(){return this.$$.ctx[18]}set translationurl(t){this.$$set({translationurl:t}),ve()}get customlocaleidentifier(){return this.$$.ctx[19]}set customlocaleidentifier(t){this.$$set({customlocaleidentifier:t}),ve()}get gmversion(){return this.$$.ctx[0]}set gmversion(t){this.$$set({gmversion:t}),ve()}get displaybalanceoption(){return this.$$.ctx[1]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),ve()}get currencyseparator(){return this.$$.ctx[20]}set currencyseparator(t){this.$$set({currencyseparator:t}),ve()}get currencydecimal(){return this.$$.ctx[21]}set currencydecimal(t){this.$$set({currencydecimal:t}),ve()}get currencyprecision(){return this.$$.ctx[22]}set currencyprecision(t){this.$$set({currencyprecision:t}),ve()}}Or(rr,{userid:{},session:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},customlocaleidentifier:{},gmversion:{},displaybalanceoption:{},currencyseparator:{},currencydecimal:{},currencyprecision:{}},[],[],!0);exports.default=rr;
|