@everymatrix/casino-wagering-detail-controller 1.15.6 → 1.16.0
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.
|
@@ -19,7 +19,7 @@ const l=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in t)null==t[n
|
|
|
19
19
|
*
|
|
20
20
|
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
21
21
|
*/
|
|
22
|
-
function T(e){(function(){if(!G)throw new Error("Function called outside component initialization");return G})().$$.on_mount.push(e)}const U=[],B=[];let
|
|
22
|
+
function T(e){(function(){if(!G)throw new Error("Function called outside component initialization");return G})().$$.on_mount.push(e)}const U=[],B=[];let w=[];const D=[],H=Promise.resolve();let O=!1;function P(e){w.push(e)}
|
|
23
23
|
// flush() calls callbacks in this order:
|
|
24
24
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
25
25
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
@@ -52,12 +52,12 @@ throw U.length=0,R=0,e}for(S(null),U.length=0,R=0;B.length;)B.pop()();
|
|
|
52
52
|
// then, once components are updated, call
|
|
53
53
|
// afterUpdate functions. This may cause
|
|
54
54
|
// subsequent updates...
|
|
55
|
-
for(let e=0;e<
|
|
55
|
+
for(let e=0;e<w.length;e+=1){const t=w[e];N.has(t)||(
|
|
56
56
|
// ...so guard against infinite loops
|
|
57
|
-
N.add(t),t())}
|
|
57
|
+
N.add(t),t())}w.length=0}while(U.length);for(;D.length;)D.pop()();O=!1,N.clear(),S(e)}function $(e){if(null!==e.fragment){e.update(),i(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(P)}}
|
|
58
58
|
/**
|
|
59
59
|
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
60
|
-
*/const k=new Set;function j(e,t){const l=e.$$;null!==l.fragment&&(!function(e){const t=[],l=[];
|
|
60
|
+
*/const k=new Set;function j(e,t){const l=e.$$;null!==l.fragment&&(!function(e){const t=[],l=[];w.forEach((n=>-1===e.indexOf(n)?t.push(n):l.push(n))),l.forEach((e=>e())),w=t}(l.after_update),i(l.on_destroy),l.fragment&&l.fragment.d(t),
|
|
61
61
|
// TODO null out other refs, including component.$$ (but need to
|
|
62
62
|
// preserve final state?)
|
|
63
63
|
l.on_destroy=l.fragment=null,l.ctx=[])}function V(e,t){-1===e.$$.dirty[0]&&(U.push(e),O||(O=!0,H.then(I)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function K(t,o,a,d,c,s,p,u=[-1]){const f=G;S(t);const h=t.$$={fragment:null,ctx:[],
|
|
@@ -177,14 +177,14 @@ r.HEADERS_RECEIVED=2),m.prototype.open=function(e,t,l,n,i,o,a){e.open("GET",i);v
|
|
|
177
177
|
// see https://github.com/promises-aplus/promises-spec/issues/179
|
|
178
178
|
return a=e.body.getReader(),t(e.status,e.statusText,e.headers.get("Content-Type"),new M(e.headers)),new s((function(e,t){var n=function(){a.read().then((function(t){if(t.done)
|
|
179
179
|
//Note: bytes in textDecoder are ignored
|
|
180
|
-
e(void 0);else{var i=u.decode(t.value,{stream:!0});l(i),n()}})).catch((function(e){t(e)}))};n()}))})).catch((function(e){return"AbortError"===e.name?void 0:e})).then((function(e){n(e)})),{abort:function(){null!=a&&a.cancel(),d.abort()}}},F.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(null!=t)for(var l=t.length,n=0;n<l;n+=1){var i=t[n];try{"function"==typeof i.handleEvent?i.handleEvent(e):i.call(this,e)}catch(e){Z(e)}}},F.prototype.addEventListener=function(e,t){e=String(e);var l=this._listeners,n=l[e];null==n&&(n=[],l[e]=n);for(var i=!1,r=0;r<n.length;r+=1)n[r]===t&&(i=!0);i||n.push(t)},F.prototype.removeEventListener=function(e,t){e=String(e);var l=this._listeners,n=l[e];if(null!=n){for(var i=[],r=0;r<n.length;r+=1)n[r]!==t&&i.push(n[r]);0===i.length?delete l[e]:l[e]=i}},A.prototype=Object.create(x.prototype),G.prototype=Object.create(x.prototype),S.prototype=Object.create(x.prototype);var T=-1,U=0,B=1,
|
|
180
|
+
e(void 0);else{var i=u.decode(t.value,{stream:!0});l(i),n()}})).catch((function(e){t(e)}))};n()}))})).catch((function(e){return"AbortError"===e.name?void 0:e})).then((function(e){n(e)})),{abort:function(){null!=a&&a.cancel(),d.abort()}}},F.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(null!=t)for(var l=t.length,n=0;n<l;n+=1){var i=t[n];try{"function"==typeof i.handleEvent?i.handleEvent(e):i.call(this,e)}catch(e){Z(e)}}},F.prototype.addEventListener=function(e,t){e=String(e);var l=this._listeners,n=l[e];null==n&&(n=[],l[e]=n);for(var i=!1,r=0;r<n.length;r+=1)n[r]===t&&(i=!0);i||n.push(t)},F.prototype.removeEventListener=function(e,t){e=String(e);var l=this._listeners,n=l[e];if(null!=n){for(var i=[],r=0;r<n.length;r+=1)n[r]!==t&&i.push(n[r]);0===i.length?delete l[e]:l[e]=i}},A.prototype=Object.create(x.prototype),G.prototype=Object.create(x.prototype),S.prototype=Object.create(x.prototype);var T=-1,U=0,B=1,w=2,D=-1,H=0,O=1,P=2,N=3,R=/^text\/event\-stream(;.*)?$/i,I=function(e,t){var l=null==e?t:parseInt(e,10);return l!=l&&(l=t),$(l)},$=function(e){return Math.min(Math.max(e,1e3),18e6)},k=function(e,t,l){try{"function"==typeof t&&t.call(e,l)}catch(e){Z(e)}};function j(e,t){F.call(this),t=t||{},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,function(e,t,l){t=String(t);var a=Boolean(l.withCredentials),d=l.lastEventIdQueryParameterName||"lastEventId",c=$(1e3),s=I(l.heartbeatTimeout,45e3),p="",u=c,f=!1,C=0,h=l.headers||{},v=l.Transport,_=V&&null==v?void 0:new g(null!=v?new v:null!=r&&"withCredentials"in r.prototype||null==o?new r:new o),L=null!=v&&"string"!=typeof v?new v:null==_?new b:new m,E=void 0,y=0,M=T,F="",Z="",x="",j="",K=H,X=0,W=0,Y=function(t,l,n,i){if(M===U)if(200===t&&null!=n&&R.test(n)){M=B,f=Date.now(),u=c,e.readyState=B;var r=new G("open",{status:t,statusText:l,headers:i});e.dispatchEvent(r),k(e,e.onopen,r)}else{var o="";200!==t?(l&&(l=l.replace(/\s+/g," ")),o="EventSource's response has a status "+t+" "+l+" that is not 200. Aborting the connection."):o="EventSource's response has a Content-Type specifying an unsupported type: "+(null==n?"-":n.replace(/\s+/g," "))+". Aborting the connection.",q();r=new G("error",{status:t,statusText:l,headers:i});e.dispatchEvent(r),k(e,e.onerror,r),console.error(o)}},z=function(t){if(M===B){for(var l=-1,r=0;r<t.length;r+=1){(d=t.charCodeAt(r))!=="\n".charCodeAt(0)&&d!=="\r".charCodeAt(0)||(l=r)}var o=(-1!==l?j:"")+t.slice(0,l+1);j=(-1===l?j:"")+t.slice(l+1),""!==t&&(f=Date.now(),C+=t.length);for(var a=0;a<o.length;a+=1){var d=o.charCodeAt(a);if(K===D&&d==="\n".charCodeAt(0))K=H;else if(K===D&&(K=H),d==="\r".charCodeAt(0)||d==="\n".charCodeAt(0)){if(K!==H){K===O&&(W=a+1);var h=o.slice(X,W-1),v=o.slice(W+(W<a&&o.charCodeAt(W)===" ".charCodeAt(0)?1:0),a);"data"===h?(F+="\n",F+=v):"id"===h?Z=v:"event"===h?x=v:"retry"===h?(c=I(v,c),u=c):"heartbeatTimeout"===h&&(s=I(v,s),0!==y&&(i(y),y=n((function(){Q()}),s)))}if(K===H){if(""!==F){p=Z,""===x&&(x="message");var _=new A(x,{data:F.slice(1),lastEventId:Z});if(e.dispatchEvent(_),"open"===x?k(e,e.onopen,_):"message"===x?k(e,e.onmessage,_):"error"===x&&k(e,e.onerror,_),M===w)return}F="",x=""}K=d==="\r".charCodeAt(0)?D:H}else K===H&&(X=a,K=O),K===O?d===":".charCodeAt(0)&&(W=a+1,K=P):K===P&&(K=N)}}},J=function(t){if(M===B||M===U){M=T,0!==y&&(i(y),y=0),y=n((function(){Q()}),u),u=$(Math.min(16*c,2*u)),e.readyState=U;var l=new S("error",{error:t});e.dispatchEvent(l),k(e,e.onerror,l),null!=t&&console.error(t)}},q=function(){M=w,null!=E&&(E.abort(),E=void 0),0!==y&&(i(y),y=0),e.readyState=w},Q=function(){if(y=0,M===T){f=!1,C=0,y=n((function(){Q()}),s),M=U,F="",x="",Z=p,j="",X=0,W=0,K=H;
|
|
181
181
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=428916
|
|
182
182
|
// Request header field Last-Event-ID is not allowed by Access-Control-Allow-Headers.
|
|
183
183
|
var l=t;if("data:"!==t.slice(0,5)&&"blob:"!==t.slice(0,5)&&""!==p){
|
|
184
184
|
// Remove the lastEventId parameter if it's already part of the request URL.
|
|
185
185
|
var i=t.indexOf("?");l=-1===i?t:t.slice(0,i+1)+t.slice(i+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(e,t){return t===d?"":e})),
|
|
186
186
|
// Append the current lastEventId to the request URL.
|
|
187
|
-
l+=(-1===t.indexOf("?")?"?":"&")+d+"="+encodeURIComponent(p)}var r=e.withCredentials,o={Accept:"text/event-stream"},a=e.headers;if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c]);try{E=L.open(_,Y,z,J,l,r,o)}catch(e){throw q(),e}}else if(f||null==E){var u=Math.max((f||Date.now())+s-Date.now(),1);f=!1,y=n((function(){Q()}),u)}else J(new Error("No activity within "+s+" milliseconds. "+(M===U?"No response received.":C+" chars received.")+" Reconnecting.")),null!=E&&(E.abort(),E=void 0)};e.url=t,e.readyState=U,e.withCredentials=a,e.headers=h,e._close=q,Q()}(this,e,t)}var V=null!=p&&null!=u&&"body"in u.prototype;j.prototype=Object.create(F.prototype),j.prototype.CONNECTING=U,j.prototype.OPEN=B,j.prototype.CLOSED=
|
|
187
|
+
l+=(-1===t.indexOf("?")?"?":"&")+d+"="+encodeURIComponent(p)}var r=e.withCredentials,o={Accept:"text/event-stream"},a=e.headers;if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c]);try{E=L.open(_,Y,z,J,l,r,o)}catch(e){throw q(),e}}else if(f||null==E){var u=Math.max((f||Date.now())+s-Date.now(),1);f=!1,y=n((function(){Q()}),u)}else J(new Error("No activity within "+s+" milliseconds. "+(M===U?"No response received.":C+" chars received.")+" Reconnecting.")),null!=E&&(E.abort(),E=void 0)};e.url=t,e.readyState=U,e.withCredentials=a,e.headers=h,e._close=q,Q()}(this,e,t)}var V=null!=p&&null!=u&&"body"in u.prototype;j.prototype=Object.create(F.prototype),j.prototype.CONNECTING=U,j.prototype.OPEN=B,j.prototype.CLOSED=w,j.prototype.close=function(){this._close()},j.CONNECTING=U,j.OPEN=B,j.CLOSED=w,j.prototype.withCredentials=void 0;var K,X=d;null==r||null!=d&&"withCredentials"in d.prototype||(
|
|
188
188
|
// Why replace a native EventSource ?
|
|
189
189
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=444328
|
|
190
190
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=831392
|
|
@@ -228,15 +228,15 @@ n=!1}},{subscribe:Te(n,s).subscribe};
|
|
|
228
228
|
* @param value initial value
|
|
229
229
|
* @param {StartStopNotifier} [start]
|
|
230
230
|
*/
|
|
231
|
-
var s}var Be=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===
|
|
231
|
+
var s}var Be=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===we}(e)}
|
|
232
232
|
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
233
|
-
(e)};var
|
|
233
|
+
(e)};var we="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function De(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Re((l=e,Array.isArray(l)?[]:{}),e,t):e;var l}function He(e,t,l){return e.concat(t).map((function(e){return De(e,l)}))}function Oe(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Pe(e,t){try{return t in e}catch(e){return!1}}
|
|
234
234
|
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
235
|
-
function Ne(e,t,l){var n={};return l.isMergeableObject(e)&&Oe(e).forEach((function(t){n[t]=
|
|
236
|
-
})(e,i)||(Pe(e,i)&&l.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return Re;var l=t.customMerge(e);return"function"==typeof l?l:Re}(i,l)(e[i],t[i],l):n[i]=
|
|
235
|
+
function Ne(e,t,l){var n={};return l.isMergeableObject(e)&&Oe(e).forEach((function(t){n[t]=De(e[t],l)})),Oe(t).forEach((function(i){(function(e,t){return Pe(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
|
|
236
|
+
})(e,i)||(Pe(e,i)&&l.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return Re;var l=t.customMerge(e);return"function"==typeof l?l:Re}(i,l)(e[i],t[i],l):n[i]=De(t[i],l))})),n}function Re(e,t,l){(l=l||{}).arrayMerge=l.arrayMerge||He,l.isMergeableObject=l.isMergeableObject||Be,
|
|
237
237
|
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
238
238
|
// implementations can use it. The caller may not replace it.
|
|
239
|
-
l.cloneUnlessOtherwiseSpecified=
|
|
239
|
+
l.cloneUnlessOtherwiseSpecified=De;var n=Array.isArray(t);return n===Array.isArray(e)?n?l.arrayMerge(e,t,l):Ne(e,t,l):De(t,l)}Re.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,l){return Re(e,l,t)}),{})};var Ie,$e,ke,je=Re;
|
|
240
240
|
/**
|
|
241
241
|
* Type Guards
|
|
242
242
|
*/
|
|
@@ -450,9 +450,9 @@ function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var l,n
|
|
|
450
450
|
Mt?Object.fromEntries:// Ponyfill
|
|
451
451
|
function(e){for(var t={},l=0,n=e;l<n.length;l++){var i=n[l],r=i[0],o=i[1];t[r]=o}return t},Bt=bt?// Native
|
|
452
452
|
function(e,t){return e.codePointAt(t)}:// IE 11
|
|
453
|
-
function(e,t){var l=e.length;if(!(t<0||t>=l)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===l||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},
|
|
453
|
+
function(e,t){var l=e.length;if(!(t<0||t>=l)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===l||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},wt=Ft?// Native
|
|
454
454
|
function(e){return e.trimStart()}:// Ponyfill
|
|
455
|
-
function(e){return e.replace(Lt,"")},
|
|
455
|
+
function(e){return e.replace(Lt,"")},Dt=Zt?// Native
|
|
456
456
|
function(e){return e.trimEnd()}:// Ponyfill
|
|
457
457
|
function(e){return e.replace(gt,"")};
|
|
458
458
|
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
@@ -462,7 +462,7 @@ if(At){
|
|
|
462
462
|
// Native
|
|
463
463
|
var Ot=Ht("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Gt=function(e,t){var l;return Ot.lastIndex=t,null!==(l=Ot.exec(e)[1])&&void 0!==l?l:""}}else
|
|
464
464
|
// IE11
|
|
465
|
-
Gt=function(e,t){for(var l=[];;){var n=Bt(e,t);if(void 0===n||
|
|
465
|
+
Gt=function(e,t){for(var l=[];;){var n=Bt(e,t);if(void 0===n||Rt(n)||It(n))break;l.push(n),t+=n>=65536?2:1}return Tt.apply(void 0,l)};var Pt=/** @class */function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,l){for(var n=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((r=this.parseArgument(e,l)).err)return r;n.push(r.val)}else{if(125/* `}` */===i&&e>0)break;if(35/* `#` */!==i||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(l)break;return this.error(Ie.UNMATCHED_CLOSING_TAG,Et(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&Nt(this.peek()||0)){if((r=this.parseTag(e,t)).err)return r;n.push(r.val)}else{var r;if((r=this.parseLiteral(e,t)).err)return r;n.push(r.val)}}else{var o=this.clonePosition();this.bump(),n.push({type:$e.pound,location:Et(o,this.clonePosition())})}}}return{val:n,err:null}},
|
|
466
466
|
/**
|
|
467
467
|
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
468
468
|
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
@@ -490,8 +490,8 @@ if(this.bumpIf("</")){if(this.isEOF()||!Nt(this.char()))return this.error(Ie.INV
|
|
|
490
490
|
/**
|
|
491
491
|
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
492
492
|
*/
|
|
493
|
-
e.prototype.parseTagName=function(){var e=this.offset();// the first tag name character
|
|
494
|
-
for(this.bump();!this.isEOF()&&
|
|
493
|
+
e.prototype.parseTagName=function(){var e,t=this.offset();// the first tag name character
|
|
494
|
+
for(this.bump();!this.isEOF()&&(45/* '-' */===(e=this.char())||46/* '.' */===e||e>=48&&e<=57/* 0..9 */||95/* '_' */===e||e>=97&&e<=122/** a..z */||e>=65&&e<=90/* A..Z */||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var l=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var r=this.tryParseUnquoted(e,t);if(r)n+=r;else{var o=this.tryParseLeftAngleBracket();if(!o)break;n+=o}}}var a=Et(l,this.clonePosition());return{val:{type:$e.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(Nt(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
|
|
495
495
|
/** See `parseTag` function docs. */},
|
|
496
496
|
/**
|
|
497
497
|
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
@@ -539,11 +539,11 @@ return this.error(Ie.EXPECT_ARGUMENT_TYPE,Et(r,a));case"number":case"date":case"
|
|
|
539
539
|
// Parse this range:
|
|
540
540
|
// {name, number, style}
|
|
541
541
|
// ^-------^
|
|
542
|
-
this.bumpSpace();var d=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((_=this.parseSimpleArgStyleIfPossible()).err)return _;if(0===(f=
|
|
542
|
+
this.bumpSpace();var d=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((_=this.parseSimpleArgStyleIfPossible()).err)return _;if(0===(f=Dt(_.val)).length)return this.error(Ie.EXPECT_ARGUMENT_STYLE,Et(this.clonePosition(),this.clonePosition()));d={style:f,styleLocation:Et(c,this.clonePosition())}}if((L=this.tryParseArgumentClose(n)).err)return L;var s=Et(n,this.clonePosition());
|
|
543
543
|
// Extract style or skeleton
|
|
544
544
|
if(d&&St(null==d?void 0:d.style,"::",0)){
|
|
545
545
|
// Skeleton starts with `::`.
|
|
546
|
-
var p=
|
|
546
|
+
var p=wt(d.style.slice(2));if("number"===o)return(_=this.parseNumberSkeletonFromString(p,d.styleLocation)).err?_:{val:{type:$e.number,value:l,location:s,style:_.val},err:null};if(0===p.length)return this.error(Ie.EXPECT_DATE_TIME_SKELETON,s);var u=p;
|
|
547
547
|
// Get "best match" pattern only if locale is passed, if not, let it
|
|
548
548
|
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
549
549
|
// for unsupported patterns.
|
|
@@ -573,7 +573,7 @@ e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePos
|
|
|
573
573
|
// Find the end of the quoted literal text.
|
|
574
574
|
this.bump();var l=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ie.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Et(l,this.clonePosition()));this.bump();break;case 123/* `{` */:e+=1,this.bump();break;case 125/* `}` */:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var l=[];try{l=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
|
|
575
575
|
// Parse the skeleton
|
|
576
|
-
for(var t=e.split(rt).filter((function(e){return e.length>0}))
|
|
576
|
+
for(var t=[],l=0,n=e.split(rt).filter((function(e){return e.length>0}));l<n.length;l++){var i=n[l].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var r=i[0],o=i.slice(1),a=0,d=o;a<d.length;a++)if(0===d[a].length)throw new Error("Invalid number skeleton");t.push({stem:r,options:o})}return t}(e)}catch(e){return this.error(Ie.INVALID_NUMBER_SKELETON,t)}return{val:{type:ke.number,tokens:l,location:t,parsedOptions:this.shouldParseSkeletons?Ct(l):{}},err:null}},
|
|
577
577
|
/**
|
|
578
578
|
* @param nesting_level The current nesting level of messages.
|
|
579
579
|
* This can be positive when parsing message fragment in select or plural argument options.
|
|
@@ -630,7 +630,7 @@ e.prototype.bumpUntil=function(e){var t=this.offset(),l=this.message.indexOf(e,t
|
|
|
630
630
|
*/
|
|
631
631
|
e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
|
|
632
632
|
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
633
|
-
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&
|
|
633
|
+
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Rt(this.char());)this.bump()},
|
|
634
634
|
/**
|
|
635
635
|
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
636
636
|
* If the input has been exhausted, then this returns null.
|
|
@@ -640,118 +640,116 @@ e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this
|
|
|
640
640
|
* This check if codepoint is alphabet (lower & uppercase)
|
|
641
641
|
* @param codepoint
|
|
642
642
|
* @returns
|
|
643
|
-
*/function Nt(e){return e>=97&&e<=122||e>=65&&e<=90}
|
|
643
|
+
*/function Nt(e){return e>=97&&e<=122||e>=65&&e<=90}
|
|
644
644
|
/**
|
|
645
645
|
* Code point equivalent of regex `\p{White_Space}`.
|
|
646
646
|
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
647
|
-
*/
|
|
647
|
+
*/
|
|
648
|
+
function Rt(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
|
|
648
649
|
/**
|
|
649
650
|
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
650
651
|
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
651
|
-
*/function
|
|
652
|
+
*/function It(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function $t(e){e.forEach((function(e){if(delete e.location,ze(e)||Je(e))for(var t in e.options)delete e.options[t].location,$t(e.options[t].value);else Xe(e)&&et(e.style)||(We(e)||Ye(e))&&tt(e.style)?delete e.style.location:Qe(e)&&$t(e.children)}))}function kt(e,t){void 0===t&&(t={}),t=Q({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var l=new Pt(e,t).parse();if(l.err){var n=SyntaxError(Ie[l.err.kind]);
|
|
652
653
|
// @ts-expect-error Assign to error object
|
|
653
654
|
throw n.location=l.err.location,
|
|
654
655
|
// @ts-expect-error Assign to error object
|
|
655
|
-
n.originalMessage=l.err.message,n}return(null==t?void 0:t.captureLocation)
|
|
656
|
+
n.originalMessage=l.err.message,n}return(null==t?void 0:t.captureLocation)||$t(l.val),l.val}
|
|
656
657
|
|
|
657
658
|
// Main
|
|
658
659
|
|
|
659
|
-
function
|
|
660
|
+
function jt(e,t){var l=t&&t.cache?t.cache:qt,n=t&&t.serializer?t.serializer:Yt;return(t&&t.strategy?t.strategy:Wt)(e,{cache:l,serializer:n})}
|
|
660
661
|
|
|
661
662
|
// Strategy
|
|
662
663
|
|
|
663
|
-
function
|
|
664
|
+
function Vt(e,t,l,n){var i,r=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:l(n),o=t.get(r);return void 0===o&&(o=e.call(this,n),t.set(r,o)),o}function Kt(e,t,l){var n=Array.prototype.slice.call(arguments,3),i=l(n),r=t.get(i);return void 0===r&&(r=e.apply(this,n),t.set(i,r)),r}function Xt(e,t,l,n,i){return l.bind(t,e,n,i)}function Wt(e,t){return Xt(e,this,1===e.length?Vt:Kt,t.cache.create(),t.serializer)}
|
|
664
665
|
// Serializer
|
|
665
|
-
var
|
|
666
|
+
var Yt=function(){return JSON.stringify(arguments)};
|
|
666
667
|
|
|
667
668
|
// Cache
|
|
668
669
|
|
|
669
|
-
function
|
|
670
|
+
function zt(){this.cache=Object.create(null)}zt.prototype.get=function(e){return this.cache[e]},zt.prototype.set=function(e,t){this.cache[e]=t};var Jt,qt={create:function(){
|
|
670
671
|
// @ts-ignore
|
|
671
|
-
return new
|
|
672
|
+
return new zt}},Qt={variadic:function(e,t){return Xt(e,this,Kt,t.cache.create(),t.serializer)},monadic:function(e,t){return Xt(e,this,Vt,t.cache.create(),t.serializer)}};!function(e){
|
|
672
673
|
// When we have a placeholder but no value to format
|
|
673
674
|
e.MISSING_VALUE="MISSING_VALUE",
|
|
674
675
|
// When value supplied is invalid
|
|
675
676
|
e.INVALID_VALUE="INVALID_VALUE",
|
|
676
677
|
// When we need specific Intl API but it's not available
|
|
677
|
-
e.MISSING_INTL_API="MISSING_INTL_API"}(
|
|
678
|
+
e.MISSING_INTL_API="MISSING_INTL_API"}(Jt||(Jt={}));var el,tl=/** @class */function(e){function t(t,l,n){var i=e.call(this,t)||this;return i.code=l,i.originalMessage=n,i}return q(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),ll=/** @class */function(e){function t(t,l,n,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(l,'". Options are "').concat(Object.keys(n).join('", "'),'"'),Jt.INVALID_VALUE,i)||this}return q(t,e),t}(tl),nl=/** @class */function(e){function t(t,l,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(l),Jt.INVALID_VALUE,n)||this}return q(t,e),t}(tl),il=/** @class */function(e){function t(t,l){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(l,'"'),Jt.MISSING_VALUE,l)||this}return q(t,e),t}(tl);function rl(e){return"function"==typeof e}
|
|
678
679
|
// TODO(skeleton): add skeleton support
|
|
679
|
-
function
|
|
680
|
+
function ol(e,t,l,n,i,r,
|
|
680
681
|
// For debugging
|
|
681
682
|
o){
|
|
682
683
|
// Hot path for straight simple msg translations
|
|
683
|
-
if(1===e.length&&Ve(e[0]))return[{type:
|
|
684
|
+
if(1===e.length&&Ve(e[0]))return[{type:el.literal,value:e[0].value}];for(var a=[],d=0,c=e;d<c.length;d++){var s=c[d];
|
|
684
685
|
// Exit early for string parts.
|
|
685
|
-
if(Ve(s))a.push({type:
|
|
686
|
+
if(Ve(s))a.push({type:el.literal,value:s.value});else
|
|
686
687
|
// TODO: should this part be literal type?
|
|
687
688
|
// Replace `#` in plural rules with the actual numeric value.
|
|
688
|
-
if(qe(s))"number"==typeof r&&a.push({type:
|
|
689
|
+
if(qe(s))"number"==typeof r&&a.push({type:el.literal,value:l.getNumberFormat(t).format(r)});else{var p=s.value;
|
|
689
690
|
// Enforce that all required values are provided by the caller.
|
|
690
|
-
if(!i||!(p in i))throw new
|
|
691
|
+
if(!i||!(p in i))throw new il(p,o);var u=i[p];if(Ke(s))u&&"string"!=typeof u&&"number"!=typeof u||(u="string"==typeof u||"number"==typeof u?String(u):""),a.push({type:"string"==typeof u?el.literal:el.object,value:u});else
|
|
691
692
|
// Recursively format plural and select parts' option — which can be a
|
|
692
693
|
// nested pattern structure. The choosing of the option to use is
|
|
693
694
|
// abstracted-by and delegated-to the part helper object.
|
|
694
|
-
if(We(s)){var f="string"==typeof s.style?n.date[s.style]:tt(s.style)?s.style.parsedOptions:void 0;a.push({type:
|
|
695
|
+
if(We(s)){var f="string"==typeof s.style?n.date[s.style]:tt(s.style)?s.style.parsedOptions:void 0;a.push({type:el.literal,value:l.getDateTimeFormat(t,f).format(u)})}else if(Ye(s)){f="string"==typeof s.style?n.time[s.style]:tt(s.style)?s.style.parsedOptions:n.time.medium;a.push({type:el.literal,value:l.getDateTimeFormat(t,f).format(u)})}else if(Xe(s)){(f="string"==typeof s.style?n.number[s.style]:et(s.style)?s.style.parsedOptions:void 0)&&f.scale&&(u*=f.scale||1),a.push({type:el.literal,value:l.getNumberFormat(t,f).format(u)})}else{if(Qe(s)){var C=s.children,h=s.value,v=i[h];if(!rl(v))throw new nl(h,"function",o);var _=v(ol(C,t,l,n,i,r).map((function(e){return e.value})));Array.isArray(_)||(_=[_]),a.push.apply(a,_.map((function(e){return{type:"string"==typeof e?el.literal:el.object,value:e}})))}if(ze(s)){if(!(L=s.options[u]||s.options.other))throw new ll(s.value,u,Object.keys(s.options),o);a.push.apply(a,ol(L.value,t,l,n,i))}else if(Je(s)){var L;if(!(L=s.options["=".concat(u)])){if(!Intl.PluralRules)throw new tl('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Jt.MISSING_INTL_API,o);var g=l.getPluralRules(t,{type:s.pluralType}).select(u-(s.offset||0));L=s.options[g]||s.options.other}if(!L)throw new ll(s.value,u,Object.keys(s.options),o);a.push.apply(a,ol(L.value,t,l,n,i,u-(s.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var l=e[e.length-1];return l&&l.type===el.literal&&t.type===el.literal?l.value+=t.value:e.push(t),e}),[])}(a)}
|
|
695
696
|
/*
|
|
696
697
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
697
698
|
Copyrights licensed under the New BSD License.
|
|
698
699
|
See the accompanying LICENSE file for terms.
|
|
699
700
|
*/
|
|
700
701
|
// -- MessageFormat --------------------------------------------------------
|
|
701
|
-
function
|
|
702
|
+
function al(e,t){return t?Object.keys(e).reduce((function(l,n){var i,r;return l[n]=(i=e[n],(r=t[n])?Q(Q(Q({},i||{}),r||{}),Object.keys(i).reduce((function(e,t){return e[t]=Q(Q({},i[t]),r[t]||{}),e}),{})):i),l}),Q({},e)):e}function dl(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,l){e[t]=l}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(el||(el={}));var cl=/** @class */function(){function e(t,l,n,i){var r,o=this;if(void 0===l&&(l=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=o.formatToParts(e);
|
|
702
703
|
// Hot path for straight simple msg translations
|
|
703
|
-
if(1===t.length)return t[0].value;var l=t.reduce((function(e,t){return e.length&&t.type===
|
|
704
|
+
if(1===t.length)return t[0].value;var l=t.reduce((function(e,t){return e.length&&t.type===el.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return l.length<=1?l[0]||"":l},this.formatToParts=function(e){return ol(o.ast,o.locales,o.formatters,o.formats,e,void 0,o.message)},this.resolvedOptions=function(){return{locale:o.resolvedLocale.toString()}},this.getAst=function(){return o.ast},
|
|
704
705
|
// Defined first because it's used to build the format pattern.
|
|
705
706
|
this.locales=l,this.resolvedLocale=e.resolveLocale(l),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
706
707
|
// Parse string messages into an AST.
|
|
707
708
|
this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
|
|
708
709
|
// Creates a new object with the specified `formats` merged with the default
|
|
709
710
|
// formats.
|
|
710
|
-
this.formats=
|
|
711
|
+
this.formats=al(e.formats,n),this.formatters=i&&i.formatters||(void 0===(r=this.formatterCache)&&(r={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:jt((function(){for(var e,t=[],l=0;l<arguments.length;l++)t[l]=arguments[l];return new((e=Intl.NumberFormat).bind.apply(e,te([void 0],t,!1)))}),{cache:dl(r.number),strategy:Qt.variadic}),getDateTimeFormat:jt((function(){for(var e,t=[],l=0;l<arguments.length;l++)t[l]=arguments[l];return new((e=Intl.DateTimeFormat).bind.apply(e,te([void 0],t,!1)))}),{cache:dl(r.dateTime),strategy:Qt.variadic}),getPluralRules:jt((function(){for(var e,t=[],l=0;l<arguments.length;l++)t[l]=arguments[l];return new((e=Intl.PluralRules).bind.apply(e,te([void 0],t,!1)))}),{cache:dl(r.pluralRules),strategy:Qt.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=kt,
|
|
711
712
|
// Default format options used as the prototype of the `formats` provided to the
|
|
712
713
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
713
714
|
// and Intl.DateTimeFormat instances.
|
|
714
|
-
e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),pl=sl;
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
Copyrights licensed under the New BSD License.
|
|
718
|
-
See the accompanying LICENSE file for terms.
|
|
719
|
-
*/const ul={},fl=(e,t,l)=>l?(t in ul||(ul[t]={}),e in ul[t]||(ul[t][e]=l),l):l,Cl=(e,t)=>{if(null==t)return;if(t in ul&&e in ul[t])return ul[t][e];const l=Tl(t);for(let n=0;n<l.length;n++){const i=Ll(l[n],e);if(i)return fl(e,t,i)}};let hl;const vl=Te({});function _l(e){return e in hl}function Ll(e,t){if(!_l(e))return null;const l=function(e){return hl[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const l=t.split(".");let n=e;for(let e=0;e<l.length;e++)if("object"==typeof n){if(e>0){const t=l.slice(e,l.length).join(".");if(t in n){n=n[t];break}}n=n[l[e]]}else n=void 0;return n}(l,t)}function gl(e,...t){delete ul[e],vl.update((l=>(l[e]=je.all([l[e]||{},...t]),l)))}Ue([vl],(([e])=>Object.keys(e))),vl.subscribe((e=>hl=e));const El={};function yl(e){return El[e]}function ml(e){return null!=e&&Tl(e).some((e=>{var t;return null===(t=yl(e))||void 0===t?void 0:t.size}))}const Ml={};function bl(e){if(!ml(e))return e in Ml?Ml[e]:Promise.resolve();const t=function(e){return Tl(e).map((e=>{const t=yl(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Ml[e]=Promise.all(t.map((([e,t])=>function(e,t){const l=Promise.all(t.map((t=>(function(e,t){El[e].delete(t),0===El[e].size&&delete El[e]}(e,t),t().then((e=>e.default||e))))));return l.then((t=>gl(e,...t)))}(e,t)))).then((()=>{if(ml(e))return bl(e);delete Ml[e]})),Ml[e]}const Fl={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Zl(){return Fl}const xl=Te(!1);let Al;const Gl=Te(null);function Sl(e){return e.split("-").map(((e,t,l)=>l.slice(0,t+1).join("-"))).reverse()}function Tl(e,t=Zl().fallbackLocale){const l=Sl(e);return t?[...new Set([...l,...Sl(t)])]:l}function Ul(){return null!=Al?Al:void 0}Gl.subscribe((e=>{Al=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Bl={...Gl,set:e=>{if(e&&function(e){if(null==e)return;const t=Tl(e);for(let e=0;e<t.length;e++){const l=t[e];if(_l(l))return l}}(e)&&ml(e)){const{loadingDelay:t}=Zl();let l;return"undefined"!=typeof window&&null!=Ul()&&t?l=window.setTimeout((()=>xl.set(!0)),t):xl.set(!0),bl(e).then((()=>{Gl.set(e)})).finally((()=>{clearTimeout(l),xl.set(!1)}))}return Gl.set(e)}},Dl=e=>{const t=Object.create(null);return l=>{const n=JSON.stringify(l);return n in t?t[n]:t[n]=e(l)}},wl=(e,t)=>{const{formats:l}=Zl();if(e in l&&t in l[e])return l[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Hl=Dl((({locale:e,format:t,...l})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(l=wl("number",t)),new Intl.NumberFormat(e,l)})),Ol=Dl((({locale:e,format:t,...l})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?l=wl("date",t):0===Object.keys(l).length&&(l=wl("date","short")),new Intl.DateTimeFormat(e,l)})),Pl=Dl((({locale:e,format:t,...l})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?l=wl("time",t):0===Object.keys(l).length&&(l=wl("time","short")),new Intl.DateTimeFormat(e,l)})),Nl=Dl(((e,t=Ul())=>new pl(e,t,Zl().formats,{ignoreTag:Zl().ignoreTag}))),Rl=(e,t={})=>{var l,n,i,r;let o=t;"object"==typeof e&&(o=e,e=o.id);const{values:a,locale:d=Ul(),default:c}=o;if(null==d)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let s=Cl(e,d);if(s){if("string"!=typeof s)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof s}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),s}else s=null!==(r=null!==(i=null===(n=(l=Zl()).handleMissingMessage)||void 0===n?void 0:n.call(l,{locale:d,id:e,defaultValue:c}))&&void 0!==i?i:c)&&void 0!==r?r:e;if(!a)return s;let p=s;try{p=Nl(s,d).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return p},Il=(e,t)=>(({locale:e=Ul(),...t}={})=>Pl({locale:e,...t}))(t).format(e),$l=(e,t)=>(({locale:e=Ul(),...t}={})=>Ol({locale:e,...t}))(t).format(e),kl=(e,t)=>(({locale:e=Ul(),...t}={})=>Hl({locale:e,...t}))(t).format(e),jl=(e,t=Ul())=>Cl(e,t),Vl=Ue([Bl,vl],(()=>Rl));Ue([Bl],(()=>Il)),Ue([Bl],(()=>$l)),Ue([Bl],(()=>kl)),Ue([Bl,vl],(()=>jl));const Kl=e=>{(({withLocale:e,translations:t})=>{Bl.subscribe((l=>{null==l&&(vl.set(t),Bl.set(e))}));// maybe we will need this to make sure that the i18n is set up only once
|
|
715
|
+
e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const sl={},pl=(e,t,l)=>l?(t in sl||(sl[t]={}),e in sl[t]||(sl[t][e]=l),l):l,ul=(e,t)=>{if(null==t)return;if(t in sl&&e in sl[t])return sl[t][e];const l=Ol(t);for(let n=0;n<l.length;n++){const i=vl(l[n],e);if(i)return pl(e,t,i)}};let fl;const Cl=Te({});function hl(e){return e in fl}function vl(e,t){if(!hl(e))return null;const l=function(e){return fl[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const l=t.split(".");let n=e;for(let e=0;e<l.length;e++)if("object"==typeof n){if(e>0){const t=l.slice(e,l.length).join(".");if(t in n){n=n[t];break}}n=n[l[e]]}else n=void 0;return n}(l,t)}function _l(e,...t){delete sl[e],Cl.update((l=>(l[e]=je.all([l[e]||{},...t]),l)))}Ue([Cl],(([e])=>Object.keys(e))),Cl.subscribe((e=>fl=e));const Ll={};function gl(e){return Ll[e]}function El(e){return null!=e&&Ol(e).some((e=>{var t;return null==(t=gl(e))?void 0:t.size}))}function yl(e,t){const l=Promise.all(t.map((t=>(function(e,t){Ll[e].delete(t),0===Ll[e].size&&delete Ll[e]}(e,t),t().then((e=>e.default||e))))));return l.then((t=>_l(e,...t)))}const ml={};function Ml(e){if(!El(e))return e in ml?ml[e]:Promise.resolve();const t=function(e){return Ol(e).map((e=>{const t=gl(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return ml[e]=Promise.all(t.map((([e,t])=>yl(e,t)))).then((()=>{if(El(e))return Ml(e);delete ml[e]})),ml[e]}const bl={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Fl(){return bl}const Zl=Te(!1);var xl=Object.defineProperty,Al=Object.defineProperties,Gl=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,Tl=Object.prototype.hasOwnProperty,Ul=Object.prototype.propertyIsEnumerable,Bl=(e,t,l)=>t in e?xl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l;let wl;const Dl=Te(null);function Hl(e){return e.split("-").map(((e,t,l)=>l.slice(0,t+1).join("-"))).reverse()}function Ol(e,t=Fl().fallbackLocale){const l=Hl(e);return t?[...new Set([...l,...Hl(t)])]:l}function Pl(){return null!=wl?wl:void 0}Dl.subscribe((e=>{wl=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Nl=(Rl=((e,t)=>{for(var l in t||(t={}))Tl.call(t,l)&&Bl(e,l,t[l]);if(Sl)for(var l of Sl(t))Ul.call(t,l)&&Bl(e,l,t[l]);return e})({},Dl),Al(Rl,Gl({set:e=>{if(e&&function(e){if(null==e)return;const t=Ol(e);for(let e=0;e<t.length;e++){const l=t[e];if(hl(l))return l}}(e)&&El(e)){const{loadingDelay:t}=Fl();let l;return"undefined"!=typeof window&&null!=Pl()&&t?l=window.setTimeout((()=>Zl.set(!0)),t):Zl.set(!0),Ml(e).then((()=>{Dl.set(e)})).finally((()=>{clearTimeout(l),Zl.set(!1)}))}return Dl.set(e)}})));var Rl;const Il=e=>{const t=Object.create(null);return l=>{const n=JSON.stringify(l);return n in t?t[n]:t[n]=e(l)}};var $l=Object.defineProperty,kl=Object.getOwnPropertySymbols,jl=Object.prototype.hasOwnProperty,Vl=Object.prototype.propertyIsEnumerable,Kl=(e,t,l)=>t in e?$l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,Xl=(e,t)=>{for(var l in t||(t={}))jl.call(t,l)&&Kl(e,l,t[l]);if(kl)for(var l of kl(t))Vl.call(t,l)&&Kl(e,l,t[l]);return e},Wl=(e,t)=>{var l={};for(var n in e)jl.call(e,n)&&t.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&kl)for(var n of kl(e))t.indexOf(n)<0&&Vl.call(e,n)&&(l[n]=e[n]);return l};const Yl=(e,t)=>{const{formats:l}=Fl();if(e in l&&t in l[e])return l[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},zl=Il((e=>{var t=e,{locale:l,format:n}=t,i=Wl(t,["locale","format"]);if(null==l)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Yl("number",n)),new Intl.NumberFormat(l,i)})),Jl=Il((e=>{var t=e,{locale:l,format:n}=t,i=Wl(t,["locale","format"]);if(null==l)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Yl("date",n):0===Object.keys(i).length&&(i=Yl("date","short")),new Intl.DateTimeFormat(l,i)})),ql=Il((e=>{var t=e,{locale:l,format:n}=t,i=Wl(t,["locale","format"]);if(null==l)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Yl("time",n):0===Object.keys(i).length&&(i=Yl("time","short")),new Intl.DateTimeFormat(l,i)})),Ql=Il((
|
|
716
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
717
|
+
(e,t=Pl())=>new cl(e,t,Fl().formats,{ignoreTag:Fl().ignoreTag}))),en=(e,t={})=>{var l,n,i,r;let o=t;"object"==typeof e&&(o=e,e=o.id);const{values:a,locale:d=Pl(),default:c}=o;if(null==d)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let s=ul(e,d);if(s){if("string"!=typeof s)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof s}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),s}else s=null!=(r=null!=(i=null==(n=(l=Fl()).handleMissingMessage)?void 0:n.call(l,{locale:d,id:e,defaultValue:c}))?i:c)?r:e;if(!a)return s;let p=s;try{p=Ql(s,d).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return p},tn=(e,t)=>((e={})=>{var t=e,{locale:l=Pl()}=t,n=Wl(t,["locale"]);return ql(Xl({locale:l},n))})(t).format(e),ln=(e,t)=>((e={})=>{var t=e,{locale:l=Pl()}=t,n=Wl(t,["locale"]);return Jl(Xl({locale:l},n))})(t).format(e),nn=(e,t)=>((e={})=>{var t=e,{locale:l=Pl()}=t,n=Wl(t,["locale"]);return zl(Xl({locale:l},n))})(t).format(e),rn=(e,t=Pl())=>ul(e,t),on=Ue([Nl,Cl],(()=>en));Ue([Nl],(()=>tn)),Ue([Nl],(()=>ln)),Ue([Nl],(()=>nn)),Ue([Nl,Cl],(()=>rn));const an=e=>{(({withLocale:e,translations:t})=>{Nl.subscribe((l=>{null==l&&(Cl.set(t),Nl.set(e))}));// maybe we will need this to make sure that the i18n is set up only once
|
|
720
718
|
/*dictionary.set(translations);
|
|
721
|
-
locale.set(_locale);*/})({withLocale:"en",translations:{}}),Object.keys(e).forEach((t=>{var l,n;l=t,n=e[t],
|
|
719
|
+
locale.set(_locale);*/})({withLocale:"en",translations:{}}),Object.keys(e).forEach((t=>{var l,n;l=t,n=e[t],_l(l,n)}))},{window:dn}=p;function cn(e,t,l){const n=e.slice();return n[23]=t[l],n[25]=l,n}function sn(e,t,l){const n=e.slice();return n[26]=t[l],n}function pn(e,t,l){const n=e.slice();return n[29]=t[l],n}
|
|
722
720
|
// (90:0) {#if bonus && isMobileView}
|
|
723
|
-
function
|
|
721
|
+
function un(e){let l,n,i,r,o,a,c,s,p,h,g,E,m,b,F,x,A,G,S,T,U,B,w=/*locale*/e[3]("wageringBonus")+"",D=/*bonus*/e[0]?` - ${/*bonus*/e[0]?.name}`:"",H=/*bonus*/(e[0]?Ae(/*bonus*/e[0]?.expiryDate):" ")+"",O=[le("Title")],P={};for(let e=0;e<O.length;e+=1)P=t(P,O[e]);let N=[le("CloseIcon")],R={};for(let e=0;e<N.length;e+=1)R=t(R,N[e]);let I=[le("ImageAndNameContainer")],$={};for(let e=0;e<I.length;e+=1)$=t($,I[e]);let k=[le("ExpiryDateTimeIcon")],j={};for(let e=0;e<k.length;e+=1)j=t(j,k[e]);let V=[le("ExpiryDateTime")],K={};for(let e=0;e<V.length;e+=1)K=t(K,V[e]);let X=[le("ExpiryDateTimeContainer")],W={};for(let e=0;e<X.length;e+=1)W=t(W,X[e]);let Y=[le("TopContainer")],z={};for(let e=0;e<Y.length;e+=1)z=t(z,Y[e]);return{c(){l=v("div"),n=v("div"),i=v("div"),r=v("img"),c=L(),s=v("div"),p=_(w),h=_(D),g=L(),E=v("div"),m=v("img"),F=L(),x=v("div"),A=v("span"),G=v("img"),T=L(),U=v("span"),B=_(H),d(r.src,o=/*bonus*/e[0]?.assets)||y(r,"src",o),y(r,"alt",""),y(i,"class",a=/*bonus*/e[0]?.assets?"":"Hidden"),M(s,P),d(m.src,b=Fe)||y(m,"src",b),y(m,"alt",""),M(E,R),M(n,$),d(G.src,S=be)||y(G,"src",S),y(G,"alt",""),M(A,j),M(U,K),M(x,W),M(l,z)},m(e,t){f(e,l,t),u(l,n),u(n,i),u(i,r),u(n,c),u(n,s),u(s,p),u(s,h),u(n,g),u(n,E),u(E,m),u(l,F),u(l,x),u(x,A),u(A,G),u(x,T),u(x,U),u(U,B)},p(e,t){/*bonus*/1&t[0]&&!d(r.src,o=/*bonus*/e[0]?.assets)&&y(r,"src",o),/*bonus*/1&t[0]&&a!==(a=/*bonus*/e[0]?.assets?"":"Hidden")&&y(i,"class",a),/*locale*/8&t[0]&&w!==(w=/*locale*/e[3]("wageringBonus")+"")&&Z(p,w,P.contenteditable),/*bonus*/1&t[0]&&D!==(D=/*bonus*/e[0]?` - ${/*bonus*/e[0]?.name}`:"")&&Z(h,D,P.contenteditable),/*bonus*/1&t[0]&&H!==(H=/*bonus*/(e[0]?Ae(/*bonus*/e[0]?.expiryDate):" ")+"")&&Z(B,H,K.contenteditable)},d(e){e&&C(l)}}}
|
|
724
722
|
// (182:8) {:else}
|
|
725
|
-
function
|
|
723
|
+
function fn(t){let l;return{c(){l=_("Don't found specified bonus")},m(e,t){f(e,l,t)},p:e,d(e){e&&C(l)}}}
|
|
726
724
|
// (124:8) {#if bonus}
|
|
727
|
-
function
|
|
725
|
+
function Cn(e){let l,n,i,r,o,a,d,c,s,p,g,E,m,b,Z,x,A,G=/*locale*/e[3]("level")+"",S=/*locale*/e[3]("target")+"",T=/*locale*/e[3]("status")+"",U=/*locale*/e[3]("rewards")+"",B=/*levels*/e[4],w=[];for(let t=0;t<B.length;t+=1)w[t]=mn(cn(e,B,t));let D=[le("TableCointainer",/*isMobileView*/e[8]&&"TableCointainerMobile")],H={};for(let e=0;e<D.length;e+=1)H=t(H,D[e]);return{c(){l=v("div"),n=v("table"),i=v("thead"),r=v("tr"),o=v("th"),a=_(G),d=L(),c=v("th"),s=_(S),p=L(),g=v("th"),E=_(T),m=L(),b=v("th"),Z=_(U),x=L(),A=v("tbody");for(let e=0;e<w.length;e+=1)w[e].c();y(n,"border",0),M(l,H)},m(e,t){f(e,l,t),u(l,n),u(n,i),u(i,r),u(r,o),u(o,a),u(r,d),u(r,c),u(c,s),u(r,p),u(r,g),u(g,E),u(r,m),u(r,b),u(b,Z),u(n,x),u(n,A);for(let e=0;e<w.length;e+=1)w[e]&&w[e].m(A,null)},p(e,t){if(/*locale*/8&t[0]&&G!==(G=/*locale*/e[3]("level")+"")&&F(a,G),/*locale*/8&t[0]&&S!==(S=/*locale*/e[3]("target")+"")&&F(s,S),/*locale*/8&t[0]&&T!==(T=/*locale*/e[3]("status")+"")&&F(E,T),/*locale*/8&t[0]&&U!==(U=/*locale*/e[3]("rewards")+"")&&F(Z,U),/*bonus, currentlevel, levels, locale, isMobileView*/313&t[0]){let l;for(B=/*levels*/e[4],l=0;l<B.length;l+=1){const n=cn(e,B,l);w[l]?w[l].p(n,t):(w[l]=mn(n),w[l].c(),w[l].m(A,null))}for(;l<w.length;l+=1)w[l].d(1);w.length=B.length}M(l,H=function(e,t){const l={},n={},i={$$scope:1};let r=e.length;for(;r--;){const o=e[r],a=t[r];if(a){for(const e in o)e in a||(n[e]=1);for(const e in a)i[e]||(l[e]=a[e],i[e]=1);e[r]=a}else for(const e in o)i[e]=1}for(const e in n)e in l||(l[e]=void 0);return l}(D,[/*isMobileView*/256&t[0]&&le("TableCointainer",/*isMobileView*/e[8]&&"TableCointainerMobile")]))},d(e){e&&C(l),h(w,e)}}}
|
|
728
726
|
// (121:6) {#if isLoading}
|
|
729
|
-
function
|
|
727
|
+
function hn(t){let l;return{c(){l=v("general-animation-loading")},m(e,t){f(e,l,t)},p:e,d(e){e&&C(l)}}}
|
|
730
728
|
// (166:26) {:else}
|
|
731
|
-
function
|
|
729
|
+
function vn(e){let t,l=/*locale*/e[3](/*status*/e[26])+"";return{c(){t=_(l)},m(e,l){f(e,t,l)},p(e,n){/*locale, bonus, currentlevel*/41&n[0]&&l!==(l=/*locale*/e[3](/*status*/e[26])+"")&&F(t,l)},d(e){e&&C(t)}}}
|
|
732
730
|
// (160:26) {#if isMobileView}
|
|
733
|
-
function
|
|
734
|
-
return e[26]===ue.completed?
|
|
731
|
+
function _n(e){let t;function l(e,t){/*status*/
|
|
732
|
+
return e[26]===ue.completed?gn:/*status*/e[26]===ue.locked?Ln:void 0}let n=l(e),i=n&&n(e);return{c(){i&&i.c(),t=g()},m(e,l){i&&i.m(e,l),f(e,t,l)},p(e,r){n===(n=l(e))&&i?i.p(e,r):(i&&i.d(1),i=n&&n(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i&&i.d(e),e&&C(t)}}}
|
|
735
733
|
// (163:74)
|
|
736
|
-
function
|
|
734
|
+
function Ln(t){let l,n;return{c(){l=v("img"),d(l.src,n=xe)||y(l,"src",n),y(l,"alt","")},m(e,t){f(e,l,t)},p:e,d(e){e&&C(l)}}}
|
|
737
735
|
// (161:28) {#if status === BonusDetailStatus.completed}
|
|
738
|
-
function
|
|
736
|
+
function gn(t){let l,n;return{c(){l=v("img"),d(l.src,n=Ze)||y(l,"src",n),y(l,"alt","")},m(e,t){f(e,l,t)},p:e,d(e){e&&C(l)}}}
|
|
739
737
|
// (172:24) {#each level.bonuses as levelBonus}
|
|
740
|
-
function
|
|
738
|
+
function En(e){let t,l,n=pe(/*level*/e[23],/*levelBonus*/e[29],/*locale*/e[3])+"";return{c(){t=v("p"),l=_(n)},m(e,n){f(e,t,n),u(t,l)},p(e,t){/*levels, locale*/24&t[0]&&n!==(n=pe(/*level*/e[23],/*levelBonus*/e[29],/*locale*/e[3])+"")&&F(l,n)},d(e){e&&C(t)}}}
|
|
741
739
|
// (139:18) {#each [getUserStautsText(bonus, index, currentlevel)] as status}
|
|
742
|
-
function
|
|
740
|
+
function yn(e){let l,n,i,r,o,a,d,c,s,p,g,E=/*index*/e[25]+1+"",y=F()+"",m=[le("Level","center")],b={};for(let e=0;e<m.length;e+=1)b=t(b,m[e]);function F(){/*func*/
|
|
743
741
|
return e[17](/*level*/e[23])}let A=[le("Target")],G={};for(let e=0;e<A.length;e+=1)G=t(G,A[e]);function S(e,t){/*isMobileView*/
|
|
744
|
-
return e[8]?
|
|
742
|
+
return e[8]?_n:vn}let T=S(e),U=T(e),B=[le("Status","center")],w={};for(let e=0;e<B.length;e+=1)w=t(w,B[e]);let D=/*level*/e[23].bonuses,H=[];for(let t=0;t<D.length;t+=1)H[t]=En(pn(e,D,t));let O=[le("Reward")],P={};for(let e=0;e<O.length;e+=1)P=t(P,O[e]);return{c(){l=v("tr"),n=v("td"),i=_(E),r=L(),o=v("td"),a=_(y),d=L(),c=v("td"),U.c(),s=L(),p=v("td");for(let e=0;e<H.length;e+=1)H[e].c();g=L(),M(n,b),M(o,G),M(c,w),M(p,P),x(l,"active",/*status*/e[26]===ue.inProgress)},m(e,t){f(e,l,t),u(l,n),u(n,i),u(l,r),u(l,o),u(o,a),u(l,d),u(l,c),U.m(c,null),u(l,s),u(l,p);for(let e=0;e<H.length;e+=1)H[e]&&H[e].m(p,null);u(l,g)},p(t,n){if(e=t,/*levels, locale, bonus*/25&n[0]&&y!==(y=F()+"")&&Z(a,y,G.contenteditable),T===(T=S(e))&&U?U.p(e,n):(U.d(1),U=T(e),U&&(U.c(),U.m(c,null))),/*levels, locale*/24&n[0]){let t;for(D=/*level*/e[23].bonuses,t=0;t<D.length;t+=1){const l=pn(e,D,t);H[t]?H[t].p(l,n):(H[t]=En(l),H[t].c(),H[t].m(p,null))}for(;t<H.length;t+=1)H[t].d(1);H.length=D.length}/*bonus, currentlevel*/33&n[0]&&x(l,"active",/*status*/e[26]===ue.inProgress)},d(e){e&&C(l),U.d(),h(H,e)}}}
|
|
745
743
|
// (138:16) {#each levels as level,index}
|
|
746
|
-
function
|
|
744
|
+
function mn(e){let t,l=[fe(/*bonus*/e[0],/*index*/e[25],/*currentlevel*/e[5])],n=[];for(let t=0;t<1;t+=1)n[t]=yn(sn(e,l,t));return{c(){for(let e=0;e<1;e+=1)n[e].c();t=g()},m(e,l){for(let t=0;t<1;t+=1)n[t]&&n[t].m(e,l);f(e,t,l)},p(e,i){if(/*bonus, currentlevel, levels, locale, isMobileView*/313&i[0]){let r;for(l=[fe(/*bonus*/e[0],/*index*/e[25],/*currentlevel*/e[5])],r=0;r<1;r+=1){const o=sn(e,l,r);n[r]?n[r].p(o,i):(n[r]=yn(o),n[r].c(),n[r].m(t.parentNode,t))}for(;r<1;r+=1)n[r].d(1)}},d(e){h(n,e),e&&C(t)}}}
|
|
747
745
|
// (189:6) {#if bonus}
|
|
748
|
-
function
|
|
746
|
+
function Mn(e){let l,n,i,r,o,a,d,c,s,p,h,g,E,y,m,b,Z=/*levels*/e[4].length+"",x=Ae(/*bonus*/e[0].startTime)+"",A=Ae(/*bonus*/e[0].endTime)+"",G=[le("About")],S={};for(let e=0;e<G.length;e+=1)S=t(S,G[e]);return{c(){l=v("div"),n=v("p"),i=_("There are "),r=_(Z),o=_(" levels in the bonus."),a=L(),d=v("p"),c=_("The bonus start "),s=_(x),p=_(" and ends "),h=_(A),g=_("."),E=L(),y=v("p"),y.textContent="See \n \n Terms&Conditions.",m=L(),b=v("p"),b.textContent=`Bonus can be contributed from ${["sports","casino"].join(" and ")}.`,M(l,S)},m(e,t){f(e,l,t),u(l,n),u(n,i),u(n,r),u(n,o),u(l,a),u(l,d),u(d,c),u(d,s),u(d,p),u(d,h),u(d,g),u(l,E),u(l,y),u(l,m),u(l,b)},p(e,t){/*levels*/16&t[0]&&Z!==(Z=/*levels*/e[4].length+"")&&F(r,Z),/*bonus*/1&t[0]&&x!==(x=Ae(/*bonus*/e[0].startTime)+"")&&F(s,x),/*bonus*/1&t[0]&&A!==(A=Ae(/*bonus*/e[0].endTime)+"")&&F(h,A)},d(e){e&&C(l)}}}
|
|
749
747
|
// (206:8) {#if bonus?.products}
|
|
750
|
-
function
|
|
748
|
+
function bn(e){let t,l,n,i=/*bonus*/e[0].products.includes("Casino"),r=/*bonus*/e[0].products.includes("Sports"),o=i&&Fn(e),a=r&&Zn(e);return{c(){t=v("div"),o&&o.c(),l=L(),a&&a.c(),y(t,"class",n="GameItems "+(/*bonus*/e[0].products.includes("Casino")&&/*bonus*/e[0].products.includes("Sports")?"TwoGames":"OneGame")),y(t,"part","ThumbnailTabContent_Games")},m(e,n){f(e,t,n),o&&o.m(t,null),u(t,l),a&&a.m(t,null)},p(e,d){/*bonus*/1&d[0]&&(i=/*bonus*/e[0].products.includes("Casino")),i?o?o.p(e,d):(o=Fn(e),o.c(),o.m(t,l)):o&&(o.d(1),o=null),/*bonus*/1&d[0]&&(r=/*bonus*/e[0].products.includes("Sports")),r?a?a.p(e,d):(a=Zn(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null),/*bonus*/1&d[0]&&n!==(n="GameItems "+(/*bonus*/e[0].products.includes("Casino")&&/*bonus*/e[0].products.includes("Sports")?"TwoGames":"OneGame"))&&y(t,"class",n)},d(e){e&&C(t),o&&o.d(),a&&a.d()}}}
|
|
751
749
|
// (208:12) {#if bonus.products.includes('Casino')}
|
|
752
|
-
function
|
|
750
|
+
function Fn(e){let t,l,n,i,r,o,a,c,s=/*locale*/e[3]("forwardCasino")+"";return{c(){t=v("div"),l=v("img"),i=L(),r=v("span"),o=_(s),y(l,"class","svg"),y(l,"part","ThumbnailTabContent_Games_Casino_Svg"),d(l.src,n=me)||y(l,"src",n),y(l,"width","78"),y(l,"height","75"),y(r,"part","ThumbnailTabContent_Games_Casino_Label"),y(t,"part","ThumbnailTabContent_Casino")},m(n,d){f(n,t,d),u(t,l),u(t,i),u(t,r),u(r,o),a||(c=E(r,"click",/*click_handler*/e[18]),a=!0)},p(e,t){/*locale*/8&t[0]&&s!==(s=/*locale*/e[3]("forwardCasino")+"")&&F(o,s)},d(e){e&&C(t),a=!1,c()}}}
|
|
753
751
|
// (214:12) {#if bonus.products.includes('Sports')}
|
|
754
|
-
function
|
|
755
|
-
return e[6]?
|
|
756
|
-
let v,_,L,g,E=[],y=!1;const m=async()=>{var e,t;if(!(h&&f&&u&&p))return;t=f,
|
|
752
|
+
function Zn(e){let t,l,n,i,r,o,a,c,s=/*locale*/e[3]("forwardSports")+"";return{c(){t=v("div"),l=v("img"),i=L(),r=v("span"),o=_(s),y(l,"class","svg"),y(l,"part","ThumbnailTabContent_Games_Sports_Svg"),d(l.src,n=Me)||y(l,"src",n),y(l,"width","68"),y(l,"height","65"),y(r,"part","ThumbnailTabContent_Games_Sports_Label"),y(t,"class","SportsItems"),y(t,"part","ThumbnailTabContent_Sports")},m(n,d){f(n,t,d),u(t,l),u(t,i),u(t,r),u(r,o),a||(c=E(r,"click",/*click_handler_1*/e[19]),a=!0)},p(e,t){/*locale*/8&t[0]&&s!==(s=/*locale*/e[3]("forwardSports")+"")&&F(o,s)},d(e){e&&C(t),a=!1,c()}}}function xn(l){let n,r,o,a,d,c,s,p,h,g,m,Z,A,G,S,T=/*locale*/l[3]("forwardMyWageringBonuses")+"";P(/*onwindowresize*/l[16]);let U=/*bonus*/l[0]&&/*isMobileView*/l[8]&&un(l);function B(e,t){/*isLoading*/
|
|
753
|
+
return e[6]?hn:/*bonus*/e[0]?Cn:fn}let w=B(l),D=w(l),H=/*bonus*/l[0]&&Mn(l),O=/*bonus*/l[0]?.products&&bn(l),N=[le("TabsContainer")],R={};for(let e=0;e<N.length;e+=1)R=t(R,N[e]);return{c(){U&&U.c(),n=L(),r=v("div"),o=v("casino-wagering-detail-controller-private-tabs"),a=v("div"),D.c(),d=L(),c=v("div"),H&&H.c(),s=L(),p=v("div"),h=v("div"),O&&O.c(),g=L(),m=v("div"),Z=_(T),this.c=e,y(a,"slot","Rewards"),y(c,"slot","About"),y(h,"class","TabContent Games"),y(h,"part","ThumbnailTabContent"),y(m,"class","BottomButton"),y(m,"part","ThumbnailGotoTournamentsButton"),y(p,"slot","Games"),b(o,"tabs",A=/*tabs*/l[2].map(An).join(",")),b(o,"tab",/*tab*/l[7]),b(o,"exportparts","Tabs,Tab"),M(r,R),x(r,"TabsContainerMobile",/*isMobileView*/l[8])},m(e,t){U&&U.m(e,t),f(e,n,t),f(e,r,t),u(r,o),u(o,a),D.m(a,null),u(o,d),u(o,c),H&&H.m(c,null),u(o,s),u(o,p),u(p,h),O&&O.m(h,null),u(p,g),u(p,m),u(m,Z),G||(S=[E(dn,"resize",/*onwindowresize*/l[16]),E(m,"click",/*click_handler_2*/l[20])],G=!0)},p(e,t){/*bonus*/e[0]&&/*isMobileView*/e[8]?U?U.p(e,t):(U=un(e),U.c(),U.m(n.parentNode,n)):U&&(U.d(1),U=null),w===(w=B(e))&&D?D.p(e,t):(D.d(1),D=w(e),D&&(D.c(),D.m(a,null))),/*bonus*/e[0]?H?H.p(e,t):(H=Mn(e),H.c(),H.m(c,null)):H&&(H.d(1),H=null),/*bonus*/e[0]?.products?O?O.p(e,t):(O=bn(e),O.c(),O.m(h,null)):O&&(O.d(1),O=null),/*locale*/8&t[0]&&T!==(T=/*locale*/e[3]("forwardMyWageringBonuses")+"")&&F(Z,T),/*tabs*/4&t[0]&&A!==(A=/*tabs*/e[2].map(An).join(","))&&b(o,"tabs",A),/*tab*/128&t[0]&&b(o,"tab",/*tab*/e[7]),/*isMobileView*/256&t[0]&&x(r,"TabsContainerMobile",/*isMobileView*/e[8])},i:e,o:e,d(e){U&&U.d(e),e&&C(n),e&&C(r),D.d(),H&&H.d(),O&&O.d(),G=!1,i(S)}}}const An=e=>e.key;function Gn(e,t,l){let n,i,r,o,a;var d,s;d=on,s=e=>l(15,a=e),e.$$.on_destroy.push(c(d,s));let{endpoint:p=""}=t,{bonuswalletid:u=""}=t,{lang:f="en"}=t,{session:C=""}=t;an(Ge);let h=!1;T((()=>(l(14,h=!0),()=>{l(14,h=!1)})));
|
|
754
|
+
let v,_,L,g,E=[],y=!1;const m=async()=>{var e,t;if(!(h&&f&&u&&p))return;t=f,Nl.set(t),l(6,y=!0),l(0,_=void 0),null==g||g.abort(),g=new AbortController;const n=await se(g,p,C,{lang:f,bonusWalletId:u});n.items.length>0&&(l(0,_=n.items.find((e=>e.bonusWalletID==u))),l(4,E=(e=>{const t=[];return e.map((e=>{const{maxRepeats:l,completedTime:n}=e,i=ee(e,["maxRepeats","completedTime"]);if(l>0)for(let e=0;e<l;e++)t.push(Object.assign({},i));else t.push(Object.assign({},i))})),t})(_.levels)),l(5,v=(null===(e=_.wageringProgress)||void 0===e?void 0:e.currentLevel)-1)),l(6,y=!1)},M=e=>{window.postMessage({type:"GotoFromWageringBonusesPage",pageType:e},window.location.href)};return e.$$set=e=>{"endpoint"in e&&l(10,p=e.endpoint),"bonuswalletid"in e&&l(11,u=e.bonuswalletid),"lang"in e&&l(12,f=e.lang),"session"in e&&l(13,C=e.session)},e.$$.update=()=>{/*isMounted*/16384&e.$$.dirty[0]&&h&&m(),/*lang*/4096&e.$$.dirty[0]&&f&&m(),/*endpoint*/1024&e.$$.dirty[0]&&p&&m(),/*bonuswalletid*/2048&e.$$.dirty[0]&&u&&m(),/*session*/8192&e.$$.dirty[0]&&C&&m(),/*innerWidth*/2&e.$$.dirty[0]&&l(8,n=L<=576),/*$_*/32768&e.$$.dirty[0]&&l(3,i=(e,t={})=>a("wageringBonuses."+e,{values:t})),/*locale*/8&e.$$.dirty[0]&&l(2,r=[{key:"Rewards",text:i("rewards")},{key:"About",text:"About"},{key:"Games",text:"Games"}]),/*tabs*/4&e.$$.dirty[0]&&l(7,o=r[0].key),/*bonus*/1&e.$$.dirty[0]&&console.log(null==_?void 0:_.products)},[_,L,r,i,E,v,y,o,n,M,p,u,f,C,h,a,function(){l(1,L=dn.innerWidth)},e=>{const t=Object.keys(e.increment)[0],l={currencySymbol:Y(t),currentLevelIncrement:e.increment[t]},{maxContribution:n="undefined",minStake:r="undefined"}=e,o={...l,maxContribution:n,minStake:r};return i(`${_.wageringType}.target`,o)},()=>M("Casino"),()=>M("Sports"),()=>{M("MyWageringBonuses")}]}class Sn extends X{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Hidden{display:none}.TabsContainerMobile{background:#282828;padding:10px}table{border-collapse:collapse;width:100%}.TableCointainer td{padding:10px;width:20%}.TableCointainer td.Reward{color:#00AEEF}.TableCointainer thead{background:#4E5662}.TableCointainer th{padding:10px;color:#FFFFFF}.TableCointainerMobile{color:#B5B5B5}.TableCointainerMobile td{width:auto}.TableCointainerMobile tr .Reward{color:#B5B5B5}.TableCointainerMobile tr.active{background-color:rgba(255, 131, 100, 0.2)}.TableCointainerMobile tr.active .Reward{color:#FFD700}.TableCointainerMobile th{background:none}.TableCointainerMobile thead{background:#1C1C1C}.TableCointainerMobile .Level{color:#FFD700}.center{text-align:center}.About{color:#FFFFFF}.TopContainer{background:#333333;color:#FFFFFF;padding:8px}.TopContainer .ImageAndNameContainer{position:relative;display:flex}.TopContainer .ImageAndNameContainer div:nth-child(1){width:20%}.TopContainer .ImageAndNameContainer div:nth-child(1) img{max-width:100%}.TopContainer .ImageAndNameContainer .CloseIcon{position:absolute;right:3px;top:3px;cursor:pointer}.TopContainer .Title{font-weight:700;font-size:16px;line-height:19px;padding-left:10px}.TopContainer .ExpiryDateTimeContainer{padding:6px;margin-top:10px;margin-bottom:15px;border:1px solid #533A34}.TopContainer .ExpiryDateTimeContainer .ExpiryDateTimeIcon{vertical-align:middle}.TopContainer .ExpiryDateTimeContainer .ExpiryDateTime{font-weight:400;font-size:12px;line-height:15px;border-left:1px solid #ffffff;margin-left:6px;padding-left:6px}.TabContent{padding:0 16px}.TabContent.Games{padding-bottom:30px}.TabContent.Games .GameItems{text-align:center;margin:auto;margin-top:39px}.TabContent.Games .GameItems.OneGame{width:100%}.TabContent.Games .GameItems.TwoGames{width:100%;display:flex}.TabContent.Games .GameItems.TwoGames div{width:50%}.TabContent.Games .GameItems span{color:#FF8364;font-size:12px;text-align:center;text-decoration-line:underline;cursor:pointer;margin-top:5px}.TabContent.Games .GameItems .svg{height:70px;display:block;margin:auto}.TabContent.Games .GameItems .svg.ball{width:98px}.BottomButton{font-weight:600;font-size:15px;text-align:center;color:#FFF;height:35px;width:60%;margin:20px auto;align-items:center;padding:8.72351px 12.6887px;background:#FF8364;box-shadow:0px 0.793047px 2.37914px rgba(0, 0, 0, 0.1), 0px 1.58609px 0.793047px rgba(0, 0, 0, 0.06), 0px 0.793047px 0.793047px rgba(0, 0, 0, 0.07);border-radius:4.75828px}",this.shadowRoot.appendChild(t),K(this,{target:this.shadowRoot,props:A(this.attributes),customElement:!0},Gn,xn,o,{endpoint:10,bonuswalletid:11,lang:12,session:13},null,[-1,-1]),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),I()))}static get observedAttributes(){return["endpoint","bonuswalletid","lang","session"]}get endpoint(){return this.$$.ctx[10]}set endpoint(e){this.$$set({endpoint:e}),I()}get bonuswalletid(){return this.$$.ctx[11]}set bonuswalletid(e){this.$$set({bonuswalletid:e}),I()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),I()}get session(){return this.$$.ctx[13]}set session(e){this.$$set({session:e}),I()}}return!customElements.get("casino-wagering-detail-controller")&&customElements.define("casino-wagering-detail-controller",Sn),Sn}));
|
|
757
755
|
//# sourceMappingURL=casino-wagering-detail-controller.js.map
|