@everymatrix/player-account-balance-modal 1.83.10 → 1.83.11

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.
@@ -4709,7 +4709,7 @@ function Mo(e) {
4709
4709
  function Po(e, t, n) {
4710
4710
  let r;
4711
4711
  pr(e, Co, (a) => n(4, r = a));
4712
- let { userid: i = "" } = t, { session: o = "" } = t, { endpoint: u = "" } = t, { lang: s = "en" } = t, { mbsource: f } = t, { clientstyling: l = "" } = t, { clientstylingurl: d = "" } = t, { translationurl: m = "" } = t, { gmversion: b = "gm16" } = t, { displaybalanceoption: _ = "All" } = t, { totalcalculationmode: B = "totalCashAmount" } = t, { hideproducttype: I } = t, { currencylocale: j = "en" } = t, { currencydisplay: W = "symbol" } = t, { maximumfractiondigits: U = "2" } = t, { minimumfractiondigits: w = "0" } = t, { customdisplayformat: A = "" } = t, P, L = !0, Y = !1, _e = !1, pe, re = "", se = [], ie;
4712
+ let { userid: i = "" } = t, { session: o = "" } = t, { endpoint: u = "" } = t, { lang: s = "en" } = t, { mbsource: f = "" } = t, { clientstyling: l = "" } = t, { clientstylingurl: d = "" } = t, { translationurl: m = "" } = t, { gmversion: b = "gm16" } = t, { displaybalanceoption: _ = "All" } = t, { totalcalculationmode: B = "totalCashAmount" } = t, { hideproducttype: I = "" } = t, { currencylocale: j = "en" } = t, { currencydisplay: W = "symbol" } = t, { maximumfractiondigits: U = "2" } = t, { minimumfractiondigits: w = "0" } = t, { customdisplayformat: A = "" } = t, P, L = !0, Y = !1, _e = !1, pe, re = "", se = [], ie;
4713
4713
  const x = {}, me = ["totalCashAmount", "totalRealAmount"], it = () => {
4714
4714
  fetch(m).then((a) => a.json()).then((a) => Object.keys(a).forEach((p) => Tn(p, a[p]))).catch((a) => console.log(a));
4715
4715
  };
@@ -4850,7 +4850,7 @@ function Po(e, t, n) {
4850
4850
  ot();
4851
4851
  for (const [v, T] of Object.entries(x))
4852
4852
  T.length < 1 && delete x[v];
4853
- n(1, L = !1);
4853
+ window.postMessage({ type: "playerBalanceInfo", balance: g }, window.location.href), n(1, L = !1);
4854
4854
  }).catch(() => {
4855
4855
  throw n(1, L = !1), new Error("Failed to fetch balance data !");
4856
4856
  });
@@ -6,4 +6,4 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
6
6
  * https://github.com/Yaffle/EventSource/
7
7
  */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,u=n.XDomainRequest,s=n.ActiveXObject,f=n.EventSource,l=n.document,d=n.Promise,m=n.fetch,b=n.Response,_=n.TextDecoder,B=n.TextEncoder,I=n.AbortController;if(typeof window!="undefined"&&typeof l!="undefined"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(c){l.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(c){function a(){}return a.prototype=c,new a}),Date.now||(Date.now=function(){return new Date().getTime()}),I==null){var j=m;m=function(c,a){var p=a.signal;return j(c,{headers:a.headers,credentials:a.credentials,cache:a.cache}).then(function(h){var g=h.body.getReader();return p._reader=g,p._aborted&&p._reader.cancel(),{status:h.status,statusText:h.statusText,headers:h.headers,body:{getReader:function(){return g}}}})},I=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function W(){this.bitsNeeded=0,this.codePoint=0}W.prototype.decode=function(c){function a(C,R,S){if(S===1)return C>=128>>R&&C<<R<=2047;if(S===2)return C>=2048>>R&&C<<R<=55295||C>=57344>>R&&C<<R<=65535;if(S===3)return C>=65536>>R&&C<<R<=1114111;throw new Error}function p(C,R){if(C===6*1)return R>>6>15?3:R>31?2:1;if(C===6*2)return R>15?3:2;if(C===6*3)return 3;throw new Error}for(var h=65533,g="",y=this.bitsNeeded,E=this.codePoint,v=0;v<c.length;v+=1){var T=c[v];y!==0&&(T<128||T>191||!a(E<<6|T&63,y-6,p(y,E)))&&(y=0,E=h,g+=String.fromCharCode(E)),y===0?(T>=0&&T<=127?(y=0,E=T):T>=192&&T<=223?(y=6*1,E=T&31):T>=224&&T<=239?(y=6*2,E=T&15):T>=240&&T<=247?(y=6*3,E=T&7):(y=0,E=h),y!==0&&!a(E,y,p(y,E))&&(y=0,E=h)):(y-=6,E=E<<6|T&63),y===0&&(E<=65535?g+=String.fromCharCode(E):(g+=String.fromCharCode(55296+(E-65535-1>>10)),g+=String.fromCharCode(56320+(E-65535-1&1023))))}return this.bitsNeeded=y,this.codePoint=E,g};var U=function(){try{return new _().decode(new B().encode("test"),{stream:!0})==="test"}catch(c){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+c)}return!1};(_==null||B==null||!U())&&(_=W);var w=function(){};function A(c){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=c,this._sendTimeout=0,this._abort=w}A.prototype.open=function(c,a){this._abort(!0);var p=this,h=this._xhr,g=1,y=0;this._abort=function(S){p._sendTimeout!==0&&(i(p._sendTimeout),p._sendTimeout=0),(g===1||g===2||g===3)&&(g=4,h.onload=w,h.onerror=w,h.onabort=w,h.onprogress=w,h.onreadystatechange=w,h.abort(),y!==0&&(i(y),y=0),S||(p.readyState=4,p.onabort(null),p.onreadystatechange())),g=0};var E=function(){if(g===1){var S=0,N="",ge=void 0;if("contentType"in h)S=200,N="OK",ge=h.contentType;else try{S=h.status,N=h.statusText,ge=h.getResponseHeader("Content-Type")}catch(Qe){S=0,N="",ge=void 0}S!==0&&(g=2,p.readyState=2,p.status=S,p.statusText=N,p._contentType=ge,p.onreadystatechange())}},v=function(){if(E(),g===2||g===3){g=3;var S="";try{S=h.responseText}catch(N){}p.readyState=3,p.responseText=S,p.onprogress()}},T=function(S,N){if((N==null||N.preventDefault==null)&&(N={preventDefault:w}),v(),g===1||g===2||g===3){if(g=4,y!==0&&(i(y),y=0),p.readyState=4,S==="load")p.onload(N);else if(S==="error")p.onerror(N);else if(S==="abort")p.onabort(N);else throw new TypeError;p.onreadystatechange()}},C=function(S){h!=null&&(h.readyState===4?(!("onload"in h)||!("onerror"in h)||!("onabort"in h))&&T(h.responseText===""?"error":"load",S):h.readyState===3?"onprogress"in h||v():h.readyState===2&&E())},R=function(){y=r(function(){R()},500),h.readyState===3&&v()};"onload"in h&&(h.onload=function(S){T("load",S)}),"onerror"in h&&(h.onerror=function(S){T("error",S)}),"onabort"in h&&(h.onabort=function(S){T("abort",S)}),"onprogress"in h&&(h.onprogress=v),"onreadystatechange"in h&&(h.onreadystatechange=function(S){C(S)}),("contentType"in h||!("ontimeout"in o.prototype))&&(a+=(a.indexOf("?")===-1?"?":"&")+"padding=true"),h.open(c,a,!0),"readyState"in h&&(y=r(function(){R()},0))},A.prototype.abort=function(){this._abort(!1)},A.prototype.getResponseHeader=function(c){return this._contentType},A.prototype.setRequestHeader=function(c,a){var p=this._xhr;"setRequestHeader"in p&&p.setRequestHeader(c,a)},A.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},A.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var c=this;c._sendTimeout=r(function(){c._sendTimeout=0,c.send()},4);return}var a=this._xhr;"withCredentials"in a&&(a.withCredentials=this.withCredentials);try{a.send(void 0)}catch(p){throw p}};function P(c){return c.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)+32)})}function L(c){for(var a=Object.create(null),p=c.split(`\r
8
8
  `),h=0;h<p.length;h+=1){var g=p[h],y=g.split(": "),E=y.shift(),v=y.join(": ");a[P(E)]=v}this._map=a}L.prototype.get=function(c){return this._map[P(c)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function Y(){}Y.prototype.open=function(c,a,p,h,g,y,E){c.open("GET",g);var v=0;c.onprogress=function(){var C=c.responseText,R=C.slice(v);v+=R.length,p(R)},c.onerror=function(C){C.preventDefault(),h(new Error("NetworkError"))},c.onload=function(){h(null)},c.onabort=function(){h(null)},c.onreadystatechange=function(){if(c.readyState===o.HEADERS_RECEIVED){var C=c.status,R=c.statusText,S=c.getResponseHeader("Content-Type"),N=c.getAllResponseHeaders();a(C,R,S,new L(N))}},c.withCredentials=y;for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&c.setRequestHeader(T,E[T]);return c.send(),c};function _e(c){this._headers=c}_e.prototype.get=function(c){return this._headers.get(c)};function pe(){}pe.prototype.open=function(c,a,p,h,g,y,E){var v=null,T=new I,C=T.signal,R=new _;return m(g,{headers:E,credentials:y?"include":"same-origin",signal:C,cache:"no-store"}).then(function(S){return v=S.body.getReader(),a(S.status,S.statusText,S.headers.get("Content-Type"),new _e(S.headers)),new d(function(N,ge){var Qe=function(){v.read().then(function(ee){if(ee.done)N(void 0);else{var Z=R.decode(ee.value,{stream:!0});p(Z),Qe()}}).catch(function(ee){ge(ee)})};Qe()})}).catch(function(S){if(S.name!=="AbortError")return S}).then(function(S){h(S)}),{abort:function(){v!=null&&v.cancel(),T.abort()}}};function re(){this._listeners=Object.create(null)}function se(c){r(function(){throw c},0)}re.prototype.dispatchEvent=function(c){c.target=this;var a=this._listeners[c.type];if(a!=null)for(var p=a.length,h=0;h<p;h+=1){var g=a[h];try{typeof g.handleEvent=="function"?g.handleEvent(c):g.call(this,c)}catch(y){se(y)}}},re.prototype.addEventListener=function(c,a){c=String(c);var p=this._listeners,h=p[c];h==null&&(h=[],p[c]=h);for(var g=!1,y=0;y<h.length;y+=1)h[y]===a&&(g=!0);g||h.push(a)},re.prototype.removeEventListener=function(c,a){c=String(c);var p=this._listeners,h=p[c];if(h!=null){for(var g=[],y=0;y<h.length;y+=1)h[y]!==a&&g.push(h[y]);g.length===0?delete p[c]:p[c]=g}};function ie(c){this.type=c,this.target=void 0}function x(c,a){ie.call(this,c),this.data=a.data,this.lastEventId=a.lastEventId}x.prototype=Object.create(ie.prototype);function me(c,a){ie.call(this,c),this.status=a.status,this.statusText=a.statusText,this.headers=a.headers}me.prototype=Object.create(ie.prototype);function it(c,a){ie.call(this,c),this.error=a.error}it.prototype=Object.create(ie.prototype);var ze=-1,ce=0,Te=1,we=2,Ae=-1,ue=0,We=1,Le=2,ot=3,Bt=/^text\/event\-stream(;.*)?$/i,at=1e3,St=18e6,Ze=function(c,a){var p=c==null?a:parseInt(c,10);return p!==p&&(p=a),qe(p)},qe=function(c){return Math.min(Math.max(c,at),St)},Be=function(c,a,p){try{typeof a=="function"&&a.call(c,p)}catch(h){se(h)}};function K(c,a){re.call(this),a=a||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Ct(this,c,a)}function wt(){return o!=null&&"withCredentials"in o.prototype||u==null?new o:new u}var At=m!=null&&b!=null&&"body"in b.prototype;function Ct(c,a,p){a=String(a);var h=!!p.withCredentials,g=p.lastEventIdQueryParameterName||"lastEventId",y=qe(1e3),E=Ze(p.heartbeatTimeout,45e3),v="",T=y,C=!1,R=0,S=p.headers||{},N=p.Transport,ge=At&&N==null?void 0:new A(N!=null?new N:wt()),Qe=N!=null&&typeof N!="string"?new N:ge==null?new pe:new Y,ee=void 0,Z=0,le=ze,Re="",ut="",be="",lt="",q=ue,Ht=0,Ce=0,sr=function(V,$,te,ne){if(le===ce)if(V===200&&te!=null&&Bt.test(te)){le=Te,C=Date.now(),T=y,c.readyState=Te;var Q=new me("open",{status:V,statusText:$,headers:ne});c.dispatchEvent(Q),Be(c,c.onopen,Q)}else{var X="";V!==200?($&&($=$.replace(/\s+/g," ")),X="EventSource's response has a status "+V+" "+$+" that is not 200. Aborting the connection."):X="EventSource's response has a Content-Type specifying an unsupported type: "+(te==null?"-":te.replace(/\s+/g," "))+". Aborting the connection.",Ot();var Q=new me("error",{status:V,statusText:$,headers:ne});c.dispatchEvent(Q),Be(c,c.onerror,Q),console.error(X)}},ur=function(V){if(le===Te){for(var $=-1,te=0;te<V.length;te+=1){var ne=V.charCodeAt(te);(ne===10||ne===13)&&($=te)}var Q=($!==-1?lt:"")+V.slice(0,$+1);lt=($===-1?lt:"")+V.slice($+1),V!==""&&(C=Date.now(),R+=V.length);for(var X=0;X<Q.length;X+=1){var ne=Q.charCodeAt(X);if(q===Ae&&ne===10)q=ue;else if(q===Ae&&(q=ue),ne===13||ne===10){if(q!==ue){q===We&&(Ce=X+1);var ye=Q.slice(Ht,Ce-1),ve=Q.slice(Ce+(Ce<X&&Q.charCodeAt(Ce)===32?1:0),X);ye==="data"?(Re+=`
9
- `,Re+=ve):ye==="id"?ut=ve:ye==="event"?be=ve:ye==="retry"?(y=Ze(ve,y),T=y):ye==="heartbeatTimeout"&&(E=Ze(ve,E),Z!==0&&(i(Z),Z=r(function(){Je()},E)))}if(q===ue){if(Re!==""){v=ut,be===""&&(be="message");var Ne=new x(be,{data:Re.slice(1),lastEventId:ut});if(c.dispatchEvent(Ne),be==="open"?Be(c,c.onopen,Ne):be==="message"?Be(c,c.onmessage,Ne):be==="error"&&Be(c,c.onerror,Ne),le===we)return}Re="",be=""}q=ne===13?Ae:ue}else q===ue&&(Ht=X,q=We),q===We?ne===58&&(Ce=X+1,q=Le):q===Le&&(q=ot)}}},an=function(V){if(le===Te||le===ce){le=ze,Z!==0&&(i(Z),Z=0),Z=r(function(){Je()},T),T=qe(Math.min(y*16,T*2)),c.readyState=ce;var $=new it("error",{error:V});c.dispatchEvent($),Be(c,c.onerror,$),V!=null&&console.error(V)}},Ot=function(){le=we,ee!=null&&(ee.abort(),ee=void 0),Z!==0&&(i(Z),Z=0),c.readyState=we},Je=function(){if(Z=0,le!==ze){if(!C&&ee!=null)an(new Error("No activity within "+E+" milliseconds. "+(le===ce?"No response received.":R+" chars received.")+" Reconnecting.")),ee!=null&&(ee.abort(),ee=void 0);else{var V=Math.max((C||Date.now())+E-Date.now(),1);C=!1,Z=r(function(){Je()},V)}return}C=!1,R=0,Z=r(function(){Je()},E),le=ce,Re="",be="",ut=v,lt="",Ht=0,Ce=0,q=ue;var $=a;if(a.slice(0,5)!=="data:"&&a.slice(0,5)!=="blob:"&&v!==""){var te=a.indexOf("?");$=te===-1?a:a.slice(0,te+1)+a.slice(te+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(ve,Ne){return Ne===g?"":ve}),$+=(a.indexOf("?")===-1?"?":"&")+g+"="+encodeURIComponent(v)}var ne=c.withCredentials,Q={};Q.Accept="text/event-stream";var X=c.headers;if(X!=null)for(var ye in X)Object.prototype.hasOwnProperty.call(X,ye)&&(Q[ye]=X[ye]);try{ee=Qe.open(ge,sr,ur,an,$,ne,Q)}catch(ve){throw Ot(),ve}};c.url=a,c.readyState=ce,c.withCredentials=h,c.headers=S,c._close=Ot,Je()}K.prototype=Object.create(re.prototype),K.prototype.CONNECTING=ce,K.prototype.OPEN=Te,K.prototype.CLOSED=we,K.prototype.close=function(){this._close()},K.CONNECTING=ce,K.OPEN=Te,K.CLOSED=we,K.prototype.withCredentials=void 0;var st=f;o!=null&&(f==null||!("withCredentials"in f.prototype))&&(st=K),function(c){{var a=c(t);a!==void 0&&(e.exports=a)}}(function(c){c.EventSourcePolyfill=K,c.NativeEventSource=f,c.EventSource=st})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:jr:globalThis)})(tn,tn.exports);var Lo=tn.exports;function Ro(e){gr(e,"svelte-gv6dm2",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function Sn(e,t,n){const r=e.slice();return r[51]=t[n],r}function wn(e,t,n){const r=e.slice();return r[54]=t[n],r}function No(e){let t,n=(e[3].Total?e[5](e[3].Total[0].amount):"0")+"",r,i,o,u,s,f,l,d=e[2]&&An(e);return{c(){t=G("button"),r=Ee(n),i=xe(),o=G("span"),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>',u=xe(),d&&d.c(),s=vr(),z(t,"class","BalanceValue")},m(m,b){de(m,t,b),M(t,r),M(t,i),M(t,o),de(m,u,b),d&&d.m(m,b),de(m,s,b),f||(l=pt(t,"click",e[25]),f=!0)},p(m,b){b[0]&8&&n!==(n=(m[3].Total?m[5](m[3].Total[0].amount):"0")+"")&&He(r,n),m[2]?d?d.p(m,b):(d=An(m),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null)},d(m){m&&(he(t),he(u),he(s)),d&&d.d(m),f=!1,l()}}}function Mo(e){let t,n=e[4]("Loading")+"",r;return{c(){t=G("p"),r=Ee(n)},m(i,o){de(i,t,o),M(t,r)},p(i,o){o[0]&16&&n!==(n=i[4]("Loading")+"")&&He(r,n)},d(i){i&&he(t)}}}function An(e){let t,n,r,i,o,u,s=e[4]("Title")+"",f,l,d,m,b,_,B=e[4]("DepositButton")+"",I,j,W,U=mt(Object.keys(e[3])),w=[];for(let A=0;A<U.length;A+=1)w[A]=Hn(Sn(e,U,A));return{c(){t=G("div"),n=G("button"),r=xe(),i=G("div"),o=G("div"),u=G("p"),f=Ee(s),l=xe(),d=G("div");for(let A=0;A<w.length;A+=1)w[A].c();m=xe(),b=G("div"),_=G("button"),I=Ee(B),z(n,"class","BalanceModalClose"),z(u,"class","BalanceModalTitle"),z(o,"class","BalanceModalHeader"),z(d,"class","BalanceModalBody"),z(_,"class","BalanceModalAction"),z(b,"class","BalanceModalFooter"),z(i,"class","BalanceModal"),z(t,"class","BalanceModalWrapper")},m(A,P){de(A,t,P),M(t,n),M(t,r),M(t,i),M(i,o),M(o,u),M(u,f),M(i,l),M(i,d);for(let L=0;L<w.length;L+=1)w[L]&&w[L].m(d,null);M(i,m),M(i,b),M(b,_),M(_,I),j||(W=[pt(n,"click",e[26]),pt(_,"click",e[27])],j=!0)},p(A,P){if(P[0]&16&&s!==(s=A[4]("Title")+"")&&He(f,s),P[0]&184){U=mt(Object.keys(A[3]));let L;for(L=0;L<U.length;L+=1){const Y=Sn(A,U,L);w[L]?w[L].p(Y,P):(w[L]=Hn(Y),w[L].c(),w[L].m(d,null))}for(;L<w.length;L+=1)w[L].d(1);w.length=U.length}P[0]&16&&B!==(B=A[4]("DepositButton")+"")&&He(I,B)},d(A){A&&he(t),Mn(w,A),j=!1,$e(W)}}}function Cn(e){let t,n,r=e[4](e[51])+"",i,o,u=e[7](e[54])+"",s,f,l,d,m=e[5](e[54].amount)+"",b;return{c(){t=G("div"),n=G("p"),i=Ee(r),o=xe(),s=Ee(u),f=xe(),l=G("p"),d=G("span"),b=Ee(m),z(n,"class","BalanceModalText"),z(d,"class","BalanceModalAmount"),z(l,"class","BalanceModalValue"),z(t,"class","BalanceModalRowLine")},m(_,B){de(_,t,B),M(t,n),M(n,i),M(n,o),M(n,s),M(t,f),M(t,l),M(l,d),M(d,b)},p(_,B){B[0]&24&&r!==(r=_[4](_[51])+"")&&He(i,r),B[0]&8&&u!==(u=_[7](_[54])+"")&&He(s,u),B[0]&8&&m!==(m=_[5](_[54].amount)+"")&&He(b,m)},d(_){_&&he(t)}}}function Hn(e){let t,n,r=mt(e[3][e[51]]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Cn(wn(e,r,o));return{c(){t=G("div");for(let o=0;o<i.length;o+=1)i[o].c();n=xe(),z(t,"class","BalanceModalRowBoth")},m(o,u){de(o,t,u);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(t,null);M(t,n)},p(o,u){if(u[0]&184){r=mt(o[3][o[51]]);let s;for(s=0;s<r.length;s+=1){const f=wn(o,r,s);i[s]?i[s].p(f,u):(i[s]=Cn(f),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(o){o&&he(t),Mn(i,o)}}}function On(e){let t,n,r;return{c(){t=G("button"),z(t,"class","ShowBalanceModalOverlay")},m(i,o){de(i,t,o),n||(r=pt(t,"click",e[28]),n=!0)},p:ae,d(i){i&&he(t),n=!1,r()}}}function Po(e){let t,n,r;function i(f,l){return f[1]?Mo:No}let o=i(e),u=o(e),s=e[2]&&On(e);return{c(){t=G("div"),n=G("div"),u.c(),r=xe(),s&&s.c(),z(n,"class","ShowBalance")},m(f,l){de(f,t,l),M(t,n),u.m(n,null),M(t,r),s&&s.m(t,null),e[29](t)},p(f,l){o===(o=i(f))&&u?u.p(f,l):(u.d(1),u=o(f),u&&(u.c(),u.m(n,null))),f[2]?s?s.p(f,l):(s=On(f),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},i:ae,o:ae,d(f){f&&he(t),u.d(),s&&s.d(),e[29](null)}}}function Io(e,t,n){let r;mr(e,Ho,a=>n(4,r=a));let{userid:i=""}=t,{session:o=""}=t,{endpoint:u=""}=t,{lang:s="en"}=t,{mbsource:f}=t,{clientstyling:l=""}=t,{clientstylingurl:d=""}=t,{translationurl:m=""}=t,{gmversion:b="gm16"}=t,{displaybalanceoption:_="All"}=t,{totalcalculationmode:B="totalCashAmount"}=t,{hideproducttype:I}=t,{currencylocale:j="en"}=t,{currencydisplay:W="symbol"}=t,{maximumfractiondigits:U="2"}=t,{minimumfractiondigits:w="0"}=t,{customdisplayformat:A=""}=t,P,L=!0,Y=!1,_e=!1,pe,re="",se=[],ie;const x={},me=["totalCashAmount","totalRealAmount"],it=()=>{fetch(m).then(a=>a.json()).then(a=>Object.keys(a).forEach(p=>Tn(p,a[p]))).catch(a=>console.log(a))};Object.keys(Bn).forEach(a=>Tn(a,Bn[a]));const ze=a=>{if(A)return ce(a);const p=j||s,h={style:"currency",currency:re,useGrouping:!0,currencyDisplay:W||"code",maximumFractionDigits:U===""||isNaN(Number(U))?2:Number(U),minimumFractionDigits:w===""||isNaN(Number(w))?0:Number(w)};return new Intl.NumberFormat(p,h).format(a)},ce=a=>{const p=[];let h="";for(const g of A)switch(g){default:h+=g;break;case"{":h&&p.push(h),h="";break;case"}":const[y,E]=h.split("|");if(h="",y.toLowerCase()==="currency")h=re;else if(y.toLowerCase()==="amount"){let v=",",T=".",C=2;E&&(E[0]!==" "&&(v=E[0]),E[1]!==" "&&(T=E[1]),E[2]!==" "&&!isNaN(Number(E[2]))&&(C=Number(E[2])));let[R,S]=String(Math.floor(a*Rt(10,C))/Rt(10,C)).split(".");h+=R[0];for(let N=1;N<R.length;++N)(R.length-N)%3===0?h+=v+R[N]:h+=R[N];S&&(h+=T+S)}h&&p.push(h),h="";break}return p.push(h),p.join("")},Te=()=>Pt(this,null,function*(){var p,h,g;n(1,L=!0);const a=new URL(`${u}/v1/player/${i}/account`);try{const y=yield fetch(a,{method:"GET",headers:{"X-SessionID":o}}),E=yield y.json();if(y.ok)se=E.items,re=(p=se.find(v=>v.displayName==="Casino"))==null?void 0:p.currency,n(3,x.Total=[{amount:E.totalAmount[re]}],x),n(3,x.Real=[{amount:(h=se.find(v=>v.displayName==="Casino"))==null?void 0:h.balanceAmount}],x),n(3,x.Bonus=[{amount:(g=se.find(v=>v.displayName==="UBS"))==null?void 0:g.balanceAmount}],x);else throw new Error("Failed to fetch balance data !")}catch(y){console.log("Balance error: ",y)}finally{n(1,L=!1)}}),we=()=>{n(1,L=!0);const a=new URL(`${u}/v2/player/${i}/balance`),p=new Headers;p.append("X-SessionID",o),fetch(a,{method:"GET",headers:p}).then(g=>g.json()).then(g=>{g[B]||n(8,B=me[0]);const y=g.items.find(v=>v.type==="Real"&&v.walletAccountType==="Ordinary");if(re=y.currency,_e=!!y.productType,n(3,x.Total=[{amount:0}],x),n(3,x.Real=[],x),n(3,x.Bonus=[],x),n(3,x.Credit=[],x),!_e){ie={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(3,x.Total[0].amount=g[B][re],x);for(const v of g.items)switch(v.type){case"Bonus":x.Bonus.length===0?x.Bonus.push({amount:v.amount}):n(3,x.Bonus[0].amount+=v.amount,x);break;case"Real":if(v.creditLine&&x.Credit.length===0&&x.Credit.push({amount:v.creditLine}),B==="totalRealAmount")continue;x.Real.length===0?x.Real.push({amount:v.amount}):n(3,x.Real[0].amount+=v.amount,x);break}for(const[v,T]of Object.entries(x))T.length<1&&delete x[v];n(1,L=!1);return}ie={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let E=g.items;_&&_!=="All"&&(E=g.items.filter(v=>v.productType===_));for(const v of E){let T;switch(v.type){case"Bonus":T=x.Bonus.findIndex(C=>C.productType===v.productType),T>0?n(3,x.Bonus[T].amount+=v.amount,x):x.Bonus.push({amount:v.amount,productType:v.productType});break;case"Real":v.creditLine&&x.Credit.push({amount:v.creditLine,productType:v.productType}),T=x.Real.findIndex(C=>C.productType===v.productType),T>0?n(3,x.Real[T].amount+=v.amount,x):x.Real.push({amount:v.amount,productType:v.productType});break}}ot();for(const[v,T]of Object.entries(x))T.length<1&&delete x[v];n(1,L=!1)}).catch(()=>{throw n(1,L=!1),new Error("Failed to fetch balance data !")})},Ae=()=>{if(pe&&pe.close(),o.length<1)return;let a,p;switch(b){case"gm16":a=new URL(`${u}/v2/player/${i}/information/updates`),p=y=>Bt(y);break;case"gmcore":a=new URL(`${u}/v1/player/${i}/balance/updates`),p=y=>We(y);break}const h={accept:"text/event-stream","X-SessionId":o},g=new Lo.EventSourcePolyfill(a,{headers:h});pe=g,g.addEventListener("message",p)},ue=a=>{let p;try{p=JSON.parse(a)}catch(h){console.log("Balance stream failed: ",h);return}return p},We=a=>{var y,E;const p=ue(a.data);if(!p){Ae();return}let h="0";const g=p.balanceChange;se=se.map(v=>(g&&g[v.id]&&(v=Mt(Nt({},v),{balanceAmount:g[v.id].afterAmount})),h=(parseFloat(v==null?void 0:v.balanceAmount)+parseFloat(h)).toString(),v)),n(3,x.Real=[{amount:(y=se[0])==null?void 0:y.balanceAmount}],x),n(3,x.Bonus=[{amount:(E=se[1])==null?void 0:E.balanceAmount}],x),n(3,x.Total=[{amount:Number(h)}],x)},Le=(a,p,h)=>{let g=null;switch(h.walletAccountType){case"Ordinary":(h.afterAmount!==h.affectedAmount||p.lastOrdinaryAfterAmount===0)&&(p.lastOrdinaryAfterAmount=h.afterAmount,p.showCreditLineAfterAmount||(g=h.afterAmount));break;case"CreditLine":h.afterAmount!==0?(g=h.afterAmount,p.showCreditLineAfterAmount=!0):(g=p.lastOrdinaryAfterAmount,p.showCreditLineAfterAmount=!1);break;default:g=h.afterAmount}return g===null?a:g},ot=()=>{switch(B){case"totalCashAmount":let a=0;for(const h of["Real","Bonus"])for(const g of x[h])a+=Math.max(g.amount,0);n(3,x.Total[0].amount=a,x);break;case"totalRealAmount":if(!_e)return;let p=0;for(const h of x.Real)p+=h.amount;n(3,x.Total[0].amount=p,x)}},Bt=a=>{const p=ue(a.data);if(!p){Ae();return}if(St(p==null?void 0:p.type)||p.type!=="BALANCE_UPDATE_V2")return;const h=p.body.balanceChange;for(const[g,y]of Object.entries(h))if(B==="totalRealAmount"&&g==="Real"&&!_e&&n(3,x.Total[0].amount=Le(x.Total[0].amount,ie,y),x),!!x[g])for(const E of x[g]){if(!_e){E.amount=g==="Real"?Le(E.amount,ie,y):y.afterAmount;continue}y.productType===E.productType&&(E.amount=g==="Real"?Le(E.amount,ie[E.productType],y):y.afterAmount)}ot()},at=()=>{n(2,Y=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&&gtag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},St=a=>a==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,Ze=()=>{me.includes(B)||(console.error(`Unsupported value ('${B}') for totalcalculationmode parameter. Only the following values are supported ${me}. Using default value ('${me[0]}').`),n(8,B=me[0]))},qe=a=>{const p=I.split(",").map(h=>h.trim());return!a.productType||p.includes(a.productType)?"":r(a.productType)},Be=()=>{switch(Oo(s),Ze(),b){case"gmcore":Te();break;case"gm16":we();break;default:throw Error(`Invalid apiversion attribute: ${b}`)}},K=a=>a.data&&a.data.type==="LogoutSuccessfull"&&pe.close();Tr(()=>(window.addEventListener("message",K,!1),()=>{window.removeEventListener("message",K),pe&&pe.close()}));const wt=()=>n(2,Y=!0),At=()=>n(2,Y=!1),Ct=()=>at(),st=()=>n(2,Y=!1);function c(a){kt[a?"unshift":"push"](()=>{P=a,n(0,P)})}return e.$$set=a=>{"userid"in a&&n(9,i=a.userid),"session"in a&&n(10,o=a.session),"endpoint"in a&&n(11,u=a.endpoint),"lang"in a&&n(12,s=a.lang),"mbsource"in a&&n(13,f=a.mbsource),"clientstyling"in a&&n(14,l=a.clientstyling),"clientstylingurl"in a&&n(15,d=a.clientstylingurl),"translationurl"in a&&n(16,m=a.translationurl),"gmversion"in a&&n(17,b=a.gmversion),"displaybalanceoption"in a&&n(18,_=a.displaybalanceoption),"totalcalculationmode"in a&&n(8,B=a.totalcalculationmode),"hideproducttype"in a&&n(19,I=a.hideproducttype),"currencylocale"in a&&n(20,j=a.currencylocale),"currencydisplay"in a&&n(21,W=a.currencydisplay),"maximumfractiondigits"in a&&n(22,U=a.maximumfractiondigits),"minimumfractiondigits"in a&&n(23,w=a.minimumfractiondigits),"customdisplayformat"in a&&n(24,A=a.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&400896&&u&&i&&o&&s&&b&&_&&Be(),e.$$.dirty[0]&134656&&u&&i&&o&&b&&Ae(),e.$$.dirty[0]&16385&&l&&P&&Dr(P,l),e.$$.dirty[0]&32769&&d&&P&&Fr(P,d),e.$$.dirty[0]&8193&&P&&Ur(P,`${f}.Style`),e.$$.dirty[0]&65536&&m&&it()},[P,L,Y,x,r,ze,at,qe,B,i,o,u,s,f,l,d,m,b,_,I,j,W,U,w,A,wt,At,Ct,st,c]}class ar extends Pr{constructor(t){super(),Nr(this,t,Io,Po,Rn,{userid:9,session:10,endpoint:11,lang:12,mbsource:13,clientstyling:14,clientstylingurl:15,translationurl:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,hideproducttype:19,currencylocale:20,currencydisplay:21,maximumfractiondigits:22,minimumfractiondigits:23,customdisplayformat:24},Ro,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(t){this.$$set({userid:t}),k()}get session(){return this.$$.ctx[10]}set session(t){this.$$set({session:t}),k()}get endpoint(){return this.$$.ctx[11]}set endpoint(t){this.$$set({endpoint:t}),k()}get lang(){return this.$$.ctx[12]}set lang(t){this.$$set({lang:t}),k()}get mbsource(){return this.$$.ctx[13]}set mbsource(t){this.$$set({mbsource:t}),k()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),k()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),k()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),k()}get gmversion(){return this.$$.ctx[17]}set gmversion(t){this.$$set({gmversion:t}),k()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),k()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),k()}get hideproducttype(){return this.$$.ctx[19]}set hideproducttype(t){this.$$set({hideproducttype:t}),k()}get currencylocale(){return this.$$.ctx[20]}set currencylocale(t){this.$$set({currencylocale:t}),k()}get currencydisplay(){return this.$$.ctx[21]}set currencydisplay(t){this.$$set({currencydisplay:t}),k()}get maximumfractiondigits(){return this.$$.ctx[22]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),k()}get minimumfractiondigits(){return this.$$.ctx[23]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),k()}get customdisplayformat(){return this.$$.ctx[24]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),k()}}Mr(ar,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},hideproducttype:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=ar;
9
+ `,Re+=ve):ye==="id"?ut=ve:ye==="event"?be=ve:ye==="retry"?(y=Ze(ve,y),T=y):ye==="heartbeatTimeout"&&(E=Ze(ve,E),Z!==0&&(i(Z),Z=r(function(){Je()},E)))}if(q===ue){if(Re!==""){v=ut,be===""&&(be="message");var Ne=new x(be,{data:Re.slice(1),lastEventId:ut});if(c.dispatchEvent(Ne),be==="open"?Be(c,c.onopen,Ne):be==="message"?Be(c,c.onmessage,Ne):be==="error"&&Be(c,c.onerror,Ne),le===we)return}Re="",be=""}q=ne===13?Ae:ue}else q===ue&&(Ht=X,q=We),q===We?ne===58&&(Ce=X+1,q=Le):q===Le&&(q=ot)}}},an=function(V){if(le===Te||le===ce){le=ze,Z!==0&&(i(Z),Z=0),Z=r(function(){Je()},T),T=qe(Math.min(y*16,T*2)),c.readyState=ce;var $=new it("error",{error:V});c.dispatchEvent($),Be(c,c.onerror,$),V!=null&&console.error(V)}},Ot=function(){le=we,ee!=null&&(ee.abort(),ee=void 0),Z!==0&&(i(Z),Z=0),c.readyState=we},Je=function(){if(Z=0,le!==ze){if(!C&&ee!=null)an(new Error("No activity within "+E+" milliseconds. "+(le===ce?"No response received.":R+" chars received.")+" Reconnecting.")),ee!=null&&(ee.abort(),ee=void 0);else{var V=Math.max((C||Date.now())+E-Date.now(),1);C=!1,Z=r(function(){Je()},V)}return}C=!1,R=0,Z=r(function(){Je()},E),le=ce,Re="",be="",ut=v,lt="",Ht=0,Ce=0,q=ue;var $=a;if(a.slice(0,5)!=="data:"&&a.slice(0,5)!=="blob:"&&v!==""){var te=a.indexOf("?");$=te===-1?a:a.slice(0,te+1)+a.slice(te+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(ve,Ne){return Ne===g?"":ve}),$+=(a.indexOf("?")===-1?"?":"&")+g+"="+encodeURIComponent(v)}var ne=c.withCredentials,Q={};Q.Accept="text/event-stream";var X=c.headers;if(X!=null)for(var ye in X)Object.prototype.hasOwnProperty.call(X,ye)&&(Q[ye]=X[ye]);try{ee=Qe.open(ge,sr,ur,an,$,ne,Q)}catch(ve){throw Ot(),ve}};c.url=a,c.readyState=ce,c.withCredentials=h,c.headers=S,c._close=Ot,Je()}K.prototype=Object.create(re.prototype),K.prototype.CONNECTING=ce,K.prototype.OPEN=Te,K.prototype.CLOSED=we,K.prototype.close=function(){this._close()},K.CONNECTING=ce,K.OPEN=Te,K.CLOSED=we,K.prototype.withCredentials=void 0;var st=f;o!=null&&(f==null||!("withCredentials"in f.prototype))&&(st=K),function(c){{var a=c(t);a!==void 0&&(e.exports=a)}}(function(c){c.EventSourcePolyfill=K,c.NativeEventSource=f,c.EventSource=st})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:jr:globalThis)})(tn,tn.exports);var Lo=tn.exports;function Ro(e){gr(e,"svelte-gv6dm2",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}')}function Sn(e,t,n){const r=e.slice();return r[51]=t[n],r}function wn(e,t,n){const r=e.slice();return r[54]=t[n],r}function No(e){let t,n=(e[3].Total?e[5](e[3].Total[0].amount):"0")+"",r,i,o,u,s,f,l,d=e[2]&&An(e);return{c(){t=G("button"),r=Ee(n),i=xe(),o=G("span"),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>',u=xe(),d&&d.c(),s=vr(),z(t,"class","BalanceValue")},m(m,b){de(m,t,b),M(t,r),M(t,i),M(t,o),de(m,u,b),d&&d.m(m,b),de(m,s,b),f||(l=pt(t,"click",e[25]),f=!0)},p(m,b){b[0]&8&&n!==(n=(m[3].Total?m[5](m[3].Total[0].amount):"0")+"")&&He(r,n),m[2]?d?d.p(m,b):(d=An(m),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null)},d(m){m&&(he(t),he(u),he(s)),d&&d.d(m),f=!1,l()}}}function Mo(e){let t,n=e[4]("Loading")+"",r;return{c(){t=G("p"),r=Ee(n)},m(i,o){de(i,t,o),M(t,r)},p(i,o){o[0]&16&&n!==(n=i[4]("Loading")+"")&&He(r,n)},d(i){i&&he(t)}}}function An(e){let t,n,r,i,o,u,s=e[4]("Title")+"",f,l,d,m,b,_,B=e[4]("DepositButton")+"",I,j,W,U=mt(Object.keys(e[3])),w=[];for(let A=0;A<U.length;A+=1)w[A]=Hn(Sn(e,U,A));return{c(){t=G("div"),n=G("button"),r=xe(),i=G("div"),o=G("div"),u=G("p"),f=Ee(s),l=xe(),d=G("div");for(let A=0;A<w.length;A+=1)w[A].c();m=xe(),b=G("div"),_=G("button"),I=Ee(B),z(n,"class","BalanceModalClose"),z(u,"class","BalanceModalTitle"),z(o,"class","BalanceModalHeader"),z(d,"class","BalanceModalBody"),z(_,"class","BalanceModalAction"),z(b,"class","BalanceModalFooter"),z(i,"class","BalanceModal"),z(t,"class","BalanceModalWrapper")},m(A,P){de(A,t,P),M(t,n),M(t,r),M(t,i),M(i,o),M(o,u),M(u,f),M(i,l),M(i,d);for(let L=0;L<w.length;L+=1)w[L]&&w[L].m(d,null);M(i,m),M(i,b),M(b,_),M(_,I),j||(W=[pt(n,"click",e[26]),pt(_,"click",e[27])],j=!0)},p(A,P){if(P[0]&16&&s!==(s=A[4]("Title")+"")&&He(f,s),P[0]&184){U=mt(Object.keys(A[3]));let L;for(L=0;L<U.length;L+=1){const Y=Sn(A,U,L);w[L]?w[L].p(Y,P):(w[L]=Hn(Y),w[L].c(),w[L].m(d,null))}for(;L<w.length;L+=1)w[L].d(1);w.length=U.length}P[0]&16&&B!==(B=A[4]("DepositButton")+"")&&He(I,B)},d(A){A&&he(t),Mn(w,A),j=!1,$e(W)}}}function Cn(e){let t,n,r=e[4](e[51])+"",i,o,u=e[7](e[54])+"",s,f,l,d,m=e[5](e[54].amount)+"",b;return{c(){t=G("div"),n=G("p"),i=Ee(r),o=xe(),s=Ee(u),f=xe(),l=G("p"),d=G("span"),b=Ee(m),z(n,"class","BalanceModalText"),z(d,"class","BalanceModalAmount"),z(l,"class","BalanceModalValue"),z(t,"class","BalanceModalRowLine")},m(_,B){de(_,t,B),M(t,n),M(n,i),M(n,o),M(n,s),M(t,f),M(t,l),M(l,d),M(d,b)},p(_,B){B[0]&24&&r!==(r=_[4](_[51])+"")&&He(i,r),B[0]&8&&u!==(u=_[7](_[54])+"")&&He(s,u),B[0]&8&&m!==(m=_[5](_[54].amount)+"")&&He(b,m)},d(_){_&&he(t)}}}function Hn(e){let t,n,r=mt(e[3][e[51]]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Cn(wn(e,r,o));return{c(){t=G("div");for(let o=0;o<i.length;o+=1)i[o].c();n=xe(),z(t,"class","BalanceModalRowBoth")},m(o,u){de(o,t,u);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(t,null);M(t,n)},p(o,u){if(u[0]&184){r=mt(o[3][o[51]]);let s;for(s=0;s<r.length;s+=1){const f=wn(o,r,s);i[s]?i[s].p(f,u):(i[s]=Cn(f),i[s].c(),i[s].m(t,n))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(o){o&&he(t),Mn(i,o)}}}function On(e){let t,n,r;return{c(){t=G("button"),z(t,"class","ShowBalanceModalOverlay")},m(i,o){de(i,t,o),n||(r=pt(t,"click",e[28]),n=!0)},p:ae,d(i){i&&he(t),n=!1,r()}}}function Po(e){let t,n,r;function i(f,l){return f[1]?Mo:No}let o=i(e),u=o(e),s=e[2]&&On(e);return{c(){t=G("div"),n=G("div"),u.c(),r=xe(),s&&s.c(),z(n,"class","ShowBalance")},m(f,l){de(f,t,l),M(t,n),u.m(n,null),M(t,r),s&&s.m(t,null),e[29](t)},p(f,l){o===(o=i(f))&&u?u.p(f,l):(u.d(1),u=o(f),u&&(u.c(),u.m(n,null))),f[2]?s?s.p(f,l):(s=On(f),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},i:ae,o:ae,d(f){f&&he(t),u.d(),s&&s.d(),e[29](null)}}}function Io(e,t,n){let r;mr(e,Ho,a=>n(4,r=a));let{userid:i=""}=t,{session:o=""}=t,{endpoint:u=""}=t,{lang:s="en"}=t,{mbsource:f=""}=t,{clientstyling:l=""}=t,{clientstylingurl:d=""}=t,{translationurl:m=""}=t,{gmversion:b="gm16"}=t,{displaybalanceoption:_="All"}=t,{totalcalculationmode:B="totalCashAmount"}=t,{hideproducttype:I=""}=t,{currencylocale:j="en"}=t,{currencydisplay:W="symbol"}=t,{maximumfractiondigits:U="2"}=t,{minimumfractiondigits:w="0"}=t,{customdisplayformat:A=""}=t,P,L=!0,Y=!1,_e=!1,pe,re="",se=[],ie;const x={},me=["totalCashAmount","totalRealAmount"],it=()=>{fetch(m).then(a=>a.json()).then(a=>Object.keys(a).forEach(p=>Tn(p,a[p]))).catch(a=>console.log(a))};Object.keys(Bn).forEach(a=>Tn(a,Bn[a]));const ze=a=>{if(A)return ce(a);const p=j||s,h={style:"currency",currency:re,useGrouping:!0,currencyDisplay:W||"code",maximumFractionDigits:U===""||isNaN(Number(U))?2:Number(U),minimumFractionDigits:w===""||isNaN(Number(w))?0:Number(w)};return new Intl.NumberFormat(p,h).format(a)},ce=a=>{const p=[];let h="";for(const g of A)switch(g){default:h+=g;break;case"{":h&&p.push(h),h="";break;case"}":const[y,E]=h.split("|");if(h="",y.toLowerCase()==="currency")h=re;else if(y.toLowerCase()==="amount"){let v=",",T=".",C=2;E&&(E[0]!==" "&&(v=E[0]),E[1]!==" "&&(T=E[1]),E[2]!==" "&&!isNaN(Number(E[2]))&&(C=Number(E[2])));let[R,S]=String(Math.floor(a*Rt(10,C))/Rt(10,C)).split(".");h+=R[0];for(let N=1;N<R.length;++N)(R.length-N)%3===0?h+=v+R[N]:h+=R[N];S&&(h+=T+S)}h&&p.push(h),h="";break}return p.push(h),p.join("")},Te=()=>Pt(this,null,function*(){var p,h,g;n(1,L=!0);const a=new URL(`${u}/v1/player/${i}/account`);try{const y=yield fetch(a,{method:"GET",headers:{"X-SessionID":o}}),E=yield y.json();if(y.ok)se=E.items,re=(p=se.find(v=>v.displayName==="Casino"))==null?void 0:p.currency,n(3,x.Total=[{amount:E.totalAmount[re]}],x),n(3,x.Real=[{amount:(h=se.find(v=>v.displayName==="Casino"))==null?void 0:h.balanceAmount}],x),n(3,x.Bonus=[{amount:(g=se.find(v=>v.displayName==="UBS"))==null?void 0:g.balanceAmount}],x);else throw new Error("Failed to fetch balance data !")}catch(y){console.log("Balance error: ",y)}finally{n(1,L=!1)}}),we=()=>{n(1,L=!0);const a=new URL(`${u}/v2/player/${i}/balance`),p=new Headers;p.append("X-SessionID",o),fetch(a,{method:"GET",headers:p}).then(g=>g.json()).then(g=>{g[B]||n(8,B=me[0]);const y=g.items.find(v=>v.type==="Real"&&v.walletAccountType==="Ordinary");if(re=y.currency,_e=!!y.productType,n(3,x.Total=[{amount:0}],x),n(3,x.Real=[],x),n(3,x.Bonus=[],x),n(3,x.Credit=[],x),!_e){ie={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(3,x.Total[0].amount=g[B][re],x);for(const v of g.items)switch(v.type){case"Bonus":x.Bonus.length===0?x.Bonus.push({amount:v.amount}):n(3,x.Bonus[0].amount+=v.amount,x);break;case"Real":if(v.creditLine&&x.Credit.length===0&&x.Credit.push({amount:v.creditLine}),B==="totalRealAmount")continue;x.Real.length===0?x.Real.push({amount:v.amount}):n(3,x.Real[0].amount+=v.amount,x);break}for(const[v,T]of Object.entries(x))T.length<1&&delete x[v];n(1,L=!1);return}ie={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let E=g.items;_&&_!=="All"&&(E=g.items.filter(v=>v.productType===_));for(const v of E){let T;switch(v.type){case"Bonus":T=x.Bonus.findIndex(C=>C.productType===v.productType),T>0?n(3,x.Bonus[T].amount+=v.amount,x):x.Bonus.push({amount:v.amount,productType:v.productType});break;case"Real":v.creditLine&&x.Credit.push({amount:v.creditLine,productType:v.productType}),T=x.Real.findIndex(C=>C.productType===v.productType),T>0?n(3,x.Real[T].amount+=v.amount,x):x.Real.push({amount:v.amount,productType:v.productType});break}}ot();for(const[v,T]of Object.entries(x))T.length<1&&delete x[v];window.postMessage({type:"playerBalanceInfo",balance:g},window.location.href),n(1,L=!1)}).catch(()=>{throw n(1,L=!1),new Error("Failed to fetch balance data !")})},Ae=()=>{if(pe&&pe.close(),o.length<1)return;let a,p;switch(b){case"gm16":a=new URL(`${u}/v2/player/${i}/information/updates`),p=y=>Bt(y);break;case"gmcore":a=new URL(`${u}/v1/player/${i}/balance/updates`),p=y=>We(y);break}const h={accept:"text/event-stream","X-SessionId":o},g=new Lo.EventSourcePolyfill(a,{headers:h});pe=g,g.addEventListener("message",p)},ue=a=>{let p;try{p=JSON.parse(a)}catch(h){console.log("Balance stream failed: ",h);return}return p},We=a=>{var y,E;const p=ue(a.data);if(!p){Ae();return}let h="0";const g=p.balanceChange;se=se.map(v=>(g&&g[v.id]&&(v=Mt(Nt({},v),{balanceAmount:g[v.id].afterAmount})),h=(parseFloat(v==null?void 0:v.balanceAmount)+parseFloat(h)).toString(),v)),n(3,x.Real=[{amount:(y=se[0])==null?void 0:y.balanceAmount}],x),n(3,x.Bonus=[{amount:(E=se[1])==null?void 0:E.balanceAmount}],x),n(3,x.Total=[{amount:Number(h)}],x)},Le=(a,p,h)=>{let g=null;switch(h.walletAccountType){case"Ordinary":(h.afterAmount!==h.affectedAmount||p.lastOrdinaryAfterAmount===0)&&(p.lastOrdinaryAfterAmount=h.afterAmount,p.showCreditLineAfterAmount||(g=h.afterAmount));break;case"CreditLine":h.afterAmount!==0?(g=h.afterAmount,p.showCreditLineAfterAmount=!0):(g=p.lastOrdinaryAfterAmount,p.showCreditLineAfterAmount=!1);break;default:g=h.afterAmount}return g===null?a:g},ot=()=>{switch(B){case"totalCashAmount":let a=0;for(const h of["Real","Bonus"])for(const g of x[h])a+=Math.max(g.amount,0);n(3,x.Total[0].amount=a,x);break;case"totalRealAmount":if(!_e)return;let p=0;for(const h of x.Real)p+=h.amount;n(3,x.Total[0].amount=p,x)}},Bt=a=>{const p=ue(a.data);if(!p){Ae();return}if(St(p==null?void 0:p.type)||p.type!=="BALANCE_UPDATE_V2")return;const h=p.body.balanceChange;for(const[g,y]of Object.entries(h))if(B==="totalRealAmount"&&g==="Real"&&!_e&&n(3,x.Total[0].amount=Le(x.Total[0].amount,ie,y),x),!!x[g])for(const E of x[g]){if(!_e){E.amount=g==="Real"?Le(E.amount,ie,y):y.afterAmount;continue}y.productType===E.productType&&(E.amount=g==="Real"?Le(E.amount,ie[E.productType],y):y.afterAmount)}ot()},at=()=>{n(2,Y=!1),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&&gtag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},St=a=>a==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,Ze=()=>{me.includes(B)||(console.error(`Unsupported value ('${B}') for totalcalculationmode parameter. Only the following values are supported ${me}. Using default value ('${me[0]}').`),n(8,B=me[0]))},qe=a=>{const p=I.split(",").map(h=>h.trim());return!a.productType||p.includes(a.productType)?"":r(a.productType)},Be=()=>{switch(Oo(s),Ze(),b){case"gmcore":Te();break;case"gm16":we();break;default:throw Error(`Invalid apiversion attribute: ${b}`)}},K=a=>a.data&&a.data.type==="LogoutSuccessfull"&&pe.close();Tr(()=>(window.addEventListener("message",K,!1),()=>{window.removeEventListener("message",K),pe&&pe.close()}));const wt=()=>n(2,Y=!0),At=()=>n(2,Y=!1),Ct=()=>at(),st=()=>n(2,Y=!1);function c(a){kt[a?"unshift":"push"](()=>{P=a,n(0,P)})}return e.$$set=a=>{"userid"in a&&n(9,i=a.userid),"session"in a&&n(10,o=a.session),"endpoint"in a&&n(11,u=a.endpoint),"lang"in a&&n(12,s=a.lang),"mbsource"in a&&n(13,f=a.mbsource),"clientstyling"in a&&n(14,l=a.clientstyling),"clientstylingurl"in a&&n(15,d=a.clientstylingurl),"translationurl"in a&&n(16,m=a.translationurl),"gmversion"in a&&n(17,b=a.gmversion),"displaybalanceoption"in a&&n(18,_=a.displaybalanceoption),"totalcalculationmode"in a&&n(8,B=a.totalcalculationmode),"hideproducttype"in a&&n(19,I=a.hideproducttype),"currencylocale"in a&&n(20,j=a.currencylocale),"currencydisplay"in a&&n(21,W=a.currencydisplay),"maximumfractiondigits"in a&&n(22,U=a.maximumfractiondigits),"minimumfractiondigits"in a&&n(23,w=a.minimumfractiondigits),"customdisplayformat"in a&&n(24,A=a.customdisplayformat)},e.$$.update=()=>{e.$$.dirty[0]&400896&&u&&i&&o&&s&&b&&_&&Be(),e.$$.dirty[0]&134656&&u&&i&&o&&b&&Ae(),e.$$.dirty[0]&16385&&l&&P&&Dr(P,l),e.$$.dirty[0]&32769&&d&&P&&Fr(P,d),e.$$.dirty[0]&8193&&P&&Ur(P,`${f}.Style`),e.$$.dirty[0]&65536&&m&&it()},[P,L,Y,x,r,ze,at,qe,B,i,o,u,s,f,l,d,m,b,_,I,j,W,U,w,A,wt,At,Ct,st,c]}class ar extends Pr{constructor(t){super(),Nr(this,t,Io,Po,Rn,{userid:9,session:10,endpoint:11,lang:12,mbsource:13,clientstyling:14,clientstylingurl:15,translationurl:16,gmversion:17,displaybalanceoption:18,totalcalculationmode:8,hideproducttype:19,currencylocale:20,currencydisplay:21,maximumfractiondigits:22,minimumfractiondigits:23,customdisplayformat:24},Ro,[-1,-1])}get userid(){return this.$$.ctx[9]}set userid(t){this.$$set({userid:t}),k()}get session(){return this.$$.ctx[10]}set session(t){this.$$set({session:t}),k()}get endpoint(){return this.$$.ctx[11]}set endpoint(t){this.$$set({endpoint:t}),k()}get lang(){return this.$$.ctx[12]}set lang(t){this.$$set({lang:t}),k()}get mbsource(){return this.$$.ctx[13]}set mbsource(t){this.$$set({mbsource:t}),k()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),k()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),k()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),k()}get gmversion(){return this.$$.ctx[17]}set gmversion(t){this.$$set({gmversion:t}),k()}get displaybalanceoption(){return this.$$.ctx[18]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),k()}get totalcalculationmode(){return this.$$.ctx[8]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),k()}get hideproducttype(){return this.$$.ctx[19]}set hideproducttype(t){this.$$set({hideproducttype:t}),k()}get currencylocale(){return this.$$.ctx[20]}set currencylocale(t){this.$$set({currencylocale:t}),k()}get currencydisplay(){return this.$$.ctx[21]}set currencydisplay(t){this.$$set({currencydisplay:t}),k()}get maximumfractiondigits(){return this.$$.ctx[22]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),k()}get minimumfractiondigits(){return this.$$.ctx[23]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),k()}get customdisplayformat(){return this.$$.ctx[24]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),k()}}Mr(ar,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},hideproducttype:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=ar;
@@ -208,13 +208,13 @@ function Er(e, t, n, r, i, o, l = null, s = [-1]) {
208
208
  };
209
209
  l && l(c.root);
210
210
  let d = !1;
211
- if (c.ctx = n ? n(e, t.props || {}, (m, b, ..._) => {
211
+ if (c.ctx = n ? n(e, t.props || {}, (g, b, ..._) => {
212
212
  const B = _.length ? _[0] : b;
213
- return c.ctx && i(c.ctx[m], c.ctx[m] = B) && (!c.skip_bound && c.bound[m] && c.bound[m](B), d && vr(e, m)), b;
213
+ return c.ctx && i(c.ctx[g], c.ctx[g] = B) && (!c.skip_bound && c.bound[g] && c.bound[g](B), d && vr(e, g)), b;
214
214
  }) : [], c.update(), d = !0, je(c.before_update), c.fragment = r ? r(c.ctx) : !1, t.target) {
215
215
  if (t.hydrate) {
216
- const m = sr(t.target);
217
- c.fragment && c.fragment.l(m), m.forEach(le);
216
+ const g = sr(t.target);
217
+ c.fragment && c.fragment.l(g), g.forEach(le);
218
218
  } else
219
219
  c.fragment && c.fragment.c();
220
220
  t.intro && gr(e.$$.fragment), br(e, t.target, t.anchor), $();
@@ -506,13 +506,13 @@ function ke(e, t, n) {
506
506
  return Ar(n, (l, s) => {
507
507
  let p = !1;
508
508
  const c = [];
509
- let d = 0, m = oe;
509
+ let d = 0, g = oe;
510
510
  const b = () => {
511
511
  if (d)
512
512
  return;
513
- m();
513
+ g();
514
514
  const B = t(r ? c[0] : c, l, s);
515
- o ? l(B) : m = Qt(B) ? B : oe;
515
+ o ? l(B) : g = Qt(B) ? B : oe;
516
516
  }, _ = i.map(
517
517
  (B, I) => wn(
518
518
  B,
@@ -525,7 +525,7 @@ function ke(e, t, n) {
525
525
  )
526
526
  );
527
527
  return p = !0, b(), function() {
528
- je(_), m(), p = !1;
528
+ je(_), g(), p = !1;
529
529
  };
530
530
  });
531
531
  }
@@ -862,8 +862,8 @@ function ii(e) {
862
862
  if (l.length === 0)
863
863
  throw new Error("Invalid number skeleton");
864
864
  for (var s = l[0], p = l.slice(1), c = 0, d = p; c < d.length; c++) {
865
- var m = d[c];
866
- if (m.length === 0)
865
+ var g = d[c];
866
+ if (g.length === 0)
867
867
  throw new Error("Invalid number skeleton");
868
868
  }
869
869
  n.push({ stem: s, options: p });
@@ -1024,11 +1024,11 @@ function ui(e) {
1024
1024
  case "integer-width":
1025
1025
  if (i.options.length > 1)
1026
1026
  throw new RangeError("integer-width stems only accept a single optional option");
1027
- i.options[0].replace(ai, function(p, c, d, m, b, _) {
1027
+ i.options[0].replace(ai, function(p, c, d, g, b, _) {
1028
1028
  if (c)
1029
1029
  t.minimumIntegerDigits = d.length;
1030
1030
  else {
1031
- if (m && b)
1031
+ if (g && b)
1032
1032
  throw new Error("We currently do not support maximum integer digits");
1033
1033
  if (_)
1034
1034
  throw new Error("We currently do not support exact integer digits");
@@ -1044,8 +1044,8 @@ function ui(e) {
1044
1044
  if (on.test(i.stem)) {
1045
1045
  if (i.options.length > 1)
1046
1046
  throw new RangeError("Fraction-precision stems only accept a single optional option");
1047
- i.stem.replace(on, function(p, c, d, m, b, _) {
1048
- return d === "*" ? t.minimumFractionDigits = c.length : m && m[0] === "#" ? t.maximumFractionDigits = m.length : b && _ ? (t.minimumFractionDigits = b.length, t.maximumFractionDigits = b.length + _.length) : (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length), "";
1047
+ i.stem.replace(on, function(p, c, d, g, b, _) {
1048
+ return d === "*" ? t.minimumFractionDigits = c.length : g && g[0] === "#" ? t.maximumFractionDigits = g.length : b && _ ? (t.minimumFractionDigits = b.length, t.maximumFractionDigits = b.length + _.length) : (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length), "";
1049
1049
  });
1050
1050
  var o = i.options[0];
1051
1051
  o === "w" ? t = F(F({}, t), { trailingZeroDisplay: "stripIfInteger" }) : o && (t = F(F({}, t), an(o)));
@@ -2814,10 +2814,10 @@ var Bi = (
2814
2814
  var c = null;
2815
2815
  if (this.bumpIf(",")) {
2816
2816
  this.bumpSpace();
2817
- var d = this.clonePosition(), m = this.parseSimpleArgStyleIfPossible();
2818
- if (m.err)
2819
- return m;
2820
- var b = Ti(m.val);
2817
+ var d = this.clonePosition(), g = this.parseSimpleArgStyleIfPossible();
2818
+ if (g.err)
2819
+ return g;
2820
+ var b = Ti(g.val);
2821
2821
  if (b.length === 0)
2822
2822
  return this.error(H.EXPECT_ARGUMENT_STYLE, O(this.clonePosition(), this.clonePosition()));
2823
2823
  var _ = O(d, this.clonePosition());
@@ -2830,9 +2830,9 @@ var Bi = (
2830
2830
  if (c && un(c?.style, "::", 0)) {
2831
2831
  var j = _i(c.style.slice(2));
2832
2832
  if (s === "number") {
2833
- var m = this.parseNumberSkeletonFromString(j, c.styleLocation);
2834
- return m.err ? m : {
2835
- val: { type: D.number, value: r, location: I, style: m.val },
2833
+ var g = this.parseNumberSkeletonFromString(j, c.styleLocation);
2834
+ return g.err ? g : {
2835
+ val: { type: D.number, value: r, location: I, style: g.val },
2836
2836
  err: null
2837
2837
  };
2838
2838
  } else {
@@ -2874,10 +2874,10 @@ var Bi = (
2874
2874
  if (!this.bumpIf(":"))
2875
2875
  return this.error(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, O(this.clonePosition(), this.clonePosition()));
2876
2876
  this.bumpSpace();
2877
- var m = this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, H.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2878
- if (m.err)
2879
- return m;
2880
- this.bumpSpace(), A = this.parseIdentifierIfPossible(), P = m.val;
2877
+ var g = this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, H.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2878
+ if (g.err)
2879
+ return g;
2880
+ this.bumpSpace(), A = this.parseIdentifierIfPossible(), P = g.val;
2881
2881
  }
2882
2882
  var L = this.tryParsePluralOrSelectOptions(t, s, n, A);
2883
2883
  if (L.err)
@@ -2965,12 +2965,12 @@ var Bi = (
2965
2965
  }, e.prototype.tryParsePluralOrSelectOptions = function(t, n, r, i) {
2966
2966
  for (var o, l = !1, s = [], p = /* @__PURE__ */ new Set(), c = i.value, d = i.location; ; ) {
2967
2967
  if (c.length === 0) {
2968
- var m = this.clonePosition();
2968
+ var g = this.clonePosition();
2969
2969
  if (n !== "select" && this.bumpIf("=")) {
2970
2970
  var b = this.tryParseDecimalInteger(H.EXPECT_PLURAL_ARGUMENT_SELECTOR, H.INVALID_PLURAL_ARGUMENT_SELECTOR);
2971
2971
  if (b.err)
2972
2972
  return b;
2973
- d = O(m, this.clonePosition()), c = this.message.slice(m.offset, this.offset());
2973
+ d = O(g, this.clonePosition()), c = this.message.slice(g.offset, this.offset());
2974
2974
  } else
2975
2975
  break;
2976
2976
  }
@@ -3185,10 +3185,10 @@ function ct(e, t, n, r, i, o, l) {
3185
3185
  });
3186
3186
  continue;
3187
3187
  }
3188
- var m = d.value;
3189
- if (!(i && m in i))
3190
- throw new Oi(m, l);
3191
- var b = i[m];
3188
+ var g = d.value;
3189
+ if (!(i && g in i))
3190
+ throw new Oi(g, l);
3191
+ var b = i[g];
3192
3192
  if (Kr(d)) {
3193
3193
  (!b || typeof b == "string" || typeof b == "number") && (b = typeof b == "string" || typeof b == "number" ? String(b) : ""), s.push({
3194
3194
  type: typeof b == "string" ? J.literal : J.object,
@@ -3329,8 +3329,8 @@ var Ii = (
3329
3329
  var c = o.formatToParts(p);
3330
3330
  if (c.length === 1)
3331
3331
  return c[0].value;
3332
- var d = c.reduce(function(m, b) {
3333
- return !m.length || b.type !== J.literal || typeof m[m.length - 1] != "string" ? m.push(b.value) : m[m.length - 1] += b.value, m;
3332
+ var d = c.reduce(function(g, b) {
3333
+ return !g.length || b.type !== J.literal || typeof g[g.length - 1] != "string" ? g.push(b.value) : g[g.length - 1] += b.value, g;
3334
3334
  }, []);
3335
3335
  return d.length <= 1 ? d[0] || "" : d;
3336
3336
  }, this.formatToParts = function(p) {
@@ -3712,16 +3712,16 @@ const tt = (e, t) => {
3712
3712
  ), d;
3713
3713
  if (!s)
3714
3714
  return d;
3715
- let m = d;
3715
+ let g = d;
3716
3716
  try {
3717
- m = lo(d, p).format(s);
3717
+ g = lo(d, p).format(s);
3718
3718
  } catch (b) {
3719
3719
  b instanceof Error && console.warn(
3720
3720
  `[svelte-i18n] Message "${e}" has syntax error:`,
3721
3721
  b.message
3722
3722
  );
3723
3723
  }
3724
- return m;
3724
+ return g;
3725
3725
  }, co = (e, t) => uo(t).format(e), fo = (e, t) => so(t).format(e), po = (e, t) => ao(t).format(e), mo = (e, t = He()) => zn(e, t), go = ke([$e, nt], () => ho);
3726
3726
  ke([$e], () => co);
3727
3727
  ke([$e], () => fo);
@@ -3941,7 +3941,7 @@ var qt = { exports: {} };
3941
3941
  */
3942
3942
  (function(e, t) {
3943
3943
  (function(n) {
3944
- var r = n.setTimeout, i = n.clearTimeout, o = n.XMLHttpRequest, l = n.XDomainRequest, s = n.ActiveXObject, p = n.EventSource, c = n.document, d = n.Promise, m = n.fetch, b = n.Response, _ = n.TextDecoder, B = n.TextEncoder, I = n.AbortController;
3944
+ var r = n.setTimeout, i = n.clearTimeout, o = n.XMLHttpRequest, l = n.XDomainRequest, s = n.ActiveXObject, p = n.EventSource, c = n.document, d = n.Promise, g = n.fetch, b = n.Response, _ = n.TextDecoder, B = n.TextEncoder, I = n.AbortController;
3945
3945
  if (typeof window < "u" && typeof c < "u" && !("readyState" in c) && c.body == null && (c.readyState = "loading", window.addEventListener("load", function(h) {
3946
3946
  c.readyState = "complete";
3947
3947
  }, !1)), o == null && s != null && (o = function() {
@@ -3953,18 +3953,18 @@ var qt = { exports: {} };
3953
3953
  }), Date.now || (Date.now = function() {
3954
3954
  return (/* @__PURE__ */ new Date()).getTime();
3955
3955
  }), I == null) {
3956
- var j = m;
3957
- m = function(h, a) {
3956
+ var j = g;
3957
+ g = function(h, a) {
3958
3958
  var f = a.signal;
3959
3959
  return j(h, { headers: a.headers, credentials: a.credentials, cache: a.cache }).then(function(u) {
3960
- var g = u.body.getReader();
3961
- return f._reader = g, f._aborted && f._reader.cancel(), {
3960
+ var m = u.body.getReader();
3961
+ return f._reader = m, f._aborted && f._reader.cancel(), {
3962
3962
  status: u.status,
3963
3963
  statusText: u.statusText,
3964
3964
  headers: u.headers,
3965
3965
  body: {
3966
3966
  getReader: function() {
3967
- return g;
3967
+ return m;
3968
3968
  }
3969
3969
  }
3970
3970
  };
@@ -4000,11 +4000,11 @@ var qt = { exports: {} };
4000
4000
  return 3;
4001
4001
  throw new Error();
4002
4002
  }
4003
- for (var u = 65533, g = "", y = this.bitsNeeded, E = this.codePoint, x = 0; x < h.length; x += 1) {
4003
+ for (var u = 65533, m = "", y = this.bitsNeeded, E = this.codePoint, x = 0; x < h.length; x += 1) {
4004
4004
  var T = h[x];
4005
- y !== 0 && (T < 128 || T > 191 || !a(E << 6 | T & 63, y - 6, f(y, E))) && (y = 0, E = u, g += String.fromCharCode(E)), y === 0 ? (T >= 0 && T <= 127 ? (y = 0, E = T) : T >= 192 && T <= 223 ? (y = 6 * 1, E = T & 31) : T >= 224 && T <= 239 ? (y = 6 * 2, E = T & 15) : T >= 240 && T <= 247 ? (y = 6 * 3, E = T & 7) : (y = 0, E = u), y !== 0 && !a(E, y, f(y, E)) && (y = 0, E = u)) : (y -= 6, E = E << 6 | T & 63), y === 0 && (E <= 65535 ? g += String.fromCharCode(E) : (g += String.fromCharCode(55296 + (E - 65535 - 1 >> 10)), g += String.fromCharCode(56320 + (E - 65535 - 1 & 1023))));
4005
+ y !== 0 && (T < 128 || T > 191 || !a(E << 6 | T & 63, y - 6, f(y, E))) && (y = 0, E = u, m += String.fromCharCode(E)), y === 0 ? (T >= 0 && T <= 127 ? (y = 0, E = T) : T >= 192 && T <= 223 ? (y = 6 * 1, E = T & 31) : T >= 224 && T <= 239 ? (y = 6 * 2, E = T & 15) : T >= 240 && T <= 247 ? (y = 6 * 3, E = T & 7) : (y = 0, E = u), y !== 0 && !a(E, y, f(y, E)) && (y = 0, E = u)) : (y -= 6, E = E << 6 | T & 63), y === 0 && (E <= 65535 ? m += String.fromCharCode(E) : (m += String.fromCharCode(55296 + (E - 65535 - 1 >> 10)), m += String.fromCharCode(56320 + (E - 65535 - 1 & 1023))));
4006
4006
  }
4007
- return this.bitsNeeded = y, this.codePoint = E, g;
4007
+ return this.bitsNeeded = y, this.codePoint = E, m;
4008
4008
  };
4009
4009
  var U = function() {
4010
4010
  try {
@@ -4022,12 +4022,12 @@ var qt = { exports: {} };
4022
4022
  }
4023
4023
  A.prototype.open = function(h, a) {
4024
4024
  this._abort(!0);
4025
- var f = this, u = this._xhr, g = 1, y = 0;
4025
+ var f = this, u = this._xhr, m = 1, y = 0;
4026
4026
  this._abort = function(S) {
4027
- f._sendTimeout !== 0 && (i(f._sendTimeout), f._sendTimeout = 0), (g === 1 || g === 2 || g === 3) && (g = 4, u.onload = w, u.onerror = w, u.onabort = w, u.onprogress = w, u.onreadystatechange = w, u.abort(), y !== 0 && (i(y), y = 0), S || (f.readyState = 4, f.onabort(null), f.onreadystatechange())), g = 0;
4027
+ f._sendTimeout !== 0 && (i(f._sendTimeout), f._sendTimeout = 0), (m === 1 || m === 2 || m === 3) && (m = 4, u.onload = w, u.onerror = w, u.onabort = w, u.onprogress = w, u.onreadystatechange = w, u.abort(), y !== 0 && (i(y), y = 0), S || (f.readyState = 4, f.onabort(null), f.onreadystatechange())), m = 0;
4028
4028
  };
4029
4029
  var E = function() {
4030
- if (g === 1) {
4030
+ if (m === 1) {
4031
4031
  var S = 0, N = "", me = void 0;
4032
4032
  if ("contentType" in u)
4033
4033
  S = 200, N = "OK", me = u.contentType;
@@ -4037,11 +4037,11 @@ var qt = { exports: {} };
4037
4037
  } catch {
4038
4038
  S = 0, N = "", me = void 0;
4039
4039
  }
4040
- S !== 0 && (g = 2, f.readyState = 2, f.status = S, f.statusText = N, f._contentType = me, f.onreadystatechange());
4040
+ S !== 0 && (m = 2, f.readyState = 2, f.status = S, f.statusText = N, f._contentType = me, f.onreadystatechange());
4041
4041
  }
4042
4042
  }, x = function() {
4043
- if (E(), g === 2 || g === 3) {
4044
- g = 3;
4043
+ if (E(), m === 2 || m === 3) {
4044
+ m = 3;
4045
4045
  var S = "";
4046
4046
  try {
4047
4047
  S = u.responseText;
@@ -4052,8 +4052,8 @@ var qt = { exports: {} };
4052
4052
  }, T = function(S, N) {
4053
4053
  if ((N == null || N.preventDefault == null) && (N = {
4054
4054
  preventDefault: w
4055
- }), x(), g === 1 || g === 2 || g === 3) {
4056
- if (g = 4, y !== 0 && (i(y), y = 0), f.readyState = 4, S === "load")
4055
+ }), x(), m === 1 || m === 2 || m === 3) {
4056
+ if (m = 4, y !== 0 && (i(y), y = 0), f.readyState = 4, S === "load")
4057
4057
  f.onload(N);
4058
4058
  else if (S === "error")
4059
4059
  f.onerror(N);
@@ -4114,7 +4114,7 @@ var qt = { exports: {} };
4114
4114
  function L(h) {
4115
4115
  for (var a = /* @__PURE__ */ Object.create(null), f = h.split(`\r
4116
4116
  `), u = 0; u < f.length; u += 1) {
4117
- var g = f[u], y = g.split(": "), E = y.shift(), x = y.join(": ");
4117
+ var m = f[u], y = m.split(": "), E = y.shift(), x = y.join(": ");
4118
4118
  a[P(E)] = x;
4119
4119
  }
4120
4120
  this._map = a;
@@ -4124,8 +4124,8 @@ var qt = { exports: {} };
4124
4124
  }, o != null && o.HEADERS_RECEIVED == null && (o.HEADERS_RECEIVED = 2);
4125
4125
  function Y() {
4126
4126
  }
4127
- Y.prototype.open = function(h, a, f, u, g, y, E) {
4128
- h.open("GET", g);
4127
+ Y.prototype.open = function(h, a, f, u, m, y, E) {
4128
+ h.open("GET", m);
4129
4129
  var x = 0;
4130
4130
  h.onprogress = function() {
4131
4131
  var C = h.responseText, R = C.slice(x);
@@ -4154,9 +4154,9 @@ var qt = { exports: {} };
4154
4154
  };
4155
4155
  function de() {
4156
4156
  }
4157
- de.prototype.open = function(h, a, f, u, g, y, E) {
4157
+ de.prototype.open = function(h, a, f, u, m, y, E) {
4158
4158
  var x = null, T = new I(), C = T.signal, R = new _();
4159
- return m(g, {
4159
+ return g(m, {
4160
4160
  headers: E,
4161
4161
  credentials: y ? "include" : "same-origin",
4162
4162
  signal: C,
@@ -4201,9 +4201,9 @@ var qt = { exports: {} };
4201
4201
  var a = this._listeners[h.type];
4202
4202
  if (a != null)
4203
4203
  for (var f = a.length, u = 0; u < f; u += 1) {
4204
- var g = a[u];
4204
+ var m = a[u];
4205
4205
  try {
4206
- typeof g.handleEvent == "function" ? g.handleEvent(h) : g.call(this, h);
4206
+ typeof m.handleEvent == "function" ? m.handleEvent(h) : m.call(this, h);
4207
4207
  } catch (y) {
4208
4208
  ae(y);
4209
4209
  }
@@ -4212,16 +4212,16 @@ var qt = { exports: {} };
4212
4212
  h = String(h);
4213
4213
  var f = this._listeners, u = f[h];
4214
4214
  u == null && (u = [], f[h] = u);
4215
- for (var g = !1, y = 0; y < u.length; y += 1)
4216
- u[y] === a && (g = !0);
4217
- g || u.push(a);
4215
+ for (var m = !1, y = 0; y < u.length; y += 1)
4216
+ u[y] === a && (m = !0);
4217
+ m || u.push(a);
4218
4218
  }, re.prototype.removeEventListener = function(h, a) {
4219
4219
  h = String(h);
4220
4220
  var f = this._listeners, u = f[h];
4221
4221
  if (u != null) {
4222
- for (var g = [], y = 0; y < u.length; y += 1)
4223
- u[y] !== a && g.push(u[y]);
4224
- g.length === 0 ? delete f[h] : f[h] = g;
4222
+ for (var m = [], y = 0; y < u.length; y += 1)
4223
+ u[y] !== a && m.push(u[y]);
4224
+ m.length === 0 ? delete f[h] : f[h] = m;
4225
4225
  }
4226
4226
  };
4227
4227
  function ie(h) {
@@ -4257,10 +4257,10 @@ var qt = { exports: {} };
4257
4257
  function St() {
4258
4258
  return o != null && "withCredentials" in o.prototype || l == null ? new o() : new l();
4259
4259
  }
4260
- var wt = m != null && b != null && "body" in b.prototype;
4260
+ var wt = g != null && b != null && "body" in b.prototype;
4261
4261
  function At(h, a, f) {
4262
4262
  a = String(a);
4263
- var u = !!f.withCredentials, g = f.lastEventIdQueryParameterName || "lastEventId", y = Ze(1e3), E = We(f.heartbeatTimeout, 45e3), x = "", T = y, C = !1, R = 0, S = f.headers || {}, N = f.Transport, me = wt && N == null ? void 0 : new A(N != null ? new N() : St()), qe = N != null && typeof N != "string" ? new N() : me == null ? new de() : new Y(), ee = void 0, Z = 0, ue = Xe, Le = "", st = "", ge = "", ut = "", q = se, Ct = 0, Ae = 0, Kn = function(V, k, te, ne) {
4263
+ var u = !!f.withCredentials, m = f.lastEventIdQueryParameterName || "lastEventId", y = Ze(1e3), E = We(f.heartbeatTimeout, 45e3), x = "", T = y, C = !1, R = 0, S = f.headers || {}, N = f.Transport, me = wt && N == null ? void 0 : new A(N != null ? new N() : St()), qe = N != null && typeof N != "string" ? new N() : me == null ? new de() : new Y(), ee = void 0, Z = 0, ue = Xe, Le = "", st = "", ge = "", ut = "", q = se, Ct = 0, Ae = 0, Kn = function(V, k, te, ne) {
4264
4264
  if (ue === he)
4265
4265
  if (V === 200 && te != null && Tt.test(te)) {
4266
4266
  ue = _e, C = Date.now(), T = y, h.readyState = _e;
@@ -4347,8 +4347,8 @@ var qt = { exports: {} };
4347
4347
  if (a.slice(0, 5) !== "data:" && a.slice(0, 5) !== "blob:" && x !== "") {
4348
4348
  var te = a.indexOf("?");
4349
4349
  k = te === -1 ? a : a.slice(0, te + 1) + a.slice(te + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(ye, Re) {
4350
- return Re === g ? "" : ye;
4351
- }), k += (a.indexOf("?") === -1 ? "?" : "&") + g + "=" + encodeURIComponent(x);
4350
+ return Re === m ? "" : ye;
4351
+ }), k += (a.indexOf("?") === -1 ? "?" : "&") + m + "=" + encodeURIComponent(x);
4352
4352
  }
4353
4353
  var ne = h.withCredentials, Q = {};
4354
4354
  Q.Accept = "text/event-stream";
@@ -4408,28 +4408,28 @@ function Eo(e) {
4408
4408
  c() {
4409
4409
  t = G("button"), r = ve(n), i = Ee(), o = G("span"), o.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>', l = Ee(), d && d.c(), s = ar(), z(t, "class", "BalanceValue");
4410
4410
  },
4411
- m(m, b) {
4412
- fe(m, t, b), M(t, r), M(t, i), M(t, o), fe(m, l, b), d && d.m(m, b), fe(m, s, b), p || (c = dt(
4411
+ m(g, b) {
4412
+ fe(g, t, b), M(t, r), M(t, i), M(t, o), fe(g, l, b), d && d.m(g, b), fe(g, s, b), p || (c = dt(
4413
4413
  t,
4414
4414
  "click",
4415
4415
  /*click_handler*/
4416
4416
  e[25]
4417
4417
  ), p = !0);
4418
4418
  },
4419
- p(m, b) {
4419
+ p(g, b) {
4420
4420
  b[0] & /*balances*/
4421
4421
  8 && n !== (n = /*balances*/
4422
- (m[3].Total ? (
4422
+ (g[3].Total ? (
4423
4423
  /*formatBalance*/
4424
- m[5](
4424
+ g[5](
4425
4425
  /*balances*/
4426
- m[3].Total[0].amount
4426
+ g[3].Total[0].amount
4427
4427
  )
4428
4428
  ) : "0") + "") && Ce(r, n), /*isModalDisplayed*/
4429
- m[2] ? d ? d.p(m, b) : (d = En(m), d.c(), d.m(s.parentNode, s)) : d && (d.d(1), d = null);
4429
+ g[2] ? d ? d.p(g, b) : (d = En(g), d.c(), d.m(s.parentNode, s)) : d && (d.d(1), d = null);
4430
4430
  },
4431
- d(m) {
4432
- m && (le(t), le(l), le(s)), d && d.d(m), p = !1, c();
4431
+ d(g) {
4432
+ g && (le(t), le(l), le(s)), d && d.d(g), p = !1, c();
4433
4433
  }
4434
4434
  };
4435
4435
  }
@@ -4459,7 +4459,7 @@ function En(e) {
4459
4459
  let t, n, r, i, o, l, s = (
4460
4460
  /*$_*/
4461
4461
  e[4]("Title") + ""
4462
- ), p, c, d, m, b, _, B = (
4462
+ ), p, c, d, g, b, _, B = (
4463
4463
  /*$_*/
4464
4464
  e[4]("DepositButton") + ""
4465
4465
  ), I, j, W, U = pt(Object.keys(
@@ -4473,13 +4473,13 @@ function En(e) {
4473
4473
  t = G("div"), n = G("button"), r = Ee(), i = G("div"), o = G("div"), l = G("p"), p = ve(s), c = Ee(), d = G("div");
4474
4474
  for (let A = 0; A < w.length; A += 1)
4475
4475
  w[A].c();
4476
- m = Ee(), b = G("div"), _ = G("button"), I = ve(B), z(n, "class", "BalanceModalClose"), z(l, "class", "BalanceModalTitle"), z(o, "class", "BalanceModalHeader"), z(d, "class", "BalanceModalBody"), z(_, "class", "BalanceModalAction"), z(b, "class", "BalanceModalFooter"), z(i, "class", "BalanceModal"), z(t, "class", "BalanceModalWrapper");
4476
+ g = Ee(), b = G("div"), _ = G("button"), I = ve(B), z(n, "class", "BalanceModalClose"), z(l, "class", "BalanceModalTitle"), z(o, "class", "BalanceModalHeader"), z(d, "class", "BalanceModalBody"), z(_, "class", "BalanceModalAction"), z(b, "class", "BalanceModalFooter"), z(i, "class", "BalanceModal"), z(t, "class", "BalanceModalWrapper");
4477
4477
  },
4478
4478
  m(A, P) {
4479
4479
  fe(A, t, P), M(t, n), M(t, r), M(t, i), M(i, o), M(o, l), M(l, p), M(i, c), M(i, d);
4480
4480
  for (let L = 0; L < w.length; L += 1)
4481
4481
  w[L] && w[L].m(d, null);
4482
- M(i, m), M(i, b), M(b, _), M(_, I), j || (W = [
4482
+ M(i, g), M(i, b), M(b, _), M(_, I), j || (W = [
4483
4483
  dt(
4484
4484
  n,
4485
4485
  "click",
@@ -4534,7 +4534,7 @@ function xn(e) {
4534
4534
  /*balance*/
4535
4535
  e[54]
4536
4536
  ) + ""
4537
- ), s, p, c, d, m = (
4537
+ ), s, p, c, d, g = (
4538
4538
  /*formatBalance*/
4539
4539
  e[5](
4540
4540
  /*balance*/
@@ -4543,7 +4543,7 @@ function xn(e) {
4543
4543
  ), b;
4544
4544
  return {
4545
4545
  c() {
4546
- t = G("div"), n = G("p"), i = ve(r), o = Ee(), s = ve(l), p = Ee(), c = G("p"), d = G("span"), b = ve(m), z(n, "class", "BalanceModalText"), z(d, "class", "BalanceModalAmount"), z(c, "class", "BalanceModalValue"), z(t, "class", "BalanceModalRowLine");
4546
+ t = G("div"), n = G("p"), i = ve(r), o = Ee(), s = ve(l), p = Ee(), c = G("p"), d = G("span"), b = ve(g), z(n, "class", "BalanceModalText"), z(d, "class", "BalanceModalAmount"), z(c, "class", "BalanceModalValue"), z(t, "class", "BalanceModalRowLine");
4547
4547
  },
4548
4548
  m(_, B) {
4549
4549
  fe(_, t, B), M(t, n), M(n, i), M(n, o), M(n, s), M(t, p), M(t, c), M(c, d), M(d, b);
@@ -4560,11 +4560,11 @@ function xn(e) {
4560
4560
  /*balance*/
4561
4561
  _[54]
4562
4562
  ) + "") && Ce(s, l), B[0] & /*balances*/
4563
- 8 && m !== (m = /*formatBalance*/
4563
+ 8 && g !== (g = /*formatBalance*/
4564
4564
  _[5](
4565
4565
  /*balance*/
4566
4566
  _[54].amount
4567
- ) + "") && Ce(b, m);
4567
+ ) + "") && Ce(b, g);
4568
4568
  },
4569
4569
  d(_) {
4570
4570
  _ && le(t);
@@ -4672,9 +4672,9 @@ function _o(e) {
4672
4672
  function To(e, t, n) {
4673
4673
  let r;
4674
4674
  nr(e, go, (a) => n(4, r = a));
4675
- let { userid: i = "" } = t, { session: o = "" } = t, { endpoint: l = "" } = t, { lang: s = "en" } = t, { mbsource: p } = t, { clientstyling: c = "" } = t, { clientstylingurl: d = "" } = t, { translationurl: m = "" } = t, { gmversion: b = "gm16" } = t, { displaybalanceoption: _ = "All" } = t, { totalcalculationmode: B = "totalCashAmount" } = t, { hideproducttype: I } = t, { currencylocale: j = "en" } = t, { currencydisplay: W = "symbol" } = t, { maximumfractiondigits: U = "2" } = t, { minimumfractiondigits: w = "0" } = t, { customdisplayformat: A = "" } = t, P, L = !0, Y = !1, xe = !1, de, re = "", ae = [], ie;
4675
+ let { userid: i = "" } = t, { session: o = "" } = t, { endpoint: l = "" } = t, { lang: s = "en" } = t, { mbsource: p = "" } = t, { clientstyling: c = "" } = t, { clientstylingurl: d = "" } = t, { translationurl: g = "" } = t, { gmversion: b = "gm16" } = t, { displaybalanceoption: _ = "All" } = t, { totalcalculationmode: B = "totalCashAmount" } = t, { hideproducttype: I = "" } = t, { currencylocale: j = "en" } = t, { currencydisplay: W = "symbol" } = t, { maximumfractiondigits: U = "2" } = t, { minimumfractiondigits: w = "0" } = t, { customdisplayformat: A = "" } = t, P, L = !0, Y = !1, xe = !1, de, re = "", ae = [], ie;
4676
4676
  const v = {}, pe = ["totalCashAmount", "totalRealAmount"], rt = () => {
4677
- fetch(m).then((a) => a.json()).then((a) => Object.keys(a).forEach((f) => gn(f, a[f]))).catch((a) => console.log(a));
4677
+ fetch(g).then((a) => a.json()).then((a) => Object.keys(a).forEach((f) => gn(f, a[f]))).catch((a) => console.log(a));
4678
4678
  };
4679
4679
  Object.keys(bn).forEach((a) => gn(a, bn[a]));
4680
4680
  const Xe = (a) => {
@@ -4692,10 +4692,10 @@ function To(e, t, n) {
4692
4692
  }, he = (a) => {
4693
4693
  const f = [];
4694
4694
  let u = "";
4695
- for (const g of A)
4696
- switch (g) {
4695
+ for (const m of A)
4696
+ switch (m) {
4697
4697
  default:
4698
- u += g;
4698
+ u += m;
4699
4699
  break;
4700
4700
  case "{":
4701
4701
  u && f.push(u), u = "";
@@ -4726,11 +4726,11 @@ function To(e, t, n) {
4726
4726
  headers: { "X-SessionID": o }
4727
4727
  }), u = await f.json();
4728
4728
  if (f.ok)
4729
- ae = u.items, re = ae.find((g) => g.displayName === "Casino")?.currency, n(3, v.Total = [{ amount: u.totalAmount[re] }], v), n(
4729
+ ae = u.items, re = ae.find((m) => m.displayName === "Casino")?.currency, n(3, v.Total = [{ amount: u.totalAmount[re] }], v), n(
4730
4730
  3,
4731
4731
  v.Real = [
4732
4732
  {
4733
- amount: ae.find((g) => g.displayName === "Casino")?.balanceAmount
4733
+ amount: ae.find((m) => m.displayName === "Casino")?.balanceAmount
4734
4734
  }
4735
4735
  ],
4736
4736
  v
@@ -4738,7 +4738,7 @@ function To(e, t, n) {
4738
4738
  3,
4739
4739
  v.Bonus = [
4740
4740
  {
4741
- amount: ae.find((g) => g.displayName === "UBS")?.balanceAmount
4741
+ amount: ae.find((m) => m.displayName === "UBS")?.balanceAmount
4742
4742
  }
4743
4743
  ],
4744
4744
  v
@@ -4753,15 +4753,15 @@ function To(e, t, n) {
4753
4753
  }, Se = () => {
4754
4754
  n(1, L = !0);
4755
4755
  const a = new URL(`${l}/v2/player/${i}/balance`), f = new Headers();
4756
- f.append("X-SessionID", o), fetch(a, { method: "GET", headers: f }).then((g) => g.json()).then((g) => {
4757
- g[B] || n(8, B = pe[0]);
4758
- const y = g.items.find((x) => x.type === "Real" && x.walletAccountType === "Ordinary");
4756
+ f.append("X-SessionID", o), fetch(a, { method: "GET", headers: f }).then((m) => m.json()).then((m) => {
4757
+ m[B] || n(8, B = pe[0]);
4758
+ const y = m.items.find((x) => x.type === "Real" && x.walletAccountType === "Ordinary");
4759
4759
  if (re = y.currency, xe = !!y.productType, n(3, v.Total = [{ amount: 0 }], v), n(3, v.Real = [], v), n(3, v.Bonus = [], v), n(3, v.Credit = [], v), !xe) {
4760
4760
  ie = {
4761
4761
  lastOrdinaryAfterAmount: 0,
4762
4762
  showCreditLineAfterAmount: !1
4763
- }, n(3, v.Total[0].amount = g[B][re], v);
4764
- for (const x of g.items)
4763
+ }, n(3, v.Total[0].amount = m[B][re], v);
4764
+ for (const x of m.items)
4765
4765
  switch (x.type) {
4766
4766
  case "Bonus":
4767
4767
  v.Bonus.length === 0 ? v.Bonus.push({ amount: x.amount }) : n(3, v.Bonus[0].amount += x.amount, v);
@@ -4787,8 +4787,8 @@ function To(e, t, n) {
4787
4787
  showCreditLineAfterAmount: !1
4788
4788
  }
4789
4789
  };
4790
- let E = g.items;
4791
- _ && _ !== "All" && (E = g.items.filter((x) => x.productType === _));
4790
+ let E = m.items;
4791
+ _ && _ !== "All" && (E = m.items.filter((x) => x.productType === _));
4792
4792
  for (const x of E) {
4793
4793
  let T;
4794
4794
  switch (x.type) {
@@ -4812,7 +4812,7 @@ function To(e, t, n) {
4812
4812
  it();
4813
4813
  for (const [x, T] of Object.entries(v))
4814
4814
  T.length < 1 && delete v[x];
4815
- n(1, L = !1);
4815
+ window.postMessage({ type: "playerBalanceInfo", balance: m }, window.location.href), n(1, L = !1);
4816
4816
  }).catch(() => {
4817
4817
  throw n(1, L = !1), new Error("Failed to fetch balance data !");
4818
4818
  });
@@ -4831,8 +4831,8 @@ function To(e, t, n) {
4831
4831
  const u = {
4832
4832
  accept: "text/event-stream",
4833
4833
  "X-SessionId": o
4834
- }, g = new yo.EventSourcePolyfill(a, { headers: u });
4835
- de = g, g.addEventListener("message", f);
4834
+ }, m = new yo.EventSourcePolyfill(a, { headers: u });
4835
+ de = m, m.addEventListener("message", f);
4836
4836
  }, se = (a) => {
4837
4837
  let f;
4838
4838
  try {
@@ -4849,31 +4849,31 @@ function To(e, t, n) {
4849
4849
  return;
4850
4850
  }
4851
4851
  let u = "0";
4852
- const g = f.balanceChange;
4853
- ae = ae.map((y) => (g && g[y.id] && (y = {
4852
+ const m = f.balanceChange;
4853
+ ae = ae.map((y) => (m && m[y.id] && (y = {
4854
4854
  ...y,
4855
- balanceAmount: g[y.id].afterAmount
4855
+ balanceAmount: m[y.id].afterAmount
4856
4856
  }), u = (parseFloat(y?.balanceAmount) + parseFloat(u)).toString(), y)), n(3, v.Real = [{ amount: ae[0]?.balanceAmount }], v), n(3, v.Bonus = [{ amount: ae[1]?.balanceAmount }], v), n(3, v.Total = [{ amount: Number(u) }], v);
4857
4857
  }, Oe = (a, f, u) => {
4858
- let g = null;
4858
+ let m = null;
4859
4859
  switch (u.walletAccountType) {
4860
4860
  case "Ordinary":
4861
- (u.afterAmount !== u.affectedAmount || f.lastOrdinaryAfterAmount === 0) && (f.lastOrdinaryAfterAmount = u.afterAmount, f.showCreditLineAfterAmount || (g = u.afterAmount));
4861
+ (u.afterAmount !== u.affectedAmount || f.lastOrdinaryAfterAmount === 0) && (f.lastOrdinaryAfterAmount = u.afterAmount, f.showCreditLineAfterAmount || (m = u.afterAmount));
4862
4862
  break;
4863
4863
  case "CreditLine":
4864
- u.afterAmount !== 0 ? (g = u.afterAmount, f.showCreditLineAfterAmount = !0) : (g = f.lastOrdinaryAfterAmount, f.showCreditLineAfterAmount = !1);
4864
+ u.afterAmount !== 0 ? (m = u.afterAmount, f.showCreditLineAfterAmount = !0) : (m = f.lastOrdinaryAfterAmount, f.showCreditLineAfterAmount = !1);
4865
4865
  break;
4866
4866
  default:
4867
- g = u.afterAmount;
4867
+ m = u.afterAmount;
4868
4868
  }
4869
- return g === null ? a : g;
4869
+ return m === null ? a : m;
4870
4870
  }, it = () => {
4871
4871
  switch (B) {
4872
4872
  case "totalCashAmount":
4873
4873
  let a = 0;
4874
4874
  for (const u of ["Real", "Bonus"])
4875
- for (const g of v[u])
4876
- a += Math.max(g.amount, 0);
4875
+ for (const m of v[u])
4876
+ a += Math.max(m.amount, 0);
4877
4877
  n(3, v.Total[0].amount = a, v);
4878
4878
  break;
4879
4879
  case "totalRealAmount":
@@ -4893,14 +4893,14 @@ function To(e, t, n) {
4893
4893
  if (Bt(f?.type) || f.type !== "BALANCE_UPDATE_V2")
4894
4894
  return;
4895
4895
  const u = f.body.balanceChange;
4896
- for (const [g, y] of Object.entries(u))
4897
- if (B === "totalRealAmount" && g === "Real" && !xe && n(3, v.Total[0].amount = Oe(v.Total[0].amount, ie, y), v), !!v[g])
4898
- for (const E of v[g]) {
4896
+ for (const [m, y] of Object.entries(u))
4897
+ if (B === "totalRealAmount" && m === "Real" && !xe && n(3, v.Total[0].amount = Oe(v.Total[0].amount, ie, y), v), !!v[m])
4898
+ for (const E of v[m]) {
4899
4899
  if (!xe) {
4900
- E.amount = g === "Real" ? Oe(E.amount, ie, y) : y.afterAmount;
4900
+ E.amount = m === "Real" ? Oe(E.amount, ie, y) : y.afterAmount;
4901
4901
  continue;
4902
4902
  }
4903
- y.productType === E.productType && (E.amount = g === "Real" ? Oe(E.amount, ie[E.productType], y) : y.afterAmount);
4903
+ y.productType === E.productType && (E.amount = m === "Real" ? Oe(E.amount, ie[E.productType], y) : y.afterAmount);
4904
4904
  }
4905
4905
  it();
4906
4906
  }, ot = () => {
@@ -4932,7 +4932,7 @@ function To(e, t, n) {
4932
4932
  });
4933
4933
  }
4934
4934
  return e.$$set = (a) => {
4935
- "userid" in a && n(9, i = a.userid), "session" in a && n(10, o = a.session), "endpoint" in a && n(11, l = a.endpoint), "lang" in a && n(12, s = a.lang), "mbsource" in a && n(13, p = a.mbsource), "clientstyling" in a && n(14, c = a.clientstyling), "clientstylingurl" in a && n(15, d = a.clientstylingurl), "translationurl" in a && n(16, m = a.translationurl), "gmversion" in a && n(17, b = a.gmversion), "displaybalanceoption" in a && n(18, _ = a.displaybalanceoption), "totalcalculationmode" in a && n(8, B = a.totalcalculationmode), "hideproducttype" in a && n(19, I = a.hideproducttype), "currencylocale" in a && n(20, j = a.currencylocale), "currencydisplay" in a && n(21, W = a.currencydisplay), "maximumfractiondigits" in a && n(22, U = a.maximumfractiondigits), "minimumfractiondigits" in a && n(23, w = a.minimumfractiondigits), "customdisplayformat" in a && n(24, A = a.customdisplayformat);
4935
+ "userid" in a && n(9, i = a.userid), "session" in a && n(10, o = a.session), "endpoint" in a && n(11, l = a.endpoint), "lang" in a && n(12, s = a.lang), "mbsource" in a && n(13, p = a.mbsource), "clientstyling" in a && n(14, c = a.clientstyling), "clientstylingurl" in a && n(15, d = a.clientstylingurl), "translationurl" in a && n(16, g = a.translationurl), "gmversion" in a && n(17, b = a.gmversion), "displaybalanceoption" in a && n(18, _ = a.displaybalanceoption), "totalcalculationmode" in a && n(8, B = a.totalcalculationmode), "hideproducttype" in a && n(19, I = a.hideproducttype), "currencylocale" in a && n(20, j = a.currencylocale), "currencydisplay" in a && n(21, W = a.currencydisplay), "maximumfractiondigits" in a && n(22, U = a.maximumfractiondigits), "minimumfractiondigits" in a && n(23, w = a.minimumfractiondigits), "customdisplayformat" in a && n(24, A = a.customdisplayformat);
4936
4936
  }, e.$$.update = () => {
4937
4937
  e.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
4938
4938
  400896 && l && i && o && s && b && _ && Te(), e.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
@@ -4940,7 +4940,7 @@ function To(e, t, n) {
4940
4940
  16385 && c && P && Br(P, c), e.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
4941
4941
  32769 && d && P && Sr(P, d), e.$$.dirty[0] & /*customStylingContainer, mbsource*/
4942
4942
  8193 && P && wr(P, `${p}.Style`), e.$$.dirty[0] & /*translationurl*/
4943
- 65536 && m && rt();
4943
+ 65536 && g && rt();
4944
4944
  }, [
4945
4945
  P,
4946
4946
  L,
@@ -4958,7 +4958,7 @@ function To(e, t, n) {
4958
4958
  p,
4959
4959
  c,
4960
4960
  d,
4961
- m,
4961
+ g,
4962
4962
  b,
4963
4963
  _,
4964
4964
  I,
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModal-CgaP1d3v.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal")&&customElements.define("player-account-balance-modal",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModal-BbFzfpCp.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal")&&customElements.define("player-account-balance-modal",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModal-C4-ftGlY.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModal-B-1-Nh2x.js").then(({ default: t }) => {
14
14
  !customElements.get("player-account-balance-modal") && customElements.define("player-account-balance-modal", t.element);
15
15
  });
16
16
  }
@@ -1,4 +1,4 @@
1
- import { P as a } from "../components/PlayerAccountBalanceModal-38mE_izq.js";
1
+ import { P as a } from "../components/PlayerAccountBalanceModal-CYi9RO2i.js";
2
2
  function s(t) {
3
3
  return function(...n) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-balance-modal",
3
- "version": "1.83.10",
3
+ "version": "1.83.11",
4
4
  "type": "module",
5
5
  "main": "es2015/player-account-balance-modal.cjs",
6
6
  "module": "esnext/player-account-balance-modal.js",