@everymatrix/casino-winners 1.28.8 → 1.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-winners.js +53 -53
- package/dist/casino-winners.js.map +1 -1
- package/package.json +2 -2
- package/src/translations.js +10 -0
package/dist/casino-winners.js
CHANGED
|
@@ -35,7 +35,7 @@ function N(){
|
|
|
35
35
|
if(0!==I)return;const e=a;do{
|
|
36
36
|
// first, call beforeUpdate functions
|
|
37
37
|
// and update components
|
|
38
|
-
try{for(;I<A.length;){const e=A[I];I++,T(e),
|
|
38
|
+
try{for(;I<A.length;){const e=A[I];I++,T(e),M(e.$$)}}catch(e){
|
|
39
39
|
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
40
40
|
throw A.length=0,I=0,e}for(T(null),A.length=0,I=0;H.length;)H.pop()();
|
|
41
41
|
// then, once components are updated, call
|
|
@@ -43,10 +43,10 @@ throw A.length=0,I=0,e}for(T(null),A.length=0,I=0;H.length;)H.pop()();
|
|
|
43
43
|
// subsequent updates...
|
|
44
44
|
for(let e=0;e<S.length;e+=1){const t=S[e];x.has(t)||(
|
|
45
45
|
// ...so guard against infinite loops
|
|
46
|
-
x.add(t),t())}S.length=0}while(A.length);for(;P.length;)P.pop()();O=!1,x.clear(),T(e)}function
|
|
46
|
+
x.add(t),t())}S.length=0}while(A.length);for(;P.length;)P.pop()();O=!1,x.clear(),T(e)}function M(e){if(null!==e.fragment){e.update(),n(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(L)}}
|
|
47
47
|
/**
|
|
48
48
|
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
49
|
-
*/const
|
|
49
|
+
*/const R=new Set;function $(e,t){const r=e.$$;null!==r.fragment&&(!function(e){const t=[],r=[];S.forEach((n=>-1===e.indexOf(n)?t.push(n):r.push(n))),r.forEach((e=>e())),S=t}(r.after_update),n(r.on_destroy),r.fragment&&r.fragment.d(t),
|
|
50
50
|
// TODO null out other refs, including component.$$ (but need to
|
|
51
51
|
// preserve final state?)
|
|
52
52
|
r.on_destroy=r.fragment=null,r.ctx=[])}function U(e,t){-1===e.$$.dirty[0]&&(A.push(e),O||(O=!0,C.then(N)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function D(o,s,l,c,u,h,p,d=[-1]){const m=a;T(o);const y=o.$$={fragment:null,ctx:[],
|
|
@@ -61,7 +61,7 @@ y.fragment=!!c&&c(y.ctx),s.target){if(s.hydrate){const e=function(e){return Arra
|
|
|
61
61
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
62
62
|
y.fragment&&y.fragment.l(e),e.forEach(f)}else
|
|
63
63
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
64
|
-
y.fragment&&y.fragment.c();s.intro&&((g=o.$$.fragment)&&g.i&&(
|
|
64
|
+
y.fragment&&y.fragment.c();s.intro&&((g=o.$$.fragment)&&g.i&&(R.delete(g),g.i(v))),function(e,r,o,s){const{fragment:a,after_update:l}=e.$$;a&&a.m(r,o),s||
|
|
65
65
|
// onMount happens before the initial afterUpdate
|
|
66
66
|
L((()=>{const r=e.$$.on_mount.map(t).filter(i);
|
|
67
67
|
// if the component was destroyed immediately
|
|
@@ -70,13 +70,13 @@ L((()=>{const r=e.$$.on_mount.map(t).filter(i);
|
|
|
70
70
|
e.$$.on_destroy?e.$$.on_destroy.push(...r):
|
|
71
71
|
// Edge case - component was destroyed immediately,
|
|
72
72
|
// most likely as a result of a binding initialising
|
|
73
|
-
n(r),e.$$.on_mount=[]})),l.forEach(L)}(o,s.target,s.anchor,s.customElement),N()}var g,v;T(m)}let
|
|
73
|
+
n(r),e.$$.on_mount=[]})),l.forEach(L)}(o,s.target,s.anchor,s.customElement),N()}var g,v;T(m)}let G;"function"==typeof HTMLElement&&(G=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(i);
|
|
74
74
|
// @ts-ignore todo: improve typings
|
|
75
75
|
for(const e in this.$$.slotted)
|
|
76
76
|
// @ts-ignore todo: improve typings
|
|
77
77
|
this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,r){this[e]=r}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){$(this,1),this.$destroy=e}$on(t,r){
|
|
78
78
|
// TODO should this delegate to addEventListener?
|
|
79
|
-
if(!i(r))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(r),()=>{const e=n.indexOf(r);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});const
|
|
79
|
+
if(!i(r))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(r),()=>{const e=n.indexOf(r);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});const F=[];
|
|
80
80
|
/**
|
|
81
81
|
* Creates a `Readable` store that allows reading by subscription.
|
|
82
82
|
* @param value initial value
|
|
@@ -88,7 +88,7 @@ if(!i(r))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return
|
|
|
88
88
|
* @param {StartStopNotifier=} start
|
|
89
89
|
*/
|
|
90
90
|
function W(t,r=e){let n;const i=new Set;function s(e){if(o(t,e)&&(t=e,n)){// store is ready
|
|
91
|
-
const e=!
|
|
91
|
+
const e=!F.length;for(const e of i)e[1](),F.push(e,t);if(e){for(let e=0;e<F.length;e+=2)F[e][0](F[e+1]);F.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(o,a=e){const l=[o,a];return i.add(l),1===i.size&&(n=r(s)||e),o(t),()=>{i.delete(l),0===i.size&&n&&(n(),n=null)}}}}function k(t,r,o){const s=!Array.isArray(t),a=s?[t]:t,l=r.length<2;return u=t=>{let o=!1;const u=[];let h=0,f=e;const p=()=>{if(h)return;f();const n=r(s?u[0]:u,t);l?t(n):f=i(n)?n:e},d=a.map(((e,t)=>c(e,(e=>{u[t]=e,h&=~(1<<t),o&&p()}),(()=>{h|=1<<t}))));return o=!0,p(),function(){n(d),f(),
|
|
92
92
|
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
93
93
|
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
94
94
|
// invoke this derived store.
|
|
@@ -296,17 +296,17 @@ e.hourCycles.length&&(
|
|
|
296
296
|
// @ts-ignore
|
|
297
297
|
t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
|
|
298
298
|
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
299
|
-
var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(Le[r||""]||Le[n||""]||Le["".concat(n,"-001")]||Le["001"])[0]}var Ie=new RegExp("^".concat(be.source,"*")),Ne=new RegExp("".concat(be.source,"*$"));function
|
|
299
|
+
var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(Le[r||""]||Le[n||""]||Le["".concat(n,"-001")]||Le["001"])[0]}var Ie=new RegExp("^".concat(be.source,"*")),Ne=new RegExp("".concat(be.source,"*$"));function Me(e,t){return{start:e,end:t}}
|
|
300
300
|
// #region Ponyfills
|
|
301
301
|
// Consolidate these variables up top for easier toggling during debugging
|
|
302
|
-
var
|
|
302
|
+
var Re=!!String.prototype.startsWith,$e=!!String.fromCodePoint,Ue=!!Object.fromEntries,De=!!String.prototype.codePointAt,Ge=!!String.prototype.trimStart,Fe=!!String.prototype.trimEnd,We=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ke=!0;try{
|
|
303
303
|
/**
|
|
304
304
|
* legacy Edge or Xbox One browser
|
|
305
305
|
* Unicode flag support: supported
|
|
306
306
|
* Pattern_Syntax support: not supported
|
|
307
307
|
* See https://github.com/formatjs/formatjs/issues/2822
|
|
308
308
|
*/
|
|
309
|
-
ke="a"===(null===(Oe=qe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Oe?void 0:Oe[0])}catch(e){ke=!1}var je,Ve=
|
|
309
|
+
ke="a"===(null===(Oe=qe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Oe?void 0:Oe[0])}catch(e){ke=!1}var je,Ve=Re?// Native
|
|
310
310
|
function(e,t,r){return e.startsWith(t,r)}:// For IE11
|
|
311
311
|
function(e,t,r){return e.slice(r,r+t.length)===t},ze=$e?String.fromCodePoint:// IE11
|
|
312
312
|
function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",i=e.length,o=0;i>o;){if((r=e[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},Xe=
|
|
@@ -314,9 +314,9 @@ function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n
|
|
|
314
314
|
Ue?Object.fromEntries:// Ponyfill
|
|
315
315
|
function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],o=i[0],s=i[1];t[o]=s}return t},Ke=De?// Native
|
|
316
316
|
function(e,t){return e.codePointAt(t)}:// IE 11
|
|
317
|
-
function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},Ye=
|
|
317
|
+
function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},Ye=Ge?// Native
|
|
318
318
|
function(e){return e.trimStart()}:// Ponyfill
|
|
319
|
-
function(e){return e.replace(Ie,"")},Ze=
|
|
319
|
+
function(e){return e.replace(Ie,"")},Ze=Fe?// Native
|
|
320
320
|
function(e){return e.trimEnd()}:// Ponyfill
|
|
321
321
|
function(e){return e.replace(Ne,"")};
|
|
322
322
|
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
@@ -326,7 +326,7 @@ if(ke){
|
|
|
326
326
|
// Native
|
|
327
327
|
var Je=qe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");je=function(e,t){var r;return Je.lastIndex=t,null!==(r=Je.exec(e)[1])&&void 0!==r?r:""}}else
|
|
328
328
|
// IE11
|
|
329
|
-
je=function(e,t){for(var r=[];;){var n=Ke(e,t);if(void 0===n||tt(n)||rt(n))break;r.push(n),t+=n>=65536?2:1}return ze.apply(void 0,r)};var Qe=/** @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,r){for(var n=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(e,r)).err)return o;n.push(o.val)}else{if(125/* `}` */===i&&e>0)break;if(35/* `#` */!==i||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(te.UNMATCHED_CLOSING_TAG,
|
|
329
|
+
je=function(e,t){for(var r=[];;){var n=Ke(e,t);if(void 0===n||tt(n)||rt(n))break;r.push(n),t+=n>=65536?2:1}return ze.apply(void 0,r)};var Qe=/** @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,r){for(var n=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(e,r)).err)return o;n.push(o.val)}else{if(125/* `}` */===i&&e>0)break;if(35/* `#` */!==i||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(te.UNMATCHED_CLOSING_TAG,Me(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&et(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;n.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;n.push(o.val)}}else{var s=this.clonePosition();this.bump(),n.push({type:re.pound,location:Me(s,this.clonePosition())})}}}return{val:n,err:null}},
|
|
330
330
|
/**
|
|
331
331
|
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
332
332
|
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
@@ -348,14 +348,14 @@ je=function(e,t){for(var r=[];;){var n=Ke(e,t);if(void 0===n||tt(n)||rt(n))break
|
|
|
348
348
|
e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();// `<`
|
|
349
349
|
var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
|
350
350
|
// Self closing tag
|
|
351
|
-
return{val:{type:re.literal,value:"<".concat(n,"/>"),location:
|
|
351
|
+
return{val:{type:re.literal,value:"<".concat(n,"/>"),location:Me(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
|
|
352
352
|
// Expecting a close tag
|
|
353
|
-
if(this.bumpIf("</")){if(this.isEOF()||!et(this.char()))return this.error(te.INVALID_TAG,
|
|
353
|
+
if(this.bumpIf("</")){if(this.isEOF()||!et(this.char()))return this.error(te.INVALID_TAG,Me(s,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(te.UNMATCHED_CLOSING_TAG,Me(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:re.tag,value:n,children:o,location:Me(r,this.clonePosition())},err:null}:this.error(te.INVALID_TAG,Me(s,this.clonePosition())))}return this.error(te.UNCLOSED_TAG,Me(r,this.clonePosition()))}return this.error(te.INVALID_TAG,Me(r,this.clonePosition()))},
|
|
354
354
|
/**
|
|
355
355
|
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
356
356
|
*/
|
|
357
357
|
e.prototype.parseTagName=function(){var e,t=this.offset();// the first tag name character
|
|
358
|
-
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 r=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=
|
|
358
|
+
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 r=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=Me(r,this.clonePosition());return{val:{type:re.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(et(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
|
|
359
359
|
/** See `parseTag` function docs. */},
|
|
360
360
|
/**
|
|
361
361
|
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
@@ -378,32 +378,32 @@ for(this.bump();!this.isEOF();){var r=this.char();if(39/* `'` */===r){if(39/* `'
|
|
|
378
378
|
this.bump();break}t.push(39),
|
|
379
379
|
// Bump one more time because we need to skip 2 characters.
|
|
380
380
|
this.bump()}else t.push(r);this.bump()}return ze.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60/* `<` */===r||123/* `{` */===r||35/* `#` */===r&&("plural"===t||"selectordinal"===t)||125/* `}` */===r&&e>0?null:(this.bump(),ze(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),// `{`
|
|
381
|
-
this.bumpSpace(),this.isEOF())return this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,
|
|
381
|
+
this.bumpSpace(),this.isEOF())return this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,Me(r,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(te.EMPTY_ARGUMENT,Me(r,this.clonePosition()));
|
|
382
382
|
// argument name
|
|
383
|
-
var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(te.MALFORMED_ARGUMENT,
|
|
383
|
+
var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(te.MALFORMED_ARGUMENT,Me(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,Me(r,this.clonePosition()));switch(this.char()){
|
|
384
384
|
// Simple argument: `{name}`
|
|
385
385
|
case 125/* `}` */:// `}`
|
|
386
386
|
return this.bump(),{val:{type:re.argument,
|
|
387
387
|
// value does not include the opening and closing braces.
|
|
388
|
-
value:n,location:
|
|
388
|
+
value:n,location:Me(r,this.clonePosition())},err:null};
|
|
389
389
|
// Argument with options: `{name, format, ...}`
|
|
390
390
|
case 44/* `,` */:return this.bump(),// `,`
|
|
391
|
-
this.bumpSpace(),this.isEOF()?this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,
|
|
391
|
+
this.bumpSpace(),this.isEOF()?this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,Me(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(te.MALFORMED_ARGUMENT,Me(r,this.clonePosition()))}},
|
|
392
392
|
/**
|
|
393
393
|
* Advance the parser until the end of the identifier, if it is currently on
|
|
394
394
|
* an identifier character. Return an empty string otherwise.
|
|
395
395
|
*/
|
|
396
|
-
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=je(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:
|
|
396
|
+
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=je(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:Me(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,n){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
|
397
397
|
// Parse this range:
|
|
398
398
|
// {name, type, style}
|
|
399
399
|
// ^---^
|
|
400
400
|
switch(s){case"":
|
|
401
401
|
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
|
402
|
-
return this.error(te.EXPECT_ARGUMENT_TYPE,
|
|
402
|
+
return this.error(te.EXPECT_ARGUMENT_TYPE,Me(o,a));case"number":case"date":case"time":
|
|
403
403
|
// Parse this range:
|
|
404
404
|
// {name, number, style}
|
|
405
405
|
// ^-------^
|
|
406
|
-
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(p=Ze(b.val)).length)return this.error(te.EXPECT_ARGUMENT_STYLE,
|
|
406
|
+
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(p=Ze(b.val)).length)return this.error(te.EXPECT_ARGUMENT_STYLE,Me(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:Me(c,this.clonePosition())}}if((g=this.tryParseArgumentClose(n)).err)return g;var u=Me(n,this.clonePosition());
|
|
407
407
|
// Extract style or skeleton
|
|
408
408
|
if(l&&Ve(null==l?void 0:l.style,"::",0)){
|
|
409
409
|
// Skeleton starts with `::`.
|
|
@@ -417,25 +417,25 @@ return{val:{type:"number"===s?re.number:"date"===s?re.date:re.time,value:r,locat
|
|
|
417
417
|
// Parse this range:
|
|
418
418
|
// {name, plural, options}
|
|
419
419
|
// ^---------^
|
|
420
|
-
var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(te.EXPECT_SELECT_ARGUMENT_OPTIONS,
|
|
420
|
+
var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(te.EXPECT_SELECT_ARGUMENT_OPTIONS,Me(d,ie({},d)));this.bumpSpace();
|
|
421
421
|
// Parse offset:
|
|
422
422
|
// {name, plural, offset:1, options}
|
|
423
423
|
// ^-----^
|
|
424
424
|
// or the first option:
|
|
425
425
|
// {name, plural, one {...} other {...}}
|
|
426
426
|
// ^--^
|
|
427
|
-
var m=this.parseIdentifierIfPossible(),y=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,
|
|
427
|
+
var m=this.parseIdentifierIfPossible(),y=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Me(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,te.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
|
|
428
428
|
// Parse another identifier for option parsing
|
|
429
|
-
this.bumpSpace(),m=this.parseIdentifierIfPossible(),y=b.val}var g,v=this.tryParsePluralOrSelectOptions(e,s,t,m);if(v.err)return v;if((g=this.tryParseArgumentClose(n)).err)return g;var E=
|
|
429
|
+
this.bumpSpace(),m=this.parseIdentifierIfPossible(),y=b.val}var g,v=this.tryParsePluralOrSelectOptions(e,s,t,m);if(v.err)return v;if((g=this.tryParseArgumentClose(n)).err)return g;var E=Me(n,this.clonePosition());return"select"===s?{val:{type:re.select,value:r,options:Xe(v.val),location:E},err:null}:{val:{type:re.plural,value:r,options:Xe(v.val),offset:y,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(te.INVALID_ARGUMENT_TYPE,Me(o,a))}},e.prototype.tryParseArgumentClose=function(e){
|
|
430
430
|
// Parse: {value, number, ::currency/GBP }
|
|
431
|
-
return this.isEOF()||125/* `}` */!==this.char()?this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,
|
|
431
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,Me(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
|
432
432
|
/**
|
|
433
433
|
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
434
434
|
*/
|
|
435
435
|
e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
|
436
436
|
// Treat apostrophe as quoting but include it in the style part.
|
|
437
437
|
// Find the end of the quoted literal text.
|
|
438
|
-
this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(te.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,
|
|
438
|
+
this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(te.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Me(r,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 r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
|
|
439
439
|
// Parse the skeleton
|
|
440
440
|
for(var t=[],r=0,n=e.split(Ee).filter((function(e){return e.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],s=i.slice(1),a=0,l=s;a<l.length;a++)if(0===l[a].length)throw new Error("Invalid number skeleton");t.push({stem:o,options:s})}return t}(e)}catch(e){return this.error(te.INVALID_NUMBER_SKELETON,t)}return{val:{type:ne.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?Ce(r):{}},err:null}},
|
|
441
441
|
/**
|
|
@@ -454,17 +454,17 @@ e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){
|
|
|
454
454
|
// ^--^
|
|
455
455
|
for(var i,o=!1,s=[],a=new Set,l=n.value,c=n.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
|
|
456
456
|
// Try parse `={number}` selector
|
|
457
|
-
var h=this.tryParseDecimalInteger(te.EXPECT_PLURAL_ARGUMENT_SELECTOR,te.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=
|
|
457
|
+
var h=this.tryParseDecimalInteger(te.EXPECT_PLURAL_ARGUMENT_SELECTOR,te.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=Me(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}
|
|
458
458
|
// Duplicate selector clauses
|
|
459
459
|
if(a.has(l))return this.error("select"===t?te.DUPLICATE_SELECT_ARGUMENT_SELECTOR:te.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(o=!0),
|
|
460
460
|
// Parse:
|
|
461
461
|
// one {one apple}
|
|
462
462
|
// ^----------^
|
|
463
|
-
this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?te.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:te.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,
|
|
463
|
+
this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?te.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:te.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Me(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,r);if(p.err)return p;var d=this.tryParseArgumentClose(f);if(d.err)return d;s.push([l,{value:p.val,location:Me(f,this.clonePosition())}]),
|
|
464
464
|
// Keep track of the existing selectors
|
|
465
465
|
a.add(l),
|
|
466
466
|
// Prep next selector clause.
|
|
467
|
-
this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===s.length?this.error("select"===t?te.EXPECT_SELECT_ARGUMENT_SELECTOR:te.EXPECT_PLURAL_ARGUMENT_SELECTOR,
|
|
467
|
+
this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===s.length?this.error("select"===t?te.EXPECT_SELECT_ARGUMENT_SELECTOR:te.EXPECT_PLURAL_ARGUMENT_SELECTOR,Me(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(te.MISSING_OTHER_CLAUSE,Me(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;i=!0,o=10*o+(s-48),this.bump()}var a=Me(n,this.clonePosition());return i?We(o*=r)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
|
|
468
468
|
// This is much faster than `Object.assign` or spread.
|
|
469
469
|
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
470
470
|
/**
|
|
@@ -576,14 +576,14 @@ this.formats=_t(e.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.
|
|
|
576
576
|
// Default format options used as the prototype of the `formats` provided to the
|
|
577
577
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
578
578
|
// and Intl.DateTimeFormat instances.
|
|
579
|
-
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 At={},Ht=(e,t,r)=>r?(t in At||(At[t]={}),e in At[t]||(At[t][e]=r),r):r,St=(e,t)=>{if(null==t)return;if(t in At&&e in At[t])return At[t][e];const r=Jt(t);for(let n=0;n<r.length;n++){const i=Lt(r[n],e);if(i)return Ht(e,t,i)}};let Pt;const Ct=W({});function Ot(e){return e in Pt}function Lt(e,t){if(!Ot(e))return null;const r=function(e){return Pt[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let e=0;e<r.length;e++)if("object"==typeof n){if(e>0){const t=r.slice(e,r.length).join(".");if(t in n){n=n[t];break}}n=n[r[e]]}else n=void 0;return n}(r,t)}function xt(e,...t){delete At[e],Ct.update((r=>(r[e]=J.all([r[e]||{},...t]),r)))}k([Ct],(([e])=>Object.keys(e))),Ct.subscribe((e=>Pt=e));const It={};function Nt(e){return It[e]}function
|
|
579
|
+
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 At={},Ht=(e,t,r)=>r?(t in At||(At[t]={}),e in At[t]||(At[t][e]=r),r):r,St=(e,t)=>{if(null==t)return;if(t in At&&e in At[t])return At[t][e];const r=Jt(t);for(let n=0;n<r.length;n++){const i=Lt(r[n],e);if(i)return Ht(e,t,i)}};let Pt;const Ct=W({});function Ot(e){return e in Pt}function Lt(e,t){if(!Ot(e))return null;const r=function(e){return Pt[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let e=0;e<r.length;e++)if("object"==typeof n){if(e>0){const t=r.slice(e,r.length).join(".");if(t in n){n=n[t];break}}n=n[r[e]]}else n=void 0;return n}(r,t)}function xt(e,...t){delete At[e],Ct.update((r=>(r[e]=J.all([r[e]||{},...t]),r)))}k([Ct],(([e])=>Object.keys(e))),Ct.subscribe((e=>Pt=e));const It={};function Nt(e){return It[e]}function Mt(e){return null!=e&&Jt(e).some((e=>{var t;return null==(t=Nt(e))?void 0:t.size}))}function Rt(e,t){const r=Promise.all(t.map((t=>(function(e,t){It[e].delete(t),0===It[e].size&&delete It[e]}(e,t),t().then((e=>e.default||e))))));return r.then((t=>xt(e,...t)))}const $t={};function Ut(e){if(!Mt(e))return e in $t?$t[e]:Promise.resolve();const t=function(e){return Jt(e).map((e=>{const t=Nt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return $t[e]=Promise.all(t.map((([e,t])=>Rt(e,t)))).then((()=>{if(Mt(e))return Ut(e);delete $t[e]})),$t[e]}const Dt={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 Gt(){return Dt}const Ft=W(!1);var Wt=Object.defineProperty,kt=Object.defineProperties,jt=Object.getOwnPropertyDescriptors,Vt=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Kt=(e,t,r)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Yt;const Zt=W(null);function qt(e){return e.split("-").map(((e,t,r)=>r.slice(0,t+1).join("-"))).reverse()}function Jt(e,t=Gt().fallbackLocale){const r=qt(e);return t?[...new Set([...r,...qt(t)])]:r}function Qt(){return null!=Yt?Yt:void 0}Zt.subscribe((e=>{Yt=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const er=(tr=((e,t)=>{for(var r in t||(t={}))zt.call(t,r)&&Kt(e,r,t[r]);if(Vt)for(var r of Vt(t))Xt.call(t,r)&&Kt(e,r,t[r]);return e})({},Zt),kt(tr,jt({set:e=>{if(e&&function(e){if(null==e)return;const t=Jt(e);for(let e=0;e<t.length;e++){const r=t[e];if(Ot(r))return r}}(e)&&Mt(e)){const{loadingDelay:t}=Gt();let r;return"undefined"!=typeof window&&null!=Qt()&&t?r=window.setTimeout((()=>Ft.set(!0)),t):Ft.set(!0),Ut(e).then((()=>{Zt.set(e)})).finally((()=>{clearTimeout(r),Ft.set(!1)}))}return Zt.set(e)}})));var tr;const rr=e=>{const t=Object.create(null);return r=>{const n=JSON.stringify(r);return n in t?t[n]:t[n]=e(r)}};var nr=Object.defineProperty,ir=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable,ar=(e,t,r)=>t in e?nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lr=(e,t)=>{for(var r in t||(t={}))or.call(t,r)&&ar(e,r,t[r]);if(ir)for(var r of ir(t))sr.call(t,r)&&ar(e,r,t[r]);return e},cr=(e,t)=>{var r={};for(var n in e)or.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&ir)for(var n of ir(e))t.indexOf(n)<0&&sr.call(e,n)&&(r[n]=e[n]);return r};const ur=(e,t)=>{const{formats:r}=Gt();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},hr=rr((e=>{var t=e,{locale:r,format:n}=t,i=cr(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=ur("number",n)),new Intl.NumberFormat(r,i)})),fr=rr((e=>{var t=e,{locale:r,format:n}=t,i=cr(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=ur("date",n):0===Object.keys(i).length&&(i=ur("date","short")),new Intl.DateTimeFormat(r,i)})),pr=rr((e=>{var t=e,{locale:r,format:n}=t,i=cr(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=ur("time",n):0===Object.keys(i).length&&(i=ur("time","short")),new Intl.DateTimeFormat(r,i)})),dr=rr((
|
|
580
580
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
581
|
-
(e,t=Qt())=>new Bt(e,t,
|
|
581
|
+
(e,t=Qt())=>new Bt(e,t,Gt().formats,{ignoreTag:Gt().ignoreTag}))),mr=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:l=Qt(),default:c}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=St(e,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!=(o=null!=(i=null==(n=(r=Gt()).handleMissingMessage)?void 0:n.call(r,{locale:l,id:e,defaultValue:c}))?i:c)?o:e;if(!a)return u;let h=u;try{h=dr(u,l).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},yr=(e,t)=>((e={})=>{var t=e,{locale:r=Qt()}=t,n=cr(t,["locale"]);return pr(lr({locale:r},n))})(t).format(e),br=(e,t)=>((e={})=>{var t=e,{locale:r=Qt()}=t,n=cr(t,["locale"]);return fr(lr({locale:r},n))})(t).format(e),gr=(e,t)=>((e={})=>{var t=e,{locale:r=Qt()}=t,n=cr(t,["locale"]);return hr(lr({locale:r},n))})(t).format(e),vr=(e,t=Qt())=>St(e,t),Er=k([er,Ct],(()=>mr));function wr(e,t){xt(e,t)}k([er],(()=>yr)),k([er],(()=>br)),k([er],(()=>gr)),k([er,Ct],(()=>vr));const _r={en:{recentWinners:"Recent Winners",topWinners:"Top Winners",won:"just won"},"zh-hk":{recentWinners:"最近的获奖者",topWinners:"最佳获奖者",won:"刚赢"},de:{recentWinners:"Kürzliche Gewinner",topWinners:"Top Gewinner",won:"Eben gewonnen"},it:{recentWinners:"Recent Winners",topWinners:"Top Winners",won:"just won"},fr:{recentWinners:"Gagnants récents",topWinners:"Meilleurs gagnants",won:"vient de gagner"},es:{recentWinners:"Ganadores Recientes",topWinners:"Ganadores Top",won:"Últimos Ganadores"},el:{recentWinners:"Πρόσφατοι νικητές",topWinners:"Κορυφαίοι νικητές",won:"μόλις κέρδισε"},tr:{recentWinners:"Recent Winners",topWinners:"Top Winners",won:"just won"},ru:{recentWinners:"Recent Winners",topWinners:"Top Winners",won:"just won"},ro:{recentWinners:"Ultimii câștigători",topWinners:"Câștigători de top",won:"tocmai a câștigat"},hr:{recentWinners:"Nedavni dobitnici",topWinners:"Top dobitnici",won:"upravo osvojio"},hu:{recentWinners:"Legutóbbi nyertesek",topWinners:"Top nyertesek",won:"Nyert"},pl:{recentWinners:"Recent Winners",topWinners:"Top Winners",won:"just won"},pt:{recentWinners:"Recent Winners",topWinners:"Top Winners",won:"just won"},sl:{recentWinners:"Recent Winners",topWinners:"Top Winners",won:"just won"},sr:{recentWinners:"Recent Winners",topWinners:"Top Winners",won:"just won"},"pt-br":{recentWinners:"Vencedores recentes",topWinners:"Principais vencedores",won:"acabei de ganhar"},"es-mx":{recentWinners:"Ganadores recientes",topWinners:"Mejores Ganadores",won:"recién gano"}};
|
|
582
582
|
/* eslint-disable no-prototype-builtins */var Tr="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||
|
|
583
583
|
// eslint-disable-next-line no-undef
|
|
584
584
|
"undefined"!=typeof global&&global||{},Br="URLSearchParams"in Tr,Ar="Symbol"in Tr&&"iterator"in Symbol,Hr="FileReader"in Tr&&"Blob"in Tr&&function(){try{return new Blob,!0}catch(e){return!1}}(),Sr="FormData"in Tr,Pr="ArrayBuffer"in Tr;if(Pr)var Cr=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Or=ArrayBuffer.isView||function(e){return e&&Cr.indexOf(Object.prototype.toString.call(e))>-1};function Lr(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function xr(e){return"string"!=typeof e&&(e=String(e)),e}
|
|
585
585
|
// Build a destructive iterator for the value list
|
|
586
|
-
function Ir(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Ar&&(t[Symbol.iterator]=function(){return t}),t}function Nr(e){this.map={},e instanceof Nr?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function
|
|
586
|
+
function Ir(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Ar&&(t[Symbol.iterator]=function(){return t}),t}function Nr(e){this.map={},e instanceof Nr?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Mr(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function Rr(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function $r(e){var t=new FileReader,r=Rr(t);return t.readAsArrayBuffer(e),r}function Ur(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Dr(){return this.bodyUsed=!1,this._initBody=function(e){var t;
|
|
587
587
|
/*
|
|
588
588
|
fetch-mock wraps the Response object in an ES6 Proxy to
|
|
589
589
|
provide useful test harness features such as flush. However, on
|
|
@@ -597,13 +597,13 @@ function Ir(e){var t={next:function(){var t=e.shift();return{done:void 0===t,val
|
|
|
597
597
|
// eslint-disable-next-line no-self-assign
|
|
598
598
|
this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Hr&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Sr&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Br&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Pr&&Hr&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ur(e.buffer),
|
|
599
599
|
// IE 10-11 can't handle a DataView body.
|
|
600
|
-
this._bodyInit=new Blob([this._bodyArrayBuffer])):Pr&&(ArrayBuffer.prototype.isPrototypeOf(e)||Or(e))?this._bodyArrayBuffer=Ur(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Br&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Hr&&(this.blob=function(){var e=
|
|
600
|
+
this._bodyInit=new Blob([this._bodyArrayBuffer])):Pr&&(ArrayBuffer.prototype.isPrototypeOf(e)||Or(e))?this._bodyArrayBuffer=Ur(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Br&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Hr&&(this.blob=function(){var e=Mr(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=Mr(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(Hr)return this.blob().then($r);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,o=Mr(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=Rr(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=n?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Sr&&(this.formData=function(){return this.text().then(Wr)}),this.json=function(){return this.text().then(JSON.parse)},this}
|
|
601
601
|
// HTTP methods whose capitalization should be normalized
|
|
602
|
-
Nr.prototype.append=function(e,t){e=Lr(e),t=xr(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},Nr.prototype.delete=function(e){delete this.map[Lr(e)]},Nr.prototype.get=function(e){return e=Lr(e),this.has(e)?this.map[e]:null},Nr.prototype.has=function(e){return this.map.hasOwnProperty(Lr(e))},Nr.prototype.set=function(e,t){this.map[Lr(e)]=xr(t)},Nr.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},Nr.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),Ir(e)},Nr.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Ir(e)},Nr.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),Ir(e)},Ar&&(Nr.prototype[Symbol.iterator]=Nr.prototype.entries);var
|
|
602
|
+
Nr.prototype.append=function(e,t){e=Lr(e),t=xr(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},Nr.prototype.delete=function(e){delete this.map[Lr(e)]},Nr.prototype.get=function(e){return e=Lr(e),this.has(e)?this.map[e]:null},Nr.prototype.has=function(e){return this.map.hasOwnProperty(Lr(e))},Nr.prototype.set=function(e,t){this.map[Lr(e)]=xr(t)},Nr.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},Nr.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),Ir(e)},Nr.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Ir(e)},Nr.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),Ir(e)},Ar&&(Nr.prototype[Symbol.iterator]=Nr.prototype.entries);var Gr=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Fr(e,t){if(!(this instanceof Fr))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,i=(t=t||{}).body;if(e instanceof Fr){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Nr(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Nr(t.headers)),this.method=(r=t.method||this.method||"GET",n=r.toUpperCase(),Gr.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Tr)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){
|
|
603
603
|
// Search for a '_' parameter in the query string
|
|
604
604
|
var o=/([?&])_=[^&]*/;if(o.test(this.url))
|
|
605
605
|
// If it already exists then set the value with the current time
|
|
606
|
-
this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Wr(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function kr(e,t){if(!(this instanceof kr))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Nr(t.headers),this.url=t.url||"",this._initBody(e)}
|
|
606
|
+
this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Wr(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function kr(e,t){if(!(this instanceof kr))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Nr(t.headers),this.url=t.url||"",this._initBody(e)}Fr.prototype.clone=function(){return new Fr(this,{body:this._bodyInit})},Dr.call(Fr.prototype),Dr.call(kr.prototype),kr.prototype.clone=function(){return new kr(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Nr(this.headers),url:this.url})},kr.error=function(){var e=new kr(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var jr=[301,302,303,307,308];kr.redirect=function(e,t){if(-1===jr.indexOf(t))throw new RangeError("Invalid status code");return new kr(null,{status:t,headers:{location:e}})};var Vr=Tr.DOMException;try{new Vr}catch(e){(Vr=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack}).prototype=Object.create(Error.prototype),Vr.prototype.constructor=Vr}function zr(e,t){return new Promise((function(r,n){var i=new Fr(e,t);if(i.signal&&i.signal.aborted)return n(new Vr("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}if(o.onload=function(){var e,t,n={statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new Nr,
|
|
607
607
|
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
|
608
608
|
// https://github.com/github/fetch/issues/748
|
|
609
609
|
// https://github.com/zloirock/core-js/issues/751
|
|
@@ -612,7 +612,7 @@ e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf(
|
|
|
612
612
|
// Only if the status is out of a normal range
|
|
613
613
|
i.url.startsWith("file://")&&(o.status<200||o.status>599)?n.status=200:n.status=o.status,n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var s="response"in o?o.response:o.responseText;setTimeout((function(){r(new kr(s,n))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request timed out"))}),0)},o.onabort=function(){setTimeout((function(){n(new Vr("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&Tr.location.href?Tr.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(Hr?o.responseType="blob":Pr&&(o.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof Nr||Tr.Headers&&t.headers instanceof Tr.Headers)){var a=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){a.push(Lr(e)),o.setRequestHeader(e,xr(t.headers[e]))})),i.headers.forEach((function(e,t){-1===a.indexOf(t)&&o.setRequestHeader(t,e)}))}else i.headers.forEach((function(e,t){o.setRequestHeader(t,e)}));i.signal&&(i.signal.addEventListener("abort",s),o.onreadystatechange=function(){
|
|
614
614
|
// DONE (success or failure)
|
|
615
|
-
4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}zr.polyfill=!0,Tr.fetch||(Tr.fetch=zr,Tr.Headers=Nr,Tr.Request=
|
|
615
|
+
4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}zr.polyfill=!0,Tr.fetch||(Tr.fetch=zr,Tr.Headers=Nr,Tr.Request=Fr,Tr.Response=kr),
|
|
616
616
|
// the whatwg-fetch polyfill installs the fetch() function
|
|
617
617
|
// on the global object (window or self)
|
|
618
618
|
// Return that as the export for use in Webpack, Browserify etc.
|
|
@@ -641,33 +641,33 @@ function On(t){let r;return{c(){r=d("div"),r.innerHTML='<section class="LoaderCo
|
|
|
641
641
|
function xn(e,t,r){const n=e.slice();return n[67]=t[r],n}function In(e,t,r){const n=e.slice();return n[70]=t[r],n}
|
|
642
642
|
// (257:2) {:else}
|
|
643
643
|
function Nn(e){let t,r,i,o,s,a,l,c,y,E,w,_,T,B,A,H,S,P,C,O=/*tabs*/e[17],L=[];for(let t=0;t<O.length;t+=1)L[t]=Un(In(e,O,t));function x(e,t){/*isLoadingDelayed*/
|
|
644
|
-
return e[18]?
|
|
644
|
+
return e[18]?Gn:Dn}let I=x(e),N=I(e);return{c(){t=d("div"),r=d("div"),i=d("div");for(let e=0;e<L.length;e+=1)L[e].c();o=b(),s=d("div"),a=d("button"),l=m("svg"),c=m("path"),E=b(),w=d("button"),_=m("svg"),T=m("path"),H=b(),N.c(),v(i,"class","WinnerButtonsContainer"),v(c,"style",y=/*numberOfVisibleSlides*/e[12]>=/*winners*/e[11].length?"fill:#F6F6F62E":""),v(c,"id","Path_36"),v(c,"data-name","Path 36"),v(c,"d","M12.328,16,0,3.672,3.672,0l8.656,8.656L20.984,0l3.672,3.672Z"),v(c,"transform","translate(14.656 0) rotate(90)"),v(c,"fill","#fff"),v(l,"id","Component_46_2"),v(l,"data-name","Component 46 – 2"),v(l,"xmlns","http://www.w3.org/2000/svg"),v(l,"width","15"),v(l,"height","15"),v(l,"viewBox","0 0 16 24.656"),v(a,"class","SliderButton"),v(T,"style",B=/*numberOfVisibleSlides*/e[12]>=/*winners*/e[11].length?"fill:#F6F6F62E":""),v(T,"id","Path_36"),v(T,"data-name","Path 36"),v(T,"d","M12.328,16,0,3.672,3.672,0l8.656,8.656L20.984,0l3.672,3.672Z"),v(T,"transform","translate(0 24.656) rotate(-90)"),v(T,"fill","#fff"),v(_,"id","Component_46_2"),v(_,"data-name","Component 46 – 2"),v(_,"xmlns","http://www.w3.org/2000/svg"),v(_,"width","15"),v(_,"height","15"),v(_,"viewBox","0 0 16 24.656"),v(w,"class","SliderButton"),v(s,"class",A="ButtonsContainer "+(/*enableautoscroll*/"true"==e[6]?"ButtonsContainerNone":"")),v(r,"class","WinnersHeader"),v(t,"class",S="CasinoWinners "+(/*mobile*/e[13]?"Mobile":""))},m(n,f){h(n,t,f),u(t,r),u(r,i);for(let e=0;e<L.length;e+=1)L[e]&&L[e].m(i,null);u(r,o),u(r,s),u(s,a),u(a,l),u(l,c),u(s,E),u(s,w),u(w,_),u(_,T),u(t,H),N.m(t,null),P||(C=[g(a,"click",/*click_handler_2*/e[42]),g(w,"click",/*click_handler_3*/e[43])],P=!0)},p(e,r){if(/*winnersType, istopavailable, toggleTab, $_, tabs, isrecentavailable*/1704963&r[0]){let t;for(O=/*tabs*/e[17],t=0;t<O.length;t+=1){const n=In(e,O,t);L[t]?L[t].p(n,r):(L[t]=Un(n),L[t].c(),L[t].m(i,null))}for(;t<L.length;t+=1)L[t].d(1);L.length=O.length}/*numberOfVisibleSlides, winners*/6144&r[0]&&y!==(y=/*numberOfVisibleSlides*/e[12]>=/*winners*/e[11].length?"fill:#F6F6F62E":"")&&v(c,"style",y),/*numberOfVisibleSlides, winners*/6144&r[0]&&B!==(B=/*numberOfVisibleSlides*/e[12]>=/*winners*/e[11].length?"fill:#F6F6F62E":"")&&v(T,"style",B),/*enableautoscroll*/64&r[0]&&A!==(A="ButtonsContainer "+(/*enableautoscroll*/"true"==e[6]?"ButtonsContainerNone":""))&&v(s,"class",A),I===(I=x(e))&&N?N.p(e,r):(N.d(1),N=I(e),N&&(N.c(),N.m(t,null))),/*mobile*/8192&r[0]&&S!==(S="CasinoWinners "+(/*mobile*/e[13]?"Mobile":""))&&v(t,"class",S)},d(e){e&&f(t),p(L,e),N.d(),P=!1,n(C)}}}
|
|
645
645
|
// (255:2) {#if isLoading || isLoadingCustomStyling}
|
|
646
|
-
function
|
|
646
|
+
function Mn(e){let t;return{c(){t=d("general-animation-loading"),E(t,"clientstyling",/*clientstyling*/e[4]),E(t,"clientstylingurl",/*clientstylingurl*/e[5])},m(e,r){h(e,t,r)},p(e,r){/*clientstyling*/16&r[0]&&E(t,"clientstyling",/*clientstyling*/e[4]),/*clientstylingurl*/32&r[0]&&E(t,"clientstylingurl",/*clientstylingurl*/e[5])},d(e){e&&f(t)}}}
|
|
647
647
|
// (262:12) {#if tab == 'recent'}
|
|
648
|
-
function
|
|
648
|
+
function Rn(e){let t,r,n,i,o,s=/*$_*/e[19]("recentWinners")+"";return{c(){t=d("button"),r=y(s),v(t,"class",n="WinnersButton "+(/*winnersType*/"recent"==e[10]?"Active":"")+" "+(/*isrecentavailable*/"false"==e[0]?"Off":""))},m(n,s){h(n,t,s),u(t,r),i||(o=g(t,"click",/*click_handler*/e[40]),i=!0)},p(e,i){/*$_*/524288&i[0]&&s!==(s=/*$_*/e[19]("recentWinners")+"")&&w(r,s),/*winnersType, isrecentavailable*/1025&i[0]&&n!==(n="WinnersButton "+(/*winnersType*/"recent"==e[10]?"Active":"")+" "+(/*isrecentavailable*/"false"==e[0]?"Off":""))&&v(t,"class",n)},d(e){e&&f(t),i=!1,o()}}}
|
|
649
649
|
// (267:12) {#if tab == 'top'}
|
|
650
650
|
function $n(e){let t,r,n,i,o,s,a=/*$_*/e[19]("topWinners")+"";return{c(){t=d("button"),r=y(a),n=b(),v(t,"class",i="WinnersButton "+(/*winnersType*/"top"==e[10]?"Active":"")+" "+(/*istopavailable*/"false"==e[1]?"Off":""))},m(i,a){h(i,t,a),u(t,r),u(t,n),o||(s=g(t,"click",/*click_handler_1*/e[41]),o=!0)},p(e,n){/*$_*/524288&n[0]&&a!==(a=/*$_*/e[19]("topWinners")+"")&&w(r,a),/*winnersType, istopavailable*/1026&n[0]&&i!==(i="WinnersButton "+(/*winnersType*/"top"==e[10]?"Active":"")+" "+(/*istopavailable*/"false"==e[1]?"Off":""))&&v(t,"class",i)},d(e){e&&f(t),o=!1,s()}}}
|
|
651
651
|
// (261:10) {#each tabs as tab}
|
|
652
|
-
function Un(e){let t,r,n=/*tab*/"recent"==e[70]&&
|
|
652
|
+
function Un(e){let t,r,n=/*tab*/"recent"==e[70]&&Rn(e),i=/*tab*/"top"==e[70]&&$n(e);return{c(){n&&n.c(),t=b(),i&&i.c(),r=y("")},m(e,o){n&&n.m(e,o),h(e,t,o),i&&i.m(e,o),h(e,r,o)},p(e,o){/*tab*/"recent"==e[70]?n?n.p(e,o):(n=Rn(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),/*tab*/"top"==e[70]?i?i.p(e,o):(i=$n(e),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null)},d(e){n&&n.d(e),e&&f(t),i&&i.d(e),e&&f(r)}}}
|
|
653
653
|
// (290:6) {:else}
|
|
654
|
-
function Dn(e){let t,r=/*winners*/e[11],n=[];for(let t=0;t<r.length;t+=1)n[t]=
|
|
655
|
-
/*div_binding*/e[45](t)},p(e,i){if(/*addAnimation, isLoggedIn, usercurrency, defaultcurrency, winners, $_, maskUsername, openWinnersGame*/6883468&i[0]){let o;for(r=/*winners*/e[11],o=0;o<r.length;o+=1){const s=xn(e,r,o);n[o]?n[o].p(s,i):(n[o]=
|
|
654
|
+
function Dn(e){let t,r=/*winners*/e[11],n=[];for(let t=0;t<r.length;t+=1)n[t]=Fn(xn(e,r,t));return{c(){t=d("div");for(let e=0;e<n.length;e+=1)n[e].c();v(t,"class","WinnersSlider")},m(r,i){h(r,t,i);for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,null);
|
|
655
|
+
/*div_binding*/e[45](t)},p(e,i){if(/*addAnimation, isLoggedIn, usercurrency, defaultcurrency, winners, $_, maskUsername, openWinnersGame*/6883468&i[0]){let o;for(r=/*winners*/e[11],o=0;o<r.length;o+=1){const s=xn(e,r,o);n[o]?n[o].p(s,i):(n[o]=Fn(s),n[o].c(),n[o].m(t,null))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},d(r){r&&f(t),p(n,r),
|
|
656
656
|
/*div_binding*/e[45](null)}}}
|
|
657
657
|
// (288:6) {#if isLoadingDelayed}
|
|
658
|
-
function
|
|
658
|
+
function Gn(e){let t;return{c(){t=d("general-animation-loading"),E(t,"clientstyling",/*clientstyling*/e[4]),E(t,"clientstylingurl",/*clientstylingurl*/e[5])},m(e,r){h(e,t,r)},p(e,r){/*clientstyling*/16&r[0]&&E(t,"clientstyling",/*clientstyling*/e[4]),/*clientstylingurl*/32&r[0]&&E(t,"clientstylingurl",/*clientstylingurl*/e[5])},d(e){e&&f(t)}}}
|
|
659
659
|
// (292:10) {#each winners as winner}
|
|
660
|
-
function
|
|
661
|
-
return e[44](/*winner*/e[67])}return{c(){t=d("div"),r=d("div"),n=d("img"),s=b(),a=d("p"),c=y(
|
|
662
|
-
return e[14]||/*isLoadingCustomStyling*/e[15]?
|
|
660
|
+
function Fn(e){let t,r,n,i,o,s,a,c,p,m,E,_,T,B,A,H,S,P,C,O,L,x,I,N,M=/*winner*/e[67].gameName+"",R=/*maskUsername*/e[21](/*winner*/e[67].username)+"",$=/*$_*/e[19]("won")+"",U=/*winner*/e[67].specifiedCurrencyAmount.toFixed(2)+"",D=/*isLoggedIn*/(e[7]?/*usercurrency*/e[3]:/*defaultcurrency*/e[2])+"";function G(){/*click_handler_4*/
|
|
661
|
+
return e[44](/*winner*/e[67])}return{c(){t=d("div"),r=d("div"),n=d("img"),s=b(),a=d("p"),c=y(M),p=b(),m=d("p"),E=y(R),_=b(),T=d("p"),B=y($),A=b(),H=d("p"),S=y(U),P=b(),C=d("span"),O=y(D),L=b(),l(n.src,i=/*winner*/e[67]?.gameModel?.thumbnail)||v(n,"src",i),v(n,"alt",o=/*winner*/e[67]?.gameModel?.thumbnail),v(n,"class","WinnersImage"),v(T,"class","WinnerUsername"),v(r,"class","WinnerCard"),v(t,"class",x="CardWrapper "+(/*addAnimation*/e[16]?"CardWrapperAnimation":""))},m(e,i){h(e,t,i),u(t,r),u(r,n),u(r,s),u(r,a),u(a,c),u(r,p),u(r,m),u(m,E),u(r,_),u(r,T),u(T,B),u(r,A),u(r,H),u(H,S),u(H,P),u(H,C),u(C,O),u(t,L),I||(N=g(n,"click",G),I=!0)},p(r,s){e=r,/*winners*/2048&s[0]&&!l(n.src,i=/*winner*/e[67]?.gameModel?.thumbnail)&&v(n,"src",i),/*winners*/2048&s[0]&&o!==(o=/*winner*/e[67]?.gameModel?.thumbnail)&&v(n,"alt",o),/*winners*/2048&s[0]&&M!==(M=/*winner*/e[67].gameName+"")&&w(c,M),/*winners*/2048&s[0]&&R!==(R=/*maskUsername*/e[21](/*winner*/e[67].username)+"")&&w(E,R),/*$_*/524288&s[0]&&$!==($=/*$_*/e[19]("won")+"")&&w(B,$),/*winners*/2048&s[0]&&U!==(U=/*winner*/e[67].specifiedCurrencyAmount.toFixed(2)+"")&&w(S,U),/*isLoggedIn, usercurrency, defaultcurrency*/140&s[0]&&D!==(D=/*isLoggedIn*/(e[7]?/*usercurrency*/e[3]:/*defaultcurrency*/e[2])+"")&&w(O,D),/*addAnimation*/65536&s[0]&&x!==(x="CardWrapper "+(/*addAnimation*/e[16]?"CardWrapperAnimation":""))&&v(t,"class",x)},d(e){e&&f(t),I=!1,N()}}}function Wn(t){let r;function n(e,t){/*isLoading*/
|
|
662
|
+
return e[14]||/*isLoadingCustomStyling*/e[15]?Mn:Nn}let i=n(t),o=i(t);return{c(){r=d("div"),o.c(),this.c=e},m(e,n){h(e,r,n),o.m(r,null),
|
|
663
663
|
/*div_binding_1*/t[46](r)},p(e,t){i===(i=n(e))&&o?o.p(e,t):(o.d(1),o=i(e),o&&(o.c(),o.m(r,null)))},i:e,o:e,d(e){e&&f(r),o.d(),
|
|
664
|
-
/*div_binding_1*/t[46](null)}}}!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",class extends
|
|
664
|
+
/*div_binding_1*/t[46](null)}}}!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",class extends G{constructor(e){super();const t=document.createElement("style");t.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(t),D(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},Ln,On,o,{clientstyling:1,clientstylingurl:2},null),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),N()))}static get observedAttributes(){return["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),N()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),N()}});function kn(e,t,r){let n;var i,o;i=Er,o=e=>r(19,n=e),e.$$.on_destroy.push(c(i,o));let s,a,l,u,h,f,p,d,m,y,{endpoint:b=""}=t,{session:g=""}=t,{userid:v=""}=t,{periodrecent:E="Today"}=t,{periodtop:w="Last7Days"}=t,{numberusersrecent:_="20"}=t,{numberuserstop:T="20"}=t,{amountlimit:A="1"}=t,{vendorCategory:S="All"}=t,{lang:P="en"}=t,{isrecentavailable:C="true"}=t,{istopavailable:O="true"}=t,{defaultcurrency:L=""}=t,{usercurrency:x=""}=t,{clientstyling:I=""}=t,{clientstylingurl:N=""}=t,{enableautoscroll:M=""}=t,{tabsorder:R=""}=t,{translationurl:$=""}=t,{winnersdatasources:U=""}=t,{hascustomstyling:D="false"}=t,G=[],F=0,W=0,k=window.navigator.userAgent,j=!0,V=!1,z=!1,X=[],K=!1;Object.keys(_r).forEach((e=>{wr(e,_r[e])}));const Y=()=>{X=U.split(",").map((function(e){return e.trim()}));const e=new URL(`${b}/v1/casino/${a}-winners`);r(18,K=!0),e.searchParams.append("limit","recent"==a?_:T),e.searchParams.append("specifiedCurrency",y),e.searchParams.append("period","recent"==a?E:w),e.searchParams.append("language",P),e.searchParams.append("amountLimit",A),e.searchParams.append("vendorCategory",S),X.forEach((t=>{e.searchParams.append("dataSource",t)})),setTimeout((()=>{fetch(e.href).then((e=>e.json())).then((e=>{r(11,G=[]),r(11,G=e.items.map((e=>e))),r(18,K=!1),
|
|
665
665
|
// Stupid hacks 'cuz svelte is a pain in the ass sometimes
|
|
666
|
-
setTimeout((()=>{te(),J(),"true"==
|
|
666
|
+
setTimeout((()=>{te(),J(),"true"==M&&(clearInterval(d),Q()),r(14,j=!1)}),5)}))}),1e3)},Z=e=>{a!==e&&(r(11,G=[]),r(10,a=e),Y())},q=(e,t,r,n)=>{window.postMessage({type:"OpenCasinoWinnersGame",gameId:e,launchUrl:t,gameName:r,subVendor:n},window.location.href),
|
|
667
667
|
//Analytics event
|
|
668
|
-
"function"==typeof gtag&>ag("event","OpenGame",{context:"WinnersWidget",gameId:`${e}`,userId:`${h||"Not logged in"}`})},J=e=>{const t=[...s.children];p=t.length,t.forEach(((t,r)=>{t.style.transform=`translateX(${100*(e?r-e:r)}%)`})),setTimeout((()=>{r(16,z=!0)}),10)},Q=()=>{
|
|
668
|
+
"function"==typeof gtag&>ag("event","OpenGame",{context:"WinnersWidget",gameId:`${e}`,userId:`${h||"Not logged in"}`})},J=e=>{const t=[...s.children];p=t.length,t.forEach(((t,r)=>{t.style.transform=`translateX(${100*(e?r-e:r)}%)`})),setTimeout((()=>{r(16,z=!0)}),10)},Q=()=>{F=0,W<p?d=setInterval((()=>{ne()}),3e3):clearInterval(d)},ee=()=>{J(F)},te=()=>{r(12,W=Math.round(s.offsetWidth/225))},re=()=>{if(W>=G.length)return;const e=G.length;0===F?F=e-W:F-W<0?F=0:F-=W,ee()},ne=()=>{if(W>=G.length)return;const e=G.length;
|
|
669
669
|
//Automatic scroll animation rules
|
|
670
|
-
"true"==
|
|
670
|
+
"true"==M&&(F===e-W?F=0:F++),
|
|
671
671
|
//Standard scroll animation rules
|
|
672
|
-
"false"==
|
|
672
|
+
"false"==M&&(F===e-W?F=0:e-W<F+W?F=e-W:F+=W),ee()},ie=()=>{var e;e=P,er.set(e)},oe=()=>{r(39,y=u?x:L)};B((()=>(r(13,l=(e=>!!(e.toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(k)),()=>{clearInterval(d)})));return e.$$set=e=>{"endpoint"in e&&r(26,b=e.endpoint),"session"in e&&r(27,g=e.session),"userid"in e&&r(28,v=e.userid),"periodrecent"in e&&r(29,E=e.periodrecent),"periodtop"in e&&r(30,w=e.periodtop),"numberusersrecent"in e&&r(31,_=e.numberusersrecent),"numberuserstop"in e&&r(32,T=e.numberuserstop),"amountlimit"in e&&r(25,A=e.amountlimit),"vendorCategory"in e&&r(33,S=e.vendorCategory),"lang"in e&&r(34,P=e.lang),"isrecentavailable"in e&&r(0,C=e.isrecentavailable),"istopavailable"in e&&r(1,O=e.istopavailable),"defaultcurrency"in e&&r(2,L=e.defaultcurrency),"usercurrency"in e&&r(3,x=e.usercurrency),"clientstyling"in e&&r(4,I=e.clientstyling),"clientstylingurl"in e&&r(5,N=e.clientstylingurl),"enableautoscroll"in e&&r(6,M=e.enableautoscroll),"tabsorder"in e&&r(35,R=e.tabsorder),"translationurl"in e&&r(36,$=e.translationurl),"winnersdatasources"in e&&r(37,U=e.winnersdatasources),"hascustomstyling"in e&&r(38,D=e.hascustomstyling)},e.$$.update=()=>{/*isrecentavailable, istopavailable, periodrecent, periodtop, amountlimit*/1644167171&e.$$.dirty[0]|/*numberusersrecent, numberuserstop, vendorCategory, lang, tabsorder*/31&e.$$.dirty[1]&&C&&O&&E&&w&&_&&T&&A&&S&&P&&R&&(r(17,m=R.split(",")),r(10,a=m[0]),"false"==C&&r(25,A=""),oe(),r(14,j=!1)),/*session*/134217728&e.$$.dirty[0]&&g&&(r(7,u=!0),h=v),/*isLoggedIn, usercurrency, defaultcurrency*/140&e.$$.dirty[0]&&u&&(x||L)&&oe(),/*endpoint*/67108864&e.$$.dirty[0]|/*winnersdatasources, currency*/320&e.$$.dirty[1]&&b&&U&&y&&Y(),/*lang*/8&e.$$.dirty[1]&&P&&ie(),/*translationurl*/32&e.$$.dirty[1]&&$&&(()=>{let e=new URL($);fetch(e.href).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{wr(t,e[t])}))})).catch((e=>{console.log(e)}))})(),/*hascustomstyling*/128&e.$$.dirty[1]&&D&&"true"===D&&(I||N||!f||console.error("clientstyling or clientstylingurl mandatory if hascustomstyling is true"),!I&&N&&r(15,V=!0)),/*clientstyling, customStylingContainer*/272&e.$$.dirty[0]&&I&&f&&(()=>{let e=document.createElement("style");e.innerHTML=I,f.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/288&e.$$.dirty[0]&&N&&f&&(()=>{let e=new URL(N),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{f.appendChild(t)}),1),setTimeout((()=>{}),500),r(15,V=!1)}))})()},[C,O,L,x,I,N,M,u,f,s,a,G,W,l,j,V,z,m,K,n,Z,e=>e.slice(0,2)+e.slice(2,-2).replace(/./g,"*")+e.slice(-2),q,re,ne,A,b,g,v,E,w,_,T,S,P,R,$,U,D,y,()=>Z("recent"),()=>Z("top"),()=>re(),()=>ne(),e=>q(e.gameId,e.gameModel.launchUrl,e.gameModel.name,e.gameModel.subVendor),function(e){H[e?"unshift":"push"]((()=>{s=e,r(9,s)}))},function(e){H[e?"unshift":"push"]((()=>{f=e,r(8,f)}))}]}class jn extends G{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.Off{display:none}.CasinoWinners{background-color:var(--emfe-w-casino-color-bg, var(--emfe-w-color-background, #07072A));width:100%;height:320px;margin:0 auto}.CasinoWinners.Mobile{padding:25px 10px;height:250px}.WinnersHeader{display:flex;justify-content:space-between}.SliderButton{border:1px solid rgba(255, 255, 255, 0.2);border-radius:5px;background-color:rgba(0, 0, 25, 0.2);height:40px;width:40px}.SliderButton.SliderButton:active{transform:translateY(1px)}.WinnerButtonsContainer{display:flex;margin-bottom:42px}.WinnersButton{border:none;background:none;color:var(--emfe-w-casino-typography, var(--emfe-w-color-contrast, #FFFFFF));font-size:22px;font-weight:500;margin-right:60px;cursor:pointer}.WinnersButton:hover{border-bottom:1px solid var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));line-height:40px}.WinnersButton:focus{color:var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));line-height:40px}.WinnersButton.Active{border-bottom:2px solid #D0046C;padding-bottom:10px;color:var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C))}.WinnersButton.Active{border-bottom:1px solid var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));color:var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));line-height:40px}.ButtonsContainerNone{display:none}.WinnersSlider{display:flex;justify-content:flex-start;position:relative;height:180px;overflow:hidden}.CardWrapper{position:absolute;top:0;left:0}.CardWrapperAnimation{transition:transform 2s}.WinnerCard{border:1px solid rgba(255, 255, 255, 0.2);border-radius:5px;background-color:rgba(0, 0, 25, 0.2);display:flex;align-items:center;flex-direction:column;justify-content:center;gap:4px;height:180px;min-width:191px;margin-bottom:30px;margin-right:30px}.WinnerCard p:first-of-type{color:var(--emfe-w-color-gray-150, #828282);font-size:14px;inline-size:189px;overflow-wrap:break-word;text-align:center}.WinnerCard p:nth-child(3){text-align:center;color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF));font-size:14px;width:100px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.WinnerCard p:nth-child(4){color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF));font-size:14px;text-align:center}.WinnerCard p:last-of-type{color:var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));font-size:16px}.WinnerCard:hover{border:1px solid rgba(255, 255, 255, 0.4)}.WinnersImage{border-radius:5px;height:54px;margin-bottom:10px;width:80px;cursor:pointer}.Mobile .WinnersHeader{justify-content:flex-start}.Mobile .WinnersButton{font-size:18px;white-space:nowrap;margin-right:40px}.Mobile .WinnersButton:last-child{margin-right:0}.Mobile .WinnersButton.Active{padding-bottom:4px}.Mobile .WinnersSlider{overflow:scroll;overflow-y:hidden;-ms-overflow-style:none;scrollbar-width:none}.Mobile .WinnersSlider::-webkit-scrollbar{display:none}.Mobile .SliderButton{display:none}.Mobile .WinnerCard{width:140px;height:150px;min-width:140px;margin-right:12px}.Mobile .WinnerCard p:first-of-type{font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;width:100px}.Mobile .WinnerCard p:nth-child(3){font-size:10px}.Mobile .WinnerCard p:nth-child(4){font-size:8px;font-weight:300;text-align:center}.Mobile .WinnerCard p:last-of-type{font-size:11px}.Mobile .WinnerButtonsContainer{margin-bottom:20px}",this.shadowRoot.appendChild(t),D(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},kn,Wn,o,{endpoint:26,session:27,userid:28,periodrecent:29,periodtop:30,numberusersrecent:31,numberuserstop:32,amountlimit:25,vendorCategory:33,lang:34,isrecentavailable:0,istopavailable:1,defaultcurrency:2,usercurrency:3,clientstyling:4,clientstylingurl:5,enableautoscroll:6,tabsorder:35,translationurl:36,winnersdatasources:37,hascustomstyling:38},null,[-1,-1,-1]),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),N()))}static get observedAttributes(){return["endpoint","session","userid","periodrecent","periodtop","numberusersrecent","numberuserstop","amountlimit","vendorCategory","lang","isrecentavailable","istopavailable","defaultcurrency","usercurrency","clientstyling","clientstylingurl","enableautoscroll","tabsorder","translationurl","winnersdatasources","hascustomstyling"]}get endpoint(){return this.$$.ctx[26]}set endpoint(e){this.$$set({endpoint:e}),N()}get session(){return this.$$.ctx[27]}set session(e){this.$$set({session:e}),N()}get userid(){return this.$$.ctx[28]}set userid(e){this.$$set({userid:e}),N()}get periodrecent(){return this.$$.ctx[29]}set periodrecent(e){this.$$set({periodrecent:e}),N()}get periodtop(){return this.$$.ctx[30]}set periodtop(e){this.$$set({periodtop:e}),N()}get numberusersrecent(){return this.$$.ctx[31]}set numberusersrecent(e){this.$$set({numberusersrecent:e}),N()}get numberuserstop(){return this.$$.ctx[32]}set numberuserstop(e){this.$$set({numberuserstop:e}),N()}get amountlimit(){return this.$$.ctx[25]}set amountlimit(e){this.$$set({amountlimit:e}),N()}get vendorCategory(){return this.$$.ctx[33]}set vendorCategory(e){this.$$set({vendorCategory:e}),N()}get lang(){return this.$$.ctx[34]}set lang(e){this.$$set({lang:e}),N()}get isrecentavailable(){return this.$$.ctx[0]}set isrecentavailable(e){this.$$set({isrecentavailable:e}),N()}get istopavailable(){return this.$$.ctx[1]}set istopavailable(e){this.$$set({istopavailable:e}),N()}get defaultcurrency(){return this.$$.ctx[2]}set defaultcurrency(e){this.$$set({defaultcurrency:e}),N()}get usercurrency(){return this.$$.ctx[3]}set usercurrency(e){this.$$set({usercurrency:e}),N()}get clientstyling(){return this.$$.ctx[4]}set clientstyling(e){this.$$set({clientstyling:e}),N()}get clientstylingurl(){return this.$$.ctx[5]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),N()}get enableautoscroll(){return this.$$.ctx[6]}set enableautoscroll(e){this.$$set({enableautoscroll:e}),N()}get tabsorder(){return this.$$.ctx[35]}set tabsorder(e){this.$$set({tabsorder:e}),N()}get translationurl(){return this.$$.ctx[36]}set translationurl(e){this.$$set({translationurl:e}),N()}get winnersdatasources(){return this.$$.ctx[37]}set winnersdatasources(e){this.$$set({winnersdatasources:e}),N()}get hascustomstyling(){return this.$$.ctx[38]}set hascustomstyling(e){this.$$set({hascustomstyling:e}),N()}}return!customElements.get("casino-winners")&&customElements.define("casino-winners",jn),jn}));
|
|
673
673
|
//# sourceMappingURL=casino-winners.js.map
|