@everymatrix/casino-header-controller-nd 1.45.0 → 1.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ "use strict";var at=Object.defineProperty,rt=Object.defineProperties;var ot=Object.getOwnPropertyDescriptors;var He=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;var ze=(r,t,a)=>t in r?at(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,Ue=(r,t)=>{for(var a in t||(t={}))it.call(t,a)&&ze(r,a,t[a]);if(He)for(var a of He(t))lt.call(t,a)&&ze(r,a,t[a]);return r},Pe=(r,t)=>rt(r,ot(t));var Xe=(r,t,a)=>new Promise((l,f)=>{var d=w=>{try{h(a.next(w))}catch(B){f(B)}},v=w=>{try{h(a.throw(w))}catch(B){f(B)}},h=w=>w.done?l(w.value):Promise.resolve(w.value).then(d,v);h((a=a.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenuNd-BXEsfn-s.cjs");function Ge(r,t){e.addMessages(r,t)}function st(r){e.$locale.set(r)}const We={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",DepositButton:"Deposit"},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",DepositButton:"存款"},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",DepositButton:"Einzahlen"},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",DepositButton:"Deposita"},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",DepositButton:"Dépôt"},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito"},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",DepositButton:"Yatır"},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",DepositButton:"Депозит"},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",DepositButton:"Depozit"},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",DepositButton:"Depozit"},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",DepositButton:"Befizetés"},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",DepositButton:"Wpłać"},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar"},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",DepositButton:"Depozit"},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",DepositButton:"Depozit"},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",DepositButton:"Depositar"},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",DepositButton:"Depósito"}};var Ne={exports:{}};/** @license
2
+ * eventsource.js
3
+ * Available under MIT License (MIT)
4
+ * https://github.com/Yaffle/EventSource/
5
+ */(function(r,t){(function(a){var l=a.setTimeout,f=a.clearTimeout,d=a.XMLHttpRequest,v=a.XDomainRequest,h=a.ActiveXObject,w=a.EventSource,B=a.document,R=a.Promise,A=a.fetch,M=a.Response,j=a.TextDecoder,F=a.TextEncoder,H=a.AbortController;if(typeof window!="undefined"&&typeof B!="undefined"&&!("readyState"in B)&&B.body==null&&(B.readyState="loading",window.addEventListener("load",function(n){B.readyState="complete"},!1)),d==null&&h!=null&&(d=function(){return new h("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(n){function o(){}return o.prototype=n,new o}),Date.now||(Date.now=function(){return new Date().getTime()}),H==null){var x=A;A=function(n,o){var c=o.signal;return x(n,{headers:o.headers,credentials:o.credentials,cache:o.cache}).then(function(i){var g=i.body.getReader();return c._reader=g,c._aborted&&c._reader.cancel(),{status:i.status,statusText:i.statusText,headers:i.headers,body:{getReader:function(){return g}}}})},H=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function z(){this.bitsNeeded=0,this.codePoint=0}z.prototype.decode=function(n){function o(E,O,y){if(y===1)return E>=128>>O&&E<<O<=2047;if(y===2)return E>=2048>>O&&E<<O<=55295||E>=57344>>O&&E<<O<=65535;if(y===3)return E>=65536>>O&&E<<O<=1114111;throw new Error}function c(E,O){if(E===6*1)return O>>6>15?3:O>31?2:1;if(E===6*2)return O>15?3:2;if(E===6*3)return 3;throw new Error}for(var i=65533,g="",u=this.bitsNeeded,m=this.codePoint,D=0;D<n.length;D+=1){var C=n[D];u!==0&&(C<128||C>191||!o(m<<6|C&63,u-6,c(u,m)))&&(u=0,m=i,g+=String.fromCharCode(m)),u===0?(C>=0&&C<=127?(u=0,m=C):C>=192&&C<=223?(u=6*1,m=C&31):C>=224&&C<=239?(u=6*2,m=C&15):C>=240&&C<=247?(u=6*3,m=C&7):(u=0,m=i),u!==0&&!o(m,u,c(u,m))&&(u=0,m=i)):(u-=6,m=m<<6|C&63),u===0&&(m<=65535?g+=String.fromCharCode(m):(g+=String.fromCharCode(55296+(m-65535-1>>10)),g+=String.fromCharCode(56320+(m-65535-1&1023))))}return this.bitsNeeded=u,this.codePoint=m,g};var I=function(){try{return new j().decode(new F().encode("test"),{stream:!0})==="test"}catch(n){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+n)}return!1};(j==null||F==null||!I())&&(j=z);var b=function(){};function S(n){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=n,this._sendTimeout=0,this._abort=b}S.prototype.open=function(n,o){this._abort(!0);var c=this,i=this._xhr,g=1,u=0;this._abort=function(y){c._sendTimeout!==0&&(f(c._sendTimeout),c._sendTimeout=0),(g===1||g===2||g===3)&&(g=4,i.onload=b,i.onerror=b,i.onabort=b,i.onprogress=b,i.onreadystatechange=b,i.abort(),u!==0&&(f(u),u=0),y||(c.readyState=4,c.onabort(null),c.onreadystatechange())),g=0};var m=function(){if(g===1){var y=0,V="",le=void 0;if("contentType"in i)y=200,V="OK",le=i.contentType;else try{y=i.status,V=i.statusText,le=i.getResponseHeader("Content-Type")}catch(Te){y=0,V="",le=void 0}y!==0&&(g=2,c.readyState=2,c.status=y,c.statusText=V,c._contentType=le,c.onreadystatechange())}},D=function(){if(m(),g===2||g===3){g=3;var y="";try{y=i.responseText}catch(V){}c.readyState=3,c.responseText=y,c.onprogress()}},C=function(y,V){if((V==null||V.preventDefault==null)&&(V={preventDefault:b}),D(),g===1||g===2||g===3){if(g=4,u!==0&&(f(u),u=0),c.readyState=4,y==="load")c.onload(V);else if(y==="error")c.onerror(V);else if(y==="abort")c.onabort(V);else throw new TypeError;c.onreadystatechange()}},E=function(y){i!=null&&(i.readyState===4?(!("onload"in i)||!("onerror"in i)||!("onabort"in i))&&C(i.responseText===""?"error":"load",y):i.readyState===3?"onprogress"in i||D():i.readyState===2&&m())},O=function(){u=l(function(){O()},500),i.readyState===3&&D()};"onload"in i&&(i.onload=function(y){C("load",y)}),"onerror"in i&&(i.onerror=function(y){C("error",y)}),"onabort"in i&&(i.onabort=function(y){C("abort",y)}),"onprogress"in i&&(i.onprogress=D),"onreadystatechange"in i&&(i.onreadystatechange=function(y){E(y)}),("contentType"in i||!("ontimeout"in d.prototype))&&(o+=(o.indexOf("?")===-1?"?":"&")+"padding=true"),i.open(n,o,!0),"readyState"in i&&(u=l(function(){O()},0))},S.prototype.abort=function(){this._abort(!1)},S.prototype.getResponseHeader=function(n){return this._contentType},S.prototype.setRequestHeader=function(n,o){var c=this._xhr;"setRequestHeader"in c&&c.setRequestHeader(n,o)},S.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},S.prototype.send=function(){if((!("ontimeout"in d.prototype)||!("sendAsBinary"in d.prototype)&&!("mozAnon"in d.prototype))&&B!=null&&B.readyState!=null&&B.readyState!=="complete"){var n=this;n._sendTimeout=l(function(){n._sendTimeout=0,n.send()},4);return}var o=this._xhr;"withCredentials"in o&&(o.withCredentials=this.withCredentials);try{o.send(void 0)}catch(c){throw c}};function L(n){return n.replace(/[A-Z]/g,function(o){return String.fromCharCode(o.charCodeAt(0)+32)})}function re(n){for(var o=Object.create(null),c=n.split(`\r
6
+ `),i=0;i<c.length;i+=1){var g=c[i],u=g.split(": "),m=u.shift(),D=u.join(": ");o[L(m)]=D}this._map=o}re.prototype.get=function(n){return this._map[L(n)]},d!=null&&d.HEADERS_RECEIVED==null&&(d.HEADERS_RECEIVED=2);function K(){}K.prototype.open=function(n,o,c,i,g,u,m){n.open("GET",g);var D=0;n.onprogress=function(){var E=n.responseText,O=E.slice(D);D+=O.length,c(O)},n.onerror=function(E){E.preventDefault(),i(new Error("NetworkError"))},n.onload=function(){i(null)},n.onabort=function(){i(null)},n.onreadystatechange=function(){if(n.readyState===d.HEADERS_RECEIVED){var E=n.status,O=n.statusText,y=n.getResponseHeader("Content-Type"),V=n.getAllResponseHeaders();o(E,O,y,new re(V))}},n.withCredentials=u;for(var C in m)Object.prototype.hasOwnProperty.call(m,C)&&n.setRequestHeader(C,m[C]);return n.send(),n};function N(n){this._headers=n}N.prototype.get=function(n){return this._headers.get(n)};function _(){}_.prototype.open=function(n,o,c,i,g,u,m){var D=null,C=new H,E=C.signal,O=new j;return A(g,{headers:m,credentials:u?"include":"same-origin",signal:E,cache:"no-store"}).then(function(y){return D=y.body.getReader(),o(y.status,y.statusText,y.headers.get("Content-Type"),new N(y.headers)),new R(function(V,le){var Te=function(){D.read().then(function(Y){if(Y.done)V(void 0);else{var G=O.decode(Y.value,{stream:!0});c(G),Te()}}).catch(function(Y){le(Y)})};Te()})}).catch(function(y){if(y.name!=="AbortError")return y}).then(function(y){i(y)}),{abort:function(){D!=null&&D.cancel(),C.abort()}}};function p(){this._listeners=Object.create(null)}function k(n){l(function(){throw n},0)}p.prototype.dispatchEvent=function(n){n.target=this;var o=this._listeners[n.type];if(o!=null)for(var c=o.length,i=0;i<c;i+=1){var g=o[i];try{typeof g.handleEvent=="function"?g.handleEvent(n):g.call(this,n)}catch(u){k(u)}}},p.prototype.addEventListener=function(n,o){n=String(n);var c=this._listeners,i=c[n];i==null&&(i=[],c[n]=i);for(var g=!1,u=0;u<i.length;u+=1)i[u]===o&&(g=!0);g||i.push(o)},p.prototype.removeEventListener=function(n,o){n=String(n);var c=this._listeners,i=c[n];if(i!=null){for(var g=[],u=0;u<i.length;u+=1)i[u]!==o&&g.push(i[u]);g.length===0?delete c[n]:c[n]=g}};function $(n){this.type=n,this.target=void 0}function Ce(n,o){$.call(this,n),this.data=o.data,this.lastEventId=o.lastEventId}Ce.prototype=Object.create($.prototype);function oe(n,o){$.call(this,n),this.status=o.status,this.statusText=o.statusText,this.headers=o.headers}oe.prototype=Object.create($.prototype);function ve(n,o){$.call(this,n),this.error=o.error}ve.prototype=Object.create($.prototype);var ye=-1,ne=0,ue=1,ie=2,we=-1,ae=0,he=1,_e=2,Me=3,xe=/^text\/event\-stream(;.*)?$/i,De=1e3,Oe=18e6,Be=function(n,o){var c=n==null?o:parseInt(n,10);return c!==c&&(c=o),be(c)},be=function(n){return Math.min(Math.max(n,De),Oe)},fe=function(n,o,c){try{typeof o=="function"&&o.call(n,c)}catch(i){k(i)}};function J(n,o){p.call(this),o=o||{},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,s(this,n,o)}function ke(){return d!=null&&"withCredentials"in d.prototype||v==null?new d:new v}var Fe=A!=null&&M!=null&&"body"in M.prototype;function s(n,o,c){o=String(o);var i=!!c.withCredentials,g=c.lastEventIdQueryParameterName||"lastEventId",u=be(1e3),m=Be(c.heartbeatTimeout,45e3),D="",C=u,E=!1,O=0,y=c.headers||{},V=c.Transport,le=Fe&&V==null?void 0:new S(V!=null?new V:ke()),Te=V!=null&&typeof V!="string"?new V:le==null?new _:new K,Y=void 0,G=0,ee=ye,me="",Ee="",se="",Re="",W=ae,Ie=0,pe=0,tt=function(P,U,Q,Z){if(ee===ne)if(P===200&&Q!=null&&xe.test(Q)){ee=ue,E=Date.now(),C=u,n.readyState=ue;var q=new oe("open",{status:P,statusText:U,headers:Z});n.dispatchEvent(q),fe(n,n.onopen,q)}else{var X="";P!==200?(U&&(U=U.replace(/\s+/g," ")),X="EventSource's response has a status "+P+" "+U+" that is not 200. Aborting the connection."):X="EventSource's response has a Content-Type specifying an unsupported type: "+(Q==null?"-":Q.replace(/\s+/g," "))+". Aborting the connection.",Le();var q=new oe("error",{status:P,statusText:U,headers:Z});n.dispatchEvent(q),fe(n,n.onerror,q),console.error(X)}},nt=function(P){if(ee===ue){for(var U=-1,Q=0;Q<P.length;Q+=1){var Z=P.charCodeAt(Q);(Z===10||Z===13)&&(U=Q)}var q=(U!==-1?Re:"")+P.slice(0,U+1);Re=(U===-1?Re:"")+P.slice(U+1),P!==""&&(E=Date.now(),O+=P.length);for(var X=0;X<q.length;X+=1){var Z=q.charCodeAt(X);if(W===we&&Z===10)W=ae;else if(W===we&&(W=ae),Z===13||Z===10){if(W!==ae){W===he&&(pe=X+1);var ce=q.slice(Ie,pe-1),de=q.slice(pe+(pe<X&&q.charCodeAt(pe)===32?1:0),X);ce==="data"?(me+=`
7
+ `,me+=de):ce==="id"?Ee=de:ce==="event"?se=de:ce==="retry"?(u=Be(de,u),C=u):ce==="heartbeatTimeout"&&(m=Be(de,m),G!==0&&(f(G),G=l(function(){Se()},m)))}if(W===ae){if(me!==""){D=Ee,se===""&&(se="message");var ge=new Ce(se,{data:me.slice(1),lastEventId:Ee});if(n.dispatchEvent(ge),se==="open"?fe(n,n.onopen,ge):se==="message"?fe(n,n.onmessage,ge):se==="error"&&fe(n,n.onerror,ge),ee===ie)return}me="",se=""}W=Z===13?we:ae}else W===ae&&(Ie=X,W=he),W===he?Z===58&&(pe=X+1,W=_e):W===_e&&(W=Me)}}},je=function(P){if(ee===ue||ee===ne){ee=ye,G!==0&&(f(G),G=0),G=l(function(){Se()},C),C=be(Math.min(u*16,C*2)),n.readyState=ne;var U=new ve("error",{error:P});n.dispatchEvent(U),fe(n,n.onerror,U),P!=null&&console.error(P)}},Le=function(){ee=ie,Y!=null&&(Y.abort(),Y=void 0),G!==0&&(f(G),G=0),n.readyState=ie},Se=function(){if(G=0,ee!==ye){if(!E&&Y!=null)je(new Error("No activity within "+m+" milliseconds. "+(ee===ne?"No response received.":O+" chars received.")+" Reconnecting.")),Y!=null&&(Y.abort(),Y=void 0);else{var P=Math.max((E||Date.now())+m-Date.now(),1);E=!1,G=l(function(){Se()},P)}return}E=!1,O=0,G=l(function(){Se()},m),ee=ne,me="",se="",Ee=D,Re="",Ie=0,pe=0,W=ae;var U=o;if(o.slice(0,5)!=="data:"&&o.slice(0,5)!=="blob:"&&D!==""){var Q=o.indexOf("?");U=Q===-1?o:o.slice(0,Q+1)+o.slice(Q+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(de,ge){return ge===g?"":de}),U+=(o.indexOf("?")===-1?"?":"&")+g+"="+encodeURIComponent(D)}var Z=n.withCredentials,q={};q.Accept="text/event-stream";var X=n.headers;if(X!=null)for(var ce in X)Object.prototype.hasOwnProperty.call(X,ce)&&(q[ce]=X[ce]);try{Y=Te.open(le,tt,nt,je,U,Z,q)}catch(de){throw Le(),de}};n.url=o,n.readyState=ne,n.withCredentials=i,n.headers=y,n._close=Le,Se()}J.prototype=Object.create(p.prototype),J.prototype.CONNECTING=ne,J.prototype.OPEN=ue,J.prototype.CLOSED=ie,J.prototype.close=function(){this._close()},J.CONNECTING=ne,J.OPEN=ue,J.CLOSED=ie,J.prototype.withCredentials=void 0;var T=w;d!=null&&(w==null||!("withCredentials"in w.prototype))&&(T=J),function(n){{var o=n(t);o!==void 0&&(r.exports=o)}}(function(n){n.EventSourcePolyfill=J,n.NativeEventSource=w,n.EventSource=T})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Ne,Ne.exports);var ct=Ne.exports;/*!
8
+ * currency.js - v2.0.4
9
+ * http://scurker.github.io/currency.js
10
+ *
11
+ * Copyright (c) 2021 Jason Wilson
12
+ * Released under MIT license
13
+ */var dt={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:ht,fromCents:!1},$e=function(t){return Math.round(t)},Ve=function(t){return Math.pow(10,t)},ut=function(t,a){return $e(t/a)*a},ft=/(\d)(?=(\d{3})+\b)/g,pt=/(\d)(?=(\d\d)+\d\b)/g;function te(r,t){var a=this;if(!(a instanceof te))return new te(r,t);var l=Object.assign({},dt,t),f=Ve(l.precision),d=Ae(r,l);a.intValue=d,a.value=d/f,l.increment=l.increment||1/f,l.useVedic?l.groups=pt:l.groups=ft,this.s=l,this.p=f}function Ae(r,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=0,f=t.decimal,d=t.errorOnInvalid,v=t.precision,h=t.fromCents,w=Ve(v),B=typeof r=="number",R=r instanceof te;if(R&&h)return r.intValue;if(B||R)l=R?r.value:r;else if(typeof r=="string"){var A=new RegExp("[^-\\d"+f+"]","g"),M=new RegExp("\\"+f,"g");l=r.replace(/\((.*)\)/,"-$1").replace(A,"").replace(M,"."),l=l||0}else{if(d)throw Error("Invalid Input");l=0}return h||(l*=w,l=l.toFixed(4)),a?$e(l):l}function ht(r,t){var a=t.pattern,l=t.negativePattern,f=t.symbol,d=t.separator,v=t.decimal,h=t.groups,w=(""+r).replace(/^-/,"").split("."),B=w[0],R=w[1];return(r.value>=0?a:l).replace("!",f).replace("#",B.replace(h,"$1"+d)+(R?v+R:""))}te.prototype={add:function(t){var a=this.intValue,l=this.s,f=this.p;return te((a+=Ae(t,l))/(l.fromCents?1:f),l)},subtract:function(t){var a=this.intValue,l=this.s,f=this.p;return te((a-=Ae(t,l))/(l.fromCents?1:f),l)},multiply:function(t){var a=this.intValue,l=this.s;return te((a*=t)/(l.fromCents?1:Ve(l.precision)),l)},divide:function(t){var a=this.intValue,l=this.s;return te(a/=Ae(t,l,!1),l)},distribute:function(t){for(var a=this.intValue,l=this.p,f=this.s,d=[],v=Math[a>=0?"floor":"ceil"](a/t),h=Math.abs(a-v*t),w=f.fromCents?1:l;t!==0;t--){var B=te(v/w,f);h-- >0&&(B=B[a>=0?"add":"subtract"](1/w)),d.push(B)}return d},dollars:function(){return~~this.value},cents:function(){var t=this.intValue,a=this.p;return~~(t%a)},format:function(t){var a=this.s;return typeof t=="function"?t(this,a):a.format(this,Object.assign({},a,t))},toString:function(){var t=this.intValue,a=this.p,l=this.s;return ut(t/a,l.increment).toFixed(l.precision)},toJSON:function(){return this.value}};function mt(r){e.append_styles(r,"svelte-bn5dkz",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}@keyframes growWidthPercent{from{height:0}to{height:100%}}.ShowBalance{position:relative}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px;fill:black}.ShowBalance .BalanceValue span{padding-left:5px}.ShowBalance .BalanceValue .TriangleActive,.ShowBalance .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.ShowBalance .BalanceValue .TriangleActive:hover,.ShowBalance .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.ShowBalance .BalanceValue .TriangleActive svg,.ShowBalance .BalanceValue .TriangleInactive svg{margin:2px 0px}.ShowBalance .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.ShowBalance .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw-header-color-primary, var(--emw-color-primary, #D0046C));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.BalanceModalWrapper.Open{opacity:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;opacity:0}.BalanceModalClose:before{content:"";background:var(--emw-color-secondary, var(--emw-color-secondary, white));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, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModalClose:hover{transform:scale(1.1)}.BalanceModalClose.Open{opacity:1}.BalanceModal{transition:all 0.2s ease-in;width:270px}.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, white))}.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, white));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw-header-contrast, var(--emw-color-contrast, white))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw-color-primary);font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw-color-primary);box-shadow:0px 0px 0px 2px inset var(--emw-color-primary);font-size:14px}.BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.ShowBalanceModalOverlay.Open{opacity:1}')}function qe(r,t,a){const l=r.slice();return l[47]=t[a],l}function Ke(r,t,a){const l=r.slice();return l[50]=t[a],l}function Je(r){let t,a,l,f,d,v,h,w,B=r[5]("Title")+"",R,A,M,j,F,H,x=r[5]("DepositButton")+"",z,I,b,S,L,re,K=e.ensure_array_like(Object.keys(r[1])),N=[];for(let _=0;_<K.length;_+=1)N[_]=Qe(qe(r,K,_));return{c(){t=e.element("div"),a=e.element("div"),f=e.space(),d=e.element("div"),v=e.element("div"),h=e.element("div"),w=e.element("p"),R=e.text(B),A=e.space(),M=e.element("div");for(let _=0;_<N.length;_+=1)N[_].c();j=e.space(),F=e.element("div"),H=e.element("button"),z=e.text(x),e.attr(a,"class",l="BalanceModalClose "+(r[3]?"Open":"")),e.attr(w,"class","BalanceModalTitle"),e.attr(h,"class","BalanceModalHeader"),e.attr(M,"class","BalanceModalBody"),e.attr(H,"class","BalanceModalAction"),e.attr(F,"class","BalanceModalFooter"),e.attr(v,"class",I="ModalContent "+(r[3]?"Open":"")),e.attr(d,"class",b="BalanceModal "+(r[3]?"Open":"")),e.attr(t,"class",S="BalanceModalWrapper "+(r[3]?"Open":""))},m(_,p){e.insert(_,t,p),e.append(t,a),e.append(t,f),e.append(t,d),e.append(d,v),e.append(v,h),e.append(h,w),e.append(w,R),e.append(v,A),e.append(v,M);for(let k=0;k<N.length;k+=1)N[k]&&N[k].m(M,null);e.append(v,j),e.append(v,F),e.append(F,H),e.append(H,z),L||(re=[e.listen(a,"click",r[24]),e.listen(H,"click",r[25])],L=!0)},p(_,p){if(p[0]&8&&l!==(l="BalanceModalClose "+(_[3]?"Open":""))&&e.attr(a,"class",l),p[0]&32&&B!==(B=_[5]("Title")+"")&&e.set_data(R,B),p[0]&178){K=e.ensure_array_like(Object.keys(_[1]));let k;for(k=0;k<K.length;k+=1){const $=qe(_,K,k);N[k]?N[k].p($,p):(N[k]=Qe($),N[k].c(),N[k].m(M,null))}for(;k<N.length;k+=1)N[k].d(1);N.length=K.length}p[0]&32&&x!==(x=_[5]("DepositButton")+"")&&e.set_data(z,x),p[0]&8&&I!==(I="ModalContent "+(_[3]?"Open":""))&&e.attr(v,"class",I),p[0]&8&&b!==(b="BalanceModal "+(_[3]?"Open":""))&&e.attr(d,"class",b),p[0]&8&&S!==(S="BalanceModalWrapper "+(_[3]?"Open":""))&&e.attr(t,"class",S)},d(_){_&&e.detach(t),e.destroy_each(N,_),L=!1,e.run_all(re)}}}function Ye(r){let t,a,l=r[5](r[47])+"",f,d,v=(r[50].productType?r[5](r[50].productType):"")+"",h,w,B,R,A=(r[50].amount?r[7](r[50].amount):"0")+"",M,j,F,H;return{c(){t=e.element("div"),a=e.element("p"),f=e.text(l),d=e.space(),h=e.text(v),w=e.space(),B=e.element("p"),R=e.element("span"),M=e.text(A),j=e.space(),F=e.element("span"),H=e.text(r[4]),e.attr(a,"class","BalanceModalText"),e.attr(R,"class","BalanceModalAmount"),e.attr(F,"class","BalanceModalCurrency"),e.attr(B,"class","BalanceModalValue"),e.attr(t,"class","BalanceModalRowLine")},m(x,z){e.insert(x,t,z),e.append(t,a),e.append(a,f),e.append(a,d),e.append(a,h),e.append(t,w),e.append(t,B),e.append(B,R),e.append(R,M),e.append(B,j),e.append(B,F),e.append(F,H)},p(x,z){z[0]&34&&l!==(l=x[5](x[47])+"")&&e.set_data(f,l),z[0]&34&&v!==(v=(x[50].productType?x[5](x[50].productType):"")+"")&&e.set_data(h,v),z[0]&2&&A!==(A=(x[50].amount?x[7](x[50].amount):"0")+"")&&e.set_data(M,A),z[0]&16&&e.set_data(H,x[4])},d(x){x&&e.detach(t)}}}function Qe(r){let t,a,l=e.ensure_array_like(r[1][r[47]]),f=[];for(let d=0;d<l.length;d+=1)f[d]=Ye(Ke(r,l,d));return{c(){t=e.element("div");for(let d=0;d<f.length;d+=1)f[d].c();a=e.space(),e.attr(t,"class","BalanceModalRowBoth")},m(d,v){e.insert(d,t,v);for(let h=0;h<f.length;h+=1)f[h]&&f[h].m(t,null);e.append(t,a)},p(d,v){if(v[0]&178){l=e.ensure_array_like(d[1][d[47]]);let h;for(h=0;h<l.length;h+=1){const w=Ke(d,l,h);f[h]?f[h].p(w,v):(f[h]=Ye(w),f[h].c(),f[h].m(t,a))}for(;h<f.length;h+=1)f[h].d(1);f.length=l.length}},d(d){d&&e.detach(t),e.destroy_each(f,d)}}}function Ze(r){let t,a,l;return{c(){t=e.element("div"),e.attr(t,"class","ShowBalanceModalOverlay")},m(f,d){e.insert(f,t,d),a||(l=e.listen(t,"click",r[26]),a=!0)},p:e.noop,d(f){f&&e.detach(t),a=!1,l()}}}function gt(r){let t,a,l,f,d=(r[1].Total?r[7](r[1].Total[0].amount):"0")+"",v,h,w,B,R,A,M,j,F,H,x,z,I=r[2]&&Je(r),b=r[2]&&Ze(r);return{c(){t=e.element("div"),a=e.element("div"),l=e.element("div"),f=e.element("p"),v=e.text(d),h=e.space(),w=e.text(r[4]),B=e.space(),R=e.element("span"),A=e.svg_element("svg"),M=e.svg_element("path"),F=e.space(),I&&I.c(),H=e.space(),b&&b.c(),e.attr(M,"id","arrow"),e.attr(M,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),e.attr(M,"transform","translate(-274.511 -441.088)"),e.attr(M,"fill","#d1d1d1"),e.attr(A,"xmlns","http://www.w3.org/2000/svg"),e.attr(A,"width","14"),e.attr(A,"height","6.835"),e.attr(A,"viewBox","0 0 14 6.835"),e.attr(R,"class",j=r[3]?"TriangleActive":"TriangleInactive"),e.attr(l,"class","BalanceValue"),e.attr(a,"class","ShowBalance")},m(S,L){e.insert(S,t,L),e.append(t,a),e.append(a,l),e.append(l,f),e.append(f,v),e.append(f,h),e.append(f,w),e.append(l,B),e.append(l,R),e.append(R,A),e.append(A,M),e.append(a,F),I&&I.m(a,null),e.append(t,H),b&&b.m(t,null),r[27](t),x||(z=e.listen(l,"click",r[23]),x=!0)},p(S,L){L[0]&2&&d!==(d=(S[1].Total?S[7](S[1].Total[0].amount):"0")+"")&&e.set_data(v,d),L[0]&16&&e.set_data(w,S[4]),L[0]&8&&j!==(j=S[3]?"TriangleActive":"TriangleInactive")&&e.attr(R,"class",j),S[2]?I?I.p(S,L):(I=Je(S),I.c(),I.m(a,null)):I&&(I.d(1),I=null),S[2]?b?b.p(S,L):(b=Ze(S),b.c(),b.m(t,null)):b&&(b.d(1),b=null)},i:e.noop,o:e.noop,d(S){S&&e.detach(t),I&&I.d(),b&&b.d(),r[27](null),x=!1,z()}}}function vt(r,t,a){let l;e.component_subscribe(r,e.$format,s=>a(5,l=s));let{userid:f=""}=t,{session:d=""}=t,{endpoint:v=""}=t,{lang:h="en"}=t,{clientstyling:w=""}=t,{clientstylingurl:B=""}=t,{translationurl:R=""}=t,{customlocaleidentifier:A=""}=t,{gmversion:M=""}=t,{displaybalanceoption:j="All"}=t,{totalcalculationmode:F="totalRealAmount"}=t,{currencyseparator:H=""}=t,{currencydecimal:x=""}=t,{currencyprecision:z=""}=t,I,b,S,L=!1,re=!1,K=!1,N="",_=[];const p={},k=["totalAmount","totalCashAmount","totalRealAmount","totalWithdrawableAmount"],$=()=>{fetch(R).then(s=>s.json()).then(s=>Object.keys(s).forEach(T=>Ge(T,s[T]))).catch(s=>console.log(s))};Object.keys(We).forEach(s=>Ge(s,We[s]));const Ce=()=>{switch(F){case"totalAmount":return(s,T,n)=>n.walletType!=="CreditLine"?s+n.affectedAmount:s;case"totalCashAmount":return(s,T,n)=>n.walletType!=="CreditLine"&&(T==="Bonus"||T==="Real")?s+n.affectedAmount:s;case"totalRealAmount":return(s,T,n)=>n.walletType!=="CreditLine"&&T==="Real"?s+n.affectedAmount:n.walletType==="CreditLine"&&T==="Real"?s-Math.abs(n.affectedAmount):s;case"totalWithdrawableAmount":return(s,T,n)=>n.walletType!=="CreditLine"&&(T==="Real"||T==="RealNegativeRemainder")?s+n.affectedAmount:T==="DepositWagering"?s-n.affectedAmount:s}},oe=s=>{switch(s){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),a(2,re=!0),setTimeout(()=>a(3,K=!0),150);break;case"closebalance":a(3,K=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{a(2,re=!1)},150);break}},ve=()=>{if(A.includes(h))return A},ye=s=>A?new Intl.NumberFormat(ve(),{useGrouping:!0}).format(s):H&&x?te(s,{separator:H,decimal:x,symbol:"",precision:parseInt(z||"2",10)}).format():te(s,{separator:".",decimal:",",symbol:"",precision:parseInt(z||"2",10)}).format(),ne=()=>Xe(this,null,function*(){var T,n;const s=new URL(`${v}/v1/player/${f}/account`);try{L=!0;const o=yield fetch(s,{method:"GET",headers:{"X-SessionID":d}}),c=yield o.json();if(o.ok)L=!1,window.postMessage({type:"BalancedFetched"},window.location.href),_=c.items,a(4,N=Object.keys(c.totalAmount)[0]),a(1,p.Total=[{amount:c.totalAmount[N]}],p),a(1,p.Real=[{amount:(T=_.find(i=>i.displayName==="Casino"))==null?void 0:T.balanceAmount}],p),a(1,p.Bonus=[{amount:(n=_.find(i=>i.displayName==="UBS"))==null?void 0:n.balanceAmount}],p);else throw L=!1,new Error("Failed to fetch balance data !")}catch(o){L=!1,console.log("Balance error: ",o)}finally{L=!1}}),ue=()=>{L=!0;const s=new URL(`${v}/v2/player/${f}/balance`),T=new Headers;T.append("X-SessionID",d),fetch(s,{method:"GET",headers:T}).then(o=>o.json()).then(o=>{L=!1;const[c,i]=Object.entries(o[F])[0];if(a(4,N=c),a(1,p.Total=[{amount:i}],p),!o.items[0].productType){const u=Object.values(o.totalBonusAmount)[0];a(1,p.Bonus=[{amount:u}],p);for(const m of o.items)m.type==="Real"&&(m.creditLine&&a(1,p.Credit=[{amount:m.creditLine}],p),p.Real?a(1,p.Real[0].amount+=m.amount,p):a(1,p.Real=[{amount:m.amount}],p));return}let g=o.items;a(1,p.Bonus=[],p),a(1,p.Real=[],p),a(1,p.Credit=[],p),j&&j!=="All"&&(g=o.items.filter(u=>u.productType===j));for(const u of g){if(u.type==="Real"){u.creditLine&&p.Credit.push({amount:u.creditLine,productType:u.productType});const m=p.Real.findIndex(D=>D.productType===u.productType);m>0?a(1,p.Real[m].amount+=u.amount,p):p.Real.push({amount:u.amount,productType:u.productType});continue}if(u.type==="Bonus"){const m=p.Bonus.findIndex(D=>D.productType===u.productType);m>0?a(1,p.Bonus[m].amount+=u.amount,p):p.Bonus.push({amount:u.amount,productType:u.productType})}}}).catch(o=>{throw L=!1,new Error("Failed to fetch balance data !")})},ie=()=>{if(S&&S.close(),d.length<1)return;let s,T;switch(M){case"gm16":s=new URL(`${v}/v2/player/${f}/information/updates`),T=c=>c.data&&c.data.type==="BALANCE_UPDATE_V2"&&ae(c.data.body);break;case"gmcore":s=new URL(`${v}/v1/player/${f}/balance/updates`),T=c=>c.data&&we(c.data.body);break}const n={accept:"text/event-stream","X-SessionId":d},o=new ct.EventSourcePolyfill(s,{headers:n});S=o,o.addEventListener("message",T)},we=s=>{var o,c;let T;try{T=JSON.parse(s)}catch(i){console.log("Balance stream failed: ",i),ie()}let n="0";_=_.map(i=>(T.balanceChange&&T.balanceChange[i.id]&&(i=Pe(Ue({},i),{balanceAmount:T.balanceChange[i.id].afterAmount})),n=(parseFloat(i==null?void 0:i.balanceAmount)+parseFloat(n)).toString(),i)),a(1,p.Real=[{amount:(o=_[0])==null?void 0:o.balanceAmount}],p),a(1,p.Bonus=[{amount:(c=_[1])==null?void 0:c.balanceAmount}],p),a(1,p.Total=[{amount:Number(n)}],p)},ae=s=>{let T;try{T=JSON.parse(s)}catch(o){console.log("Balance stream failed: ",o),ie()}const n=T.body;for(const[o,c]of Object.entries(n)){for(const i of p[o])!i.productType||c.productType&&c.productType===i.productType&&(i.amount=c.afterAmount);a(1,p.Total[0].amount=I(p.Total[0].amount,o,c),p)}},he=()=>{oe("closebalance"),window.postMessage({type:"GoToDeposit"},window.location.href),typeof gtag=="function"&&gtag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},_e=()=>{k.includes(F)||(console.error(`Unsupported value ('${F}') for totalcalculationmode parameter. Only the following values are supported ${k}. Using default value ('${k[2]}').`),a(9,F=k[2]))},Me=()=>{switch(st(h),_e(),I=Ce(),M){case"gmcore":ne();break;case"gm16":ue();break;default:throw Error(`Invalid apiversion attribute: ${M}`)}},xe=s=>s.data&&s.data.type==="LogoutSuccessfull"&&S.close(),De=()=>{const s=document.createElement("style");s.innerHTML=w,b.appendChild(s)},Oe=()=>{const s=new URL(B),T=document.createElement("style");fetch(s.href).then(n=>n.text()).then(n=>{T.innerHTML=n,setTimeout(()=>{b.appendChild(T)},1)})},Be=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)};e.onMount(()=>(window.addEventListener("message",xe,!1),()=>{window.removeEventListener("message",xe),S&&S.close()}));const be=()=>oe("balance"),fe=()=>oe("closebalance"),J=()=>he(),ke=()=>oe("closeBalance");function Fe(s){e.binding_callbacks[s?"unshift":"push"](()=>{b=s,a(0,b)})}return r.$$set=s=>{"userid"in s&&a(10,f=s.userid),"session"in s&&a(11,d=s.session),"endpoint"in s&&a(12,v=s.endpoint),"lang"in s&&a(13,h=s.lang),"clientstyling"in s&&a(14,w=s.clientstyling),"clientstylingurl"in s&&a(15,B=s.clientstylingurl),"translationurl"in s&&a(16,R=s.translationurl),"customlocaleidentifier"in s&&a(17,A=s.customlocaleidentifier),"gmversion"in s&&a(18,M=s.gmversion),"displaybalanceoption"in s&&a(19,j=s.displaybalanceoption),"totalcalculationmode"in s&&a(9,F=s.totalcalculationmode),"currencyseparator"in s&&a(20,H=s.currencyseparator),"currencydecimal"in s&&a(21,x=s.currencydecimal),"currencyprecision"in s&&a(22,z=s.currencyprecision)},r.$$.update=()=>{r.$$.dirty[0]&8192&&h&&ve(),r.$$.dirty[0]&801792&&v&&f&&d&&h&&M&&j&&Me(),r.$$.dirty[0]&7680&&v&&f&&d&&F&&ie(),r.$$.dirty[0]&16385&&w&&b&&De(),r.$$.dirty[0]&32769&&B&&b&&Oe(),r.$$.dirty[0]&65536&&R&&$(),r.$$.dirty[0]&2&&p.Total&&Be()},[b,p,re,K,N,l,oe,ye,he,F,f,d,v,h,w,B,R,A,M,j,H,x,z,be,fe,J,ke,Fe]}class et extends e.SvelteComponent{constructor(t){super(),e.init(this,t,vt,gt,e.safe_not_equal,{userid:10,session:11,endpoint:12,lang:13,clientstyling:14,clientstylingurl:15,translationurl:16,customlocaleidentifier:17,gmversion:18,displaybalanceoption:19,totalcalculationmode:9,currencyseparator:20,currencydecimal:21,currencyprecision:22},mt,[-1,-1])}get userid(){return this.$$.ctx[10]}set userid(t){this.$$set({userid:t}),e.flush()}get session(){return this.$$.ctx[11]}set session(t){this.$$set({session:t}),e.flush()}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get lang(){return this.$$.ctx[13]}set lang(t){this.$$set({lang:t}),e.flush()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get customlocaleidentifier(){return this.$$.ctx[17]}set customlocaleidentifier(t){this.$$set({customlocaleidentifier:t}),e.flush()}get gmversion(){return this.$$.ctx[18]}set gmversion(t){this.$$set({gmversion:t}),e.flush()}get displaybalanceoption(){return this.$$.ctx[19]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),e.flush()}get totalcalculationmode(){return this.$$.ctx[9]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),e.flush()}get currencyseparator(){return this.$$.ctx[20]}set currencyseparator(t){this.$$set({currencyseparator:t}),e.flush()}get currencydecimal(){return this.$$.ctx[21]}set currencydecimal(t){this.$$set({currencydecimal:t}),e.flush()}get currencyprecision(){return this.$$.ctx[22]}set currencyprecision(t){this.$$set({currencyprecision:t}),e.flush()}}e.create_custom_element(et,{userid:{},session:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},customlocaleidentifier:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},currencyseparator:{},currencydecimal:{},currencyprecision:{}},[],[],!0);exports.default=et;
@@ -0,0 +1,395 @@
1
+ import { b as V, $ as X, S as Z, i as J, f as D, c as $, s as ee, d as te, g as _, h as L, D as C, j as d, N as P, n as S, m as p, E, F as j, v as T, w as ie, L as ae, x as se, B as M, o as ne, H as re, k as A, K as oe } from "./CasinoHamburgerMenuNd-CIrTtpDp.js";
2
+ function W(a, e) {
3
+ V(a, e);
4
+ }
5
+ function le(a) {
6
+ X.set(a);
7
+ }
8
+ const z = {
9
+ en: {
10
+ titleDeposit: "Deposit",
11
+ loading: "Loading, please wait ..."
12
+ },
13
+ "zh-hk": {
14
+ titleDeposit: "訂金",
15
+ loading: "加載請稍候…"
16
+ },
17
+ fr: {
18
+ titleDeposit: "Dépôt",
19
+ loading: "Chargement, veuillez patienter ..."
20
+ },
21
+ tr: {
22
+ titleDeposit: "PARA YATIR",
23
+ loading: "Yükleniyor ..."
24
+ },
25
+ ro: {
26
+ titleDeposit: "Depunere",
27
+ loading: "Se încarcă..."
28
+ },
29
+ es: {
30
+ titleDeposit: "Deposita",
31
+ loading: "Cargando ..."
32
+ },
33
+ pt: {
34
+ titleDeposit: "Depósito",
35
+ loading: "Carregando, por favor espere ..."
36
+ },
37
+ hr: {
38
+ titleDeposit: "Uplata",
39
+ loading: "Učitavanje"
40
+ },
41
+ "pt-br": {
42
+ titleDeposit: "Depositar",
43
+ Loading: "Carregando, por favor espere..."
44
+ },
45
+ "es-mx": {
46
+ titleDeposit: "Depositar",
47
+ Loading: "Cargando, por favor espere..."
48
+ }
49
+ };
50
+ function ce(a) {
51
+ te(a, "svelte-141ijwb", "button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}");
52
+ }
53
+ function de(a) {
54
+ let e, i, r, s, l, m, c, u, y, o, n = (
55
+ /*$_*/
56
+ a[4]("titleDeposit") + ""
57
+ ), h, b, v;
58
+ return {
59
+ c() {
60
+ e = _("div"), i = M("svg"), r = M("defs"), s = M("style"), l = C(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = M("g"), c = M("g"), u = M("path"), y = L(), o = _("h2"), h = C(n), d(u, "class", "aaa"), d(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(u, "transform", "translate(15 15) rotate(180)"), d(c, "transform", "translate(20 158)"), d(m, "transform", "translate(-20 -158)"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "15"), d(i, "height", "15"), d(i, "viewBox", "0 0 15 15"), d(o, "class", "DepositTitleMobile"), d(e, "class", "MenuReturnButton");
61
+ },
62
+ m(g, k) {
63
+ S(g, e, k), p(e, i), p(i, r), p(r, s), p(s, l), p(i, m), p(m, c), p(c, u), p(e, y), p(e, o), p(o, h), b || (v = ne(
64
+ e,
65
+ "click",
66
+ /*click_handler*/
67
+ a[17]
68
+ ), b = !0);
69
+ },
70
+ p(g, k) {
71
+ k & /*$_*/
72
+ 16 && n !== (n = /*$_*/
73
+ g[4]("titleDeposit") + "") && E(h, n);
74
+ },
75
+ d(g) {
76
+ g && T(e), b = !1, v();
77
+ }
78
+ };
79
+ }
80
+ function he(a) {
81
+ let e, i, r;
82
+ return {
83
+ c() {
84
+ e = _("div"), i = _("iframe"), A(i.src, r = /*iframeUrl*/
85
+ a[3]) || d(i, "src", r), d(i, "title", "Deposit Iframe"), d(e, "class", "DepositIframeWrapper");
86
+ },
87
+ m(s, l) {
88
+ S(s, e, l), p(e, i);
89
+ },
90
+ p(s, l) {
91
+ l & /*iframeUrl*/
92
+ 8 && !A(i.src, r = /*iframeUrl*/
93
+ s[3]) && d(i, "src", r);
94
+ },
95
+ d(s) {
96
+ s && T(e);
97
+ }
98
+ };
99
+ }
100
+ function pe(a) {
101
+ let e, i = (
102
+ /*$_*/
103
+ a[4]("loading") + ""
104
+ ), r;
105
+ return {
106
+ c() {
107
+ e = _("p"), r = C(i);
108
+ },
109
+ m(s, l) {
110
+ S(s, e, l), p(e, r);
111
+ },
112
+ p(s, l) {
113
+ l & /*$_*/
114
+ 16 && i !== (i = /*$_*/
115
+ s[4]("loading") + "") && E(r, i);
116
+ },
117
+ d(s) {
118
+ s && T(e);
119
+ }
120
+ };
121
+ }
122
+ function ue(a) {
123
+ let e, i, r, s = (
124
+ /*$_*/
125
+ a[4]("titleDeposit") + ""
126
+ ), l, m, c = (
127
+ /*isMobile*/
128
+ a[5] && de(a)
129
+ );
130
+ function u(n, h) {
131
+ return (
132
+ /*isLoading*/
133
+ n[1] ? pe : he
134
+ );
135
+ }
136
+ let y = u(a), o = y(a);
137
+ return {
138
+ c() {
139
+ e = _("div"), c && c.c(), i = L(), r = _("h2"), l = C(s), m = L(), o.c(), d(r, "class", "DepositTitle " + /*isMobile*/
140
+ (a[5] ? "DepositTitleNone" : "")), d(e, "class", "DepositWrapper " + /*isMobile*/
141
+ (a[5] ? "DepositWrapperMobile" : "")), P(
142
+ e,
143
+ "--dynamic-height",
144
+ /*dynamicHeight*/
145
+ a[2]
146
+ );
147
+ },
148
+ m(n, h) {
149
+ S(n, e, h), c && c.m(e, null), p(e, i), p(e, r), p(r, l), p(e, m), o.m(e, null), a[18](e);
150
+ },
151
+ p(n, [h]) {
152
+ /*isMobile*/
153
+ n[5] && c.p(n, h), h & /*$_*/
154
+ 16 && s !== (s = /*$_*/
155
+ n[4]("titleDeposit") + "") && E(l, s), y === (y = u(n)) && o ? o.p(n, h) : (o.d(1), o = y(n), o && (o.c(), o.m(e, null))), h & /*dynamicHeight*/
156
+ 4 && P(
157
+ e,
158
+ "--dynamic-height",
159
+ /*dynamicHeight*/
160
+ n[2]
161
+ );
162
+ },
163
+ i: j,
164
+ o: j,
165
+ d(n) {
166
+ n && T(e), c && c.d(), o.d(), a[18](null);
167
+ }
168
+ };
169
+ }
170
+ function ge(a, e, i) {
171
+ let r, s;
172
+ ie(a, oe, (t) => i(4, s = t));
173
+ let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: u = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: n = "" } = e, { translationurl: h = "" } = e, { playercurrency: b = "" } = e, { shortcashierenabled: v = "false" } = e, g, k = window.navigator.userAgent, R = ae(k) !== "PC", B = !0, F, x = 0, H = "";
174
+ const G = () => {
175
+ fetch(h).then((w) => w.json()).then((w) => {
176
+ Object.keys(w).forEach((f) => {
177
+ W(f, w[f]);
178
+ });
179
+ }).catch((w) => {
180
+ console.log(w);
181
+ });
182
+ };
183
+ Object.keys(z).forEach((t) => {
184
+ W(t, z[t]);
185
+ });
186
+ const U = () => {
187
+ window.postMessage({ type: "GoToPreviousRoute", isMobile: R }, window.location.href);
188
+ }, I = (t) => {
189
+ if (t.data) {
190
+ switch (t.data.type) {
191
+ case "ProfileDetailsData":
192
+ i(7, b = t.data.profileDetails.currency);
193
+ break;
194
+ }
195
+ switch (t.data["MMFE:setQuickDepositHeight"] && i(2, F = t.data["MMFE:setQuickDepositHeight"].toString() + "px"), t.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), t.data.redirect) {
196
+ case "mm-hc-casino":
197
+ window.postMessage({ type: "GoToCasino" }, window.location.href);
198
+ break;
199
+ case "mm-hc-sports":
200
+ window.postMessage({ type: "GoToSports" }, window.location.href);
201
+ break;
202
+ case "mm-hc-contact":
203
+ window.postMessage({ type: "GoToCustomerSupport" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href);
204
+ break;
205
+ case "mm-hc-back-to-merchant":
206
+ window.postMessage({ type: "GoToHomepage" }, window.location.href);
207
+ break;
208
+ case "mm-wm-hc-init-deposit":
209
+ window.postMessage(
210
+ {
211
+ type: "RedirectWithdrawDepositCloseModal"
212
+ },
213
+ window.location.href
214
+ );
215
+ break;
216
+ case "mm-wm-hc-init-deposit-quick":
217
+ window.postMessage({ type: "CloseShortCashier" }, window.location.href);
218
+ break;
219
+ }
220
+ }
221
+ }, N = () => {
222
+ let t = new URL(`${l}/v1/player/${c}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);
223
+ if (t.searchParams.append("language", u), r && t.searchParams.append("isShortCashier", v), y)
224
+ switch (b) {
225
+ case "USD":
226
+ x = 0.4;
227
+ break;
228
+ case "CDF":
229
+ x = 1e3;
230
+ break;
231
+ }
232
+ let w = {
233
+ method: "POST",
234
+ headers: {
235
+ "X-SessionId": m,
236
+ currency: b || "EUR",
237
+ amount: x,
238
+ cashierMode: "Default",
239
+ IsShortCashier: v,
240
+ accept: "application/json"
241
+ }
242
+ };
243
+ fetch(t.href, w).then((f) => f.json()).then(
244
+ (f) => {
245
+ i(1, B = !1), i(3, H = f.CashierUrl);
246
+ },
247
+ (f) => {
248
+ console.error(f);
249
+ }
250
+ );
251
+ }, O = () => {
252
+ le(u);
253
+ }, q = () => {
254
+ let t = document.createElement("style");
255
+ t.innerHTML = o, g.appendChild(t);
256
+ }, Q = () => {
257
+ let t = new URL(n), w = document.createElement("style");
258
+ fetch(t.href).then((f) => f.text()).then((f) => {
259
+ w.innerHTML = f, setTimeout(
260
+ () => {
261
+ g.appendChild(w);
262
+ },
263
+ 1
264
+ );
265
+ });
266
+ };
267
+ se(() => (window.addEventListener("message", I, !1), () => {
268
+ window.removeEventListener("message", I);
269
+ }));
270
+ const Y = () => U();
271
+ function K(t) {
272
+ re[t ? "unshift" : "push"](() => {
273
+ g = t, i(0, g);
274
+ });
275
+ }
276
+ return a.$$set = (t) => {
277
+ "endpoint" in t && i(8, l = t.endpoint), "session" in t && i(9, m = t.session), "playerid" in t && i(10, c = t.playerid), "lang" in t && i(11, u = t.lang), "hasdefaultamount" in t && i(12, y = t.hasdefaultamount), "clientstyling" in t && i(13, o = t.clientstyling), "clientstylingurl" in t && i(14, n = t.clientstylingurl), "translationurl" in t && i(15, h = t.translationurl), "playercurrency" in t && i(7, b = t.playercurrency), "shortcashierenabled" in t && i(16, v = t.shortcashierenabled);
278
+ }, a.$$.update = () => {
279
+ a.$$.dirty & /*lang*/
280
+ 2048 && u && O(), a.$$.dirty & /*shortcashierenabled*/
281
+ 65536 && (r = v.toLocaleLowerCase() === "true"), a.$$.dirty & /*clientstylingurl, customStylingContainer*/
282
+ 16385 && n && g && Q(), a.$$.dirty & /*clientstyling, customStylingContainer*/
283
+ 8193 && o && g && q(), a.$$.dirty & /*translationurl*/
284
+ 32768 && h && G(), a.$$.dirty & /*session, playerid, endpoint, playercurrency, lang, shortcashierenabled*/
285
+ 69504 && m && c && l && b && u && v && N();
286
+ }, [
287
+ g,
288
+ B,
289
+ F,
290
+ H,
291
+ s,
292
+ R,
293
+ U,
294
+ b,
295
+ l,
296
+ m,
297
+ c,
298
+ u,
299
+ y,
300
+ o,
301
+ n,
302
+ h,
303
+ v,
304
+ Y,
305
+ K
306
+ ];
307
+ }
308
+ class me extends Z {
309
+ constructor(e) {
310
+ super(), J(
311
+ this,
312
+ e,
313
+ ge,
314
+ ue,
315
+ ee,
316
+ {
317
+ endpoint: 8,
318
+ session: 9,
319
+ playerid: 10,
320
+ lang: 11,
321
+ hasdefaultamount: 12,
322
+ clientstyling: 13,
323
+ clientstylingurl: 14,
324
+ translationurl: 15,
325
+ playercurrency: 7,
326
+ shortcashierenabled: 16
327
+ },
328
+ ce
329
+ );
330
+ }
331
+ get endpoint() {
332
+ return this.$$.ctx[8];
333
+ }
334
+ set endpoint(e) {
335
+ this.$$set({ endpoint: e }), D();
336
+ }
337
+ get session() {
338
+ return this.$$.ctx[9];
339
+ }
340
+ set session(e) {
341
+ this.$$set({ session: e }), D();
342
+ }
343
+ get playerid() {
344
+ return this.$$.ctx[10];
345
+ }
346
+ set playerid(e) {
347
+ this.$$set({ playerid: e }), D();
348
+ }
349
+ get lang() {
350
+ return this.$$.ctx[11];
351
+ }
352
+ set lang(e) {
353
+ this.$$set({ lang: e }), D();
354
+ }
355
+ get hasdefaultamount() {
356
+ return this.$$.ctx[12];
357
+ }
358
+ set hasdefaultamount(e) {
359
+ this.$$set({ hasdefaultamount: e }), D();
360
+ }
361
+ get clientstyling() {
362
+ return this.$$.ctx[13];
363
+ }
364
+ set clientstyling(e) {
365
+ this.$$set({ clientstyling: e }), D();
366
+ }
367
+ get clientstylingurl() {
368
+ return this.$$.ctx[14];
369
+ }
370
+ set clientstylingurl(e) {
371
+ this.$$set({ clientstylingurl: e }), D();
372
+ }
373
+ get translationurl() {
374
+ return this.$$.ctx[15];
375
+ }
376
+ set translationurl(e) {
377
+ this.$$set({ translationurl: e }), D();
378
+ }
379
+ get playercurrency() {
380
+ return this.$$.ctx[7];
381
+ }
382
+ set playercurrency(e) {
383
+ this.$$set({ playercurrency: e }), D();
384
+ }
385
+ get shortcashierenabled() {
386
+ return this.$$.ctx[16];
387
+ }
388
+ set shortcashierenabled(e) {
389
+ this.$$set({ shortcashierenabled: e }), D();
390
+ }
391
+ }
392
+ $(me, { endpoint: {}, session: {}, playerid: {}, lang: {}, hasdefaultamount: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, playercurrency: {}, shortcashierenabled: {} }, [], [], !0);
393
+ export {
394
+ me as default
395
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenuNd-BXEsfn-s.cjs");function x(n,t){e.addMessages(n,t)}function j(n){e.$locale.set(n)}const L={en:{titleDeposit:"Deposit",loading:"Loading, please wait ..."},"zh-hk":{titleDeposit:"訂金",loading:"加載請稍候…"},fr:{titleDeposit:"Dépôt",loading:"Chargement, veuillez patienter ..."},tr:{titleDeposit:"PARA YATIR",loading:"Yükleniyor ..."},ro:{titleDeposit:"Depunere",loading:"Se încarcă..."},es:{titleDeposit:"Deposita",loading:"Cargando ..."},pt:{titleDeposit:"Depósito",loading:"Carregando, por favor espere ..."},hr:{titleDeposit:"Uplata",loading:"Učitavanje"},"pt-br":{titleDeposit:"Depositar",Loading:"Carregando, por favor espere..."},"es-mx":{titleDeposit:"Depositar",Loading:"Cargando, por favor espere..."}};function A(n){e.append_styles(n,"svelte-141ijwb","button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}")}function W(n){let t,a,l,r,c,m,d,h,f,o,s=n[4]("titleDeposit")+"",p,w,b;return{c(){t=e.element("div"),a=e.svg_element("svg"),l=e.svg_element("defs"),r=e.svg_element("style"),c=e.text(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"),m=e.svg_element("g"),d=e.svg_element("g"),h=e.svg_element("path"),f=e.space(),o=e.element("h2"),p=e.text(s),e.attr(h,"class","aaa"),e.attr(h,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),e.attr(h,"transform","translate(15 15) rotate(180)"),e.attr(d,"transform","translate(20 158)"),e.attr(m,"transform","translate(-20 -158)"),e.attr(a,"xmlns","http://www.w3.org/2000/svg"),e.attr(a,"width","15"),e.attr(a,"height","15"),e.attr(a,"viewBox","0 0 15 15"),e.attr(o,"class","DepositTitleMobile"),e.attr(t,"class","MenuReturnButton")},m(u,D){e.insert(u,t,D),e.append(t,a),e.append(a,l),e.append(l,r),e.append(r,c),e.append(a,m),e.append(m,d),e.append(d,h),e.append(t,f),e.append(t,o),e.append(o,p),w||(b=e.listen(t,"click",n[17]),w=!0)},p(u,D){D&16&&s!==(s=u[4]("titleDeposit")+"")&&e.set_data(p,s)},d(u){u&&e.detach(t),w=!1,b()}}}function z(n){let t,a,l;return{c(){t=e.element("div"),a=e.element("iframe"),e.src_url_equal(a.src,l=n[3])||e.attr(a,"src",l),e.attr(a,"title","Deposit Iframe"),e.attr(t,"class","DepositIframeWrapper")},m(r,c){e.insert(r,t,c),e.append(t,a)},p(r,c){c&8&&!e.src_url_equal(a.src,l=r[3])&&e.attr(a,"src",l)},d(r){r&&e.detach(t)}}}function G(n){let t,a=n[4]("loading")+"",l;return{c(){t=e.element("p"),l=e.text(a)},m(r,c){e.insert(r,t,c),e.append(t,l)},p(r,c){c&16&&a!==(a=r[4]("loading")+"")&&e.set_data(l,a)},d(r){r&&e.detach(t)}}}function N(n){let t,a,l,r=n[4]("titleDeposit")+"",c,m,d=n[5]&&W(n);function h(s,p){return s[1]?G:z}let f=h(n),o=f(n);return{c(){t=e.element("div"),d&&d.c(),a=e.space(),l=e.element("h2"),c=e.text(r),m=e.space(),o.c(),e.attr(l,"class","DepositTitle "+(n[5]?"DepositTitleNone":"")),e.attr(t,"class","DepositWrapper "+(n[5]?"DepositWrapperMobile":"")),e.set_style(t,"--dynamic-height",n[2])},m(s,p){e.insert(s,t,p),d&&d.m(t,null),e.append(t,a),e.append(t,l),e.append(l,c),e.append(t,m),o.m(t,null),n[18](t)},p(s,[p]){s[5]&&d.p(s,p),p&16&&r!==(r=s[4]("titleDeposit")+"")&&e.set_data(c,r),f===(f=h(s))&&o?o.p(s,p):(o.d(1),o=f(s),o&&(o.c(),o.m(t,null))),p&4&&e.set_style(t,"--dynamic-height",s[2])},i:e.noop,o:e.noop,d(s){s&&e.detach(t),d&&d.d(),o.d(),n[18](null)}}}function q(n,t,a){let l,r;e.component_subscribe(n,e.$format,i=>a(4,r=i));let{endpoint:c=""}=t,{session:m=""}=t,{playerid:d=""}=t,{lang:h="en"}=t,{hasdefaultamount:f=""}=t,{clientstyling:o=""}=t,{clientstylingurl:s=""}=t,{translationurl:p=""}=t,{playercurrency:w=""}=t,{shortcashierenabled:b="false"}=t,u,D=window.navigator.userAgent,v=e.getDevice(D)!=="PC",M=!0,C,_=0,k="";const R=()=>{fetch(p).then(y=>y.json()).then(y=>{Object.keys(y).forEach(g=>{x(g,y[g])})}).catch(y=>{console.log(y)})};Object.keys(L).forEach(i=>{x(i,L[i])});const S=()=>{window.postMessage({type:"GoToPreviousRoute",isMobile:v},window.location.href)},T=i=>{if(i.data){switch(i.data.type){case"ProfileDetailsData":a(7,w=i.data.profileDetails.currency);break}switch(i.data["MMFE:setQuickDepositHeight"]&&a(2,C=i.data["MMFE:setQuickDepositHeight"].toString()+"px"),i.data["MMFE:openFullCashier"]==="true"&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),i.data.redirect){case"mm-hc-casino":window.postMessage({type:"GoToCasino"},window.location.href);break;case"mm-hc-sports":window.postMessage({type:"GoToSports"},window.location.href);break;case"mm-hc-contact":window.postMessage({type:"GoToCustomerSupport"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href);break;case"mm-hc-back-to-merchant":window.postMessage({type:"GoToHomepage"},window.location.href);break;case"mm-wm-hc-init-deposit":window.postMessage({type:"RedirectWithdrawDepositCloseModal"},window.location.href);break;case"mm-wm-hc-init-deposit-quick":window.postMessage({type:"CloseShortCashier"},window.location.href);break}}},B=()=>{let i=new URL(`${c}/v1/player/${d}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);if(i.searchParams.append("language",h),l&&i.searchParams.append("isShortCashier",b),f)switch(w){case"USD":_=.4;break;case"CDF":_=1e3;break}let y={method:"POST",headers:{"X-SessionId":m,currency:w||"EUR",amount:_,cashierMode:"Default",IsShortCashier:b,accept:"application/json"}};fetch(i.href,y).then(g=>g.json()).then(g=>{a(1,M=!1),a(3,k=g.CashierUrl)},g=>{console.error(g)})},H=()=>{j(h)},P=()=>{let i=document.createElement("style");i.innerHTML=o,u.appendChild(i)},U=()=>{let i=new URL(s),y=document.createElement("style");fetch(i.href).then(g=>g.text()).then(g=>{y.innerHTML=g,setTimeout(()=>{u.appendChild(y)},1)})};e.onMount(()=>(window.addEventListener("message",T,!1),()=>{window.removeEventListener("message",T)}));const F=()=>S();function I(i){e.binding_callbacks[i?"unshift":"push"](()=>{u=i,a(0,u)})}return n.$$set=i=>{"endpoint"in i&&a(8,c=i.endpoint),"session"in i&&a(9,m=i.session),"playerid"in i&&a(10,d=i.playerid),"lang"in i&&a(11,h=i.lang),"hasdefaultamount"in i&&a(12,f=i.hasdefaultamount),"clientstyling"in i&&a(13,o=i.clientstyling),"clientstylingurl"in i&&a(14,s=i.clientstylingurl),"translationurl"in i&&a(15,p=i.translationurl),"playercurrency"in i&&a(7,w=i.playercurrency),"shortcashierenabled"in i&&a(16,b=i.shortcashierenabled)},n.$$.update=()=>{n.$$.dirty&2048&&h&&H(),n.$$.dirty&65536&&(l=b.toLocaleLowerCase()==="true"),n.$$.dirty&16385&&s&&u&&U(),n.$$.dirty&8193&&o&&u&&P(),n.$$.dirty&32768&&p&&R(),n.$$.dirty&69504&&m&&d&&c&&w&&h&&b&&B()},[u,M,C,k,r,v,S,w,c,m,d,h,f,o,s,p,b,F,I]}class E extends e.SvelteComponent{constructor(t){super(),e.init(this,t,q,N,e.safe_not_equal,{endpoint:8,session:9,playerid:10,lang:11,hasdefaultamount:12,clientstyling:13,clientstylingurl:14,translationurl:15,playercurrency:7,shortcashierenabled:16},A)}get endpoint(){return this.$$.ctx[8]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[9]}set session(t){this.$$set({session:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get lang(){return this.$$.ctx[11]}set lang(t){this.$$set({lang:t}),e.flush()}get hasdefaultamount(){return this.$$.ctx[12]}set hasdefaultamount(t){this.$$set({hasdefaultamount:t}),e.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get playercurrency(){return this.$$.ctx[7]}set playercurrency(t){this.$$set({playercurrency:t}),e.flush()}get shortcashierenabled(){return this.$$.ctx[16]}set shortcashierenabled(t){this.$$set({shortcashierenabled:t}),e.flush()}}e.create_custom_element(E,{endpoint:{},session:{},playerid:{},lang:{},hasdefaultamount:{},clientstyling:{},clientstylingurl:{},translationurl:{},playercurrency:{},shortcashierenabled:{}},[],[],!0);exports.default=E;
@@ -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/CasinoHeaderControllerNd-BjLsJchb.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",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/CasinoHeaderControllerNd-B2ZZN_uT.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-BH6aLDbo.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-BoPK_uwo.js").then(({ default: t }) => {
14
14
  !customElements.get("casino-header-controller-nd") && customElements.define("casino-header-controller-nd", t.element);
15
15
  });
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-header-controller-nd",
3
- "version": "1.45.0",
3
+ "version": "1.45.2",
4
4
  "type": "module",
5
5
  "main": "es2015/casino-header-controller-nd.cjs",
6
6
  "module": "es2015/casino-header-controller-nd.js",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "./es2015/casino-header-controller-nd.cjs": "./es2015/casino-header-controller-nd.cjs"
13
13
  },
14
- "files": [
14
+ "files": [
15
15
  "es2015/",
16
16
  "components"
17
17
  ],