@everymatrix/player-account-gaming-limits-wrapper-2 0.0.382 → 0.0.383

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.
@@ -1,724 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@everymatrix/player-account-gaming-limits-page-2-gm16")):"function"==typeof define&&define.amd?define(["@everymatrix/player-account-gaming-limits-page-2-gm16"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,(function(){"use strict";function t(){}function e(t){return t()}function r(){return Object.create(null)}function n(t){t.forEach(e)}function i(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(e,...r){if(null==e)return t;const n=e.subscribe(...r);return n.unsubscribe?()=>n.unsubscribe():n}function a(t,e,r){t.$$.on_destroy.push(s(e,r))}function l(t,e){t.appendChild(e)}function c(t,e,r){t.insertBefore(e,r||null)}function u(t){t.parentNode.removeChild(t)}function h(t,e){for(let r=0;r<t.length;r+=1)t[r]&&t[r].d(e)}function p(t){return document.createElement(t)}function f(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function m(t){return document.createTextNode(t)}function d(){return m(" ")}function g(){return m("")}function y(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function b(t,e,r){null==r?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}function v(t,e,r){e in t?t[e]="boolean"==typeof t[e]&&""===r||r:b(t,e,r)}function E(t){return""===t?null:+t}function T(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function L(t,e){t.value=null==e?"":e}function w(t,e,r,n){null===r?t.style.removeProperty(e):t.style.setProperty(e,r,n?"important":"")}function _(t,e){for(let r=0;r<t.options.length;r+=1){const n=t.options[r];if(n.__value===e)return void(n.selected=!0)}t.selectedIndex=-1}function A(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function B(t,e,r){t.classList[r?"add":"remove"](e)}function S(t){const e={};for(const r of t)e[r.name]=r.value;return e}let H;function x(t){H=t}const P=[],I=[],$=[],O=[],C=Promise.resolve();let R=!1;function N(t){$.push(t)}
2
- // flush() calls callbacks in this order:
3
- // 1. All beforeUpdate callbacks, in order: parents before children
4
- // 2. All bind:this callbacks, in reverse order: children before parents.
5
- // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
6
- // for afterUpdates called during the initial onMount, which are called in
7
- // reverse order: children before parents.
8
- // Since callbacks might update component values, which could trigger another
9
- // call to flush(), the following steps guard against this:
10
- // 1. During beforeUpdate, any updated components will be added to the
11
- // dirty_components array and will cause a reentrant call to flush(). Because
12
- // the flush index is kept outside the function, the reentrant call will pick
13
- // up where the earlier call left off and go through all dirty components. The
14
- // current_component value is saved and restored so that the reentrant call will
15
- // not interfere with the "parent" flush() call.
16
- // 2. bind:this callbacks cannot trigger new flush() calls.
17
- // 3. During afterUpdate, any updated components will NOT have their afterUpdate
18
- // callback called a second time; the seen_callbacks set, outside the flush()
19
- // function, guarantees this behavior.
20
- const M=new Set;let D=0;// Do *not* move this inside the flush() function
21
- function U(){const t=H;do{
22
- // first, call beforeUpdate functions
23
- // and update components
24
- for(;D<P.length;){const t=P[D];D++,x(t),k(t.$$)}for(x(null),P.length=0,D=0;I.length;)I.pop()();
25
- // then, once components are updated, call
26
- // afterUpdate functions. This may cause
27
- // subsequent updates...
28
- for(let t=0;t<$.length;t+=1){const e=$[t];M.has(e)||(
29
- // ...so guard against infinite loops
30
- M.add(e),e())}$.length=0}while(P.length);for(;O.length;)O.pop()();R=!1,M.clear(),x(t)}function k(t){if(null!==t.fragment){t.update(),n(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(N)}}const G=new Set;function F(t,e){-1===t.$$.dirty[0]&&(P.push(t),R||(R=!0,C.then(U)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function j(o,s,a,l,c,h,p,f=[-1]){const m=H;x(o);const d=o.$$={fragment:null,ctx:null,
31
- // state
32
- props:h,update:t,not_equal:c,bound:r(),
33
- // lifecycle
34
- on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(m?m.$$.context:[])),
35
- // everything else
36
- callbacks:r(),dirty:f,skip_bound:!1,root:s.target||m.$$.root};p&&p(d.root);let g=!1;if(d.ctx=a?a(o,s.props||{},((t,e,...r)=>{const n=r.length?r[0]:e;return d.ctx&&c(d.ctx[t],d.ctx[t]=n)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](n),g&&F(o,t)),e})):[],d.update(),g=!0,n(d.before_update),
37
- // `false` as a special case of no DOM component
38
- d.fragment=!!l&&l(d.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);
39
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
40
- d.fragment&&d.fragment.l(t),t.forEach(u)}else
41
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
42
- d.fragment&&d.fragment.c();s.intro&&((y=o.$$.fragment)&&y.i&&(G.delete(y),y.i(b))),function(t,r,o,s){const{fragment:a,on_mount:l,on_destroy:c,after_update:u}=t.$$;a&&a.m(r,o),s||
43
- // onMount happens before the initial afterUpdate
44
- N((()=>{const r=l.map(e).filter(i);c?c.push(...r):
45
- // Edge case - component was destroyed immediately,
46
- // most likely as a result of a binding initialising
47
- n(r),t.$$.on_mount=[]})),u.forEach(N)}(o,s.target,s.anchor,s.customElement),U()}var y,b;x(m)}let V;"function"==typeof HTMLElement&&(V=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);
48
- // @ts-ignore todo: improve typings
49
- for(const t in this.$$.slotted)
50
- // @ts-ignore todo: improve typings
51
- this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,r){this[t]=r}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){!function(t,e){const r=t.$$;null!==r.fragment&&(n(r.on_destroy),r.fragment&&r.fragment.d(e),
52
- // TODO null out other refs, including component.$$ (but need to
53
- // preserve final state?)
54
- r.on_destroy=r.fragment=null,r.ctx=[])}(this,1),this.$destroy=t}$on(t,e){
55
- // TODO should this delegate to addEventListener?
56
- const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});const z={deposit:{title:"Deposit Limit",value:"deposit",callValue:"depositLimits",periods:["Daily","Weekly","Monthly"]},loss:{title:"Loss Limit",value:"loss",callValue:"lossLimits",periods:["Daily","Weekly","Monthly"]},wager:{title:"Wager Limit",value:"wager",callValue:"wageringLimits",periods:["Monthly"]},stake:{title:"Stake Limit",value:"stake",callValue:"stakeLimit",periods:["Monthly"]}},W=[];
57
- /**
58
- * Create a `Writable` store that allows both updating and reading by subscription.
59
- * @param {*=}value initial value
60
- * @param {StartStopNotifier=}start start and stop notifications for subscriptions
61
- */
62
- function X(e,r=t){let n;const i=new Set;function s(t){if(o(e,t)&&(e=t,n)){// store is ready
63
- const t=!W.length;for(const t of i)t[1](),W.push(t,e);if(t){for(let t=0;t<W.length;t+=2)W[t][0](W[t+1]);W.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(o,a=t){const l=[o,a];return i.add(l),1===i.size&&(n=r(s)||t),o(e),()=>{i.delete(l),0===i.size&&(n(),n=null)}}}}function K(e,r,o){const a=!Array.isArray(e),l=a?[e]:e,c=r.length<2;return u=e=>{let o=!1;const u=[];let h=0,p=t;const f=()=>{if(h)return;p();const n=r(a?u[0]:u,e);c?e(n):p=i(n)?n:t},m=l.map(((t,e)=>s(t,(t=>{u[e]=t,h&=~(1<<e),o&&f()}),(()=>{h|=1<<e}))));return o=!0,f(),function(){n(m),p()}},{subscribe:X(o,u).subscribe};
64
- /**
65
- * Creates a `Readable` store that allows reading by subscription.
66
- * @param value initial value
67
- * @param {StartStopNotifier}start start and stop notifications for subscriptions
68
- */
69
- var u}var Y=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===Z}(t)}
70
- // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
71
- (t)};var Z="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function q(t,e){return!1!==e.clone&&e.isMergeableObject(t)?rt((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function Q(t,e,r){return t.concat(e).map((function(t){return q(t,r)}))}function J(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function tt(t,e){try{return e in t}catch(t){return!1}}
72
- // Protects from prototype poisoning and unexpected merging up the prototype chain.
73
- function et(t,e,r){var n={};return r.isMergeableObject(t)&&J(t).forEach((function(e){n[e]=q(t[e],r)})),J(e).forEach((function(i){(function(t,e){return tt(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e));// and also unsafe if they're nonenumerable.
74
- })(t,i)||(tt(t,i)&&r.isMergeableObject(e[i])?n[i]=function(t,e){if(!e.customMerge)return rt;var r=e.customMerge(t);return"function"==typeof r?r:rt}(i,r)(t[i],e[i],r):n[i]=q(e[i],r))})),n}function rt(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||Q,r.isMergeableObject=r.isMergeableObject||Y,
75
- // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
76
- // implementations can use it. The caller may not replace it.
77
- r.cloneUnlessOtherwiseSpecified=q;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):et(t,e,r):q(e,r)}rt.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return rt(t,r,e)}),{})};var nt=rt,it=function(t,e){return it=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},it(t,e)};function ot(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}it(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var st,at,lt,ct=function(){return ct=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ct.apply(this,arguments)};function ut(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}
78
- /**
79
- * Type Guards
80
- */
81
- function ht(t){return t.type===at.literal}function pt(t){return t.type===at.argument}function ft(t){return t.type===at.number}function mt(t){return t.type===at.date}function dt(t){return t.type===at.time}function gt(t){return t.type===at.select}function yt(t){return t.type===at.plural}function bt(t){return t.type===at.pound}function vt(t){return t.type===at.tag}function Et(t){return!(!t||"object"!=typeof t||t.type!==lt.number)}function Tt(t){return!(!t||"object"!=typeof t||t.type!==lt.dateTime)}
82
- // @generated from regex-gen.ts
83
- !function(t){
84
- /** Argument is unclosed (e.g. `{0`) */
85
- t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
86
- /** Argument is empty (e.g. `{}`). */
87
- t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
88
- /** Argument is malformed (e.g. `{foo!}``) */
89
- t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
90
- /** Expect an argument type (e.g. `{foo,}`) */
91
- t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
92
- /** Unsupported argument type (e.g. `{foo,foo}`) */
93
- t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
94
- /** Expect an argument style (e.g. `{foo, number, }`) */
95
- t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
96
- /** The number skeleton is invalid. */
97
- t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
98
- /** The date time skeleton is invalid. */
99
- t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
100
- /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
101
- t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
102
- /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
103
- t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
104
- /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
105
- t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
106
- /** Missing select argument options (e.g. `{foo, select}`) */
107
- t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
108
- /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
109
- t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
110
- /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
111
- t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
112
- /** Expecting a selector in `select` argument (e.g `{foo, select}`) */
113
- t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
114
- /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
115
- t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
116
- /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
117
- t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
118
- /**
119
- * Expecting a message fragment after the `plural` or `selectordinal` selector
120
- * (e.g. `{foo, plural, one}`)
121
- */
122
- t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
123
- /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
124
- t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
125
- /**
126
- * Duplicate selectors in `plural` or `selectordinal` argument.
127
- * (e.g. {foo, plural, one {#} one {#}})
128
- */
129
- t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
130
- /** Duplicate selectors in `select` argument.
131
- * (e.g. {foo, select, apple {apple} apple {apple}})
132
- */
133
- t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
134
- /** Plural or select argument option must have `other` clause. */
135
- t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
136
- /** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
137
- t[t.INVALID_TAG=23]="INVALID_TAG",
138
- /** The tag name is invalid. (e.g. `<123>foo</123>`) */
139
- t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
140
- /** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
141
- t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
142
- /** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
143
- t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(st||(st={})),function(t){
144
- /**
145
- * Raw text
146
- */
147
- t[t.literal=0]="literal",
148
- /**
149
- * Variable w/o any format, e.g `var` in `this is a {var}`
150
- */
151
- t[t.argument=1]="argument",
152
- /**
153
- * Variable w/ number format
154
- */
155
- t[t.number=2]="number",
156
- /**
157
- * Variable w/ date format
158
- */
159
- t[t.date=3]="date",
160
- /**
161
- * Variable w/ time format
162
- */
163
- t[t.time=4]="time",
164
- /**
165
- * Variable w/ select format
166
- */
167
- t[t.select=5]="select",
168
- /**
169
- * Variable w/ plural format
170
- */
171
- t[t.plural=6]="plural",
172
- /**
173
- * Only possible within plural argument.
174
- * This is the `#` symbol that will be substituted with the count.
175
- */
176
- t[t.pound=7]="pound",
177
- /**
178
- * XML-like tag
179
- */
180
- t[t.tag=8]="tag"}(at||(at={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(lt||(lt={}));var Lt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,wt=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
181
- /**
182
- * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
183
- * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
184
- * with some tweaks
185
- */
186
- /**
187
- * Parse Date time skeleton into Intl.DateTimeFormatOptions
188
- * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
189
- * @public
190
- * @param skeleton skeleton string
191
- */
192
- function _t(t){var e={};return t.replace(wt,(function(t){var r=t.length;switch(t[0]){
193
- // Era
194
- case"G":e.era=4===r?"long":5===r?"narrow":"short";break;
195
- // Year
196
- case"y":e.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
197
- // Quarter
198
- case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
199
- // Month
200
- case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][r-1];break;
201
- // Week
202
- case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
203
- // Weekday
204
- case"E":e.weekday=4===r?"short":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;
205
- // Period
206
- case"a":// AM, PM
207
- e.hour12=!0;break;case"b":// am, pm, noon, midnight
208
- case"B":// flexible day periods
209
- throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
210
- // Hour
211
- case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][r-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][r-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][r-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
212
- // Minute
213
- case"m":e.minute=["numeric","2-digit"][r-1];break;
214
- // Second
215
- case"s":e.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
216
- // Zone
217
- case"z":// 1..3, 4: specific non-location format
218
- e.timeZoneName=r<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
219
- case"O":// 1, 4: miliseconds in day short, long
220
- case"v":// 1, 4: generic non-location format
221
- case"V":// 1, 2, 3, 4: time zone ID or city
222
- case"X":// 1, 2, 3, 4: The ISO8601 varios formats
223
- case"x":// 1, 2, 3, 4: The ISO8601 varios formats
224
- throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}
225
- // @generated from regex-gen.ts
226
- var At=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Bt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,St=/^(@+)?(\+|#+)?[rs]?$/g,Ht=/(\*)(0+)|(#+)(0+)|(0+)/g,xt=/^(0+)$/;function Pt(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(St,(function(t,r,n){
227
- // @@@ case
228
- return"string"!=typeof n?(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length):"+"===n?e.minimumSignificantDigits=r.length:"#"===r[0]?e.maximumSignificantDigits=r.length:(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),e}function It(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function $t(t){
229
- // Engineering
230
- var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if("+!"===r?(e.signDisplay="always",t=t.slice(2)):"+?"===r&&(e.signDisplay="exceptZero",t=t.slice(2)),!xt.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Ot(t){var e=It(t);return e||{}}
231
- /**
232
- * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
233
- */function Ct(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=ct(ct(ct({},e),{notation:"scientific"}),i.options.reduce((function(t,e){return ct(ct({},t),Ot(e))}),{}));continue;case"engineering":e=ct(ct(ct({},e),{notation:"engineering"}),i.options.reduce((function(t,e){return ct(ct({},t),Ot(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;
234
- // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
235
- case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;
236
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
237
- case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Ht,(function(t,r,n,i,o,s){if(r)e.minimumIntegerDigits=n.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}
238
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
239
- if(xt.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(Bt.test(i.stem)){
240
- // Precision
241
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
242
- // precision-integer case
243
- if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Bt,(function(t,r,n,i,o,s){
244
- // .000* case (before ICU67 it was .000+)
245
- return"*"===n?e.minimumFractionDigits=r.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:o&&s?(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length+s.length):(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length),""}));var o=i.options[0];
246
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
247
- "w"===o?e=ct(ct({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=ct(ct({},e),Pt(o)))}
248
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
249
- else if(St.test(i.stem))e=ct(ct({},e),Pt(i.stem));else{var s=It(i.stem);s&&(e=ct(ct({},e),s));var a=$t(i.stem);a&&(e=ct(ct({},e),a))}}return e}
250
- // @generated from time-data-gen.ts
251
- // prettier-ignore
252
- var Rt,Nt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};
253
- /**
254
- * Returns the best matching date time pattern if a date time skeleton
255
- * pattern is provided with a locale. Follows the Unicode specification:
256
- * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
257
- * @param skeleton date time skeleton pattern that possibly includes j, J or C
258
- * @param locale
259
- */
260
- /**
261
- * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
262
- * of the given `locale` to the corresponding time pattern.
263
- * @param locale
264
- */
265
- function Mt(t){var e=t.hourCycle;if(void 0===e&&
266
- // @ts-ignore hourCycle(s) is not identified yet
267
- t.hourCycles&&
268
- // @ts-ignore
269
- t.hourCycles.length&&(
270
- // @ts-ignore
271
- e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
272
- // TODO: Once hourCycle is fully supported remove the following with data generation
273
- var r,n=t.language;return"root"!==n&&(r=t.maximize().region),(Nt[r||""]||Nt[n||""]||Nt["".concat(n,"-001")]||Nt["001"])[0]}var Dt=new RegExp("^".concat(Lt.source,"*")),Ut=new RegExp("".concat(Lt.source,"*$"));function kt(t,e){return{start:t,end:e}}
274
- // #region Ponyfills
275
- // Consolidate these variables up top for easier toggling during debugging
276
- var Gt=!!String.prototype.startsWith,Ft=!!String.fromCodePoint,jt=!!Object.fromEntries,Vt=!!String.prototype.codePointAt,zt=!!String.prototype.trimStart,Wt=!!String.prototype.trimEnd,Xt=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Kt=!0;try{
277
- /**
278
- * legacy Edge or Xbox One browser
279
- * Unicode flag support: supported
280
- * Pattern_Syntax support: not supported
281
- * See https://github.com/formatjs/formatjs/issues/2822
282
- */
283
- Kt="a"===(null===(Rt=re("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Rt?void 0:Rt[0])}catch(t){Kt=!1}var Yt,Zt=Gt?// Native
284
- function(t,e,r){return t.startsWith(e,r)}:// For IE11
285
- function(t,e,r){return t.slice(r,r+e.length)===e},qt=Ft?String.fromCodePoint:// IE11
286
- function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n="",i=t.length,o=0;i>o;){if((r=t[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},Qt=
287
- // native
288
- jt?Object.fromEntries:// Ponyfill
289
- function(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r],o=i[0],s=i[1];e[o]=s}return e},Jt=Vt?// Native
290
- function(t,e){return t.codePointAt(e)}:// IE 11
291
- function(t,e){var r=t.length;if(!(e<0||e>=r)){var n,i=t.charCodeAt(e);return i<55296||i>56319||e+1===r||(n=t.charCodeAt(e+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},te=zt?// Native
292
- function(t){return t.trimStart()}:// Ponyfill
293
- function(t){return t.replace(Dt,"")},ee=Wt?// Native
294
- function(t){return t.trimEnd()}:// Ponyfill
295
- function(t){return t.replace(Ut,"")};
296
- // Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
297
- function re(t,e){return new RegExp(t,e)}
298
- // #endregion
299
- if(Kt){
300
- // Native
301
- var ne=re("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Yt=function(t,e){var r;return ne.lastIndex=e,null!==(r=ne.exec(t)[1])&&void 0!==r?r:""}}else
302
- // IE11
303
- Yt=function(t,e){for(var r=[];;){var n=Jt(t,e);if(void 0===n||ae(n)||le(n))break;r.push(n),e+=n>=65536?2:1}return qt.apply(void 0,r)};var ie=/** @class */function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,r){for(var n=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(t,r)).err)return o;n.push(o.val)}else{if(125/* `}` */===i&&t>0)break;if(35/* `#` */!==i||"plural"!==e&&"selectordinal"!==e){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(st.UNMATCHED_CLOSING_TAG,kt(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&oe(this.peek()||0)){if((o=this.parseTag(t,e)).err)return o;n.push(o.val)}else{var o;if((o=this.parseLiteral(t,e)).err)return o;n.push(o.val)}}else{var s=this.clonePosition();this.bump(),n.push({type:at.pound,location:kt(s,this.clonePosition())})}}}return{val:n,err:null}},
304
- /**
305
- * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
306
- * [custom element name][] except that a dash is NOT always mandatory and uppercase letters
307
- * are accepted:
308
- *
309
- * ```
310
- * tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
311
- * tagName ::= [a-z] (PENChar)*
312
- * PENChar ::=
313
- * "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
314
- * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
315
- * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
316
- * ```
317
- *
318
- * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
319
- * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
320
- * since other tag-based engines like React allow it
321
- */
322
- t.prototype.parseTag=function(t,e){var r=this.clonePosition();this.bump();// `<`
323
- var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
324
- // Self closing tag
325
- return{val:{type:at.literal,value:"<".concat(n,"/>"),location:kt(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
326
- // Expecting a close tag
327
- if(this.bumpIf("</")){if(this.isEOF()||!oe(this.char()))return this.error(st.INVALID_TAG,kt(s,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(st.UNMATCHED_CLOSING_TAG,kt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:at.tag,value:n,children:o,location:kt(r,this.clonePosition())},err:null}:this.error(st.INVALID_TAG,kt(s,this.clonePosition())))}return this.error(st.UNCLOSED_TAG,kt(r,this.clonePosition()))}return this.error(st.INVALID_TAG,kt(r,this.clonePosition()))},
328
- /**
329
- * This method assumes that the caller has peeked ahead for the first tag character.
330
- */
331
- t.prototype.parseTagName=function(){var t=this.offset();// the first tag name character
332
- for(this.bump();!this.isEOF()&&se(this.char());)this.bump();return this.message.slice(t,this.offset())},t.prototype.parseLiteral=function(t,e){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(e);if(i)n+=i;else{var o=this.tryParseUnquoted(t,e);if(o)n+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=kt(r,this.clonePosition());return{val:{type:at.literal,value:n,location:a},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(oe(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t;
333
- /** See `parseTag` function docs. */},
334
- /**
335
- * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
336
- * a character that requires quoting (that is, "only where needed"), and works the same in
337
- * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
338
- */
339
- t.prototype.tryParseQuote=function(t){if(this.isEOF()||39/* `'` */!==this.char())return null;
340
- // Parse escaped char following the apostrophe, or early return if there is no escaped char.
341
- // Check if is valid escaped character
342
- switch(this.peek()){case 39/* `'` */:
343
- // double quote, should return as a single quote.
344
- return this.bump(),this.bump(),"'";
345
- // '{', '<', '>', '}'
346
- case 123:case 60:case 62:case 125:break;case 35:// '#'
347
- if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();// apostrophe
348
- var e=[this.char()];// escaped char
349
- // read chars until the optional closing apostrophe is found
350
- for(this.bump();!this.isEOF();){var r=this.char();if(39/* `'` */===r){if(39/* `'` */!==this.peek()){
351
- // Optional closing apostrophe.
352
- this.bump();break}e.push(39),
353
- // Bump one more time because we need to skip 2 characters.
354
- this.bump()}else e.push(r);this.bump()}return qt.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var r=this.char();return 60/* `<` */===r||123/* `{` */===r||35/* `#` */===r&&("plural"===e||"selectordinal"===e)||125/* `}` */===r&&t>0?null:(this.bump(),qt(r))},t.prototype.parseArgument=function(t,e){var r=this.clonePosition();if(this.bump(),// `{`
355
- this.bumpSpace(),this.isEOF())return this.error(st.EXPECT_ARGUMENT_CLOSING_BRACE,kt(r,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(st.EMPTY_ARGUMENT,kt(r,this.clonePosition()));
356
- // argument name
357
- var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(st.MALFORMED_ARGUMENT,kt(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(st.EXPECT_ARGUMENT_CLOSING_BRACE,kt(r,this.clonePosition()));switch(this.char()){
358
- // Simple argument: `{name}`
359
- case 125/* `}` */:// `}`
360
- return this.bump(),{val:{type:at.argument,
361
- // value does not include the opening and closing braces.
362
- value:n,location:kt(r,this.clonePosition())},err:null};
363
- // Argument with options: `{name, format, ...}`
364
- case 44/* `,` */:return this.bump(),// `,`
365
- this.bumpSpace(),this.isEOF()?this.error(st.EXPECT_ARGUMENT_CLOSING_BRACE,kt(r,this.clonePosition())):this.parseArgumentOptions(t,e,n,r);default:return this.error(st.MALFORMED_ARGUMENT,kt(r,this.clonePosition()))}},
366
- /**
367
- * Advance the parser until the end of the identifier, if it is currently on
368
- * an identifier character. Return an empty string otherwise.
369
- */
370
- t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=Yt(this.message,e),n=e+r.length;return this.bumpTo(n),{value:r,location:kt(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,r,n){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
371
- // Parse this range:
372
- // {name, type, style}
373
- // ^---^
374
- switch(s){case"":
375
- // Expecting a style string number, date, time, plural, selectordinal, or select.
376
- return this.error(st.EXPECT_ARGUMENT_TYPE,kt(o,a));case"number":case"date":case"time":
377
- // Parse this range:
378
- // {name, number, style}
379
- // ^-------^
380
- this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(f=ee(y.val)).length)return this.error(st.EXPECT_ARGUMENT_STYLE,kt(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:kt(c,this.clonePosition())}}if((b=this.tryParseArgumentClose(n)).err)return b;var u=kt(n,this.clonePosition());
381
- // Extract style or skeleton
382
- if(l&&Zt(null==l?void 0:l.style,"::",0)){
383
- // Skeleton starts with `::`.
384
- var h=te(l.style.slice(2));if("number"===s)return(y=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?y:{val:{type:at.number,value:r,location:u,style:y.val},err:null};if(0===h.length)return this.error(st.EXPECT_DATE_TIME_SKELETON,u);var p=h;
385
- // Get "best match" pattern only if locale is passed, if not, let it
386
- // pass as-is where `parseDateTimeSkeleton()` will throw an error
387
- // for unsupported patterns.
388
- this.locale&&(p=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t.charAt(n);if("j"===i){for(var o=0;n+1<t.length&&t.charAt(n+1)===i;)o++,n++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=Mt(e);for("H"!=l&&"k"!=l||(a=0);a-- >0;)r+="a";for(;s-- >0;)r=l+r}else r+="J"===i?"H":i}return r}(h,this.locale));var f={type:lt.dateTime,pattern:p,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?_t(p):{}};return{val:{type:"date"===s?at.date:at.time,value:r,location:u,style:f},err:null}}
389
- // Regular style or no style.
390
- return{val:{type:"number"===s?at.number:"date"===s?at.date:at.time,value:r,location:u,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
391
- // Parse this range:
392
- // {name, plural, options}
393
- // ^---------^
394
- var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(st.EXPECT_SELECT_ARGUMENT_OPTIONS,kt(m,ct({},m)));this.bumpSpace();
395
- // Parse offset:
396
- // {name, plural, offset:1, options}
397
- // ^-----^
398
- // or the first option:
399
- // {name, plural, one {...} other {...}}
400
- // ^--^
401
- var d=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(st.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,kt(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(st.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,st.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;
402
- // Parse another identifier for option parsing
403
- this.bumpSpace(),d=this.parseIdentifierIfPossible(),g=y.val}var b,v=this.tryParsePluralOrSelectOptions(t,s,e,d);if(v.err)return v;if((b=this.tryParseArgumentClose(n)).err)return b;var E=kt(n,this.clonePosition());return"select"===s?{val:{type:at.select,value:r,options:Qt(v.val),location:E},err:null}:{val:{type:at.plural,value:r,options:Qt(v.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(st.INVALID_ARGUMENT_TYPE,kt(o,a))}},t.prototype.tryParseArgumentClose=function(t){
404
- // Parse: {value, number, ::currency/GBP }
405
- return this.isEOF()||125/* `}` */!==this.char()?this.error(st.EXPECT_ARGUMENT_CLOSING_BRACE,kt(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},
406
- /**
407
- * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
408
- */
409
- t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
410
- // Treat apostrophe as quoting but include it in the style part.
411
- // Find the end of the quoted literal text.
412
- this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(st.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,kt(r,this.clonePosition()));this.bump();break;case 123/* `{` */:t+=1,this.bump();break;case 125/* `}` */:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var r=[];try{r=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");
413
- // Parse the skeleton
414
- for(var e=t.split(At).filter((function(t){return t.length>0})),r=[],n=0,i=e;n<i.length;n++){var o=i[n].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var s=o[0],a=o.slice(1),l=0,c=a;l<c.length;l++)if(0===c[l].length)throw new Error("Invalid number skeleton");r.push({stem:s,options:a})}return r}(t)}catch(t){return this.error(st.INVALID_NUMBER_SKELETON,e)}return{val:{type:lt.number,tokens:r,location:e,parsedOptions:this.shouldParseSkeletons?Ct(r):{}},err:null}},
415
- /**
416
- * @param nesting_level The current nesting level of messages.
417
- * This can be positive when parsing message fragment in select or plural argument options.
418
- * @param parent_arg_type The parent argument's type.
419
- * @param parsed_first_identifier If provided, this is the first identifier-like selector of
420
- * the argument. It is a by-product of a previous parsing attempt.
421
- * @param expecting_close_tag If true, this message is directly or indirectly nested inside
422
- * between a pair of opening and closing tags. The nested message will not parse beyond
423
- * the closing tag boundary.
424
- */
425
- t.prototype.tryParsePluralOrSelectOptions=function(t,e,r,n){
426
- // Parse:
427
- // one {one apple}
428
- // ^--^
429
- 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"===e||!this.bumpIf("="))break;
430
- // Try parse `={number}` selector
431
- var h=this.tryParseDecimalInteger(st.EXPECT_PLURAL_ARGUMENT_SELECTOR,st.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=kt(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}
432
- // Duplicate selector clauses
433
- if(a.has(l))return this.error("select"===e?st.DUPLICATE_SELECT_ARGUMENT_SELECTOR:st.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(o=!0),
434
- // Parse:
435
- // one {one apple}
436
- // ^----------^
437
- this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?st.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:st.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,kt(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(t+1,e,r);if(f.err)return f;var m=this.tryParseArgumentClose(p);if(m.err)return m;s.push([l,{value:f.val,location:kt(p,this.clonePosition())}]),
438
- // Keep track of the existing selectors
439
- a.add(l),
440
- // Prep next selector clause.
441
- this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===s.length?this.error("select"===e?st.EXPECT_SELECT_ARGUMENT_SELECTOR:st.EXPECT_PLURAL_ARGUMENT_SELECTOR,kt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(st.MISSING_OTHER_CLAUSE,kt(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){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=kt(n,this.clonePosition());return i?Xt(o*=r)?{val:o,err:null}:this.error(e,a):this.error(t,a)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){
442
- // This is much faster than `Object.assign` or spread.
443
- return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
444
- /**
445
- * Return the code point at the current position of the parser.
446
- * Throws if the index is out of bound.
447
- */
448
- t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=Jt(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},
449
- /** Bump the parser to the next UTF-16 code unit. */
450
- t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10/* '\n' */===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,
451
- // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
452
- this.position.offset+=t<65536?1:2)}},
453
- /**
454
- * If the substring starting at the current position of the parser has
455
- * the given prefix, then bump the parser to the character immediately
456
- * following the prefix and return true. Otherwise, don't bump the parser
457
- * and return false.
458
- */
459
- t.prototype.bumpIf=function(t){if(Zt(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},
460
- /**
461
- * Bump the parser until the pattern character is found and return `true`.
462
- * Otherwise bump to the end of the file and return `false`.
463
- */
464
- t.prototype.bumpUntil=function(t){var e=this.offset(),r=this.message.indexOf(t,e);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},
465
- /**
466
- * Bump the parser to the target offset.
467
- * If target offset is beyond the end of the input, bump the parser to the end of the input.
468
- */
469
- t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
470
- /** advance the parser through all whitespace to the next non-whitespace code unit. */
471
- t.prototype.bumpSpace=function(){for(;!this.isEOF()&&ae(this.char());)this.bump()},
472
- /**
473
- * Peek at the *next* Unicode codepoint in the input without advancing the parser.
474
- * If the input has been exhausted, then this returns null.
475
- */
476
- t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),r=this.message.charCodeAt(e+(t>=65536?2:1));return null!=r?r:null},t}();
477
- /**
478
- * This check if codepoint is alphabet (lower & uppercase)
479
- * @param codepoint
480
- * @returns
481
- */function oe(t){return t>=97&&t<=122||t>=65&&t<=90}function se(t){return 45/* '-' */===t||46/* '.' */===t||t>=48&&t<=57/* 0..9 */||95/* '_' */===t||t>=97&&t<=122/** a..z */||t>=65&&t<=90/* A..Z */||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}
482
- /**
483
- * Code point equivalent of regex `\p{White_Space}`.
484
- * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
485
- */function ae(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}
486
- /**
487
- * Code point equivalent of regex `\p{Pattern_Syntax}`.
488
- * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
489
- */function le(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}function ce(t){t.forEach((function(t){if(delete t.location,gt(t)||yt(t))for(var e in t.options)delete t.options[e].location,ce(t.options[e].value);else ft(t)&&Et(t.style)||(mt(t)||dt(t))&&Tt(t.style)?delete t.style.location:vt(t)&&ce(t.children)}))}function ue(t,e){void 0===e&&(e={}),e=ct({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new ie(t,e).parse();if(r.err){var n=SyntaxError(st[r.err.kind]);
490
- // @ts-expect-error Assign to error object
491
- throw n.location=r.err.location,
492
- // @ts-expect-error Assign to error object
493
- n.originalMessage=r.err.message,n}return(null==e?void 0:e.captureLocation)||ce(r.val),r.val}
494
-
495
- // Main
496
-
497
- function he(t,e){var r=e&&e.cache?e.cache:ve,n=e&&e.serializer?e.serializer:ge;return(e&&e.strategy?e.strategy:de)(t,{cache:r,serializer:n})}
498
-
499
- // Strategy
500
-
501
- function pe(t,e,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),s=e.get(o);return void 0===s&&(s=t.call(this,n),e.set(o,s)),s}function fe(t,e,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=e.get(i);return void 0===o&&(o=t.apply(this,n),e.set(i,o)),o}function me(t,e,r,n,i){return r.bind(e,t,n,i)}function de(t,e){return me(t,this,1===t.length?pe:fe,e.cache.create(),e.serializer)}
502
- // Serializer
503
- var ge=function(){return JSON.stringify(arguments)};
504
-
505
- // Cache
506
-
507
- function ye(){this.cache=Object.create(null)}ye.prototype.get=function(t){return this.cache[t]},ye.prototype.set=function(t,e){this.cache[t]=e};var be,ve={create:function(){
508
- // @ts-ignore
509
- return new ye}},Ee={variadic:function(t,e){return me(t,this,fe,e.cache.create(),e.serializer)},monadic:function(t,e){return me(t,this,pe,e.cache.create(),e.serializer)}};!function(t){
510
- // When we have a placeholder but no value to format
511
- t.MISSING_VALUE="MISSING_VALUE",
512
- // When value supplied is invalid
513
- t.INVALID_VALUE="INVALID_VALUE",
514
- // When we need specific Intl API but it's not available
515
- t.MISSING_INTL_API="MISSING_INTL_API"}(be||(be={}));var Te,Le=/** @class */function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.code=r,i.originalMessage=n,i}return ot(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),we=/** @class */function(t){function e(e,r,n,i){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),be.INVALID_VALUE,i)||this}return ot(e,t),e}(Le),_e=/** @class */function(t){function e(e,r,n){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(r),be.INVALID_VALUE,n)||this}return ot(e,t),e}(Le),Ae=/** @class */function(t){function e(e,r){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(r,'"'),be.MISSING_VALUE,r)||this}return ot(e,t),e}(Le);function Be(t){return"function"==typeof t}
516
- // TODO(skeleton): add skeleton support
517
- function Se(t,e,r,n,i,o,
518
- // For debugging
519
- s){
520
- // Hot path for straight simple msg translations
521
- if(1===t.length&&ht(t[0]))return[{type:Te.literal,value:t[0].value}];for(var a=[],l=0,c=t;l<c.length;l++){var u=c[l];
522
- // Exit early for string parts.
523
- if(ht(u))a.push({type:Te.literal,value:u.value});else
524
- // TODO: should this part be literal type?
525
- // Replace `#` in plural rules with the actual numeric value.
526
- if(bt(u))"number"==typeof o&&a.push({type:Te.literal,value:r.getNumberFormat(e).format(o)});else{var h=u.value;
527
- // Enforce that all required values are provided by the caller.
528
- if(!i||!(h in i))throw new Ae(h,s);var p=i[h];if(pt(u))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),a.push({type:"string"==typeof p?Te.literal:Te.object,value:p});else
529
- // Recursively format plural and select parts' option — which can be a
530
- // nested pattern structure. The choosing of the option to use is
531
- // abstracted-by and delegated-to the part helper object.
532
- if(mt(u)){var f="string"==typeof u.style?n.date[u.style]:Tt(u.style)?u.style.parsedOptions:void 0;a.push({type:Te.literal,value:r.getDateTimeFormat(e,f).format(p)})}else if(dt(u)){f="string"==typeof u.style?n.time[u.style]:Tt(u.style)?u.style.parsedOptions:n.time.medium;a.push({type:Te.literal,value:r.getDateTimeFormat(e,f).format(p)})}else if(ft(u)){(f="string"==typeof u.style?n.number[u.style]:Et(u.style)?u.style.parsedOptions:void 0)&&f.scale&&(p*=f.scale||1),a.push({type:Te.literal,value:r.getNumberFormat(e,f).format(p)})}else{if(vt(u)){var m=u.children,d=u.value,g=i[d];if(!Be(g))throw new _e(d,"function",s);var y=g(Se(m,e,r,n,i,o).map((function(t){return t.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(t){return{type:"string"==typeof t?Te.literal:Te.object,value:t}})))}if(gt(u)){if(!(b=u.options[p]||u.options.other))throw new we(u.value,p,Object.keys(u.options),s);a.push.apply(a,Se(b.value,e,r,n,i))}else if(yt(u)){var b;if(!(b=u.options["=".concat(p)])){if(!Intl.PluralRules)throw new Le('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',be.MISSING_INTL_API,s);var v=r.getPluralRules(e,{type:u.pluralType}).select(p-(u.offset||0));b=u.options[v]||u.options.other}if(!b)throw new we(u.value,p,Object.keys(u.options),s);a.push.apply(a,Se(b.value,e,r,n,i,p-(u.offset||0)))}else;}}}return function(t){return t.length<2?t:t.reduce((function(t,e){var r=t[t.length-1];return r&&r.type===Te.literal&&e.type===Te.literal?r.value+=e.value:t.push(e),t}),[])}(a)}
533
- /*
534
- Copyright (c) 2014, Yahoo! Inc. All rights reserved.
535
- Copyrights licensed under the New BSD License.
536
- See the accompanying LICENSE file for terms.
537
- */
538
- // -- MessageFormat --------------------------------------------------------
539
- function He(t,e){return e?Object.keys(t).reduce((function(r,n){var i,o;return r[n]=(i=t[n],(o=e[n])?ct(ct(ct({},i||{}),o||{}),Object.keys(i).reduce((function(t,e){return t[e]=ct(ct({},i[e]),o[e]||{}),t}),{})):i),r}),ct({},t)):t}function xe(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}}}!function(t){t[t.literal=0]="literal",t[t.object=1]="object"}(Te||(Te={}));var Pe=/** @class */function(){function t(e,r,n,i){var o,s=this;if(void 0===r&&(r=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=s.formatToParts(t);
540
- // Hot path for straight simple msg translations
541
- if(1===e.length)return e[0].value;var r=e.reduce((function(t,e){return t.length&&e.type===Te.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(t){return Se(s.ast,s.locales,s.formatters,s.formats,t,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
542
- // Defined first because it's used to build the format pattern.
543
- this.locales=r,this.resolvedLocale=t.resolveLocale(r),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
544
- // Parse string messages into an AST.
545
- this.ast=t.__parse(e,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
546
- // Creates a new object with the specified `formats` merged with the default
547
- // formats.
548
- this.formats=He(t.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:he((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ut([void 0],e,!1)))}),{cache:xe(o.number),strategy:Ee.variadic}),getDateTimeFormat:he((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ut([void 0],e,!1)))}),{cache:xe(o.dateTime),strategy:Ee.variadic}),getPluralRules:he((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ut([void 0],e,!1)))}),{cache:xe(o.pluralRules),strategy:Ee.variadic})})}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(t){var e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},t.__parse=ue,
549
- // Default format options used as the prototype of the `formats` provided to the
550
- // constructor. These are used when constructing the internal Intl.NumberFormat
551
- // and Intl.DateTimeFormat instances.
552
- t.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"}}},t}(),Ie=Pe;
553
- /*
554
- Copyright (c) 2014, Yahoo! Inc. All rights reserved.
555
- Copyrights licensed under the New BSD License.
556
- See the accompanying LICENSE file for terms.
557
- */const $e={},Oe=(t,e,r)=>r?(e in $e||($e[e]={}),t in $e[e]||($e[e][t]=r),r):r,Ce=(t,e)=>{if(null==e)return;if(e in $e&&t in $e[e])return $e[e][t];const r=Qe(e);for(let n=0;n<r.length;n++){const i=De(r[n],t);if(i)return Oe(t,e,i)}};let Re;const Ne=X({});function Me(t){return t in Re}function De(t,e){if(!Me(t))return null;const r=function(t){return Re[t]||null}(t);return function(t,e){if(null==e)return;if(e in t)return t[e];const r=e.split(".");let n=t;for(let t=0;t<r.length;t++)if("object"==typeof n){if(t>0){const e=r.slice(t,r.length).join(".");if(e in n){n=n[e];break}}n=n[r[t]]}else n=void 0;return n}(r,e)}function Ue(t,...e){delete $e[t],Ne.update((r=>(r[t]=nt.all([r[t]||{},...e]),r)))}K([Ne],(([t])=>Object.keys(t))),Ne.subscribe((t=>Re=t));const ke={};function Ge(t){return ke[t]}function Fe(t){return null!=t&&Qe(t).some((t=>{var e;return null===(e=Ge(t))||void 0===e?void 0:e.size}))}const je={};function Ve(t){if(!Fe(t))return t in je?je[t]:Promise.resolve();const e=function(t){return Qe(t).map((t=>{const e=Ge(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return je[t]=Promise.all(e.map((([t,e])=>function(t,e){const r=Promise.all(e.map((e=>(function(t,e){ke[t].delete(e),0===ke[t].size&&delete ke[t]}(t,e),e().then((t=>t.default||t))))));return r.then((e=>Ue(t,...e)))}(t,e)))).then((()=>{if(Fe(t))return Ve(t);delete je[t]})),je[t]}
558
- /*! *****************************************************************************
559
- Copyright (c) Microsoft Corporation.
560
-
561
- Permission to use, copy, modify, and/or distribute this software for any
562
- purpose with or without fee is hereby granted.
563
-
564
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
565
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
566
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
567
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
568
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
569
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
570
- PERFORMANCE OF THIS SOFTWARE.
571
- ***************************************************************************** */function ze(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}const We={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 Xe(){return We}const Ke=X(!1);let Ye;const Ze=X(null);function qe(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function Qe(t,e=Xe().fallbackLocale){const r=qe(t);return e?[...new Set([...r,...qe(e)])]:r}function Je(){return null!=Ye?Ye:void 0}Ze.subscribe((t=>{Ye=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const tr=Object.assign(Object.assign({},Ze),{set:t=>{if(t&&function(t){if(null==t)return;const e=Qe(t);for(let t=0;t<e.length;t++){const r=e[t];if(Me(r))return r}}(t)&&Fe(t)){const{loadingDelay:e}=Xe();let r;return"undefined"!=typeof window&&null!=Je()&&e?r=window.setTimeout((()=>Ke.set(!0)),e):Ke.set(!0),Ve(t).then((()=>{Ze.set(t)})).finally((()=>{clearTimeout(r),Ke.set(!1)}))}return Ze.set(t)}}),er=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}},rr=(t,e)=>{const{formats:r}=Xe();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},nr=er((t=>{var{locale:e,format:r}=t,n=ze(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(n=rr("number",r)),new Intl.NumberFormat(e,n)})),ir=er((t=>{var{locale:e,format:r}=t,n=ze(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?n=rr("date",r):0===Object.keys(n).length&&(n=rr("date","short")),new Intl.DateTimeFormat(e,n)})),or=er((t=>{var{locale:e,format:r}=t,n=ze(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?n=rr("time",r):0===Object.keys(n).length&&(n=rr("time","short")),new Intl.DateTimeFormat(e,n)})),sr=er(((t,e=Je())=>new Ie(t,e,Xe().formats,{ignoreTag:Xe().ignoreTag}))),ar=(t,e={})=>{var r,n,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:l=Je(),default:c}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=Ce(t,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${t}" 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=Xe()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:l,id:t,defaultValue:c}))&&void 0!==i?i:c)&&void 0!==o?o:t;if(!a)return u;let h=u;try{h=sr(u,l).format(a)}catch(e){console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return h},lr=(t,e)=>((t={})=>{var{locale:e=Je()}=t,r=ze(t,["locale"]);return or(Object.assign({locale:e},r))})(e).format(t),cr=(t,e)=>((t={})=>{var{locale:e=Je()}=t,r=ze(t,["locale"]);return ir(Object.assign({locale:e},r))})(e).format(t),ur=(t,e)=>((t={})=>{var{locale:e=Je()}=t,r=ze(t,["locale"]);return nr(Object.assign({locale:e},r))})(e).format(t),hr=(t,e=Je())=>Ce(t,e),pr=K([tr,Ne],(()=>ar));K([tr],(()=>lr)),K([tr],(()=>cr)),K([tr],(()=>ur)),K([tr,Ne],(()=>hr));const fr={en:{gamingLimits:{loadingText:"Loading, please wait...",Monthly:"month",Weekly:"week",Daily:"day",per:"per",updateText:"will be applied on",removedLimitText:"The limit will be removed on",noLimitText:"There is currently no limit set.",limitType:"Limit Type",period:"Period",amount:"Amount",new:"New",limit:"limit",setLimit:"SET LIMIT",loss:"Loss Limit",deposit:"Deposit Limit",wager:"Wager Limit",removeLimit:"REMOVE",popupPendingUpdate:"We have received the request to change the limit. Please be aware that the update will only come into effect on",popupImmediateUpdate:"Your new {selectedLimit} is {updatedAmount}{currency} {selectedPeriod}",popupTitle:"Limit changed",popupSuccess:"Succesful"}},fr:{gamingLimits:{loadingText:"Chargement, veuillez patienter...",Monthly:"mois",Weekly:"semaine",Daily:"jour",per:"par",updateText:"sera appliqué sur",noLimitText:"Aucune limite n'est actuellement définie.",limitType:"Limit Type",period:"Period",amount:"Amount",new:"New",limit:"limit",setLimit:"SET LIMIT",loss:"Loss Limit",deposit:"Deposit Limit",wager:"Wager Limit"}},ro:{gamingLimits:{loadingText:"Se incarca, va rugam asteptati...",Monthly:"luna",Weekly:"saptamana",Daily:"zi",per:"pe",updateText:"va intra in vigoare incepand cu",noLimitText:"Momentan nu este setata o limita.",limitType:"Tip Limita",period:"Perioada",amount:"Valoare",new:"Limita pe",limit:"noua",setLimit:"ACCEPTA LIMITA",loss:"Limita de Pierdere",deposit:"Limita de Depunere",wager:"Limita de Pariere",removeLimit:"ELIMINA",popupPendingUpdate:"Am primit cererea de a schimba limita. Schimbarea va intra in vigoare in data de",popupImmediateUpdate:"Noua {selectedLimit} este {updatedAmount}{currency} pe {selectedPeriod}",popupTitle:"Limita schimbata",popupSuccess:"Succes!"}},es:{gamingLimits:{loadingText:"Cargando por favor espere..."}},pt:{gamingLimits:{loadingText:"Carregando, por favor espere..."}},de:{gamingLimits:{loadingText:"Laden, bitte warten..."}}};var mr="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==mr&&mr,dr="URLSearchParams"in mr,gr="Symbol"in mr&&"iterator"in Symbol,yr="FileReader"in mr&&"Blob"in mr&&function(){try{return new Blob,!0}catch(t){return!1}}(),br="FormData"in mr,vr="ArrayBuffer"in mr;if(vr)var Er=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Tr=ArrayBuffer.isView||function(t){return t&&Er.indexOf(Object.prototype.toString.call(t))>-1};function Lr(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function wr(t){return"string"!=typeof t&&(t=String(t)),t}
572
- // Build a destructive iterator for the value list
573
- function _r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return gr&&(e[Symbol.iterator]=function(){return e}),e}function Ar(t){this.map={},t instanceof Ar?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function Br(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function Sr(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function Hr(t){var e=new FileReader,r=Sr(e);return e.readAsArrayBuffer(t),r}function xr(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function Pr(){return this.bodyUsed=!1,this._initBody=function(t){var e;
574
- /*
575
- fetch-mock wraps the Response object in an ES6 Proxy to
576
- provide useful test harness features such as flush. However, on
577
- ES5 browsers without fetch or Proxy support pollyfills must be used;
578
- the proxy-pollyfill is unable to proxy an attribute unless it exists
579
- on the object before the Proxy is created. This change ensures
580
- Response.bodyUsed exists on the instance, while maintaining the
581
- semantic of setting Request.bodyUsed in the constructor before
582
- _initBody is called.
583
- */
584
- this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:yr&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:br&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:dr&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():vr&&yr&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=xr(t.buffer),
585
- // IE 10-11 can't handle a DataView body.
586
- this._bodyInit=new Blob([this._bodyArrayBuffer])):vr&&(ArrayBuffer.prototype.isPrototypeOf(t)||Tr(t))?this._bodyArrayBuffer=xr(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):dr&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},yr&&(this.blob=function(){var t=Br(this);if(t)return t;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 t=Br(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(Hr)}),this.text=function(){var t,e,r,n=Br(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=Sr(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},br&&(this.formData=function(){return this.text().then(Or)}),this.json=function(){return this.text().then(JSON.parse)},this}
587
- // HTTP methods whose capitalization should be normalized
588
- Ar.prototype.append=function(t,e){t=Lr(t),e=wr(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},Ar.prototype.delete=function(t){delete this.map[Lr(t)]},Ar.prototype.get=function(t){return t=Lr(t),this.has(t)?this.map[t]:null},Ar.prototype.has=function(t){return this.map.hasOwnProperty(Lr(t))},Ar.prototype.set=function(t,e){this.map[Lr(t)]=wr(e)},Ar.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},Ar.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),_r(t)},Ar.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),_r(t)},Ar.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),_r(t)},gr&&(Ar.prototype[Symbol.iterator]=Ar.prototype.entries);var Ir=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function $r(t,e){if(!(this instanceof $r))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,i=(e=e||{}).body;if(t instanceof $r){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new Ar(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new Ar(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),Ir.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.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"!==e.cache&&"no-cache"!==e.cache)){
589
- // Search for a '_' parameter in the query string
590
- var o=/([?&])_=[^&]*/;if(o.test(this.url))
591
- // If it already exists then set the value with the current time
592
- this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Or(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function Cr(t,e){if(!(this instanceof Cr))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new Ar(e.headers),this.url=e.url||"",this._initBody(t)}$r.prototype.clone=function(){return new $r(this,{body:this._bodyInit})},Pr.call($r.prototype),Pr.call(Cr.prototype),Cr.prototype.clone=function(){return new Cr(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Ar(this.headers),url:this.url})},Cr.error=function(){var t=new Cr(null,{status:0,statusText:""});return t.type="error",t};var Rr=[301,302,303,307,308];Cr.redirect=function(t,e){if(-1===Rr.indexOf(e))throw new RangeError("Invalid status code");return new Cr(null,{status:e,headers:{location:t}})};var Nr=mr.DOMException;try{new Nr}catch(t){(Nr=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),Nr.prototype.constructor=Nr}function Mr(t,e){return new Promise((function(r,n){var i=new $r(t,e);if(i.signal&&i.signal.aborted)return n(new Nr("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var t,e,n={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new Ar,
593
- // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
594
- // https://github.com/github/fetch/issues/748
595
- // https://github.com/zloirock/core-js/issues/751
596
- t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){r(new Cr(i,n))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){n(new Nr("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&mr.location.href?mr.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(yr?o.responseType="blob":vr&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof Ar?i.headers.forEach((function(t,e){o.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){o.setRequestHeader(t,wr(e.headers[t]))})),i.signal&&(i.signal.addEventListener("abort",s),o.onreadystatechange=function(){
597
- // DONE (success or failure)
598
- 4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Mr.polyfill=!0,mr.fetch||(mr.fetch=Mr,mr.Headers=Ar,mr.Request=$r,mr.Response=Cr),
599
- // the whatwg-fetch polyfill installs the fetch() function
600
- // on the global object (window or self)
601
- // Return that as the export for use in Webpack, Browserify etc.
602
- self.fetch.bind(self);
603
- /******************************************************************************
604
- Copyright (c) Microsoft Corporation.
605
-
606
- Permission to use, copy, modify, and/or distribute this software for any
607
- purpose with or without fee is hereby granted.
608
-
609
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
610
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
611
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
612
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
613
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
614
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
615
- PERFORMANCE OF THIS SOFTWARE.
616
- ***************************************************************************** */
617
- /* global Reflect, Promise */
618
- var Dr=function(t,e){return Dr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Dr(t,e)};function Ur(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Dr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function kr(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gr(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function Fr(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function jr(t){return"function"==typeof t}function Vr(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var zr=Vr((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Wr(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Xr=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=kr(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(jr(l))try{l()}catch(t){i=t instanceof zr?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=kr(c),h=u.next();!h.done;h=u.next()){var p=h.value;try{Zr(p)}catch(t){i=null!=i?i:[],t instanceof zr?i=Fr(Fr([],Gr(i)),Gr(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}if(i)throw new zr(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Zr(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Wr(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&Wr(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Kr=Xr.EMPTY;function Yr(t){return t instanceof Xr||t&&"closed"in t&&jr(t.remove)&&jr(t.add)&&jr(t.unsubscribe)}function Zr(t){jr(t)?t():t.unsubscribe()}var qr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Qr={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Qr.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,Fr([t,e],Gr(r))):setTimeout.apply(void 0,Fr([t,e],Gr(r)))},clearTimeout:function(t){var e=Qr.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Jr(){}var tn=null;function en(t){if(qr.useDeprecatedSynchronousErrorHandling){var e=!tn;if(e&&(tn={errorThrown:!1,error:null}),t(),e){var r=tn,n=r.errorThrown,i=r.error;if(tn=null,n)throw i}}else t()}var rn=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Yr(e)&&e.add(r)):r.destination=cn,r}return Ur(e,t),e.create=function(t,e,r){return new an(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Xr),nn=Function.prototype.bind;function on(t,e){return nn.call(t,e)}var sn=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){ln(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){ln(t)}else ln(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){ln(t)}},t}(),an=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;jr(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&qr.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&on(e.next,o),error:e.error&&on(e.error,o),complete:e.complete&&on(e.complete,o)}):i=e;return s.destination=new sn(i),s}return Ur(e,t),e}(rn);function ln(t){var e;e=t,Qr.setTimeout((function(){throw e}))}var cn={closed:!0,next:Jr,error:function(t){throw t},complete:Jr},un="function"==typeof Symbol&&Symbol.observable||"@@observable";function hn(t){return t}function pn(t){return 0===t.length?hn:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var fn=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof rn||function(t){return t&&jr(t.next)&&jr(t.error)&&jr(t.complete)}(n)&&Yr(n)?t:new an(t,e,r);return en((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=mn(e))((function(e,n){var i=new an({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[un]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return pn(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=mn(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function mn(t){var e;return null!==(e=null!=t?t:qr.Promise)&&void 0!==e?e:Promise}var dn=Vr((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),gn=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Ur(e,t),e.prototype.lift=function(t){var e=new yn(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new dn},e.prototype.next=function(t){var e=this;en((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=kr(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;en((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;en((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?Kr:(this.currentObservers=null,o.push(t),new Xr((function(){e.currentObservers=null,Wr(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new fn;return t.source=this,t},e.create=function(t,e){return new yn(t,e)},e}(fn),yn=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return Ur(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:Kr},e}(gn),bn={now:function(){return(bn.delegate||Date).now()},delegate:void 0},vn=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=bn);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return Ur(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,l=1;l<n.length&&n[l]<=s;l+=2)a=l;a&&n.splice(0,a+1)}},e}(gn);let En=[],Tn={};window.emWidgets={topic:(t,e=0)=>{if(-1==En.indexOf(t)){let r=new vn(e);Tn[t]=r,En.push(t)}return Tn[t]}};
619
- /**
620
- * @name isMobile
621
- * @description A method that returns if the browser used to access the app is from a mobile device or not
622
- * @param {String} userAgent window.navigator.userAgent
623
- * @returns {Boolean} true or false
624
- */
625
- const Ln=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
626
- /* ../player-account-gaming-limits-page-2-gmcore/src/PlayerAccountGamingLimitsPage_2Gmcore.svelte generated by Svelte v3.48.0 */function wn(t,e,r){const n=t.slice();return n[46]=e[r],n}function _n(t,e,r){const n=t.slice();return n[49]=e[r],n}function An(t,e,r){const n=t.slice();return n[49]=e[r],n}function Bn(t,e,r){const n=t.slice();return n[54]=e[r],n}
627
- // (235:2) {#if popupVisible}
628
- function Sn(t){let e,r,n;function i(t,e){/*popupReady*/
629
- return t[10]?Hn:xn}let o=i(t),s=o(t);return{c(){e=p("div"),r=p("div"),s.c(),b(r,"class",n="PopupContainer "+(/*isDesktop*/t[13]?"Desktop":"")),b(e,"class","PopupOverlay")},m(t,n){c(t,e,n),l(e,r),s.m(r,null)},p(t,e){o===(o=i(t))&&s?s.p(t,e):(s.d(1),s=o(t),s&&(s.c(),s.m(r,null)))},d(t){t&&u(e),s.d()}}}
630
- // (240:6) {:else}
631
- function Hn(t){let e,r,i,o,s,a,h,g,v,E,L,_,A,B,S,H,x,P,I,$,O,C,R,N,M=/*$_*/t[12]("gamingLimits.popupTitle")+"",D=/*$_*/t[12]("gamingLimits.popupSuccess")+"";return{c(){e=p("div"),r=p("span"),i=m(M),o=d(),s=p("button"),s.textContent="X",a=d(),h=p("div"),g=p("div"),v=f("svg"),E=f("defs"),L=f("style"),_=m(".fil0 {fill:black;fill-rule:nonzero}\n "),A=f("g"),B=f("polygon"),S=d(),H=p("p"),x=m(D),P=d(),I=p("p"),$=m(/*popupContent*/t[11]),O=d(),C=p("button"),C.textContent="OK",b(r,"class","PopupTitle"),b(s,"class","ClosePopup"),b(e,"class","PopupTitleWrapper"),b(L,"type","text/css"),b(B,"class","fil0"),b(B,"points","0,38 10,25 36,47 78,0 90,11 37,69 "),b(v,"xmlns","http://www.w3.org/2000/svg"),b(v,"xmlns:xlink","http://www.w3.org/1999/xlink"),b(v,"xml:space","preserve"),b(v,"version","1.1"),w(v,"shape-rendering","geometricPrecision"),w(v,"text-rendering","geometricPrecision"),w(v,"image-rendering","optimizeQuality"),b(v,"viewBox","0 0 90 69"),b(v,"x","0px"),b(v,"y","0px"),b(v,"fill-rule","evenodd"),b(v,"clip-rule","evenodd"),b(g,"class","ResultIconWrapper"),b(I,"class","DescriptionParagraph"),b(h,"class","DescriptionWrapper"),b(C,"class","ConfirmButton")},m(n,u){c(n,e,u),l(e,r),l(r,i),l(e,o),l(e,s),c(n,a,u),c(n,h,u),l(h,g),l(g,v),l(v,E),l(E,L),l(L,_),l(v,A),l(A,B),l(g,S),l(g,H),l(H,x),l(h,P),l(h,I),l(I,$),c(n,O,u),c(n,C,u),R||(N=[y(s,"click",/*closePopup*/t[19]),y(C,"click",/*closePopup*/t[19])],R=!0)},p(t,e){/*$_*/4096&e[0]&&M!==(M=/*$_*/t[12]("gamingLimits.popupTitle")+"")&&T(i,M),/*$_*/4096&e[0]&&D!==(D=/*$_*/t[12]("gamingLimits.popupSuccess")+"")&&T(x,D),/*popupContent*/2048&e[0]&&T($,/*popupContent*/t[11])},d(t){t&&u(e),t&&u(a),t&&u(h),t&&u(O),t&&u(C),R=!1,n(N)}}}
632
- // (238:6) {#if !popupReady}
633
- function xn(e){let r;return{c(){r=p("div"),b(r,"class","LoadingIndicator")},m(t,e){c(t,r,e)},p:t,d(t){t&&u(r)}}}
634
- // (269:2) {:else}
635
- function Pn(t){let e,r,i,o,s,a,f,g,v,w,_,A,B,S,H,x,P,I=/*multiplePeriods*/t[6]?`${/*$_*/t[12]("gamingLimits.amount")}`:`${/*$_*/t[12]("gamingLimits.new")} ${/*$_*/t[12](`gamingLimits.${/*selectedPeriod*/t[2]}`)} ${/*$_*/t[12]("gamingLimits.limit")}`,$=/*$_*/t[12]("gamingLimits.setLimit")+"",O=/*availableLimits*/t[14],C=[];for(let e=0;e<O.length;e+=1)C[e]=Un(An(t,O,e));let R=/*multipleLimits*/t[5]&&kn(t),N=/*multiplePeriods*/t[6]&&Fn(t);return{c(){e=p("div"),r=p("div"),i=p("div");for(let t=0;t<C.length;t+=1)C[t].c();o=d(),s=p("form"),R&&R.c(),a=d(),N&&N.c(),f=d(),g=p("label"),v=p("span"),w=m(I),_=d(),A=p("input"),B=d(),S=p("button"),H=m($),b(i,"class","LimitsList "+(/*isDesktop*/t[13]?"Desktop":"")),b(v,"class","LimitInputText"),b(A,"type","number"),b(g,"class","LimitAmountInputWrapper"),b(S,"class","LimitSubmitButton"),b(S,"type","button"),S.disabled=!0,b(s,"class","LimitsInteractionArea "+(/*isDesktop*/t[13]?"Desktop":"")),b(r,"class","LimitsPageContainer"),b(e,"class","player-account-gaming-limits-page-2-gmcore")},m(n,u){c(n,e,u),l(e,r),l(r,i);for(let t=0;t<C.length;t+=1)C[t].m(i,null);l(r,o),l(r,s),R&&R.m(s,null),l(s,a),N&&N.m(s,null),l(s,f),l(s,g),l(g,v),l(v,w),l(g,_),l(g,A),L(A,/*inputAmount*/t[3]),l(s,B),l(s,S),l(S,H),
636
- /*button_binding*/t[32](S),x||(P=[y(A,"input",/*input_input_handler*/t[31]),y(A,"keyup",/*updateInputValue*/t[17]),y(S,"click",/*updateLimits*/t[16]),y(s,"submit",/*updateLimits*/t[16])],x=!0)},p(t,e){if(/*isDesktop, availableLimits, removeLimit, $_*/290816&e[0]){let r;for(O=/*availableLimits*/t[14],r=0;r<O.length;r+=1){const n=An(t,O,r);C[r]?C[r].p(n,e):(C[r]=Un(n),C[r].c(),C[r].m(i,null))}for(;r<C.length;r+=1)C[r].d(1);C.length=O.length}/*multipleLimits*/t[5]?R?R.p(t,e):(R=kn(t),R.c(),R.m(s,a)):R&&(R.d(1),R=null),/*multiplePeriods*/t[6]?N?N.p(t,e):(N=Fn(t),N.c(),N.m(s,f)):N&&(N.d(1),N=null),/*multiplePeriods, $_, selectedPeriod*/4164&e[0]&&I!==(I=/*multiplePeriods*/t[6]?`${/*$_*/t[12]("gamingLimits.amount")}`:`${/*$_*/t[12]("gamingLimits.new")} ${/*$_*/t[12](`gamingLimits.${/*selectedPeriod*/t[2]}`)} ${/*$_*/t[12]("gamingLimits.limit")}`)&&T(w,I),/*inputAmount*/8&e[0]&&E(A.value)!==/*inputAmount*/t[3]&&L(A,/*inputAmount*/t[3]),/*$_*/4096&e[0]&&$!==($=/*$_*/t[12]("gamingLimits.setLimit")+"")&&T(H,$)},d(r){r&&u(e),h(C,r),R&&R.d(),N&&N.d()
637
- /*button_binding*/,t[32](null),x=!1,n(P)}}}
638
- // (267:22)
639
- function In(e){let r;return{c(){r=p("p"),r.textContent="500 Server error"},m(t,e){c(t,r,e)},p:t,d(t){t&&u(r)}}}
640
- // (266:22)
641
- function $n(e){return{c:t,m:t,p:t,d:t}}
642
- // (263:2) {#if isLoading && !popupVisible}
643
- function On(e){let r;return{c(){r=p("div"),b(r,"class","LoadingIndicator")},m(t,e){c(t,r,e)},p:t,d(t){t&&u(r)}}}
644
- // (293:12) {:else}
645
- function Cn(t){let e,r,n,i,o=/*$_*/t[12]("gamingLimits.noLimitText")+"";return{c(){e=p("div"),r=p("div"),n=p("div"),i=m(o),b(n,"class","LimitDetailsTextWrapper"),b(r,"class","LimitDetailsWrapper"),b(e,"class","LimitDetails")},m(t,o){c(t,e,o),l(e,r),l(r,n),l(n,i)},p(t,e){/*$_*/4096&e[0]&&o!==(o=/*$_*/t[12]("gamingLimits.noLimitText")+"")&&T(i,o)},d(t){t&&u(e)}}}
646
- // (277:12) {#if limit.currentLimits.length > 0}
647
- function Rn(t){let e,r=/*limit*/t[49].currentLimits,n=[];for(let e=0;e<r.length;e+=1)n[e]=Dn(Bn(t,r,e));return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=g()},m(t,r){for(let e=0;e<n.length;e+=1)n[e].m(t,r);c(t,e,r)},p(t,i){if(/*removeLimit, availableLimits, $_*/282624&i[0]){let o;for(r=/*limit*/t[49].currentLimits,o=0;o<r.length;o+=1){const s=Bn(t,r,o);n[o]?n[o].p(s,i):(n[o]=Dn(s),n[o].c(),n[o].m(e.parentNode,e))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},d(t){h(n,t),t&&u(e)}}}
648
- // (284:54)
649
- function Nn(t){let e,r,n=`${/*$_*/t[12]("gamingLimits.removedLimitText")} ${/*currentLimit*/t[54].expiryDate}`;return{c(){e=p("div"),r=m(n),b(e,"class","PendingLimit")},m(t,n){c(t,e,n),l(e,r)},p(t,e){/*$_*/4096&e[0]&&n!==(n=`${/*$_*/t[12]("gamingLimits.removedLimitText")} ${/*currentLimit*/t[54].expiryDate}`)&&T(r,n)},d(t){t&&u(e)}}}
650
- // (282:18) {#if currentLimit.isModified && currentLimit.updateAmount!= "-1"}
651
- function Mn(t){let e,r,n=`${/*currentLimit*/t[54].updateAmount}${/*currentLimit*/t[54].currency} ${/*$_*/t[12]("gamingLimits.per")} ${/*$_*/t[12](`gamingLimits.${/*currentLimit*/t[54].period}`)} ${/*$_*/t[12]("gamingLimits.updateText")} ${/*currentLimit*/t[54].expiryDate}`;return{c(){e=p("div"),r=m(n),b(e,"class","PendingLimit")},m(t,n){c(t,e,n),l(e,r)},p(t,e){/*$_*/4096&e[0]&&n!==(n=`${/*currentLimit*/t[54].updateAmount}${/*currentLimit*/t[54].currency} ${/*$_*/t[12]("gamingLimits.per")} ${/*$_*/t[12](`gamingLimits.${/*currentLimit*/t[54].period}`)} ${/*$_*/t[12]("gamingLimits.updateText")} ${/*currentLimit*/t[54].expiryDate}`)&&T(r,n)},d(t){t&&u(e)}}}
652
- // (288:16) {#if !currentLimit.isModified}
653
- // (278:14) {#each limit.currentLimits as currentLimit}
654
- function Dn(t){let e,r,n,i,o,s,a,h=`${/*currentLimit*/t[54].amount}${/*currentLimit*/t[54].currency} ${/*$_*/t[12]("gamingLimits.per")} ${/*$_*/t[12](`gamingLimits.${/*currentLimit*/t[54].period}`)}`;let f=function(t,e){/*currentLimit*/
655
- return t[54].isModified&&/*currentLimit*/"-1"!=t[54].updateAmount?Mn:/*currentLimit*/t[54].isModified?Nn:void 0}(t),g=f&&f(t),v=!/*currentLimit*/t[54].isModified&&function(t){let e,r,n,i,o=/*$_*/t[12]("gamingLimits.removeLimit")+"";function s(){/*click_handler*/
656
- return t[28](/*currentLimit*/t[54])}return{c(){e=p("button"),r=m(o),b(e,"class","RemoveLimitButton")},m(t,o){c(t,e,o),l(e,r),n||(i=y(e,"click",s),n=!0)},p(e,n){t=e,/*$_*/4096&n[0]&&o!==(o=/*$_*/t[12]("gamingLimits.removeLimit")+"")&&T(r,o)},d(t){t&&u(e),n=!1,i()}}}(t);return{c(){e=p("div"),r=p("div"),n=p("div"),i=m(h),o=d(),g&&g.c(),s=d(),v&&v.c(),a=d(),b(n,"class","CurrentLimit"),b(r,"class","LimitDetailsTextWrapper"),b(e,"class","LimitDetails")},m(t,u){c(t,e,u),l(e,r),l(r,n),l(n,i),l(r,o),g&&g.m(r,null),l(e,s),v&&v.m(e,null),l(e,a)},p(t,e){/*$_*/4096&e[0]&&h!==(h=`${/*currentLimit*/t[54].amount}${/*currentLimit*/t[54].currency} ${/*$_*/t[12]("gamingLimits.per")} ${/*$_*/t[12](`gamingLimits.${/*currentLimit*/t[54].period}`)}`)&&T(i,h),g&&g.p(t,e),/*currentLimit*/t[54].isModified||v.p(t,e)},d(t){t&&u(e),g&&g.d(),v&&v.d()}}}
657
- // (274:8) {#each availableLimits as limit}
658
- function Un(t){let e,r,n,i,o,s,a=/*$_*/t[12](`gamingLimits.${/*limit*/t[49].value}`)+"";let h=function(t,e){/*limit*/
659
- return t[49].currentLimits.length>0?Rn:Cn}(t),f=h(t);return{c(){e=p("div"),r=p("p"),n=m(a),i=d(),f.c(),o=d(),b(r,"class","LimitTitle"),b(e,"class",s="LimitWrapper "+(/*isDesktop*/t[13]?"Desktop":""))},m(t,s){c(t,e,s),l(e,r),l(r,n),l(e,i),f.m(e,null),l(e,o)},p(t,e){/*$_*/4096&e[0]&&a!==(a=/*$_*/t[12](`gamingLimits.${/*limit*/t[49].value}`)+"")&&T(n,a),f.p(t,e)},d(t){t&&u(e),f.d()}}}
660
- // (302:8) {#if multipleLimits}
661
- function kn(t){let e,r,i,o,s,a,f,g=/*$_*/t[12]("gamingLimits.limitType")+"",v=/*availableLimits*/t[14],E=[];for(let e=0;e<v.length;e+=1)E[e]=Gn(_n(t,v,e));return{c(){e=p("label"),r=p("span"),i=m(g),o=d(),s=p("select");for(let t=0;t<E.length;t+=1)E[t].c();b(r,"class","LimitSelectText"),b(s,"name",""),b(s,"id",""),/*selectedLimit*/void 0===t[1]&&N((()=>/*select_change_handler*/t[29].call(s))),b(e,"class","LimitTypeDropdownWrapper")},m(n,u){c(n,e,u),l(e,r),l(r,i),l(e,o),l(e,s);for(let t=0;t<E.length;t+=1)E[t].m(s,null);_(s,/*selectedLimit*/t[1]),a||(f=[y(s,"change",/*select_change_handler*/t[29]),y(s,"change",/*updateLimitSelection*/t[15])],a=!0)},p(t,e){if(/*$_*/4096&e[0]&&g!==(g=/*$_*/t[12]("gamingLimits.limitType")+"")&&T(i,g),/*availableLimits*/16384&e[0]){let r;for(v=/*availableLimits*/t[14],r=0;r<v.length;r+=1){const n=_n(t,v,r);E[r]?E[r].p(n,e):(E[r]=Gn(n),E[r].c(),E[r].m(s,null))}for(;r<E.length;r+=1)E[r].d(1);E.length=v.length}/*selectedLimit, availableLimits*/16386&e[0]&&_(s,/*selectedLimit*/t[1])},d(t){t&&u(e),h(E,t),a=!1,n(f)}}}
662
- // (305:12) {#each availableLimits as limit}
663
- function Gn(e){let r,n,i,o=/*limit*/e[49].title+"";return{c(){r=p("option"),n=m(o),r.__value=i=/*limit*/e[49].value,r.value=r.__value},m(t,e){c(t,r,e),l(r,n)},p:t,d(t){t&&u(r)}}}
664
- // (311:8) {#if multiplePeriods}
665
- function Fn(t){let e,r,n,i,o,s,a,f=/*$_*/t[12]("gamingLimits.period")+"",g=z[/*selectedLimit*/t[1]].periods,v=[];for(let e=0;e<g.length;e+=1)v[e]=jn(wn(t,g,e));return{c(){e=p("label"),r=p("span"),n=m(f),i=d(),o=p("select");for(let t=0;t<v.length;t+=1)v[t].c();b(r,"class","PeriodSelectText"),b(o,"name",""),b(o,"id",""),/*selectedPeriod*/void 0===t[2]&&N((()=>/*select_change_handler_1*/t[30].call(o))),b(e,"class","LimitPeriodDropdownWrapper")},m(u,h){c(u,e,h),l(e,r),l(r,n),l(e,i),l(e,o);for(let t=0;t<v.length;t+=1)v[t].m(o,null);_(o,/*selectedPeriod*/t[2]),s||(a=y(o,"change",/*select_change_handler_1*/t[30]),s=!0)},p(t,e){if(/*$_*/4096&e[0]&&f!==(f=/*$_*/t[12]("gamingLimits.period")+"")&&T(n,f),/*selectedLimit, $_*/4098&e[0]){let r;for(g=z[/*selectedLimit*/t[1]].periods,r=0;r<g.length;r+=1){const n=wn(t,g,r);v[r]?v[r].p(n,e):(v[r]=jn(n),v[r].c(),v[r].m(o,null))}for(;r<v.length;r+=1)v[r].d(1);v.length=g.length}/*selectedPeriod, selectedLimit*/6&e[0]&&_(o,/*selectedPeriod*/t[2])},d(t){t&&u(e),h(v,t),s=!1,a()}}}
666
- // (314:12) {#each limitsConfig[selectedLimit].periods as period}
667
- function jn(t){let e,r,n,i,o,s=/*$_*/t[12]("gamingLimits.per")+"",a=/*$_*/t[12](`gamingLimits.${/*period*/t[46]}`)+"";return{c(){e=p("option"),r=m(s),n=d(),i=m(a),e.__value=o=/*period*/t[46],e.value=e.__value,e.selected=!0},m(t,o){c(t,e,o),l(e,r),l(e,n),l(e,i)},p(t,n){/*$_*/4096&n[0]&&s!==(s=/*$_*/t[12]("gamingLimits.per")+"")&&T(r,s),/*$_, selectedLimit*/4098&n[0]&&a!==(a=/*$_*/t[12](`gamingLimits.${/*period*/t[46]}`)+"")&&T(i,a),/*selectedLimit, availableLimits*/16386&n[0]&&o!==(o=/*period*/t[46])&&(e.__value=o,e.value=e.__value)},d(t){t&&u(e)}}}function Vn(e){let r,n,i=/*popupVisible*/e[9]&&Sn(e);function o(t,e){/*isLoading*/
668
- return t[7]&&!/*popupVisible*/t[9]?On:/*isLoading*/t[7]?$n:/*hasErrors*/t[8]?In:Pn}let s=o(e),a=s(e);return{c(){r=p("div"),i&&i.c(),n=d(),a.c(),this.c=t},m(t,o){c(t,r,o),i&&i.m(r,null),l(r,n),a.m(r,null),
669
- /*div_binding*/e[33](r)},p(t,e){/*popupVisible*/t[9]?i?i.p(t,e):(i=Sn(t),i.c(),i.m(r,n)):i&&(i.d(1),i=null),s===(s=o(t))&&a?a.p(t,e):(a.d(1),a=s(t),a&&(a.c(),a.m(r,null)))},i:t,o:t,d(t){t&&u(r),i&&i.d(),a.d(),
670
- /*div_binding*/e[33](null)}}}function zn(t,e,r){let n;a(t,pr,(t=>r(12,n=t)));let i,o,s,l,{lang:c="en"}=e,{currency:u=""}=e,{limits:h=""}=e,{session:p=""}=e,{userid:f=""}=e,{endpoint:m=""}=e,{clientstyling:d=""}=e,{clientstylingurl:g=""}=e,y=window.navigator.userAgent,b=!Ln(y),v=[],T="",L="",w=!1,_=!1,B=!0,S=!1,H=!1,x=!1,P="";const $={EUR:"€",RON:" lei"};Object.keys(fr).forEach((t=>{!function(t,e){Ue(t,e)}(t,fr[t])}));const O=()=>{let t=new URL(`v2/player/${f}/limits`,m),e={method:"GET",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"}};fetch(t.href,e).then((t=>{if(t.status>=300)throw r(7,B=!1),r(8,S=!0),new Error("There was an error fetching the limits");return t.json()})).then((t=>{l=t,H&&N(),C(l),r(7,B=!1),r(3,o=null)})).catch((t=>{console.log(t),r(7,B=!1),r(8,S=!0)}))},C=t=>{v.forEach((e=>{var r;e.currentLimits=[],
671
- // this is not n^2, despite the nesting loop. It's max totalLimitType * totalPeriodType, so 4 * 3 = 12 operations tops
672
- null===(r=t[z[e.value].callValue])||void 0===r||r.forEach(((r,n)=>{var i;const o=t[z[e.value].callValue][n];e.currentLimits.push({}),
673
- // format the limit data
674
- e.currentLimits[n].limitType=e.value,e.currentLimits[n].amount=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(o.amount),e.currentLimits[n].currency=null!==(i=$[o.currency])&&void 0!==i?i:o.currency,e.currentLimits[n].period=o.period,e.currentLimits[n].updateAmount=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(o.updateAmount),e.currentLimits[n].isModified=o.isModified,e.currentLimits[n].expiryDate=`${new Date(o.expiryDate).toLocaleDateString("en-de",{hour:"numeric",minute:"numeric"}).replaceAll("/",".")} (GMT)`})),e.currentLimits=R(e.currentLimits)}))},R=t=>{const e={Daily:0,Weekly:1,Monthly:2};return t.sort(((t,r)=>e[t.period]-e[r.period])),t},N=()=>{if(l){const t=l[z[T].callValue].filter((t=>t.period===L))[0],e=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(t.amount);let i=n("gamingLimits.popupImmediateUpdate").replace("{selectedLimit}",n(`gamingLimits.${T}`).toLowerCase()).replace("{updatedAmount}",e).replace("{currency}",$[t.currency]||t.currency).replace("{selectedPeriod}",n(`gamingLimits.${L}`).toLowerCase());r(11,P=t.isModified?`${n("gamingLimits.popupPendingUpdate")} ${new Date(t.expiryDate).toLocaleDateString("en-de",{hour:"numeric",minute:"numeric"}).replaceAll("/",".")} (GMT)`:i)}r(10,x=!0)},M=t=>{r(9,H=!0),r(7,B=!0);let e=new URL(`v2/player/${f}/limits/${{wager:"wagering",loss:"loss",deposit:"deposit"}[t.limitType]}?periods=${t.period}`,m),n={method:"DELETE",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"}};fetch(e.href,n).then((t=>t.json())).then((t=>{O()})).catch((t=>{console.log(t),r(7,B=!1),r(8,S=!0)}))},D=()=>{var t;t=c,tr.set(t)};return t.$$set=t=>{"lang"in t&&r(20,c=t.lang),"currency"in t&&r(21,u=t.currency),"limits"in t&&r(22,h=t.limits),"session"in t&&r(23,p=t.session),"userid"in t&&r(24,f=t.userid),"endpoint"in t&&r(25,m=t.endpoint),"clientstyling"in t&&r(26,d=t.clientstyling),"clientstylingurl"in t&&r(27,g=t.clientstylingurl)},t.$$.update=()=>{/*limits*/4194304&t.$$.dirty[0]&&h&&(h.split(" ").forEach((t=>{z[t]?v.push(z[t]):console.error(`Unknown limit: ${t}`)})),
675
- //set default selected limit
676
- r(1,T=v[0].value),r(2,L=z[T].periods[0]),r(5,w=v.length>1),r(6,_=z[T].periods.length>1)),/*lang*/1048576&t.$$.dirty[0]&&c&&D(),/*userid, session, endpoint*/58720256&t.$$.dirty[0]&&f&&p&&m&&O(),/*clientstylingurl*/134217728&t.$$.dirty[0]&&g&&(()=>{let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,i&&(setTimeout((()=>{i.appendChild(e)}),1),setTimeout((()=>{}),500))}))})(),/*clientstyling*/67108864&t.$$.dirty[0]&&d&&(()=>{let t=document.createElement("style");t.innerHTML=d,i.appendChild(t)})()},[i,T,L,o,s,w,_,B,S,H,x,P,n,b,v,()=>{r(2,L=z[T].periods[0]),// select the first period by default until the user selects a different period
677
- r(6,_=z[T].periods.length>1)},()=>{if(!(o>0))return;r(9,H=!0),r(7,B=!0);let t=new URL(`v2/player/${f}/limits`,m);const e={};e[z[T].callValue]=[{period:L,amount:o,currency:u}];let n={method:"PUT",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e)};fetch(t.href,n).then((t=>t.json())).then((t=>{O()})).catch((t=>{console.log(t),r(7,B=!1),r(8,S=!0)}))},()=>{const t=o-Math.floor(o)==0;o>0&&t?s.removeAttribute("disabled"):s.setAttribute("disabled","true")},M,()=>{r(10,x=r(9,H=!1))},c,u,h,p,f,m,d,g,t=>M(t),function(){T=A(this),r(1,T),r(14,v)},function(){L=A(this),r(2,L),r(1,T)},function(){o=E(this.value),r(3,o)},function(t){I[t?"unshift":"push"]((()=>{s=t,r(4,s)}))},function(t){I[t?"unshift":"push"]((()=>{i=t,r(0,i)}))}]}!customElements.get("player-account-gaming-limits-page-2-gmcore")&&customElements.define("player-account-gaming-limits-page-2-gmcore",class extends V{constructor(t){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';font-size:1.3rem}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}select,input{width:100%;height:38px;padding:8px 4px;padding-right:8px;margin:12px 0;border-radius:2px;border:1px solid #999}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-page-2-gmcore{color:var(--emfe-w-color-white, #333)}.LimitsInteractionArea{display:flex;flex-direction:column;margin-top:12px}.LimitsInteractionArea.Desktop{width:63%;padding:0 12px;margin:0 auto}.LimitsList.Desktop{display:flex;flex-wrap:wrap;justify-content:space-between;width:63%;margin:0 auto}.LimitWrapper{background:var(--emfe-w-color-white, #fff);font-size:1.3rem;border:1px solid #ccc;padding:8px 12px;border-radius:4px}.LimitWrapper:not(:first-child){margin-top:12px}.LimitWrapper.Desktop{width:45%;margin:12px}.LimitSubmitButton,.ConfirmButton{background:#7ac317;color:#fff;border:0;border-radius:2px;padding:12px;cursor:pointer}.LimitSubmitButton:disabled,.ConfirmButton:disabled{background:rgba(116, 180, 27, 0.322);cursor:not-allowed}.LimitDetails{padding:12px 0 12px 4px}.LimitDetails:not(:last-child){border-bottom:#ccc 1px solid}.LimitDetailsTextWrapper{font-size:1.3rem;color:#666}.PendingLimit{color:#999}.LimitTitle{font-size:1.5rem}.PopupOverlay{position:absolute;top:0;left:0;background:#000;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center}.PopupContainer{background:#fff;font-size:1rem;color:#333;width:80vw;height:350px;padding:12px;border-radius:4px;display:flex;flex-direction:column;justify-content:space-between}.PopupContainer.Desktop{width:30vw}.PopupTitleWrapper{display:flex;justify-content:space-between;font-size:1.3rem}.PopupTitleWrapper button{background:#fff;font-size:1rem;border:0;cursor:pointer}.DescriptionParagraph{text-align:center;font-size:1.3rem;padding:12px}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.LimitDetails{display:flex;justify-content:space-between;align-items:center}.RemoveLimitButton{height:28px;font-size:0.7rem;background:#fff;color:#666;border:1px solid #ccc;border-radius:4px;padding:0 4px;cursor:pointer}.RemoveLimitButton:hover{background:#f3f3fc}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.LoadingIndicator{width:100px;height:100px;margin:110px auto 0;border:solid 10px #7ac317;border-radius:50%;border-right-color:transparent;border-bottom-color:transparent;-webkit-transition:all 0.5s ease-in;-webkit-animation-name:rotate;-webkit-animation-duration:1.0s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear;transition:all 0.5s ease-in;animation-name:rotate;animation-duration:1.0s;animation-iteration-count:infinite;animation-timing-function:linear}</style>",j(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},zn,Vn,o,{lang:20,currency:21,limits:22,session:23,userid:24,endpoint:25,clientstyling:26,clientstylingurl:27},null,[-1,-1]),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),U()))}static get observedAttributes(){return["lang","currency","limits","session","userid","endpoint","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[20]}set lang(t){this.$$set({lang:t}),U()}get currency(){return this.$$.ctx[21]}set currency(t){this.$$set({currency:t}),U()}get limits(){return this.$$.ctx[22]}set limits(t){this.$$set({limits:t}),U()}get session(){return this.$$.ctx[23]}set session(t){this.$$set({session:t}),U()}get userid(){return this.$$.ctx[24]}set userid(t){this.$$set({userid:t}),U()}get endpoint(){return this.$$.ctx[25]}set endpoint(t){this.$$set({endpoint:t}),U()}get clientstyling(){return this.$$.ctx[26]}set clientstyling(t){this.$$set({clientstyling:t}),U()}get clientstylingurl(){return this.$$.ctx[27]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),U()}});const Wn={en:{history:{expandLimits:"LIMIT HISTORY",daily:"per day",weekly:"per week",monthly:"per month",loss:"Loss Limit",deposit:"Deposit Limit",wagering:"Wagering Limit",loading:"Loading limits history...",error:"500 - Server Error",limitRemoved:"Limit removed"}},zh:{history:{expandLimits:"极限历史",daily:"每天",weekly:"每个星期",monthly:"每月",loss:"损失限额",deposit:"存款限额",wagering:"投注限额",loading:"加载请稍候...",error:"500 - 服务器错误",limitRemoved:"移除限制"}},fr:{history:{expandLimits:"LIMITER L'HISTORIQUE",daily:"par jour",weekly:"par semaine",monthly:"par mois",loss:"Limite de perte",deposit:"Limite de dépôt",wagering:"Limite de mise",loading:"Chargement, veuillez patienter...",error:"500 - Erreur de serveur",limitRemoved:"Limite supprimée"}},ro:{history:{expandLimits:"ISTORIC LIMITE",daily:"pe zi",weekly:"pe saptamana",monthly:"pe luna",loss:"Limita de pierdere",deposit:"Limita de incarcare",loading:"Se incarca, va rugam asteptati...",error:"500 - Eroare de server",limitRemoved:"Limita eliminata"}}};
678
- /* ../player-account-gaming-limits-history-2/src/PlayerAccountGamingLimitsHistory_2.svelte generated by Svelte v3.48.0 */function Xn(t,e,r){const n=t.slice();return n[24]=e[r],n}
679
- // (118:0) {:else}
680
- function Kn(t){let e,r,n,i,o,s,a,g,v,E,L,w,_=/*$_*/t[7]("history.expandLimits")+"",A=/*historyArray*/t[4],S=[];for(let e=0;e<A.length;e+=1)S[e]=Jn(Xn(t,A,e));return{c(){e=p("div"),r=p("div"),n=p("button"),i=m(_),o=d(),s=f("svg"),a=f("path"),g=f("path"),v=d(),E=p("div");for(let t=0;t<S.length;t+=1)S[t].c();b(a,"d","M10.5 15l7.5 7.5 7.5-7.5z"),b(g,"d","M0 0h36v36h-36z"),b(g,"fill","none"),b(s,"class","ExpandArrow"),b(s,"xmlns","http://www.w3.org/2000/svg"),b(s,"width","36"),b(s,"height","36"),b(s,"viewBox","0 0 36 36"),b(s,"fill","#999"),B(s,"extended",/*extended*/t[6]),b(n,"class","ExpandButton"),b(E,"class","HistoryDisplayArea"),B(E,"hidden",/*hidden*/t[5]),b(r,"class","HistoryWrapper "+(/*isDesktop*/t[8]?"Desktop":"")),b(e,"class","player-account-gaming-limits-history-2")},m(u,h){c(u,e,h),l(e,r),l(r,n),l(n,i),l(n,o),l(n,s),l(s,a),l(s,g),l(r,v),l(r,E);for(let t=0;t<S.length;t+=1)S[t].m(E,null);L||(w=y(n,"click",/*toggleHistoryDisplayArea*/t[9]),L=!0)},p(t,e){if(/*$_*/128&e&&_!==(_=/*$_*/t[7]("history.expandLimits")+"")&&T(i,_),/*extended*/64&e&&B(s,"extended",/*extended*/t[6]),/*historyArray, $_*/144&e){let r;for(A=/*historyArray*/t[4],r=0;r<A.length;r+=1){const n=Xn(t,A,r);S[r]?S[r].p(n,e):(S[r]=Jn(n),S[r].c(),S[r].m(E,null))}for(;r<S.length;r+=1)S[r].d(1);S.length=A.length}/*hidden*/32&e&&B(E,"hidden",/*hidden*/t[5])},d(t){t&&u(e),h(S,t),L=!1,w()}}}
681
- // (115:20)
682
- function Yn(e){return{c:t,m:t,p:t,d:t}}
683
- // (113:0) {#if hasErrors}
684
- function Zn(t){let e,r,n=/*lang*/(t[0]?/*$_*/t[7]("history.error"):"500 Server Error")+"";return{c(){e=p("p"),r=m(n)},m(t,n){c(t,e,n),l(e,r)},p(t,e){/*lang, $_*/129&e&&n!==(n=/*lang*/(t[0]?/*$_*/t[7]("history.error"):"500 Server Error")+"")&&T(r,n)},d(t){t&&u(e)}}}
685
- // (130:8) {:else}
686
- function qn(t){let e,r,n,i,o,s,a,h,f,g,y,v,E=/*history*/t[24].type+"",L=/*history*/t[24].amount+"",w=/*history*/t[24].currency+"",_=/*history*/t[24].period+"",A=/*history*/t[24].date+"";return{c(){e=p("div"),r=p("span"),n=p("span"),i=m(E),o=p("span"),s=m(L),a=d(),h=m(w),f=d(),g=m(_),y=p("span"),v=m(A),b(n,"class","LimitType"),b(o,"class","LimitAmountPeriod"),b(r,"class","GeneralLimitInformation"),b(y,"class","DateLimitInformation"),b(e,"class","HistoryRow")},m(t,u){c(t,e,u),l(e,r),l(r,n),l(n,i),l(r,o),l(o,s),l(o,a),l(o,h),l(o,f),l(o,g),l(e,y),l(y,v)},p(t,e){/*historyArray*/16&e&&E!==(E=/*history*/t[24].type+"")&&T(i,E),/*historyArray*/16&e&&L!==(L=/*history*/t[24].amount+"")&&T(s,L),/*historyArray*/16&e&&w!==(w=/*history*/t[24].currency+"")&&T(h,w),/*historyArray*/16&e&&_!==(_=/*history*/t[24].period+"")&&T(g,_),/*historyArray*/16&e&&A!==(A=/*history*/t[24].date+"")&&T(v,A)},d(t){t&&u(e)}}}
687
- // (128:8) {#if history.removed}
688
- function Qn(t){let e,r,n,i,o,s,a,h,f=/*history*/t[24].type+"",d=/*$_*/t[7]("history.limitRemoved")+"",g=/*history*/t[24].date+"";return{c(){e=p("div"),r=p("span"),n=p("span"),i=m(f),o=p("span"),s=m(d),a=p("span"),h=m(g),b(n,"class","LimitType"),b(o,"class","LimitAmountPeriod"),b(r,"class","GeneralLimitInformation"),b(a,"class","DateLimitInformation"),b(e,"class","HistoryRow")},m(t,u){c(t,e,u),l(e,r),l(r,n),l(n,i),l(r,o),l(o,s),l(e,a),l(a,h)},p(t,e){/*historyArray*/16&e&&f!==(f=/*history*/t[24].type+"")&&T(i,f),/*$_*/128&e&&d!==(d=/*$_*/t[7]("history.limitRemoved")+"")&&T(s,d),/*historyArray*/16&e&&g!==(g=/*history*/t[24].date+"")&&T(h,g)},d(t){t&&u(e)}}}
689
- // (127:6) {#each historyArray as history}
690
- function Jn(t){let e;function r(t,e){/*history*/
691
- return t[24].removed?Qn:qn}let n=r(t),i=n(t);return{c(){i.c(),e=g()},m(t,r){i.m(t,r),c(t,e,r)},p(t,o){n===(n=r(t))&&i?i.p(t,o):(i.d(1),i=n(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&u(e)}}}function ti(e){let r;function n(t,e){/*hasErrors*/
692
- return t[2]?Zn:/*isLoading*/t[3]?Yn:Kn}let i=n(e),o=i(e);return{c(){r=p("div"),o.c(),this.c=t},m(t,n){c(t,r,n),o.m(r,null),
693
- /*div_binding*/e[15](r)},p(t,[e]){i===(i=n(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(r,null)))},i:t,o:t,d(t){t&&u(r),o.d(),
694
- /*div_binding*/e[15](null)}}}function ei(t,e,r){let n;a(t,pr,(t=>r(7,n=t)));let i,o=window.navigator.userAgent,s=!Ln(o),{lang:l=""}=e,{userid:c=""}=e,{session:u=""}=e,{endpoint:h=""}=e,{clientstyling:p=""}=e,{clientstylingurl:f=""}=e,m=!1,d=!0,g=[],y=!0,b=!1,v={EUR:"€",RON:"lei"};Object.keys(Wn).forEach((t=>{!function(t,e){Ue(t,e)}(t,Wn[t])}));const E=t=>{const e=!!Wn[l];return t.map((t=>{let r={amount:"",currency:"",date:"",period:"",type:"",removed:!1};return r.amount=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(t.limitAmount),r.currency=e?v[t.limitCurrencyCode]:t.limitCurrencyCode,r.date=new Intl.DateTimeFormat("de",{dateStyle:"medium"}).format(new Date(t.limitDate)),r.period=n(`history.${t.limitPeriod.toLowerCase()}`),r.type=n(`history.${t.limitType.split(" ")[0].toLowerCase()}`),r.removed=-1===t.limitAmount,r}))},T=()=>{var t;t=l,tr.set(t)};return t.$$set=t=>{"lang"in t&&r(0,l=t.lang),"userid"in t&&r(10,c=t.userid),"session"in t&&r(11,u=t.session),"endpoint"in t&&r(12,h=t.endpoint),"clientstyling"in t&&r(13,p=t.clientstyling),"clientstylingurl"in t&&r(14,f=t.clientstylingurl)},t.$$.update=()=>{/*endpoint, userid, session*/7168&t.$$.dirty&&h&&c&&u&&(()=>{let t=new URL(`v2/player/${c}/transactions/limit`,h);
695
- // hardcoded values because there's no date filtering requirement for the widget. However, the API requires these values
696
- t.searchParams.append("startDate","1970"),t.searchParams.append("endDate","2099");let e={method:"GET",headers:{"X-SessionID":u}};fetch(t.href,e).then((t=>{if(t.status>=300)throw r(3,d=!1),r(2,m=!0),new Error("There was an error fetching the limits");return t.json()})).then((t=>{t.length&&r(4,g=E(t)),r(3,d=!1)}),(t=>{console.error("There was an error",t),r(2,m=!0)}))})(),/*lang*/1&t.$$.dirty&&l&&T(),/*clientstylingurl*/16384&t.$$.dirty&&f&&(()=>{let t=new URL(f),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,i&&(setTimeout((()=>{i.appendChild(e)}),1),setTimeout((()=>{}),500))}))})(),/*clientstyling*/8192&t.$$.dirty&&p&&(()=>{let t=document.createElement("style");t.innerHTML=p,i.appendChild(t)})()},[l,i,m,d,g,y,b,n,s,()=>{r(5,y=!y),r(6,b=!b)},c,u,h,p,f,function(t){I[t?"unshift":"push"]((()=>{i=t,r(1,i)}))}]}
697
- /* src/PlayerAccountGamingLimitsWrapper_2.svelte generated by Svelte v3.48.0 */
698
- function ri(t,e,r){const n=t.slice();return n[25]=e[r],n}function ni(t,e,r){const n=t.slice();return n[28]=e[r],n[30]=r,n}
699
- // (68:2) {:else}
700
- function ii(t){let e,r,n,i,o=/*limitTabs*/t[10].length>1&&si(t),s=/*limitTabs*/t[10],a=[];for(let e=0;e<s.length;e+=1)a[e]=ui(ri(t,s,e));let l=/*historyenabled*/"true"===t[6]&&hi(t);return{c(){o&&o.c(),e=d(),r=p("div");for(let t=0;t<a.length;t+=1)a[t].c();n=d(),l&&l.c(),i=g(),b(r,"class","player-account-gaming-limits-wrapper-2")},m(s,u){o&&o.m(s,u),c(s,e,u),c(s,r,u);for(let t=0;t<a.length;t+=1)a[t].m(r,null);
701
- /*div_binding_1*/t[20](r),c(s,n,u),l&&l.m(s,u),c(s,i,u)},p(t,n){if(/*limitTabs*/t[10].length>1?o?o.p(t,n):(o=si(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),/*lang, currency, limitTabs, userid, session, endpoint, apiversion*/1087&n){let e;for(s=/*limitTabs*/t[10],e=0;e<s.length;e+=1){const i=ri(t,s,e);a[e]?a[e].p(i,n):(a[e]=ui(i),a[e].c(),a[e].m(r,null))}for(;e<a.length;e+=1)a[e].d(1);a.length=s.length}/*historyenabled*/"true"===t[6]?l?l.p(t,n):(l=hi(t),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},d(s){o&&o.d(s),s&&u(e),s&&u(r),h(a,s),
702
- /*div_binding_1*/t[20](null),s&&u(n),l&&l.d(s),s&&u(i)}}}
703
- // (66:2) {#if isLoading}
704
- function oi(e){return{c:t,m:t,p:t,d:t}}
705
- // (69:4) {#if limitTabs.length > 1}
706
- function si(t){let e,r=/*limitTabs*/t[10],n=[];for(let e=0;e<r.length;e+=1)n[e]=ai(ni(t,r,e));return{c(){e=p("div");for(let t=0;t<n.length;t+=1)n[t].c();b(e,"class","TabsContainer")},m(r,i){c(r,e,i);for(let t=0;t<n.length;t+=1)n[t].m(e,null);
707
- /*div_binding*/t[19](e)},p(t,i){if(/*limitTabs, selectTab, tabLabelArray*/11264&i){let o;for(r=/*limitTabs*/t[10],o=0;o<r.length;o+=1){const s=ni(t,r,o);n[o]?n[o].p(s,i):(n[o]=ai(s),n[o].c(),n[o].m(e,null))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},d(r){r&&u(e),h(n,r),
708
- /*div_binding*/t[19](null)}}}
709
- // (71:8) {#each limitTabs as limit,i}
710
- function ai(t){let e,r,n,i,o=/*tabLabelArray*/(t[11][/*i*/t[30]]??/*limit*/t[28])+"";function s(){/*click_handler*/
711
- return t[18](/*i*/t[30])}return{c(){e=p("div"),r=m(o),b(e,"class","LimitsTab"),w(e,"width",100/ /*limitTabs*/t[10].length+"%")},m(t,o){c(t,e,o),l(e,r),n||(i=y(e,"click",s),n=!0)},p(n,i){t=n,/*tabLabelArray, limitTabs*/3072&i&&o!==(o=/*tabLabelArray*/(t[11][/*i*/t[30]]??/*limit*/t[28])+"")&&T(r,o),/*limitTabs*/1024&i&&w(e,"width",100/ /*limitTabs*/t[10].length+"%")},d(t){t&&u(e),n=!1,i()}}}
712
- // (89:8) {:else}
713
- function li(t){let e,r;return{c(){e=p("player-account-gaming-limits-page-2-gm16"),v(e,"class","hidden selected"),v(e,"lang",/*lang*/t[0]),v(e,"currency",/*currency*/t[4]),v(e,"limits",r=/*limits*/t[25]),v(e,"userid",/*userid*/t[1]),v(e,"session",/*session*/t[2]),v(e,"endpoint",/*endpoint*/t[3]),v(e,"apiversion",/*apiversion*/t[5])},m(t,r){c(t,e,r)},p(t,n){/*lang*/1&n&&v(e,"lang",/*lang*/t[0]),/*currency*/16&n&&v(e,"currency",/*currency*/t[4]),/*limitTabs*/1024&n&&r!==(r=/*limits*/t[25])&&v(e,"limits",r),/*userid*/2&n&&v(e,"userid",/*userid*/t[1]),/*session*/4&n&&v(e,"session",/*session*/t[2]),/*endpoint*/8&n&&v(e,"endpoint",/*endpoint*/t[3]),/*apiversion*/32&n&&v(e,"apiversion",/*apiversion*/t[5])},d(t){t&&u(e)}}}
714
- // (79:8) {#if apiversion == 'gmcore'}
715
- function ci(t){let e,r;return{c(){e=p("player-account-gaming-limits-page-2-gmcore"),v(e,"class","hidden selected"),v(e,"lang",/*lang*/t[0]),v(e,"currency",/*currency*/t[4]),v(e,"limits",r=/*limits*/t[25]),v(e,"userid",/*userid*/t[1]),v(e,"session",/*session*/t[2]),v(e,"endpoint",/*endpoint*/t[3]),v(e,"apiversion",/*apiversion*/t[5])},m(t,r){c(t,e,r)},p(t,n){/*lang*/1&n&&v(e,"lang",/*lang*/t[0]),/*currency*/16&n&&v(e,"currency",/*currency*/t[4]),/*limitTabs*/1024&n&&r!==(r=/*limits*/t[25])&&v(e,"limits",r),/*userid*/2&n&&v(e,"userid",/*userid*/t[1]),/*session*/4&n&&v(e,"session",/*session*/t[2]),/*endpoint*/8&n&&v(e,"endpoint",/*endpoint*/t[3]),/*apiversion*/32&n&&v(e,"apiversion",/*apiversion*/t[5])},d(t){t&&u(e)}}}
716
- // (78:6) {#each limitTabs as limits}
717
- function ui(t){let e;function r(t,e){/*apiversion*/
718
- return"gmcore"==t[5]?ci:li}let n=r(t),i=n(t);return{c(){i.c(),e=g()},m(t,r){i.m(t,r),c(t,e,r)},p(t,o){n===(n=r(t))&&i?i.p(t,o):(i.d(1),i=n(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&u(e)}}}
719
- // (102:4) {#if historyenabled === 'true'}
720
- function hi(t){let e;return{c(){e=p("player-account-gaming-limits-history-2"),v(e,"lang",/*lang*/t[0]),v(e,"userid",/*userid*/t[1]),v(e,"session",/*session*/t[2]),v(e,"endpoint",/*endpoint*/t[3])},m(t,r){c(t,e,r)},p(t,r){/*lang*/1&r&&v(e,"lang",/*lang*/t[0]),/*userid*/2&r&&v(e,"userid",/*userid*/t[1]),/*session*/4&r&&v(e,"session",/*session*/t[2]),/*endpoint*/8&r&&v(e,"endpoint",/*endpoint*/t[3])},d(t){t&&u(e)}}}function pi(e){let r;function n(t,e){/*isLoading*/
721
- return t[8]?oi:ii}let i=n(e),o=i(e);return{c(){r=p("div"),o.c(),this.c=t},m(t,n){c(t,r,n),o.m(r,null),
722
- /*div_binding_2*/e[21](r)},p(t,[e]){i===(i=n(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(r,null)))},i:t,o:t,d(t){t&&u(r),o.d(),
723
- /*div_binding_2*/e[21](null)}}}function fi(t,e,r){let n,i,o,s,{lang:a=""}=e,{userid:l=""}=e,{session:c=""}=e,{endpoint:u=""}=e,{currency:h=""}=e,{apiversion:p=""}=e,{includedlimits:f=""}=e,{tablabels:m=""}=e,{historyenabled:d="true"}=e,{clientstyling:g=""}=e,{clientstylingurl:y=""}=e,b=!0,v=[];const E=t=>{if(o.children.length>0)for(let e=0;e<o.children.length;e++)t===e?(o.children[e].classList.remove("hidden"),null==s||s.children[e].classList.add("selected")):(o.children[e].classList.add("hidden"),null==s||s.children[e].classList.remove("selected"))};return t.$$set=t=>{"lang"in t&&r(0,a=t.lang),"userid"in t&&r(1,l=t.userid),"session"in t&&r(2,c=t.session),"endpoint"in t&&r(3,u=t.endpoint),"currency"in t&&r(4,h=t.currency),"apiversion"in t&&r(5,p=t.apiversion),"includedlimits"in t&&r(14,f=t.includedlimits),"tablabels"in t&&r(15,m=t.tablabels),"historyenabled"in t&&r(6,d=t.historyenabled),"clientstyling"in t&&r(16,g=t.clientstyling),"clientstylingurl"in t&&r(17,y=t.clientstylingurl)},t.$$.update=()=>{/*mainContainer*/128&t.$$.dirty&&o&&E(0),/*clientstylingurl*/131072&t.$$.dirty&&y&&(()=>{let t=new URL(y),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,n&&setTimeout((()=>{n.appendChild(e)}),1)}))})(),/*clientstyling*/65536&t.$$.dirty&&g&&(()=>{let t=document.createElement("style");t.innerHTML=g,n.appendChild(t)})(),/*userid, session, endpoint, includedlimits, tablabels*/49166&t.$$.dirty&&l&&c&&u&&f&&m&&(r(10,v=f.split(",").map((t=>t.trim()))),r(11,i=m.split(",").map((t=>t.trim()))),r(8,b=!1))},[a,l,c,u,h,p,d,o,b,n,v,i,s,E,f,m,g,y,t=>E(t),function(t){I[t?"unshift":"push"]((()=>{s=t,r(12,s)}))},function(t){I[t?"unshift":"push"]((()=>{o=t,r(7,o)}))},function(t){I[t?"unshift":"push"]((()=>{n=t,r(9,n)}))}]}!customElements.get("player-account-gaming-limits-history-2")&&customElements.define("player-account-gaming-limits-history-2",class extends V{constructor(t){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';font-size:1.3rem}*,*::before,*::after{color:#555;margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.player-account-gaming-limits-history-2{color:var(--emfe-w-color-white, #FFFFFF)}button{font-size:1rem;border:0;padding:0}.ExpandButton{color:#999;display:flex;justify-content:center;align-items:center;margin-right:-14px;background:transparent}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.extended{transform:rotate(180deg)}.HistoryWrapper{display:flex;flex-direction:column}.HistoryWrapper.Desktop{width:63%;padding:0 12px;margin:12px auto}.hidden{display:none}.HistoryRow{padding:12px 0;display:flex;justify-content:space-between;align-items:center;border-bottom:#ccc 1px solid}.GeneralLimitInformation{display:flex;flex-direction:column;gap:4px}.LimitType{font-size:1.3rem}.LimitAmountPeriod{color:#999}</style>",j(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},ei,ti,o,{lang:0,userid:10,session:11,endpoint:12,clientstyling:13,clientstylingurl:14},null),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),U()))}static get observedAttributes(){return["lang","userid","session","endpoint","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),U()}get userid(){return this.$$.ctx[10]}set userid(t){this.$$set({userid:t}),U()}get session(){return this.$$.ctx[11]}set session(t){this.$$set({session:t}),U()}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),U()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(t){this.$$set({clientstyling:t}),U()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),U()}});class mi extends V{constructor(t){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';color:#666}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TabsContainer{height:42px;display:flex;margin-bottom:12px;cursor:pointer;border-bottom:1px solid #ccc}.LimitsTab{font-size:18px;margin-bottom:3px;display:flex;justify-content:center;align-items:center;box-sizing:content-box}.hidden{display:none}.selected{border-bottom:3px solid #7ac317;color:#7ac317;margin:0}</style>",j(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},fi,pi,o,{lang:0,userid:1,session:2,endpoint:3,currency:4,apiversion:5,includedlimits:14,tablabels:15,historyenabled:6,clientstyling:16,clientstylingurl:17},null),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),U()))}static get observedAttributes(){return["lang","userid","session","endpoint","currency","apiversion","includedlimits","tablabels","historyenabled","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),U()}get userid(){return this.$$.ctx[1]}set userid(t){this.$$set({userid:t}),U()}get session(){return this.$$.ctx[2]}set session(t){this.$$set({session:t}),U()}get endpoint(){return this.$$.ctx[3]}set endpoint(t){this.$$set({endpoint:t}),U()}get currency(){return this.$$.ctx[4]}set currency(t){this.$$set({currency:t}),U()}get apiversion(){return this.$$.ctx[5]}set apiversion(t){this.$$set({apiversion:t}),U()}get includedlimits(){return this.$$.ctx[14]}set includedlimits(t){this.$$set({includedlimits:t}),U()}get tablabels(){return this.$$.ctx[15]}set tablabels(t){this.$$set({tablabels:t}),U()}get historyenabled(){return this.$$.ctx[6]}set historyenabled(t){this.$$set({historyenabled:t}),U()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(t){this.$$set({clientstyling:t}),U()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),U()}}return!customElements.get("player-account-gaming-limits-wrapper-2")&&customElements.define("player-account-gaming-limits-wrapper-2",mi),mi}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,(function(){"use strict";function e(){}function t(e){return e()}function i(){return Object.create(null)}function n(e){e.forEach(t)}function r(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function s(t,...i){if(null==t)return e;const n=t.subscribe(...i);return n.unsubscribe?()=>n.unsubscribe():n}function a(e,t,i){e.$$.on_destroy.push(s(t,i))}function l(e,t){e.appendChild(t)}function c(e,t,i){e.insertBefore(t,i||null)}function u(e){e.parentNode.removeChild(e)}function h(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function p(e){return document.createElement(e)}function m(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function d(e){return document.createTextNode(e)}function f(){return d(" ")}function g(){return d("")}function y(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function b(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function v(e,t,i){t in e?e[t]="boolean"==typeof e[t]&&""===i||i:b(e,t,i)}function L(e){return""===e?null:+e}function E(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function T(e,t){e.value=null==t?"":t}function w(e,t,i,n){null===i?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function _(e,t){for(let i=0;i<e.options.length;i+=1){const n=e.options[i];if(n.__value===t)return void(n.selected=!0)}e.selectedIndex=-1}function x(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}function A(e,t,i){e.classList[i?"add":"remove"](t)}function $(e){const t={};for(const i of e)t[i.name]=i.value;return t}let S;function P(e){S=e}const B=[],H=[],I=[],D=[],C=Promise.resolve();let O=!1;function N(e){I.push(e)}const R=new Set;let M=0;function U(){const e=S;do{for(;M<B.length;){const e=B[M];M++,P(e),k(e.$$)}for(P(null),B.length=0,M=0;H.length;)H.pop()();for(let e=0;e<I.length;e+=1){const t=I[e];R.has(t)||(R.add(t),t())}I.length=0}while(B.length);for(;D.length;)D.pop()();O=!1,R.clear(),P(e)}function k(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(N)}}const G=new Set;function j(e,t){-1===e.$$.dirty[0]&&(B.push(e),O||(O=!0,C.then(U)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function F(o,s,a,l,c,h,p,m=[-1]){const d=S;P(o);const f=o.$$={fragment:null,ctx:null,props:h,update:e,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(d?d.$$.context:[])),callbacks:i(),dirty:m,skip_bound:!1,root:s.target||d.$$.root};p&&p(f.root);let g=!1;if(f.ctx=a?a(o,s.props||{},((e,t,...i)=>{const n=i.length?i[0]:t;return f.ctx&&c(f.ctx[e],f.ctx[e]=n)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](n),g&&j(o,e)),t})):[],f.update(),g=!0,n(f.before_update),f.fragment=!!l&&l(f.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);f.fragment&&f.fragment.l(e),e.forEach(u)}else f.fragment&&f.fragment.c();s.intro&&((y=o.$$.fragment)&&y.i&&(G.delete(y),y.i(b))),function(e,i,o,s){const{fragment:a,on_mount:l,on_destroy:c,after_update:u}=e.$$;a&&a.m(i,o),s||N((()=>{const i=l.map(t).filter(r);c?c.push(...i):n(i),e.$$.on_mount=[]})),u.forEach(N)}(o,s.target,s.anchor,s.customElement),U()}var y,b;P(d)}let W;"function"==typeof HTMLElement&&(W=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){!function(e,t){const i=e.$$;null!==i.fragment&&(n(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}(this,1),this.$destroy=e}$on(e,t){const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const e=i.indexOf(t);-1!==e&&i.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 V={deposit:{title:"Deposit Limit",value:"deposit",callValue:"depositLimits",periods:["Daily","Weekly","Monthly"]},loss:{title:"Loss Limit",value:"loss",callValue:"lossLimits",periods:["Daily","Weekly","Monthly"]},wager:{title:"Wager Limit",value:"wager",callValue:"wageringLimits",periods:["Monthly"]},stake:{title:"Stake Limit",value:"stake",callValue:"stakeLimit",periods:["Monthly"]}},z=[];function X(t,i=e){let n;const r=new Set;function s(e){if(o(t,e)&&(t=e,n)){const e=!z.length;for(const e of r)e[1](),z.push(e,t);if(e){for(let e=0;e<z.length;e+=2)z[e][0](z[e+1]);z.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(o,a=e){const l=[o,a];return r.add(l),1===r.size&&(n=i(s)||e),o(t),()=>{r.delete(l),0===r.size&&(n(),n=null)}}}}function K(t,i,o){const a=!Array.isArray(t),l=a?[t]:t,c=i.length<2;return u=t=>{let o=!1;const u=[];let h=0,p=e;const m=()=>{if(h)return;p();const n=i(a?u[0]:u,t);c?t(n):p=r(n)?n:e},d=l.map(((e,t)=>s(e,(e=>{u[t]=e,h&=~(1<<t),o&&m()}),(()=>{h|=1<<t}))));return o=!0,m(),function(){n(d),p()}},{subscribe:X(o,u).subscribe};var u}var Y=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===Z}(e)}(e)};var Z="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function q(e,t){return!1!==t.clone&&t.isMergeableObject(e)?ie((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function J(e,t,i){return e.concat(t).map((function(e){return q(e,i)}))}function Q(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function ee(e,t){try{return t in e}catch(e){return!1}}function te(e,t,i){var n={};return i.isMergeableObject(e)&&Q(e).forEach((function(t){n[t]=q(e[t],i)})),Q(t).forEach((function(r){(function(e,t){return ee(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(ee(e,r)&&i.isMergeableObject(t[r])?n[r]=function(e,t){if(!t.customMerge)return ie;var i=t.customMerge(e);return"function"==typeof i?i:ie}(r,i)(e[r],t[r],i):n[r]=q(t[r],i))})),n}function ie(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||J,i.isMergeableObject=i.isMergeableObject||Y,i.cloneUnlessOtherwiseSpecified=q;var n=Array.isArray(t);return n===Array.isArray(e)?n?i.arrayMerge(e,t,i):te(e,t,i):q(t,i)}ie.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,i){return ie(e,i,t)}),{})};var ne=ie,re=function(e,t){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},re(e,t)};function oe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}re(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var se,ae,le,ce=function(){return ce=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ce.apply(this,arguments)};function ue(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}function he(e){return e.type===ae.literal}function pe(e){return e.type===ae.argument}function me(e){return e.type===ae.number}function de(e){return e.type===ae.date}function fe(e){return e.type===ae.time}function ge(e){return e.type===ae.select}function ye(e){return e.type===ae.plural}function be(e){return e.type===ae.pound}function ve(e){return e.type===ae.tag}function Le(e){return!(!e||"object"!=typeof e||e.type!==le.number)}function Ee(e){return!(!e||"object"!=typeof e||e.type!==le.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(se||(se={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(ae||(ae={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(le||(le={}));var Te=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,we=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function _e(e){var t={};return e.replace(we,(function(e){var i=e.length;switch(e[0]){case"G":t.era=4===i?"long":5===i?"narrow":"short";break;case"y":t.year=2===i?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===i?"short":5===i?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var xe=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Ae=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,$e=/^(@+)?(\+|#+)?[rs]?$/g,Se=/(\*)(0+)|(#+)(0+)|(0+)/g,Pe=/^(0+)$/;function Be(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace($e,(function(e,i,n){return"string"!=typeof n?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):"+"===n?t.minimumSignificantDigits=i.length:"#"===i[0]?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+("string"==typeof n?n.length:0)),""})),t}function He(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ie(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var i=e.slice(0,2);if("+!"===i?(t.signDisplay="always",e=e.slice(2)):"+?"===i&&(t.signDisplay="exceptZero",e=e.slice(2)),!Pe.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function De(e){var t=He(e);return t||{}}function Ce(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=ce(ce(ce({},t),{notation:"scientific"}),r.options.reduce((function(e,t){return ce(ce({},e),De(t))}),{}));continue;case"engineering":t=ce(ce(ce({},t),{notation:"engineering"}),r.options.reduce((function(e,t){return ce(ce({},e),De(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(Se,(function(e,i,n,r,o,s){if(i)t.minimumIntegerDigits=n.length;else{if(r&&o)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(Pe.test(r.stem))t.minimumIntegerDigits=r.stem.length;else if(Ae.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Ae,(function(e,i,n,r,o,s){return"*"===n?t.minimumFractionDigits=i.length:r&&"#"===r[0]?t.maximumFractionDigits=r.length:o&&s?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+s.length):(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length),""}));var o=r.options[0];"w"===o?t=ce(ce({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=ce(ce({},t),Be(o)))}else if($e.test(r.stem))t=ce(ce({},t),Be(r.stem));else{var s=He(r.stem);s&&(t=ce(ce({},t),s));var a=Ie(r.stem);a&&(t=ce(ce({},t),a))}}return t}var Oe,Ne={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Re(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var i,n=e.language;return"root"!==n&&(i=e.maximize().region),(Ne[i||""]||Ne[n||""]||Ne["".concat(n,"-001")]||Ne["001"])[0]}var Me=new RegExp("^".concat(Te.source,"*")),Ue=new RegExp("".concat(Te.source,"*$"));function ke(e,t){return{start:e,end:t}}var Ge=!!String.prototype.startsWith,je=!!String.fromCodePoint,Fe=!!Object.fromEntries,We=!!String.prototype.codePointAt,Ve=!!String.prototype.trimStart,ze=!!String.prototype.trimEnd,Xe=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ke=!0;try{Ke="a"===(null===(Oe=it("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Oe?void 0:Oe[0])}catch(e){Ke=!1}var Ye,Ze=Ge?function(e,t,i){return e.startsWith(t,i)}:function(e,t,i){return e.slice(i,i+t.length)===t},qe=je?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i,n="",r=e.length,o=0;r>o;){if((i=e[o++])>1114111)throw RangeError(i+" is not a valid code point");n+=i<65536?String.fromCharCode(i):String.fromCharCode(55296+((i-=65536)>>10),i%1024+56320)}return n},Je=Fe?Object.fromEntries:function(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i],o=r[0],s=r[1];t[o]=s}return t},Qe=We?function(e,t){return e.codePointAt(t)}:function(e,t){var i=e.length;if(!(t<0||t>=i)){var n,r=e.charCodeAt(t);return r<55296||r>56319||t+1===i||(n=e.charCodeAt(t+1))<56320||n>57343?r:n-56320+(r-55296<<10)+65536}},et=Ve?function(e){return e.trimStart()}:function(e){return e.replace(Me,"")},tt=ze?function(e){return e.trimEnd()}:function(e){return e.replace(Ue,"")};function it(e,t){return new RegExp(e,t)}if(Ke){var nt=it("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ye=function(e,t){var i;return nt.lastIndex=t,null!==(i=nt.exec(e)[1])&&void 0!==i?i:""}}else Ye=function(e,t){for(var i=[];;){var n=Qe(e,t);if(void 0===n||at(n)||lt(n))break;i.push(n),t+=n>=65536?2:1}return qe.apply(void 0,i)};var rt=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,i){for(var n=[];!this.isEOF();){var r=this.char();if(123===r){if((o=this.parseArgument(e,i)).err)return o;n.push(o.val)}else{if(125===r&&e>0)break;if(35!==r||"plural"!==t&&"selectordinal"!==t){if(60===r&&!this.ignoreTag&&47===this.peek()){if(i)break;return this.error(se.UNMATCHED_CLOSING_TAG,ke(this.clonePosition(),this.clonePosition()))}if(60===r&&!this.ignoreTag&&ot(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:ae.pound,location:ke(s,this.clonePosition())})}}}return{val:n,err:null}},e.prototype.parseTag=function(e,t){var i=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ae.literal,value:"<".concat(n,"/>"),location:ke(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var r=this.parseMessage(e+1,t,!0);if(r.err)return r;var o=r.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ot(this.char()))return this.error(se.INVALID_TAG,ke(s,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(se.UNMATCHED_CLOSING_TAG,ke(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ae.tag,value:n,children:o,location:ke(i,this.clonePosition())},err:null}:this.error(se.INVALID_TAG,ke(s,this.clonePosition())))}return this.error(se.UNCLOSED_TAG,ke(i,this.clonePosition()))}return this.error(se.INVALID_TAG,ke(i,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&st(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var i=this.clonePosition(),n="";;){var r=this.tryParseQuote(t);if(r)n+=r;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=ke(i,this.clonePosition());return{val:{type:ae.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ot(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(39===i){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(i);this.bump()}return qe.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var i=this.char();return 60===i||123===i||35===i&&("plural"===t||"selectordinal"===t)||125===i&&e>0?null:(this.bump(),qe(i))},e.prototype.parseArgument=function(e,t){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(se.EXPECT_ARGUMENT_CLOSING_BRACE,ke(i,this.clonePosition()));if(125===this.char())return this.bump(),this.error(se.EMPTY_ARGUMENT,ke(i,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(se.MALFORMED_ARGUMENT,ke(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(se.EXPECT_ARGUMENT_CLOSING_BRACE,ke(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ae.argument,value:n,location:ke(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(se.EXPECT_ARGUMENT_CLOSING_BRACE,ke(i,this.clonePosition())):this.parseArgumentOptions(e,t,n,i);default:return this.error(se.MALFORMED_ARGUMENT,ke(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),i=Ye(this.message,t),n=t+i.length;return this.bumpTo(n),{value:i,location:ke(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,i,n){var r,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(se.EXPECT_ARGUMENT_TYPE,ke(o,a));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(m=tt(y.val)).length)return this.error(se.EXPECT_ARGUMENT_STYLE,ke(this.clonePosition(),this.clonePosition()));l={style:m,styleLocation:ke(c,this.clonePosition())}}if((b=this.tryParseArgumentClose(n)).err)return b;var u=ke(n,this.clonePosition());if(l&&Ze(null==l?void 0:l.style,"::",0)){var h=et(l.style.slice(2));if("number"===s)return(y=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?y:{val:{type:ae.number,value:i,location:u,style:y.val},err:null};if(0===h.length)return this.error(se.EXPECT_DATE_TIME_SKELETON,u);var p=h;this.locale&&(p=function(e,t){for(var i="",n=0;n<e.length;n++){var r=e.charAt(n);if("j"===r){for(var o=0;n+1<e.length&&e.charAt(n+1)===r;)o++,n++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=Re(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)i+="a";for(;s-- >0;)i=l+i}else i+="J"===r?"H":r}return i}(h,this.locale));var m={type:le.dateTime,pattern:p,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?_e(p):{}};return{val:{type:"date"===s?ae.date:ae.time,value:i,location:u,style:m},err:null}}return{val:{type:"number"===s?ae.number:"date"===s?ae.date:ae.time,value:i,location:u,style:null!==(r=null==l?void 0:l.style)&&void 0!==r?r:null},err:null};case"plural":case"selectordinal":case"select":var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(se.EXPECT_SELECT_ARGUMENT_OPTIONS,ke(d,ce({},d)));this.bumpSpace();var f=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===f.value){if(!this.bumpIf(":"))return this.error(se.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ke(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(se.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,se.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;this.bumpSpace(),f=this.parseIdentifierIfPossible(),g=y.val}var b,v=this.tryParsePluralOrSelectOptions(e,s,t,f);if(v.err)return v;if((b=this.tryParseArgumentClose(n)).err)return b;var L=ke(n,this.clonePosition());return"select"===s?{val:{type:ae.select,value:i,options:Je(v.val),location:L},err:null}:{val:{type:ae.plural,value:i,options:Je(v.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:L},err:null};default:return this.error(se.INVALID_ARGUMENT_TYPE,ke(o,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(se.EXPECT_ARGUMENT_CLOSING_BRACE,ke(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(se.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ke(i,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 i=[];try{i=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=e.split(xe).filter((function(e){return e.length>0})),i=[],n=0,r=t;n<r.length;n++){var o=r[n].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var s=o[0],a=o.slice(1),l=0,c=a;l<c.length;l++)if(0===c[l].length)throw new Error("Invalid number skeleton");i.push({stem:s,options:a})}return i}(e)}catch(e){return this.error(se.INVALID_NUMBER_SKELETON,t)}return{val:{type:le.number,tokens:i,location:t,parsedOptions:this.shouldParseSkeletons?Ce(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,i,n){for(var r,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;var h=this.tryParseDecimalInteger(se.EXPECT_PLURAL_ARGUMENT_SELECTOR,se.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=ke(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}if(a.has(l))return this.error("select"===t?se.DUPLICATE_SELECT_ARGUMENT_SELECTOR:se.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?se.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:se.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ke(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(e+1,t,i);if(m.err)return m;var d=this.tryParseArgumentClose(p);if(d.err)return d;s.push([l,{value:m.val,location:ke(p,this.clonePosition())}]),a.add(l),this.bumpSpace(),l=(r=this.parseIdentifierIfPossible()).value,c=r.location}return 0===s.length?this.error("select"===t?se.EXPECT_SELECT_ARGUMENT_SELECTOR:se.EXPECT_PLURAL_ARGUMENT_SELECTOR,ke(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(se.MISSING_OTHER_CLAUSE,ke(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var i=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var r=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48&&s<=57))break;r=!0,o=10*o+(s-48),this.bump()}var a=ke(n,this.clonePosition());return r?Xe(o*=i)?{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(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Qe(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Ze(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),i=this.message.indexOf(e,t);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},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}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&at(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),i=this.message.charCodeAt(t+(e>=65536?2:1));return null!=i?i:null},e}();function ot(e){return e>=97&&e<=122||e>=65&&e<=90}function st(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||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}function at(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function lt(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 ct(e){e.forEach((function(e){if(delete e.location,ge(e)||ye(e))for(var t in e.options)delete e.options[t].location,ct(e.options[t].value);else me(e)&&Le(e.style)||(de(e)||fe(e))&&Ee(e.style)?delete e.style.location:ve(e)&&ct(e.children)}))}function ut(e,t){void 0===t&&(t={}),t=ce({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var i=new rt(e,t).parse();if(i.err){var n=SyntaxError(se[i.err.kind]);throw n.location=i.err.location,n.originalMessage=i.err.message,n}return(null==t?void 0:t.captureLocation)||ct(i.val),i.val}function ht(e,t){var i=t&&t.cache?t.cache:vt,n=t&&t.serializer?t.serializer:gt;return(t&&t.strategy?t.strategy:ft)(e,{cache:i,serializer:n})}function pt(e,t,i,n){var r,o=null==(r=n)||"number"==typeof r||"boolean"==typeof r?n:i(n),s=t.get(o);return void 0===s&&(s=e.call(this,n),t.set(o,s)),s}function mt(e,t,i){var n=Array.prototype.slice.call(arguments,3),r=i(n),o=t.get(r);return void 0===o&&(o=e.apply(this,n),t.set(r,o)),o}function dt(e,t,i,n,r){return i.bind(t,e,n,r)}function ft(e,t){return dt(e,this,1===e.length?pt:mt,t.cache.create(),t.serializer)}var gt=function(){return JSON.stringify(arguments)};function yt(){this.cache=Object.create(null)}yt.prototype.get=function(e){return this.cache[e]},yt.prototype.set=function(e,t){this.cache[e]=t};var bt,vt={create:function(){return new yt}},Lt={variadic:function(e,t){return dt(e,this,mt,t.cache.create(),t.serializer)},monadic:function(e,t){return dt(e,this,pt,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(bt||(bt={}));var Et,Tt=function(e){function t(t,i,n){var r=e.call(this,t)||this;return r.code=i,r.originalMessage=n,r}return oe(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),wt=function(e){function t(t,i,n,r){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(i,'". Options are "').concat(Object.keys(n).join('", "'),'"'),bt.INVALID_VALUE,r)||this}return oe(t,e),t}(Tt),_t=function(e){function t(t,i,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(i),bt.INVALID_VALUE,n)||this}return oe(t,e),t}(Tt),xt=function(e){function t(t,i){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(i,'"'),bt.MISSING_VALUE,i)||this}return oe(t,e),t}(Tt);function At(e){return"function"==typeof e}function $t(e,t,i,n,r,o,s){if(1===e.length&&he(e[0]))return[{type:Et.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(he(u))a.push({type:Et.literal,value:u.value});else if(be(u))"number"==typeof o&&a.push({type:Et.literal,value:i.getNumberFormat(t).format(o)});else{var h=u.value;if(!r||!(h in r))throw new xt(h,s);var p=r[h];if(pe(u))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),a.push({type:"string"==typeof p?Et.literal:Et.object,value:p});else if(de(u)){var m="string"==typeof u.style?n.date[u.style]:Ee(u.style)?u.style.parsedOptions:void 0;a.push({type:Et.literal,value:i.getDateTimeFormat(t,m).format(p)})}else if(fe(u)){m="string"==typeof u.style?n.time[u.style]:Ee(u.style)?u.style.parsedOptions:n.time.medium;a.push({type:Et.literal,value:i.getDateTimeFormat(t,m).format(p)})}else if(me(u)){(m="string"==typeof u.style?n.number[u.style]:Le(u.style)?u.style.parsedOptions:void 0)&&m.scale&&(p*=m.scale||1),a.push({type:Et.literal,value:i.getNumberFormat(t,m).format(p)})}else{if(ve(u)){var d=u.children,f=u.value,g=r[f];if(!At(g))throw new _t(f,"function",s);var y=g($t(d,t,i,n,r,o).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(e){return{type:"string"==typeof e?Et.literal:Et.object,value:e}})))}if(ge(u)){if(!(b=u.options[p]||u.options.other))throw new wt(u.value,p,Object.keys(u.options),s);a.push.apply(a,$t(b.value,t,i,n,r))}else if(ye(u)){var b;if(!(b=u.options["=".concat(p)])){if(!Intl.PluralRules)throw new Tt('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',bt.MISSING_INTL_API,s);var v=i.getPluralRules(t,{type:u.pluralType}).select(p-(u.offset||0));b=u.options[v]||u.options.other}if(!b)throw new wt(u.value,p,Object.keys(u.options),s);a.push.apply(a,$t(b.value,t,i,n,r,p-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var i=e[e.length-1];return i&&i.type===Et.literal&&t.type===Et.literal?i.value+=t.value:e.push(t),e}),[])}(a)}function St(e,t){return t?Object.keys(e).reduce((function(i,n){var r,o;return i[n]=(r=e[n],(o=t[n])?ce(ce(ce({},r||{}),o||{}),Object.keys(r).reduce((function(e,t){return e[t]=ce(ce({},r[t]),o[t]||{}),e}),{})):r),i}),ce({},e)):e}function Pt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,i){e[t]=i}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(Et||(Et={}));var Bt=function(){function e(t,i,n,r){var o,s=this;if(void 0===i&&(i=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);if(1===t.length)return t[0].value;var i=t.reduce((function(e,t){return e.length&&t.type===Et.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return i.length<=1?i[0]||"":i},this.formatToParts=function(e){return $t(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},this.locales=i,this.resolvedLocale=e.resolveLocale(i),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:null==r?void 0:r.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.");this.formats=St(e.formats,n),this.formatters=r&&r.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ht((function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.NumberFormat).bind.apply(e,ue([void 0],t,!1)))}),{cache:Pt(o.number),strategy:Lt.variadic}),getDateTimeFormat:ht((function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.DateTimeFormat).bind.apply(e,ue([void 0],t,!1)))}),{cache:Pt(o.dateTime),strategy:Lt.variadic}),getPluralRules:ht((function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.PluralRules).bind.apply(e,ue([void 0],t,!1)))}),{cache:Pt(o.pluralRules),strategy:Lt.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=ut,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}(),Ht=Bt;const It={},Dt=(e,t,i)=>i?(t in It||(It[t]={}),e in It[t]||(It[t][e]=i),i):i,Ct=(e,t)=>{if(null==t)return;if(t in It&&e in It[t])return It[t][e];const i=Jt(t);for(let n=0;n<i.length;n++){const r=Mt(i[n],e);if(r)return Dt(e,t,r)}};let Ot;const Nt=X({});function Rt(e){return e in Ot}function Mt(e,t){if(!Rt(e))return null;const i=function(e){return Ot[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const i=t.split(".");let n=e;for(let e=0;e<i.length;e++)if("object"==typeof n){if(e>0){const t=i.slice(e,i.length).join(".");if(t in n){n=n[t];break}}n=n[i[e]]}else n=void 0;return n}(i,t)}function Ut(e,...t){delete It[e],Nt.update((i=>(i[e]=ne.all([i[e]||{},...t]),i)))}K([Nt],(([e])=>Object.keys(e))),Nt.subscribe((e=>Ot=e));const kt={};function Gt(e){return kt[e]}function jt(e){return null!=e&&Jt(e).some((e=>{var t;return null===(t=Gt(e))||void 0===t?void 0:t.size}))}const Ft={};function Wt(e){if(!jt(e))return e in Ft?Ft[e]:Promise.resolve();const t=function(e){return Jt(e).map((e=>{const t=Gt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Ft[e]=Promise.all(t.map((([e,t])=>function(e,t){const i=Promise.all(t.map((t=>(function(e,t){kt[e].delete(t),0===kt[e].size&&delete kt[e]}(e,t),t().then((e=>e.default||e))))));return i.then((t=>Ut(e,...t)))}(e,t)))).then((()=>{if(jt(e))return Wt(e);delete Ft[e]})),Ft[e]}function Vt(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i}const zt={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 Xt(){return zt}const Kt=X(!1);let Yt;const Zt=X(null);function qt(e){return e.split("-").map(((e,t,i)=>i.slice(0,t+1).join("-"))).reverse()}function Jt(e,t=Xt().fallbackLocale){const i=qt(e);return t?[...new Set([...i,...qt(t)])]:i}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 ei=Object.assign(Object.assign({},Zt),{set:e=>{if(e&&function(e){if(null==e)return;const t=Jt(e);for(let e=0;e<t.length;e++){const i=t[e];if(Rt(i))return i}}(e)&&jt(e)){const{loadingDelay:t}=Xt();let i;return"undefined"!=typeof window&&null!=Qt()&&t?i=window.setTimeout((()=>Kt.set(!0)),t):Kt.set(!0),Wt(e).then((()=>{Zt.set(e)})).finally((()=>{clearTimeout(i),Kt.set(!1)}))}return Zt.set(e)}}),ti=e=>{const t=Object.create(null);return i=>{const n=JSON.stringify(i);return n in t?t[n]:t[n]=e(i)}},ii=(e,t)=>{const{formats:i}=Xt();if(e in i&&t in i[e])return i[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},ni=ti((e=>{var{locale:t,format:i}=e,n=Vt(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return i&&(n=ii("number",i)),new Intl.NumberFormat(t,n)})),ri=ti((e=>{var{locale:t,format:i}=e,n=Vt(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return i?n=ii("date",i):0===Object.keys(n).length&&(n=ii("date","short")),new Intl.DateTimeFormat(t,n)})),oi=ti((e=>{var{locale:t,format:i}=e,n=Vt(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return i?n=ii("time",i):0===Object.keys(n).length&&(n=ii("time","short")),new Intl.DateTimeFormat(t,n)})),si=ti(((e,t=Qt())=>new Ht(e,t,Xt().formats,{ignoreTag:Xt().ignoreTag}))),ai=(e,t={})=>{var i,n,r,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=Ct(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!==(r=null===(n=(i=Xt()).handleMissingMessage)||void 0===n?void 0:n.call(i,{locale:l,id:e,defaultValue:c}))&&void 0!==r?r:c)&&void 0!==o?o:e;if(!a)return u;let h=u;try{h=si(u,l).format(a)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},li=(e,t)=>((e={})=>{var{locale:t=Qt()}=e,i=Vt(e,["locale"]);return oi(Object.assign({locale:t},i))})(t).format(e),ci=(e,t)=>((e={})=>{var{locale:t=Qt()}=e,i=Vt(e,["locale"]);return ri(Object.assign({locale:t},i))})(t).format(e),ui=(e,t)=>((e={})=>{var{locale:t=Qt()}=e,i=Vt(e,["locale"]);return ni(Object.assign({locale:t},i))})(t).format(e),hi=(e,t=Qt())=>Ct(e,t),pi=K([ei,Nt],(()=>ai));K([ei],(()=>li)),K([ei],(()=>ci)),K([ei],(()=>ui)),K([ei,Nt],(()=>hi));const mi={en:{gamingLimits:{loadingText:"Loading, please wait...",Monthly:"month",Weekly:"week",Daily:"day",per:"per",updateText:"will be applied on",removedLimitText:"The limit will be removed on",noLimitText:"There is currently no limit set.",limitType:"Limit Type",period:"Period",amount:"Amount",new:"New",limit:"limit",setLimit:"SET LIMIT",loss:"Loss Limit",deposit:"Deposit Limit",wager:"Wager Limit",removeLimit:"REMOVE",popupPendingUpdate:"We have received the request to change the limit. Please be aware that the update will only come into effect on",popupImmediateUpdate:"Your new {selectedLimit} is {updatedAmount}{currency} {selectedPeriod}",popupTitle:"Limit changed",popupSuccess:"Succesful",popupError:"There was a problem while setting the limit, please try again."}},fr:{gamingLimits:{loadingText:"Chargement, veuillez patienter...",Monthly:"mois",Weekly:"semaine",Daily:"jour",per:"par",updateText:"sera appliqué sur",noLimitText:"Aucune limite n'est actuellement définie.",limitType:"Limit Type",period:"Period",amount:"Amount",new:"New",limit:"limit",setLimit:"SET LIMIT",loss:"Loss Limit",deposit:"Deposit Limit",wager:"Wager Limit",popupError:"There was a problem while setting the limit, please try again."}},ro:{gamingLimits:{loadingText:"Se incarca, va rugam asteptati...",Monthly:"luna",Weekly:"saptamana",Daily:"zi",per:"pe",updateText:"va intra in vigoare incepand cu",noLimitText:"Momentan nu este setata o limita.",limitType:"Tip Limita",period:"Perioada",amount:"Valoare",new:"Limita pe",limit:"noua",setLimit:"ACCEPTA LIMITA",loss:"Limita de Pierdere",deposit:"Limita de Depunere",wager:"Limita de Pariere",removeLimit:"ELIMINA",popupPendingUpdate:"Am primit cererea de a schimba limita. Schimbarea va intra in vigoare in data de",popupImmediateUpdate:"Noua {selectedLimit} este {updatedAmount}{currency} pe {selectedPeriod}",popupTitle:"Limita schimbata",popupSuccess:"Succes!",popupError:"There was a problem while setting the limit, please try again."}},es:{gamingLimits:{loadingText:"Cargando por favor espere..."}},pt:{gamingLimits:{loadingText:"Carregando, por favor espere..."}},de:{gamingLimits:{loadingText:"Laden, bitte warten...",popupError:"There was a problem while setting the limit, please try again."}}};var di="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==di&&di,fi="URLSearchParams"in di,gi="Symbol"in di&&"iterator"in Symbol,yi="FileReader"in di&&"Blob"in di&&function(){try{return new Blob,!0}catch(e){return!1}}(),bi="FormData"in di,vi="ArrayBuffer"in di;if(vi)var Li=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Ei=ArrayBuffer.isView||function(e){return e&&Li.indexOf(Object.prototype.toString.call(e))>-1};function Ti(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 wi(e){return"string"!=typeof e&&(e=String(e)),e}function _i(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return gi&&(t[Symbol.iterator]=function(){return t}),t}function xi(e){this.map={},e instanceof xi?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Ai(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function $i(e){return new Promise((function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}}))}function Si(e){var t=new FileReader,i=$i(t);return t.readAsArrayBuffer(e),i}function Pi(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Bi(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:yi&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:bi&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:fi&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():vi&&yi&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Pi(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):vi&&(ArrayBuffer.prototype.isPrototypeOf(e)||Ei(e))?this._bodyArrayBuffer=Pi(e):this._bodyText=e=Object.prototype.toString.call(e):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):fi&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},yi&&(this.blob=function(){var e=Ai(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=Ai(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))}return this.blob().then(Si)}),this.text=function(){var e,t,i,n=Ai(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,i=$i(t),t.readAsText(e),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},bi&&(this.formData=function(){return this.text().then(Di)}),this.json=function(){return this.text().then(JSON.parse)},this}xi.prototype.append=function(e,t){e=Ti(e),t=wi(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},xi.prototype.delete=function(e){delete this.map[Ti(e)]},xi.prototype.get=function(e){return e=Ti(e),this.has(e)?this.map[e]:null},xi.prototype.has=function(e){return this.map.hasOwnProperty(Ti(e))},xi.prototype.set=function(e,t){this.map[Ti(e)]=wi(t)},xi.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},xi.prototype.keys=function(){var e=[];return this.forEach((function(t,i){e.push(i)})),_i(e)},xi.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),_i(e)},xi.prototype.entries=function(){var e=[];return this.forEach((function(t,i){e.push([i,t])})),_i(e)},gi&&(xi.prototype[Symbol.iterator]=xi.prototype.entries);var Hi=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Ii(e,t){if(!(this instanceof Ii))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var i,n,r=(t=t||{}).body;if(e instanceof Ii){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new xi(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=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 xi(t.headers)),this.method=(i=t.method||this.method||"GET",n=i.toUpperCase(),Hi.indexOf(n)>-1?n:i),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Di(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(r))}})),t}function Ci(e,t){if(!(this instanceof Ci))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new xi(t.headers),this.url=t.url||"",this._initBody(e)}Ii.prototype.clone=function(){return new Ii(this,{body:this._bodyInit})},Bi.call(Ii.prototype),Bi.call(Ci.prototype),Ci.prototype.clone=function(){return new Ci(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new xi(this.headers),url:this.url})},Ci.error=function(){var e=new Ci(null,{status:0,statusText:""});return e.type="error",e};var Oi=[301,302,303,307,308];Ci.redirect=function(e,t){if(-1===Oi.indexOf(t))throw new RangeError("Invalid status code");return new Ci(null,{status:t,headers:{location:e}})};var Ni=di.DOMException;try{new Ni}catch(e){(Ni=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack}).prototype=Object.create(Error.prototype),Ni.prototype.constructor=Ni}function Ri(e,t){return new Promise((function(i,n){var r=new Ii(e,t);if(r.signal&&r.signal.aborted)return n(new Ni("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var e,t,n={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new xi,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var i=e.split(":"),n=i.shift().trim();if(n){var r=i.join(":").trim();t.append(n,r)}})),t)};n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var r="response"in o?o.response:o.responseText;setTimeout((function(){i(new Ci(r,n))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){n(new Ni("Aborted","AbortError"))}),0)},o.open(r.method,function(e){try{return""===e&&di.location.href?di.location.href:e}catch(t){return e}}(r.url),!0),"include"===r.credentials?o.withCredentials=!0:"omit"===r.credentials&&(o.withCredentials=!1),"responseType"in o&&(yi?o.responseType="blob":vi&&r.headers.get("Content-Type")&&-1!==r.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof xi?r.headers.forEach((function(e,t){o.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){o.setRequestHeader(e,wi(t.headers[e]))})),r.signal&&(r.signal.addEventListener("abort",s),o.onreadystatechange=function(){4===o.readyState&&r.signal.removeEventListener("abort",s)}),o.send(void 0===r._bodyInit?null:r._bodyInit)}))}Ri.polyfill=!0,di.fetch||(di.fetch=Ri,di.Headers=xi,di.Request=Ii,di.Response=Ci),self.fetch.bind(self);var Mi=function(e,t){return Mi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},Mi(e,t)};function Ui(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}Mi(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function ki(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gi(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,o=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}function ji(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}function Fi(e){return"function"==typeof e}function Wi(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Vi=Wi((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function zi(e,t){if(e){var i=e.indexOf(t);0<=i&&e.splice(i,1)}}var Xi=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,i,n,r;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=ki(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var l=this.initialTeardown;if(Fi(l))try{l()}catch(e){r=e instanceof Vi?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=ki(c),h=u.next();!h.done;h=u.next()){var p=h.value;try{Zi(p)}catch(e){r=null!=r?r:[],e instanceof Vi?r=ji(ji([],Gi(r)),Gi(e.errors)):r.push(e)}}}catch(e){i={error:e}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(i)throw i.error}}}if(r)throw new Vi(r)}},e.prototype.add=function(t){var i;if(t&&t!==this)if(this.closed)Zi(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(i=this._finalizers)&&void 0!==i?i:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&zi(t,e)},e.prototype.remove=function(t){var i=this._finalizers;i&&zi(i,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Ki=Xi.EMPTY;function Yi(e){return e instanceof Xi||e&&"closed"in e&&Fi(e.remove)&&Fi(e.add)&&Fi(e.unsubscribe)}function Zi(e){Fi(e)?e():e.unsubscribe()}var qi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ji={setTimeout:function(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var r=Ji.delegate;return(null==r?void 0:r.setTimeout)?r.setTimeout.apply(r,ji([e,t],Gi(i))):setTimeout.apply(void 0,ji([e,t],Gi(i)))},clearTimeout:function(e){var t=Ji.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Qi(){}var en=null;function tn(e){if(qi.useDeprecatedSynchronousErrorHandling){var t=!en;if(t&&(en={errorThrown:!1,error:null}),e(),t){var i=en,n=i.errorThrown,r=i.error;if(en=null,n)throw r}}else e()}var nn=function(e){function t(t){var i=e.call(this)||this;return i.isStopped=!1,t?(i.destination=t,Yi(t)&&t.add(i)):i.destination=cn,i}return Ui(t,e),t.create=function(e,t,i){return new an(e,t,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Xi),rn=Function.prototype.bind;function on(e,t){return rn.call(e,t)}var sn=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){ln(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ln(e)}else ln(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ln(e)}},e}(),an=function(e){function t(t,i,n){var r,o,s=e.call(this)||this;Fi(t)||!t?r={next:null!=t?t:void 0,error:null!=i?i:void 0,complete:null!=n?n:void 0}:s&&qi.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},r={next:t.next&&on(t.next,o),error:t.error&&on(t.error,o),complete:t.complete&&on(t.complete,o)}):r=t;return s.destination=new sn(r),s}return Ui(t,e),t}(nn);function ln(e){var t;t=e,Ji.setTimeout((function(){throw t}))}var cn={closed:!0,next:Qi,error:function(e){throw e},complete:Qi},un="function"==typeof Symbol&&Symbol.observable||"@@observable";function hn(e){return e}function pn(e){return 0===e.length?hn:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var mn=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var i=new e;return i.source=this,i.operator=t,i},e.prototype.subscribe=function(e,t,i){var n,r=this,o=(n=e)&&n instanceof nn||function(e){return e&&Fi(e.next)&&Fi(e.error)&&Fi(e.complete)}(n)&&Yi(n)?e:new an(e,t,i);return tn((function(){var e=r,t=e.operator,i=e.source;o.add(t?t.call(o,i):i?r._subscribe(o):r._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var i=this;return new(t=dn(t))((function(t,n){var r=new an({next:function(t){try{e(t)}catch(e){n(e),r.unsubscribe()}},error:n,complete:t});i.subscribe(r)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[un]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return pn(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=dn(e))((function(e,i){var n;t.subscribe((function(e){return n=e}),(function(e){return i(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function dn(e){var t;return null!==(t=null!=e?e:qi.Promise)&&void 0!==t?t:Promise}var fn=Wi((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),gn=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Ui(t,e),t.prototype.lift=function(e){var t=new yn(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new fn},t.prototype.next=function(e){var t=this;tn((function(){var i,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var r=ki(t.currentObservers),o=r.next();!o.done;o=r.next()){o.value.next(e)}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}}))},t.prototype.error=function(e){var t=this;tn((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var i=t.observers;i.length;)i.shift().error(e)}}))},t.prototype.complete=function(){var e=this;tn((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,i=this,n=i.hasError,r=i.isStopped,o=i.observers;return n||r?Ki:(this.currentObservers=null,o.push(e),new Xi((function(){t.currentObservers=null,zi(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,i=t.hasError,n=t.thrownError,r=t.isStopped;i?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new mn;return e.source=this,e},t.create=function(e,t){return new yn(e,t)},t}(mn),yn=function(e){function t(t,i){var n=e.call(this)||this;return n.destination=t,n.source=i,n}return Ui(t,e),t.prototype.next=function(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,e)},t.prototype.error=function(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==i?i:Ki},t}(gn),bn={now:function(){return(bn.delegate||Date).now()},delegate:void 0},vn=function(e){function t(t,i,n){void 0===t&&(t=1/0),void 0===i&&(i=1/0),void 0===n&&(n=bn);var r=e.call(this)||this;return r._bufferSize=t,r._windowTime=i,r._timestampProvider=n,r._buffer=[],r._infiniteTimeWindow=!0,r._infiniteTimeWindow=i===1/0,r._bufferSize=Math.max(1,t),r._windowTime=Math.max(1,i),r}return Ui(t,e),t.prototype.next=function(t){var i=this,n=i.isStopped,r=i._buffer,o=i._infiniteTimeWindow,s=i._timestampProvider,a=i._windowTime;n||(r.push(t),!o&&r.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),i=this._infiniteTimeWindow,n=this._buffer.slice(),r=0;r<n.length&&!e.closed;r+=i?1:2)e.next(n[r]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,i=e._timestampProvider,n=e._buffer,r=e._infiniteTimeWindow,o=(r?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!r){for(var s=i.now(),a=0,l=1;l<n.length&&n[l]<=s;l+=2)a=l;a&&n.splice(0,a+1)}},t}(gn);let Ln=[],En={};window.emWidgets={topic:(e,t=0)=>{if(-1==Ln.indexOf(e)){let i=new vn(t);En[e]=i,Ln.push(e)}return En[e]}};const Tn=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));function wn(e,t,i){const n=e.slice();return n[47]=t[i],n}function _n(e,t,i){const n=e.slice();return n[50]=t[i],n}function xn(e,t,i){const n=e.slice();return n[50]=t[i],n}function An(e,t,i){const n=e.slice();return n[55]=t[i],n}function $n(e){let t,i,n;function r(e,t){return e[11]?Sn:Pn}let o=r(e),s=o(e);return{c(){t=p("div"),i=p("div"),s.c(),b(i,"class",n="PopupContainer "+(e[14]?"Desktop":"")),b(t,"class","PopupOverlay")},m(e,n){c(e,t,n),l(t,i),s.m(i,null)},p(e,t){o===(o=r(e))&&s?s.p(e,t):(s.d(1),s=o(e),s&&(s.c(),s.m(i,null)))},d(e){e&&u(t),s.d()}}}function Sn(e){let t,i,n,r;function o(e,t){return e[9]?Hn:Bn}let s=o(e),a=s(e);return{c(){a.c(),t=f(),i=p("button"),i.textContent="OK",b(i,"class","ConfirmButton")},m(o,s){a.m(o,s),c(o,t,s),c(o,i,s),n||(r=y(i,"click",e[20]),n=!0)},p(e,i){s===(s=o(e))&&a?a.p(e,i):(a.d(1),a=s(e),a&&(a.c(),a.m(t.parentNode,t)))},d(e){a.d(e),e&&u(t),e&&u(i),n=!1,r()}}}function Pn(t){let i;return{c(){i=p("div"),b(i,"class","LoadingIndicator")},m(e,t){c(e,i,t)},p:e,d(e){e&&u(i)}}}function Bn(e){let t,i,n,r,o,s,a,h,g,v,L,T,_,x,A,$,S,P,B,H,I,D,C=e[13]("gamingLimits.popupTitle")+"",O=e[13]("gamingLimits.popupSuccess")+"";return{c(){t=p("div"),i=p("span"),n=d(C),r=f(),o=p("button"),o.textContent="X",s=f(),a=p("div"),h=p("div"),g=m("svg"),v=m("defs"),L=m("style"),T=d(".fil0 {fill:black;fill-rule:nonzero}\n "),_=m("g"),x=m("polygon"),A=f(),$=p("p"),S=d(O),P=f(),B=p("p"),H=d(e[12]),b(i,"class","PopupTitle"),b(o,"class","ClosePopup"),b(t,"class","PopupTitleWrapper"),b(L,"type","text/css"),b(x,"class","fil0"),b(x,"points","0,38 10,25 36,47 78,0 90,11 37,69 "),b(g,"xmlns","http://www.w3.org/2000/svg"),b(g,"xmlns:xlink","http://www.w3.org/1999/xlink"),b(g,"xml:space","preserve"),b(g,"version","1.1"),w(g,"shape-rendering","geometricPrecision"),w(g,"text-rendering","geometricPrecision"),w(g,"image-rendering","optimizeQuality"),b(g,"viewBox","0 0 90 69"),b(g,"x","0px"),b(g,"y","0px"),b(g,"fill-rule","evenodd"),b(g,"clip-rule","evenodd"),b(h,"class","ResultIconWrapper"),b(B,"class","DescriptionParagraph"),b(a,"class","DescriptionWrapper")},m(u,p){c(u,t,p),l(t,i),l(i,n),l(t,r),l(t,o),c(u,s,p),c(u,a,p),l(a,h),l(h,g),l(g,v),l(v,L),l(L,T),l(g,_),l(_,x),l(h,A),l(h,$),l($,S),l(a,P),l(a,B),l(B,H),I||(D=y(o,"click",e[20]),I=!0)},p(e,t){8192&t[0]&&C!==(C=e[13]("gamingLimits.popupTitle")+"")&&E(n,C),8192&t[0]&&O!==(O=e[13]("gamingLimits.popupSuccess")+"")&&E(S,O),4096&t[0]&&E(H,e[12])},d(e){e&&u(t),e&&u(s),e&&u(a),I=!1,D()}}}function Hn(e){let t,i,n,r,o,s,a,h,m,g,v,L=e[13]("gamingLimits.popupTitle")+"",T=e[13]("gamingLimits.popupError")+"";return{c(){t=p("div"),i=p("span"),n=d(L),r=f(),o=p("button"),o.textContent="X",s=f(),a=p("div"),h=p("p"),m=d(T),b(i,"class","PopupTitle"),b(o,"class","ClosePopup"),b(t,"class","PopupTitleWrapper"),b(h,"class","DescriptionParagraph"),b(a,"class","DescriptionWrapper")},m(u,p){c(u,t,p),l(t,i),l(i,n),l(t,r),l(t,o),c(u,s,p),c(u,a,p),l(a,h),l(h,m),g||(v=y(o,"click",e[20]),g=!0)},p(e,t){8192&t[0]&&L!==(L=e[13]("gamingLimits.popupTitle")+"")&&E(n,L),8192&t[0]&&T!==(T=e[13]("gamingLimits.popupError")+"")&&E(m,T)},d(e){e&&u(t),e&&u(s),e&&u(a),g=!1,v()}}}function In(e){let t,i,r,o,s,a,m,g,v,w,_,x,A,$,S,P,B,H=e[6]?`${e[13]("gamingLimits.amount")}`:`${e[13]("gamingLimits.new")} ${e[13](`gamingLimits.${e[2]}`)} ${e[13]("gamingLimits.limit")}`,I=e[13]("gamingLimits.setLimit")+"",D=e[15],C=[];for(let t=0;t<D.length;t+=1)C[t]=Gn(xn(e,D,t));let O=e[5]&&jn(e),N=e[6]&&Wn(e);return{c(){t=p("div"),i=p("div"),r=p("div");for(let e=0;e<C.length;e+=1)C[e].c();o=f(),s=p("form"),O&&O.c(),a=f(),N&&N.c(),m=f(),g=p("label"),v=p("span"),w=d(H),_=f(),x=p("input"),A=f(),$=p("button"),S=d(I),b(r,"class","LimitsList "+(e[14]?"Desktop":"")),b(v,"class","LimitInputText"),b(x,"type","number"),b(x,"pattern","[0-9]*"),b(g,"class","LimitAmountInputWrapper"),b($,"class","LimitSubmitButton"),b($,"type","button"),$.disabled=!0,b(s,"class","LimitsInteractionArea "+(e[14]?"Desktop":"")),b(i,"class","LimitsPageContainer"),b(t,"class","player-account-gaming-limits-page-2-gmcore")},m(n,u){c(n,t,u),l(t,i),l(i,r);for(let e=0;e<C.length;e+=1)C[e].m(r,null);l(i,o),l(i,s),O&&O.m(s,null),l(s,a),N&&N.m(s,null),l(s,m),l(s,g),l(g,v),l(v,w),l(g,_),l(g,x),T(x,e[3]),l(s,A),l(s,$),l($,S),e[33]($),P||(B=[y(x,"input",e[32]),y(x,"keyup",e[18]),y($,"click",e[17]),y(s,"submit",e[17])],P=!0)},p(e,t){if(581632&t[0]){let i;for(D=e[15],i=0;i<D.length;i+=1){const n=xn(e,D,i);C[i]?C[i].p(n,t):(C[i]=Gn(n),C[i].c(),C[i].m(r,null))}for(;i<C.length;i+=1)C[i].d(1);C.length=D.length}e[5]?O?O.p(e,t):(O=jn(e),O.c(),O.m(s,a)):O&&(O.d(1),O=null),e[6]?N?N.p(e,t):(N=Wn(e),N.c(),N.m(s,m)):N&&(N.d(1),N=null),8260&t[0]&&H!==(H=e[6]?`${e[13]("gamingLimits.amount")}`:`${e[13]("gamingLimits.new")} ${e[13](`gamingLimits.${e[2]}`)} ${e[13]("gamingLimits.limit")}`)&&E(w,H),8&t[0]&&L(x.value)!==e[3]&&T(x,e[3]),8192&t[0]&&I!==(I=e[13]("gamingLimits.setLimit")+"")&&E(S,I)},d(i){i&&u(t),h(C,i),O&&O.d(),N&&N.d(),e[33](null),P=!1,n(B)}}}function Dn(t){let i;return{c(){i=p("p"),i.textContent="500 Server error"},m(e,t){c(e,i,t)},p:e,d(e){e&&u(i)}}}function Cn(t){return{c:e,m:e,p:e,d:e}}function On(t){let i;return{c(){i=p("div"),b(i,"class","LoadingIndicator")},m(e,t){c(e,i,t)},p:e,d(e){e&&u(i)}}}function Nn(e){let t,i,n,r,o=e[13]("gamingLimits.noLimitText")+"";return{c(){t=p("div"),i=p("div"),n=p("div"),r=d(o),b(n,"class","LimitDetailsTextWrapper"),b(i,"class","LimitDetailsWrapper"),b(t,"class","LimitDetails")},m(e,o){c(e,t,o),l(t,i),l(i,n),l(n,r)},p(e,t){8192&t[0]&&o!==(o=e[13]("gamingLimits.noLimitText")+"")&&E(r,o)},d(e){e&&u(t)}}}function Rn(e){let t,i=e[50].currentLimits,n=[];for(let t=0;t<i.length;t+=1)n[t]=kn(An(e,i,t));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();t=g()},m(e,i){for(let t=0;t<n.length;t+=1)n[t].m(e,i);c(e,t,i)},p(e,r){if(565248&r[0]){let o;for(i=e[50].currentLimits,o=0;o<i.length;o+=1){const s=An(e,i,o);n[o]?n[o].p(s,r):(n[o]=kn(s),n[o].c(),n[o].m(t.parentNode,t))}for(;o<n.length;o+=1)n[o].d(1);n.length=i.length}},d(e){h(n,e),e&&u(t)}}}function Mn(e){let t,i,n=`${e[13]("gamingLimits.removedLimitText")} ${e[55].expiryDate}`;return{c(){t=p("div"),i=d(n),b(t,"class","PendingLimit")},m(e,n){c(e,t,n),l(t,i)},p(e,t){8192&t[0]&&n!==(n=`${e[13]("gamingLimits.removedLimitText")} ${e[55].expiryDate}`)&&E(i,n)},d(e){e&&u(t)}}}function Un(e){let t,i,n=`${e[55].updateAmount}${e[55].currency} ${e[13]("gamingLimits.per")} ${e[13](`gamingLimits.${e[55].period}`)} ${e[13]("gamingLimits.updateText")} ${e[55].expiryDate}`;return{c(){t=p("div"),i=d(n),b(t,"class","PendingLimit")},m(e,n){c(e,t,n),l(t,i)},p(e,t){8192&t[0]&&n!==(n=`${e[55].updateAmount}${e[55].currency} ${e[13]("gamingLimits.per")} ${e[13](`gamingLimits.${e[55].period}`)} ${e[13]("gamingLimits.updateText")} ${e[55].expiryDate}`)&&E(i,n)},d(e){e&&u(t)}}}function kn(e){let t,i,n,r,o,s,a,h=`${e[55].amount}${e[55].currency} ${e[13]("gamingLimits.per")} ${e[13](`gamingLimits.${e[55].period}`)}`;let m=function(e,t){return e[55].isModified&&"-1"!=e[55].updateAmount?Un:e[55].isModified?Mn:void 0}(e),g=m&&m(e),v=!e[55].isModified&&function(e){let t,i,n,r,o=e[13]("gamingLimits.removeLimit")+"";function s(){return e[29](e[55])}return{c(){t=p("button"),i=d(o),b(t,"class","RemoveLimitButton")},m(e,o){c(e,t,o),l(t,i),n||(r=y(t,"click",s),n=!0)},p(t,n){e=t,8192&n[0]&&o!==(o=e[13]("gamingLimits.removeLimit")+"")&&E(i,o)},d(e){e&&u(t),n=!1,r()}}}(e);return{c(){t=p("div"),i=p("div"),n=p("div"),r=d(h),o=f(),g&&g.c(),s=f(),v&&v.c(),a=f(),b(n,"class","CurrentLimit"),b(i,"class","LimitDetailsTextWrapper"),b(t,"class","LimitDetails")},m(e,u){c(e,t,u),l(t,i),l(i,n),l(n,r),l(i,o),g&&g.m(i,null),l(t,s),v&&v.m(t,null),l(t,a)},p(e,t){8192&t[0]&&h!==(h=`${e[55].amount}${e[55].currency} ${e[13]("gamingLimits.per")} ${e[13](`gamingLimits.${e[55].period}`)}`)&&E(r,h),g&&g.p(e,t),e[55].isModified||v.p(e,t)},d(e){e&&u(t),g&&g.d(),v&&v.d()}}}function Gn(e){let t,i,n,r,o,s,a=e[13](`gamingLimits.${e[50].value}`)+"";let h=function(e,t){return e[50].currentLimits.length>0?Rn:Nn}(e),m=h(e);return{c(){t=p("div"),i=p("p"),n=d(a),r=f(),m.c(),o=f(),b(i,"class","LimitTitle"),b(t,"class",s="LimitWrapper "+(e[14]?"Desktop":""))},m(e,s){c(e,t,s),l(t,i),l(i,n),l(t,r),m.m(t,null),l(t,o)},p(e,t){8192&t[0]&&a!==(a=e[13](`gamingLimits.${e[50].value}`)+"")&&E(n,a),m.p(e,t)},d(e){e&&u(t),m.d()}}}function jn(e){let t,i,r,o,s,a,m,g=e[13]("gamingLimits.limitType")+"",v=e[15],L=[];for(let t=0;t<v.length;t+=1)L[t]=Fn(_n(e,v,t));return{c(){t=p("label"),i=p("span"),r=d(g),o=f(),s=p("select");for(let e=0;e<L.length;e+=1)L[e].c();b(i,"class","LimitSelectText"),b(s,"name",""),b(s,"id",""),void 0===e[1]&&N((()=>e[30].call(s))),b(t,"class","LimitTypeDropdownWrapper")},m(n,u){c(n,t,u),l(t,i),l(i,r),l(t,o),l(t,s);for(let e=0;e<L.length;e+=1)L[e].m(s,null);_(s,e[1]),a||(m=[y(s,"change",e[30]),y(s,"change",e[16])],a=!0)},p(e,t){if(8192&t[0]&&g!==(g=e[13]("gamingLimits.limitType")+"")&&E(r,g),32768&t[0]){let i;for(v=e[15],i=0;i<v.length;i+=1){const n=_n(e,v,i);L[i]?L[i].p(n,t):(L[i]=Fn(n),L[i].c(),L[i].m(s,null))}for(;i<L.length;i+=1)L[i].d(1);L.length=v.length}32770&t[0]&&_(s,e[1])},d(e){e&&u(t),h(L,e),a=!1,n(m)}}}function Fn(t){let i,n,r,o=t[50].title+"";return{c(){i=p("option"),n=d(o),i.__value=r=t[50].value,i.value=i.__value},m(e,t){c(e,i,t),l(i,n)},p:e,d(e){e&&u(i)}}}function Wn(e){let t,i,n,r,o,s,a,m=e[13]("gamingLimits.period")+"",g=V[e[1]].periods,v=[];for(let t=0;t<g.length;t+=1)v[t]=Vn(wn(e,g,t));return{c(){t=p("label"),i=p("span"),n=d(m),r=f(),o=p("select");for(let e=0;e<v.length;e+=1)v[e].c();b(i,"class","PeriodSelectText"),b(o,"name",""),b(o,"id",""),void 0===e[2]&&N((()=>e[31].call(o))),b(t,"class","LimitPeriodDropdownWrapper")},m(u,h){c(u,t,h),l(t,i),l(i,n),l(t,r),l(t,o);for(let e=0;e<v.length;e+=1)v[e].m(o,null);_(o,e[2]),s||(a=y(o,"change",e[31]),s=!0)},p(e,t){if(8192&t[0]&&m!==(m=e[13]("gamingLimits.period")+"")&&E(n,m),8194&t[0]){let i;for(g=V[e[1]].periods,i=0;i<g.length;i+=1){const n=wn(e,g,i);v[i]?v[i].p(n,t):(v[i]=Vn(n),v[i].c(),v[i].m(o,null))}for(;i<v.length;i+=1)v[i].d(1);v.length=g.length}6&t[0]&&_(o,e[2])},d(e){e&&u(t),h(v,e),s=!1,a()}}}function Vn(e){let t,i,n,r,o,s=e[13]("gamingLimits.per")+"",a=e[13](`gamingLimits.${e[47]}`)+"";return{c(){t=p("option"),i=d(s),n=f(),r=d(a),t.__value=o=e[47],t.value=t.__value,t.selected=!0},m(e,o){c(e,t,o),l(t,i),l(t,n),l(t,r)},p(e,n){8192&n[0]&&s!==(s=e[13]("gamingLimits.per")+"")&&E(i,s),8194&n[0]&&a!==(a=e[13](`gamingLimits.${e[47]}`)+"")&&E(r,a),32770&n[0]&&o!==(o=e[47])&&(t.__value=o,t.value=t.__value)},d(e){e&&u(t)}}}function zn(t){let i,n,r=t[10]&&$n(t);function o(e,t){return e[7]&&!e[10]?On:e[7]?Cn:e[8]?Dn:In}let s=o(t),a=s(t);return{c(){i=p("div"),r&&r.c(),n=f(),a.c(),this.c=e},m(e,o){c(e,i,o),r&&r.m(i,null),l(i,n),a.m(i,null),t[34](i)},p(e,t){e[10]?r?r.p(e,t):(r=$n(e),r.c(),r.m(i,n)):r&&(r.d(1),r=null),s===(s=o(e))&&a?a.p(e,t):(a.d(1),a=s(e),a&&(a.c(),a.m(i,null)))},i:e,o:e,d(e){e&&u(i),r&&r.d(),a.d(),t[34](null)}}}function Xn(e,t,i){let n;a(e,pi,(e=>i(13,n=e)));let r,o,s,l,{lang:c="en"}=t,{currency:u=""}=t,{limits:h=""}=t,{session:p=""}=t,{userid:m=""}=t,{endpoint:d=""}=t,{clientstyling:f=""}=t,{clientstylingurl:g=""}=t,y=window.navigator.userAgent,b=!Tn(y),v=[],E="",T="",w=!1,_=!1,A=!0,$=!1,S=!1,P=!1,B=!1,I="";const D={EUR:"€",RON:" lei"};Object.keys(mi).forEach((e=>{!function(e,t){Ut(e,t)}(e,mi[e])}));const C=()=>{let e=new URL(`v2/player/${m}/limits`,d),t={method:"GET",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"}};fetch(e.href,t).then((e=>{if(e.status>=300)throw i(7,A=!1),i(8,$=!0),new Error("There was an error fetching the limits");return e.json()})).then((e=>{l=e,P&&R(),O(l),i(7,A=!1),i(3,o=null)})).catch((e=>{console.log(e),i(7,A=!1),i(8,$=!0)}))},O=e=>{v.forEach((t=>{var i;t.currentLimits=[],null===(i=e[V[t.value].callValue])||void 0===i||i.forEach(((i,n)=>{var r;const o=e[V[t.value].callValue][n];t.currentLimits.push({}),t.currentLimits[n].limitType=t.value,t.currentLimits[n].amount=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(o.amount),t.currentLimits[n].currency=null!==(r=D[o.currency])&&void 0!==r?r:o.currency,t.currentLimits[n].period=o.period,t.currentLimits[n].updateAmount=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(o.updateAmount),t.currentLimits[n].isModified=o.isModified,t.currentLimits[n].expiryDate=`${new Date(o.expiryDate).toLocaleDateString("en-de",{hour:"numeric",minute:"numeric"}).replaceAll("/",".")} (GMT)`})),t.currentLimits=N(t.currentLimits)}))},N=e=>{const t={Daily:0,Weekly:1,Monthly:2};return e.sort(((e,i)=>t[e.period]-t[i.period])),e},R=()=>{if(l){const e=l[V[E].callValue].filter((e=>e.period===T))[0],t=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(e.amount);let r=n("gamingLimits.popupImmediateUpdate").replace("{selectedLimit}",n(`gamingLimits.${E}`).toLowerCase()).replace("{updatedAmount}",t).replace("{currency}",D[e.currency]||e.currency).replace("{selectedPeriod}",n(`gamingLimits.${T}`).toLowerCase());i(12,I=e.isModified?`${n("gamingLimits.popupPendingUpdate")} ${new Date(e.expiryDate).toLocaleDateString("en-de",{hour:"numeric",minute:"numeric"}).replaceAll("/",".")} (GMT)`:r)}i(11,B=!0)},M=e=>{i(10,P=!0),i(7,A=!0);let t=new URL(`v2/player/${m}/limits/${{wager:"wagering",loss:"loss",deposit:"deposit"}[e.limitType]}?periods=${e.period}`,d),n={method:"DELETE",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"}};fetch(t.href,n).then((e=>e.json())).then((e=>{C()})).catch((e=>{console.log(e),i(7,A=!1),i(8,$=!0)}))},U=()=>{var e;e=c,ei.set(e)};return e.$$set=e=>{"lang"in e&&i(21,c=e.lang),"currency"in e&&i(22,u=e.currency),"limits"in e&&i(23,h=e.limits),"session"in e&&i(24,p=e.session),"userid"in e&&i(25,m=e.userid),"endpoint"in e&&i(26,d=e.endpoint),"clientstyling"in e&&i(27,f=e.clientstyling),"clientstylingurl"in e&&i(28,g=e.clientstylingurl)},e.$$.update=()=>{8388608&e.$$.dirty[0]&&h&&(h.split(" ").forEach((e=>{V[e]?v.push(V[e]):console.error(`Unknown limit: ${e}`)})),i(1,E=v[0].value),i(2,T=V[E].periods[0]),i(5,w=v.length>1),i(6,_=V[E].periods.length>1)),2097152&e.$$.dirty[0]&&c&&U(),117440512&e.$$.dirty[0]&&m&&p&&d&&C(),268435456&e.$$.dirty[0]&&g&&(()=>{let e=new URL(g),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,r&&(setTimeout((()=>{r.appendChild(t)}),1),setTimeout((()=>{}),500))}))})(),134217728&e.$$.dirty[0]&&f&&(()=>{let e=document.createElement("style");e.innerHTML=f,r.appendChild(e)})()},[r,E,T,o,s,w,_,A,$,S,P,B,I,n,b,v,()=>{i(2,T=V[E].periods[0]),i(6,_=V[E].periods.length>1)},()=>{if(!(o>0))return;i(10,P=!0),i(7,A=!0);let e=new URL(`v2/player/${m}/limits`,d);const t={};t[V[E].callValue]=[{period:T,amount:o,currency:u}];let n={method:"PUT",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(t)};fetch(e.href,n).then((e=>{if(e.status>=300)throw i(7,A=!1),i(11,B=!0),i(9,S=!0),new Error("There was an error while setting the new limit");return e.json()})).then((e=>{C()})).catch((e=>{console.log(e),i(9,S=!0),i(11,B=!0),i(7,A=!1)}))},()=>{const e=999999999999999;o>e&&i(3,o=e);const t=o-Math.floor(o)==0;o>0&&t?s.removeAttribute("disabled"):s.setAttribute("disabled","true")},M,()=>{i(11,B=i(10,P=!1))},c,u,h,p,m,d,f,g,e=>M(e),function(){E=x(this),i(1,E),i(15,v)},function(){T=x(this),i(2,T),i(1,E)},function(){o=L(this.value),i(3,o)},function(e){H[e?"unshift":"push"]((()=>{s=e,i(4,s)}))},function(e){H[e?"unshift":"push"]((()=>{r=e,i(0,r)}))}]}!customElements.get("player-account-gaming-limits-page-2-gmcore")&&customElements.define("player-account-gaming-limits-page-2-gmcore",class extends W{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';font-size:1.3rem}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}select,input{width:100%;height:38px;padding:8px 4px;padding-right:8px;margin:12px 0;border-radius:2px;border:1px solid #999}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-page-2-gmcore{color:var(--emfe-w-color-white, #333)}.LimitsInteractionArea{display:flex;flex-direction:column;margin-top:12px}.LimitsInteractionArea.Desktop{width:63%;padding:0 12px;margin:0 auto}.LimitsList.Desktop{display:flex;flex-wrap:wrap;justify-content:space-between;width:63%;margin:0 auto}.LimitWrapper{background:var(--emfe-w-color-white, #fff);font-size:1.3rem;border:1px solid #ccc;padding:8px 12px;border-radius:4px}.LimitWrapper:not(:first-child){margin-top:12px}.LimitWrapper.Desktop{width:45%;margin:12px}.LimitSubmitButton,.ConfirmButton{background:#7ac317;color:#fff;border:0;border-radius:2px;padding:12px;cursor:pointer}.LimitSubmitButton:disabled,.ConfirmButton:disabled{background:rgba(116, 180, 27, 0.322);cursor:not-allowed}.LimitDetails{padding:12px 0 12px 4px}.LimitDetails:not(:last-child){border-bottom:#ccc 1px solid}.LimitDetailsTextWrapper{font-size:1.3rem;color:#666}.PendingLimit{color:#999}.LimitTitle{font-size:1.5rem}.PopupOverlay{position:absolute;top:0;left:0;background:#000;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center}.PopupContainer{background:#fff;font-size:1rem;color:#333;width:80vw;height:350px;padding:12px;border-radius:4px;display:flex;flex-direction:column;justify-content:space-between}.PopupContainer.Desktop{width:30vw}.PopupTitleWrapper{display:flex;justify-content:space-between;font-size:1.3rem}.PopupTitleWrapper button{background:#fff;font-size:1rem;border:0;cursor:pointer}.DescriptionParagraph{text-align:center;font-size:1.3rem;padding:12px}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.LimitDetails{display:flex;justify-content:space-between;align-items:center}.RemoveLimitButton{height:28px;font-size:0.7rem;background:#fff;color:#666;border:1px solid #ccc;border-radius:4px;padding:0 4px;cursor:pointer}.RemoveLimitButton:hover{background:#f3f3fc}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.LoadingIndicator{width:100px;height:100px;margin:110px auto 0;border:solid 10px #7ac317;border-radius:50%;border-right-color:transparent;border-bottom-color:transparent;-webkit-transition:all 0.5s ease-in;-webkit-animation-name:rotate;-webkit-animation-duration:1.0s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear;transition:all 0.5s ease-in;animation-name:rotate;animation-duration:1.0s;animation-iteration-count:infinite;animation-timing-function:linear}</style>",F(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},Xn,zn,o,{lang:21,currency:22,limits:23,session:24,userid:25,endpoint:26,clientstyling:27,clientstylingurl:28},null,[-1,-1]),e&&(e.target&&c(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["lang","currency","limits","session","userid","endpoint","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[21]}set lang(e){this.$$set({lang:e}),U()}get currency(){return this.$$.ctx[22]}set currency(e){this.$$set({currency:e}),U()}get limits(){return this.$$.ctx[23]}set limits(e){this.$$set({limits:e}),U()}get session(){return this.$$.ctx[24]}set session(e){this.$$set({session:e}),U()}get userid(){return this.$$.ctx[25]}set userid(e){this.$$set({userid:e}),U()}get endpoint(){return this.$$.ctx[26]}set endpoint(e){this.$$set({endpoint:e}),U()}get clientstyling(){return this.$$.ctx[27]}set clientstyling(e){this.$$set({clientstyling:e}),U()}get clientstylingurl(){return this.$$.ctx[28]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),U()}});const Kn={lugas:{title:"Deposit Limit",value:"lugas",callValue:"lugasLimit",callValue16:"Lugas",periods:["Monthly"]},deposit:{title:"Deposit Limit",value:"deposit",callValue:"depositLimits",callValue16:"Deposit",periods:["Daily","Weekly","Monthly"]},loss:{title:"Loss Limit",value:"loss",callValue:"lossLimits",callValue16:"Loss",periods:["Daily","Weekly","Monthly"]},wager:{title:"Wager Limit",value:"wager",callValue:"wageringLimits",callValue16:"Wagering",periods:["Monthly"]},stake:{title:"Stake Limit",value:"stake",callValue:"maxStake",callValue16:"MaxStake",periods:["None"]}};const Yn={en:{gamingLimits:{loadingText:"Loading, please wait...",Monthly:"month",Weekly:"week",Daily:"day",None:" ",noPeriod:".",per:"per",updateText:"will be applied on",removedLimitText:"The limit will be removed on",noLimitText:"There is currently no limit set.",lugasPrivacy:"The cross-provider LUGAS limit is not visible to providers.",limitType:"Limit Type",period:"Period",amount:"Amount",new:"New",limit:"limit",setLimit:"SET LIMIT",loss:"Loss Limit",deposit:"Deposit Limit",wager:"Wager Limit",stake:"Stake Limit",lugas:"Current Deposit Limit",removeLimit:"REMOVE",popupPendingUpdate:"We have received the request to change the limit. Please be aware that the update will only come into effect on",popupImmediateUpdate:"Your new {selectedLimit} is {updatedAmount}{currency} {per} {selectedPeriod}",popupTitle:"Limit changed",popupSuccess:"Succesful"}},fr:{gamingLimits:{loadingText:"Chargement, veuillez patienter...",Monthly:"mois",Weekly:"semaine",Daily:"jour",per:"par",updateText:"sera appliqué sur",noLimitText:"Aucune limite n'est actuellement définie.",limitType:"Limit Type",period:"Period",amount:"Amount",new:"New",limit:"limit",setLimit:"SET LIMIT",loss:"Loss Limit",deposit:"Deposit Limit",wager:"Wager Limit"}},ro:{gamingLimits:{loadingText:"Se incarca, va rugam asteptati...",Monthly:"luna",Weekly:"saptamana",Daily:"zi",per:"pe",updateText:"va intra in vigoare incepand cu",noLimitText:"Momentan nu este setata o limita.",limitType:"Tip Limita",period:"Perioada",amount:"Valoare",new:"Limita pe",limit:"noua",setLimit:"ACCEPTA LIMITA",loss:"Limita de Pierdere",deposit:"Limita de Depunere",wager:"Limita de Pariere",removeLimit:"ELIMINA",popupPendingUpdate:"Am primit cererea de a schimba limita. Schimbarea va intra in vigoare in data de",popupImmediateUpdate:"Noua {selectedLimit} este {updatedAmount}{currency} pe {selectedPeriod}",popupTitle:"Limita schimbata",popupSuccess:"Succes!"}},es:{gamingLimits:{loadingText:"Cargando por favor espere..."}},pt:{gamingLimits:{loadingText:"Carregando, por favor espere..."}},de:{gamingLimits:{loadingText:"Laden, bitte warten..."}}};function Zn(e,t,i){const n=e.slice();return n[54]=t[i],n}function qn(e,t,i){const n=e.slice();return n[57]=t[i],n}function Jn(e,t,i){const n=e.slice();return n[57]=t[i],n}function Qn(e,t,i){const n=e.slice();return n[62]=t[i],n}function er(e){let t,i,n;function r(e,t){return e[10]?tr:ir}let o=r(e),s=o(e);return{c(){t=p("div"),i=p("div"),s.c(),b(i,"class",n="PopupContainer "+(e[13]?"Desktop":"")),b(t,"class","PopupOverlay")},m(e,n){c(e,t,n),l(t,i),s.m(i,null)},p(e,t){o===(o=r(e))&&s?s.p(e,t):(s.d(1),s=o(e),s&&(s.c(),s.m(i,null)))},d(e){e&&u(t),s.d()}}}function tr(e){let t,i,r,o,s,a,h,g,v,L,T,_,x,A,$,S,P,B,H,I,D,C,O,N,R=e[12]("gamingLimits.popupTitle")+"",M=e[12]("gamingLimits.popupSuccess")+"";return{c(){t=p("div"),i=p("span"),r=d(R),o=f(),s=p("button"),s.textContent="X",a=f(),h=p("div"),g=p("div"),v=m("svg"),L=m("defs"),T=m("style"),_=d(".fil0 {fill:black;fill-rule:nonzero}\n "),x=m("g"),A=m("polygon"),$=f(),S=p("p"),P=d(M),B=f(),H=p("p"),I=d(e[11]),D=f(),C=p("button"),C.textContent="OK",b(i,"class","PopupTitle"),b(s,"class","ClosePopup"),b(t,"class","PopupTitleWrapper"),b(T,"type","text/css"),b(A,"class","fil0"),b(A,"points","0,38 10,25 36,47 78,0 90,11 37,69 "),b(v,"xmlns","http://www.w3.org/2000/svg"),b(v,"xmlns:xlink","http://www.w3.org/1999/xlink"),b(v,"xml:space","preserve"),b(v,"version","1.1"),w(v,"shape-rendering","geometricPrecision"),w(v,"text-rendering","geometricPrecision"),w(v,"image-rendering","optimizeQuality"),b(v,"viewBox","0 0 90 69"),b(v,"x","0px"),b(v,"y","0px"),b(v,"fill-rule","evenodd"),b(v,"clip-rule","evenodd"),b(g,"class","ResultIconWrapper"),b(H,"class","DescriptionParagraph"),b(h,"class","DescriptionWrapper"),b(C,"class","ConfirmButton")},m(n,u){c(n,t,u),l(t,i),l(i,r),l(t,o),l(t,s),c(n,a,u),c(n,h,u),l(h,g),l(g,v),l(v,L),l(L,T),l(T,_),l(v,x),l(x,A),l(g,$),l(g,S),l(S,P),l(h,B),l(h,H),l(H,I),c(n,D,u),c(n,C,u),O||(N=[y(s,"click",e[19]),y(C,"click",e[19])],O=!0)},p(e,t){4096&t[0]&&R!==(R=e[12]("gamingLimits.popupTitle")+"")&&E(r,R),4096&t[0]&&M!==(M=e[12]("gamingLimits.popupSuccess")+"")&&E(P,M),2048&t[0]&&E(I,e[11])},d(e){e&&u(t),e&&u(a),e&&u(h),e&&u(D),e&&u(C),O=!1,n(N)}}}function ir(t){let i;return{c(){i=p("div"),b(i,"class","LoadingIndicator")},m(e,t){c(e,i,t)},p:e,d(e){e&&u(i)}}}function nr(e){let t,i,r,o,s,a,m,g,v,w,_,x,A,$,S,P,B,H=e[6]?`${e[12]("gamingLimits.amount")}`:`${e[12]("gamingLimits.new")} ${e[12](`gamingLimits.${e[2]}`)} ${e[12]("gamingLimits.limit")}`,I=e[12]("gamingLimits.setLimit")+"",D=e[14],C=[];for(let t=0;t<D.length;t+=1)C[t]=mr(Jn(e,D,t));let O=e[5]&&dr(e),N=e[6]&&gr(e);return{c(){t=p("div"),i=p("div"),r=p("div");for(let e=0;e<C.length;e+=1)C[e].c();o=f(),s=p("form"),O&&O.c(),a=f(),N&&N.c(),m=f(),g=p("label"),v=p("span"),w=d(H),_=f(),x=p("input"),A=f(),$=p("button"),S=d(I),b(r,"class","LimitsList "+(e[13]?"Desktop":"")),b(v,"class","LimitInputText"),b(x,"type","number"),b(x,"pattern","[0-9]*"),b(g,"class","LimitAmountInputWrapper"),b($,"class","LimitSubmitButton"),b($,"type","button"),$.disabled=!0,b(s,"class","LimitsInteractionArea "+(e[13]?"Desktop":"")),b(i,"class","LimitsPageContainer"),b(t,"class","player-account-gaming-limits-page-2-gm16")},m(n,u){c(n,t,u),l(t,i),l(i,r);for(let e=0;e<C.length;e+=1)C[e].m(r,null);l(i,o),l(i,s),O&&O.m(s,null),l(s,a),N&&N.m(s,null),l(s,m),l(s,g),l(g,v),l(v,w),l(g,_),l(g,x),T(x,e[3]),l(s,A),l(s,$),l($,S),e[33]($),P||(B=[y(x,"input",e[32]),y(x,"keyup",e[17]),y($,"click",e[16]),y(s,"submit",e[16])],P=!0)},p(e,t){if(290816&t[0]){let i;for(D=e[14],i=0;i<D.length;i+=1){const n=Jn(e,D,i);C[i]?C[i].p(n,t):(C[i]=mr(n),C[i].c(),C[i].m(r,null))}for(;i<C.length;i+=1)C[i].d(1);C.length=D.length}e[5]?O?O.p(e,t):(O=dr(e),O.c(),O.m(s,a)):O&&(O.d(1),O=null),e[6]?N?N.p(e,t):(N=gr(e),N.c(),N.m(s,m)):N&&(N.d(1),N=null),4164&t[0]&&H!==(H=e[6]?`${e[12]("gamingLimits.amount")}`:`${e[12]("gamingLimits.new")} ${e[12](`gamingLimits.${e[2]}`)} ${e[12]("gamingLimits.limit")}`)&&E(w,H),8&t[0]&&L(x.value)!==e[3]&&T(x,e[3]),4096&t[0]&&I!==(I=e[12]("gamingLimits.setLimit")+"")&&E(S,I)},d(i){i&&u(t),h(C,i),O&&O.d(),N&&N.d(),e[33](null),P=!1,n(B)}}}function rr(t){let i;return{c(){i=p("p"),i.textContent="500 Server error"},m(e,t){c(e,i,t)},p:e,d(e){e&&u(i)}}}function or(t){return{c:e,m:e,p:e,d:e}}function sr(t){let i;return{c(){i=p("div"),b(i,"class","LoadingIndicator")},m(e,t){c(e,i,t)},p:e,d(e){e&&u(i)}}}function ar(e){let t,i,n,r,o=e[12]("gamingLimits.noLimitText")+"";return{c(){t=p("div"),i=p("div"),n=p("div"),r=d(o),b(n,"class","LimitDetailsTextWrapper"),b(i,"class","LimitDetailsWrapper"),b(t,"class","LimitDetails")},m(e,o){c(e,t,o),l(t,i),l(i,n),l(n,r)},p(e,t){4096&t[0]&&o!==(o=e[12]("gamingLimits.noLimitText")+"")&&E(r,o)},d(e){e&&u(t)}}}function lr(e){let t,i,n,r,o=e[12]("gamingLimits.lugasPrivacy")+"";return{c(){t=p("div"),i=p("div"),n=p("div"),r=d(o),b(n,"class","LimitDetailsTextWrapper"),b(i,"class","LimitDetailsWrapper"),b(t,"class","LimitDetails")},m(e,o){c(e,t,o),l(t,i),l(i,n),l(n,r)},p(e,t){4096&t[0]&&o!==(o=e[12]("gamingLimits.lugasPrivacy")+"")&&E(r,o)},d(e){e&&u(t)}}}function cr(e){let t,i=e[57].currentLimits,n=[];for(let t=0;t<i.length;t+=1)n[t]=pr(Qn(e,i,t));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();t=g()},m(e,i){for(let t=0;t<n.length;t+=1)n[t].m(e,i);c(e,t,i)},p(e,r){if(282624&r[0]){let o;for(i=e[57].currentLimits,o=0;o<i.length;o+=1){const s=Qn(e,i,o);n[o]?n[o].p(s,r):(n[o]=pr(s),n[o].c(),n[o].m(t.parentNode,t))}for(;o<n.length;o+=1)n[o].d(1);n.length=i.length}},d(e){h(n,e),e&&u(t)}}}function ur(e){let t,i,n=`${e[12]("gamingLimits.removedLimitText")} ${e[62].expiryDate}`;return{c(){t=p("div"),i=d(n),b(t,"class","PendingLimit")},m(e,n){c(e,t,n),l(t,i)},p(e,t){4096&t[0]&&n!==(n=`${e[12]("gamingLimits.removedLimitText")} ${e[62].expiryDate}`)&&E(i,n)},d(e){e&&u(t)}}}function hr(e){let t,i,n=`${e[62].updateAmount}${e[62].currency} ${"None"===e[62].period?" ":e[12]("gamingLimits.per")} ${e[12](`gamingLimits.${e[62].period}`)} ${e[12]("gamingLimits.updateText")} ${e[62].expiryDate}`;return{c(){t=p("div"),i=d(n),b(t,"class","PendingLimit")},m(e,n){c(e,t,n),l(t,i)},p(e,t){4096&t[0]&&n!==(n=`${e[62].updateAmount}${e[62].currency} ${"None"===e[62].period?" ":e[12]("gamingLimits.per")} ${e[12](`gamingLimits.${e[62].period}`)} ${e[12]("gamingLimits.updateText")} ${e[62].expiryDate}`)&&E(i,n)},d(e){e&&u(t)}}}function pr(e){let t,i,n,r,o,s,a,h=`${e[62].amount}${e[62].currency} ${"None"===e[62].period?" ":e[12]("gamingLimits.per")} ${e[12](`gamingLimits.${e[62].period}`)}`;let m=function(e,t){return e[62].isModified&&+e[62].updateAmount>0?hr:e[62].isModified?ur:void 0}(e),g=m&&m(e),v=!e[62].isModified&&function(e){let t,i,n,r,o=e[12]("gamingLimits.removeLimit")+"";function s(){return e[29](e[62])}return{c(){t=p("button"),i=d(o),b(t,"class","RemoveLimitButton")},m(e,o){c(e,t,o),l(t,i),n||(r=y(t,"click",s),n=!0)},p(t,n){e=t,4096&n[0]&&o!==(o=e[12]("gamingLimits.removeLimit")+"")&&E(i,o)},d(e){e&&u(t),n=!1,r()}}}(e);return{c(){t=p("div"),i=p("div"),n=p("div"),r=d(h),o=f(),g&&g.c(),s=f(),v&&v.c(),a=f(),b(n,"class","CurrentLimit"),b(i,"class","LimitDetailsTextWrapper"),b(t,"class","LimitDetails")},m(e,u){c(e,t,u),l(t,i),l(i,n),l(n,r),l(i,o),g&&g.m(i,null),l(t,s),v&&v.m(t,null),l(t,a)},p(e,t){4096&t[0]&&h!==(h=`${e[62].amount}${e[62].currency} ${"None"===e[62].period?" ":e[12]("gamingLimits.per")} ${e[12](`gamingLimits.${e[62].period}`)}`)&&E(r,h),g&&g.p(e,t),e[62].isModified||v.p(e,t)},d(e){e&&u(t),g&&g.d(),v&&v.d()}}}function mr(e){let t,i,n,r,o,s,a=e[12](`gamingLimits.${e[57].value}`)+"";let h=function(e,t){return e[57].currentLimits.length>0?cr:"lugas"===e[57].value?lr:ar}(e),m=h(e);return{c(){t=p("div"),i=p("p"),n=d(a),r=f(),m.c(),o=f(),b(i,"class","LimitTitle"),b(t,"class",s="LimitWrapper "+(e[13]?"Desktop":""))},m(e,s){c(e,t,s),l(t,i),l(i,n),l(t,r),m.m(t,null),l(t,o)},p(e,t){4096&t[0]&&a!==(a=e[12](`gamingLimits.${e[57].value}`)+"")&&E(n,a),m.p(e,t)},d(e){e&&u(t),m.d()}}}function dr(e){let t,i,r,o,s,a,m,g=e[12]("gamingLimits.limitType")+"",v=e[14],L=[];for(let t=0;t<v.length;t+=1)L[t]=fr(qn(e,v,t));return{c(){t=p("label"),i=p("span"),r=d(g),o=f(),s=p("select");for(let e=0;e<L.length;e+=1)L[e].c();b(i,"class","LimitSelectText"),b(s,"name",""),b(s,"id",""),void 0===e[1]&&N((()=>e[30].call(s))),b(t,"class","LimitTypeDropdownWrapper")},m(n,u){c(n,t,u),l(t,i),l(i,r),l(t,o),l(t,s);for(let e=0;e<L.length;e+=1)L[e].m(s,null);_(s,e[1]),a||(m=[y(s,"change",e[30]),y(s,"change",e[15])],a=!0)},p(e,t){if(4096&t[0]&&g!==(g=e[12]("gamingLimits.limitType")+"")&&E(r,g),16384&t[0]){let i;for(v=e[14],i=0;i<v.length;i+=1){const n=qn(e,v,i);L[i]?L[i].p(n,t):(L[i]=fr(n),L[i].c(),L[i].m(s,null))}for(;i<L.length;i+=1)L[i].d(1);L.length=v.length}16386&t[0]&&_(s,e[1])},d(e){e&&u(t),h(L,e),a=!1,n(m)}}}function fr(t){let i,n,r,o=t[57].title+"";return{c(){i=p("option"),n=d(o),i.__value=r=t[57].value,i.value=i.__value},m(e,t){c(e,i,t),l(i,n)},p:e,d(e){e&&u(i)}}}function gr(e){let t,i,n,r,o,s,a,m=e[12]("gamingLimits.period")+"",g=Kn[e[1]].periods,v=[];for(let t=0;t<g.length;t+=1)v[t]=yr(Zn(e,g,t));return{c(){t=p("label"),i=p("span"),n=d(m),r=f(),o=p("select");for(let e=0;e<v.length;e+=1)v[e].c();b(i,"class","PeriodSelectText"),b(o,"name",""),b(o,"id",""),void 0===e[2]&&N((()=>e[31].call(o))),b(t,"class","LimitPeriodDropdownWrapper")},m(u,h){c(u,t,h),l(t,i),l(i,n),l(t,r),l(t,o);for(let e=0;e<v.length;e+=1)v[e].m(o,null);_(o,e[2]),s||(a=y(o,"change",e[31]),s=!0)},p(e,t){if(4096&t[0]&&m!==(m=e[12]("gamingLimits.period")+"")&&E(n,m),4098&t[0]){let i;for(g=Kn[e[1]].periods,i=0;i<g.length;i+=1){const n=Zn(e,g,i);v[i]?v[i].p(n,t):(v[i]=yr(n),v[i].c(),v[i].m(o,null))}for(;i<v.length;i+=1)v[i].d(1);v.length=g.length}6&t[0]&&_(o,e[2])},d(e){e&&u(t),h(v,e),s=!1,a()}}}function yr(e){let t,i,n,r,o,s=e[12]("gamingLimits.per")+"",a=e[12](`gamingLimits.${e[54]}`)+"";return{c(){t=p("option"),i=d(s),n=f(),r=d(a),t.__value=o=e[54],t.value=t.__value,t.selected=!0},m(e,o){c(e,t,o),l(t,i),l(t,n),l(t,r)},p(e,n){4096&n[0]&&s!==(s=e[12]("gamingLimits.per")+"")&&E(i,s),4098&n[0]&&a!==(a=e[12](`gamingLimits.${e[54]}`)+"")&&E(r,a),16386&n[0]&&o!==(o=e[54])&&(t.__value=o,t.value=t.__value)},d(e){e&&u(t)}}}function br(t){let i,n,r=t[9]&&er(t);function o(e,t){return e[7]&&!e[9]?sr:e[7]?or:e[8]?rr:nr}let s=o(t),a=s(t);return{c(){i=p("div"),r&&r.c(),n=f(),a.c(),this.c=e},m(e,o){c(e,i,o),r&&r.m(i,null),l(i,n),a.m(i,null),t[34](i)},p(e,t){e[9]?r?r.p(e,t):(r=er(e),r.c(),r.m(i,n)):r&&(r.d(1),r=null),s===(s=o(e))&&a?a.p(e,t):(a.d(1),a=s(e),a&&(a.c(),a.m(i,null)))},i:e,o:e,d(e){e&&u(i),r&&r.d(),a.d(),t[34](null)}}}function vr(e,t,i){let n;a(e,pi,(e=>i(12,n=e)));let r,o,s,l,{lang:c="en"}=t,{currency:u=""}=t,{limits:h=""}=t,{session:p=""}=t,{userid:m=""}=t,{endpoint:d=""}=t,{apiversion:f=""}=t,{clientstyling:g=""}=t,{clientstylingurl:y=""}=t,b=window.navigator.userAgent,v=!Tn(b),E=[],T="",w="",_=!1,A=!1,$=!0,S=!1,P=!1,B=!1,I="";const D={EUR:"€",RON:" lei",USD:"$"};Object.keys(Yn).forEach((e=>{!function(e,t){Ut(e,t)}(e,Yn[e])}));const C=()=>{let e=new URL(`v1/player/${m}/limits/monetary`,d),t={method:"GET",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"}};fetch(e.href,t).then((e=>{if(e.status>=300)throw i(7,$=!1),i(8,S=!0),new Error("There was an error fetching the limits");return e.json()})).then((e=>{l=e,P&&M(),"gmcore"===f&&O(l),"gm16"===f&&N(l),i(3,o=null)})).catch((e=>{console.error("Error LimitsWidget: ",e),i(8,S=!0)})).finally((()=>{i(7,$=!1)}))},O=e=>{E.forEach((t=>{var i;t.currentLimits=[],null===(i=e[Kn[t.value].callValue])||void 0===i||i.forEach(((i,n)=>{var r;const o=e[Kn[t.value].callValue][n];t.currentLimits.push({}),t.currentLimits[n].limitType=t.value,t.currentLimits[n].amount=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(o.amount),t.currentLimits[n].currency=null!==(r=D[o.currency])&&void 0!==r?r:o.currency,t.currentLimits[n].period=o.period,t.currentLimits[n].updateAmount=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(o.updateAmount),t.currentLimits[n].isModified=o.isModified,t.currentLimits[n].expiryDate=`${new Date(o.expiryDate).toLocaleDateString("en-de",{hour:"numeric",minute:"numeric"}).replaceAll("/",".")} (GMT)`})),t.currentLimits=R(t.currentLimits)}))},N=e=>{E.forEach((t=>{var i;t.currentLimits=[];for(const n of e.limits){if(n.type!==t.callValue16)continue;const e=n;t.currentLimits.push({limitType:t.value,amount:Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(e.amount),currency:null!==(i=D[e.currency])&&void 0!==i?i:e.currency,isModified:e.schedules.length>0,period:e.period,updateAmount:e.schedules.length>0?Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(e.schedules[0].updateAmount):"",expiryDate:e.schedules.length>0?`${new Date(e.schedules[0].applyAt).toLocaleDateString("en-de",{hour:"numeric",minute:"numeric"}).replaceAll("/",".")} (GMT)`:"",id:e.id})}t.currentLimits=R(t.currentLimits)}))},R=e=>{const t={Daily:0,Weekly:1,Monthly:2};return e.sort(((e,i)=>t[e.period]-t[i.period])),e},M=()=>{switch(f){case"gmcore":(()=>{if(l){const e=l[Kn[T].callValue].filter((e=>e.period===w))[0],t=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(e.amount);let r=n("gamingLimits.popupImmediateUpdate").replace("{selectedLimit}",n(`gamingLimits.${T}`).toLowerCase()).replace("{updatedAmount}",t).replace("{currency}",D[e.currency]||e.currency).replace("{per}","None"===e.period?" ":n("gamingLimits.per")).replace("{selectedPeriod}",n(`gamingLimits.${w}`).toLowerCase());i(11,I=e.isModified?`${n("gamingLimits.popupPendingUpdate")} ${new Date(e.expiryDate).toLocaleDateString("en-de",{hour:"numeric",minute:"numeric"}).replaceAll("/",".")} (GMT)`:r)}i(10,B=!0)})();break;case"gm16":"lugas"===T?(i(11,I="Your LUGAS update request has been received."),i(10,B=!0)):(()=>{if(l){const e=l.limits.filter((e=>e.type===Kn[T].callValue16&&e.period===w))[0],t=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(e.amount),r=e.schedules.length>0?`${new Date(e.schedules[0].applyAt).toLocaleDateString("en-de",{hour:"numeric",minute:"numeric"}).replaceAll("/",".")} (GMT)`:"";let o=n("gamingLimits.popupImmediateUpdate").replace("{selectedLimit}",n(`gamingLimits.${T}`).toLowerCase()).replace("{updatedAmount}",t).replace("{currency}",D[e.currency]||e.currency).replace("{per}","None"===e.period?" ":n("gamingLimits.per")).replace("{selectedPeriod}",n(`gamingLimits.${w}`).toLowerCase());i(11,I=e.schedules.length>0?`${n("gamingLimits.popupPendingUpdate")} ${r}`:o)}i(10,B=!0)})();break;default:throw new Error(`Invalid apiversion attribute: ${f}`)}},U=e=>{const t=new URL(`/v1/player/${m}/limits/monetary/${e.id}`,d);i(9,P=!0),i(7,$=!0);let n={method:"DELETE",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"}};fetch(t.href,n).then((e=>e.json())).then((e=>C())).catch((e=>{console.log(e),i(8,S=!0)}))},k=()=>{var e;e=c,ei.set(e)};return e.$$set=e=>{"lang"in e&&i(20,c=e.lang),"currency"in e&&i(21,u=e.currency),"limits"in e&&i(22,h=e.limits),"session"in e&&i(23,p=e.session),"userid"in e&&i(24,m=e.userid),"endpoint"in e&&i(25,d=e.endpoint),"apiversion"in e&&i(26,f=e.apiversion),"clientstyling"in e&&i(27,g=e.clientstyling),"clientstylingurl"in e&&i(28,y=e.clientstylingurl)},e.$$.update=()=>{4194304&e.$$.dirty[0]&&h&&(h.split(" ").forEach((e=>{Kn[e]?E.push(Kn[e]):console.error(`Unknown limit: ${e}`)})),i(1,T=E[0].value),i(2,w=Kn[T].periods[0]),i(5,_=E.length>1),i(6,A=Kn[T].periods.length>1)),1048576&e.$$.dirty[0]&&c&&k(),125829120&e.$$.dirty[0]&&m&&p&&d&&f&&C(),268435456&e.$$.dirty[0]&&y&&(()=>{let e=new URL(y),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,r&&setTimeout((()=>{r.appendChild(t)}),1)}))})(),134217728&e.$$.dirty[0]&&g&&(()=>{let e=document.createElement("style");e.innerHTML=g,r.appendChild(e)})()},[r,T,w,o,s,_,A,$,S,P,B,I,n,v,E,()=>{i(2,w=Kn[T].periods[0]),i(6,A=Kn[T].periods.length>1)},()=>{switch(f){case"gmcore":(()=>{if(!(o>0))return;i(9,P=!0),i(7,$=!0);let e=new URL(`v2/player/${m}/limits`,d);const t={};t[Kn[T].callValue]=[{period:"None"===Kn[T].periods[0]?null:w,amount:o,currency:u}];let n={method:"PUT",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(t)};fetch(e.href,n).then((e=>e.json())).then((e=>{C()})).catch((e=>{console.log(e),i(8,S=!0)}))})();break;case"gm16":"lugas"===T?(()=>{if(!(o>0))return;i(9,P=!0),i(7,$=!0);const e=new URL(`v1/player/${m}/limit/lugas`,d),t={amount:o};let n={method:"PUT",headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(t)};fetch(e.href,n).then((e=>e.json())).then((e=>{C()})).catch((e=>{console.log(e),i(8,S=!0)}))})():(()=>{if(!(o>0))return;i(9,P=!0),i(7,$=!0);const e=E.filter((e=>e.value===T))[0].currentLimits.filter((e=>e.period===w))[0],t=new URL(`v1/player/${m}/limits/monetary/${e?e.id:""}`,d),n=e?"PUT":"POST",r=e?{amount:o,skipCoolOff:!1}:{amount:o,currency:u,period:"None"===Kn[T].periods[0]?null:w,type:Kn[T].callValue16,products:["All"],walletTypes:["All"]};let s={method:n,headers:{"X-SessionID":p,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)};fetch(t.href,s).then((e=>e.json())).then((e=>{C()})).catch((e=>{console.log(e),i(8,S=!0)}))})();break;default:throw Error(`Invalid apiversion attribute: ${f}`)}},()=>{const e=999999999999999;o>e&&i(3,o=e);const t=o-Math.floor(o)==0;o>0&&t?s.removeAttribute("disabled"):s.setAttribute("disabled","true")},U,()=>{i(10,B=i(9,P=!1))},c,u,h,p,m,d,f,g,y,e=>U(e),function(){T=x(this),i(1,T),i(14,E)},function(){w=x(this),i(2,w),i(1,T)},function(){o=L(this.value),i(3,o)},function(e){H[e?"unshift":"push"]((()=>{s=e,i(4,s)}))},function(e){H[e?"unshift":"push"]((()=>{r=e,i(0,r)}))}]}!customElements.get("player-account-gaming-limits-page-2-gm16")&&customElements.define("player-account-gaming-limits-page-2-gm16",class extends W{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';font-size:1.3rem}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}select,input{width:100%;height:38px;padding:8px 4px;padding-right:8px;margin:12px 0;border-radius:2px;border:1px solid #999}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-page-2-gm16{background:#E8E9EB;color:var(--emfe-w-color-white, #333)}.LimitsInteractionArea{display:flex;flex-direction:column;margin-top:12px}.LimitsInteractionArea.Desktop{width:63%;padding:0 12px;margin:0 auto}.LimitsList.Desktop{display:flex;flex-wrap:wrap;justify-content:space-between;width:63%;margin:0 auto}.LimitWrapper{background:var(--emfe-w-color-white, #fff);font-size:1.3rem;border:1px solid #ccc;padding:8px 12px;border-radius:4px}.LimitWrapper:not(:first-child){margin-top:12px}.LimitWrapper.Desktop{width:45%;margin:12px}.LimitSubmitButton,.ConfirmButton{background:#7ac317;color:#fff;border:0;border-radius:2px;padding:12px;cursor:pointer}.LimitSubmitButton:disabled,.ConfirmButton:disabled{background:rgba(116, 180, 27, 0.322);cursor:not-allowed}.LimitDetails{padding:12px 0 12px 4px}.LimitDetails:not(:last-child){border-bottom:#ccc 1px solid}.LimitDetailsTextWrapper{font-size:1.3rem;color:#666}.PendingLimit{color:#999}.LimitTitle{font-size:0.9rem}.PopupOverlay{position:absolute;top:0;left:0;background:#000;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center}.PopupContainer{background:#fff;font-size:1rem;color:#333;width:80vw;height:350px;padding:12px;border-radius:4px;display:flex;flex-direction:column;justify-content:space-between}.PopupContainer.Desktop{width:30vw}.PopupTitleWrapper{display:flex;justify-content:space-between;font-size:1.3rem}.PopupTitleWrapper button{background:#fff;font-size:1rem;border:0;cursor:pointer}.DescriptionParagraph{text-align:center;font-size:1.3rem;padding:12px}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.LimitDetails{display:flex;justify-content:space-between;align-items:center}.RemoveLimitButton{height:28px;font-size:0.7rem;background:#fff;color:#666;border:1px solid #ccc;border-radius:4px;padding:0 4px;cursor:pointer}.RemoveLimitButton:hover{background:#f3f3fc}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.LoadingIndicator{width:100px;height:100px;margin:110px auto 0;border:solid 10px #7ac317;border-radius:50%;border-right-color:transparent;border-bottom-color:transparent;-webkit-transition:all 0.5s ease-in;-webkit-animation-name:rotate;-webkit-animation-duration:1.0s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear;transition:all 0.5s ease-in;animation-name:rotate;animation-duration:1.0s;animation-iteration-count:infinite;animation-timing-function:linear}</style>",F(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},vr,br,o,{lang:20,currency:21,limits:22,session:23,userid:24,endpoint:25,apiversion:26,clientstyling:27,clientstylingurl:28},null,[-1,-1,-1]),e&&(e.target&&c(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["lang","currency","limits","session","userid","endpoint","apiversion","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[20]}set lang(e){this.$$set({lang:e}),U()}get currency(){return this.$$.ctx[21]}set currency(e){this.$$set({currency:e}),U()}get limits(){return this.$$.ctx[22]}set limits(e){this.$$set({limits:e}),U()}get session(){return this.$$.ctx[23]}set session(e){this.$$set({session:e}),U()}get userid(){return this.$$.ctx[24]}set userid(e){this.$$set({userid:e}),U()}get endpoint(){return this.$$.ctx[25]}set endpoint(e){this.$$set({endpoint:e}),U()}get apiversion(){return this.$$.ctx[26]}set apiversion(e){this.$$set({apiversion:e}),U()}get clientstyling(){return this.$$.ctx[27]}set clientstyling(e){this.$$set({clientstyling:e}),U()}get clientstylingurl(){return this.$$.ctx[28]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),U()}});const Lr={en:{history:{expandLimits:"LIMIT HISTORY",daily:"per day",weekly:"per week",monthly:"per month",loss:"Loss Limit",deposit:"Deposit Limit",wagering:"Wagering Limit",loading:"Loading limits history...",error:"500 - Server Error",limitRemoved:"Limit removed"}},zh:{history:{expandLimits:"极限历史",daily:"每天",weekly:"每个星期",monthly:"每月",loss:"损失限额",deposit:"存款限额",wagering:"投注限额",loading:"加载请稍候...",error:"500 - 服务器错误",limitRemoved:"移除限制"}},fr:{history:{expandLimits:"LIMITER L'HISTORIQUE",daily:"par jour",weekly:"par semaine",monthly:"par mois",loss:"Limite de perte",deposit:"Limite de dépôt",wagering:"Limite de mise",loading:"Chargement, veuillez patienter...",error:"500 - Erreur de serveur",limitRemoved:"Limite supprimée"}},ro:{history:{expandLimits:"ISTORIC LIMITE",daily:"pe zi",weekly:"pe saptamana",monthly:"pe luna",loss:"Limita de pierdere",deposit:"Limita de incarcare",loading:"Se incarca, va rugam asteptati...",error:"500 - Eroare de server",limitRemoved:"Limita eliminata"}}};function Er(e,t,i){const n=e.slice();return n[25]=t[i],n}function Tr(e){let t,i,n,r,o,s,a,g,v,L,T,w,_=e[7]("history.expandLimits")+"",x=e[4],$=[];for(let t=0;t<x.length;t+=1)$[t]=$r(Er(e,x,t));return{c(){t=p("div"),i=p("div"),n=p("button"),r=d(_),o=f(),s=m("svg"),a=m("path"),g=m("path"),v=f(),L=p("div");for(let e=0;e<$.length;e+=1)$[e].c();b(a,"d","M10.5 15l7.5 7.5 7.5-7.5z"),b(g,"d","M0 0h36v36h-36z"),b(g,"fill","none"),b(s,"class","ExpandArrow"),b(s,"xmlns","http://www.w3.org/2000/svg"),b(s,"width","36"),b(s,"height","36"),b(s,"viewBox","0 0 36 36"),b(s,"fill","#999"),A(s,"extended",e[6]),b(n,"class","ExpandButton"),b(L,"class","HistoryDisplayArea"),A(L,"hidden",e[5]),b(i,"class","HistoryWrapper "+(e[8]?"Desktop":"")),b(t,"class","player-account-gaming-limits-history-2")},m(u,h){c(u,t,h),l(t,i),l(i,n),l(n,r),l(n,o),l(n,s),l(s,a),l(s,g),l(i,v),l(i,L);for(let e=0;e<$.length;e+=1)$[e].m(L,null);T||(w=y(n,"click",e[9]),T=!0)},p(e,t){if(128&t&&_!==(_=e[7]("history.expandLimits")+"")&&E(r,_),64&t&&A(s,"extended",e[6]),144&t){let i;for(x=e[4],i=0;i<x.length;i+=1){const n=Er(e,x,i);$[i]?$[i].p(n,t):($[i]=$r(n),$[i].c(),$[i].m(L,null))}for(;i<$.length;i+=1)$[i].d(1);$.length=x.length}32&t&&A(L,"hidden",e[5])},d(e){e&&u(t),h($,e),T=!1,w()}}}function wr(t){return{c:e,m:e,p:e,d:e}}function _r(e){let t,i,n=(e[0]?e[7]("history.error"):"500 Server Error")+"";return{c(){t=p("p"),i=d(n)},m(e,n){c(e,t,n),l(t,i)},p(e,t){129&t&&n!==(n=(e[0]?e[7]("history.error"):"500 Server Error")+"")&&E(i,n)},d(e){e&&u(t)}}}function xr(e){let t,i,n,r,o,s,a,h,m,g,y,v,L=e[25].type+"",T=e[25].amount+"",w=e[25].currency+"",_=e[25].period+"",x=e[25].date+"";return{c(){t=p("div"),i=p("span"),n=p("span"),r=d(L),o=p("span"),s=d(T),a=f(),h=d(w),m=f(),g=d(_),y=p("span"),v=d(x),b(n,"class","LimitType"),b(o,"class","LimitAmountPeriod"),b(i,"class","GeneralLimitInformation"),b(y,"class","DateLimitInformation"),b(t,"class","HistoryRow")},m(e,u){c(e,t,u),l(t,i),l(i,n),l(n,r),l(i,o),l(o,s),l(o,a),l(o,h),l(o,m),l(o,g),l(t,y),l(y,v)},p(e,t){16&t&&L!==(L=e[25].type+"")&&E(r,L),16&t&&T!==(T=e[25].amount+"")&&E(s,T),16&t&&w!==(w=e[25].currency+"")&&E(h,w),16&t&&_!==(_=e[25].period+"")&&E(g,_),16&t&&x!==(x=e[25].date+"")&&E(v,x)},d(e){e&&u(t)}}}function Ar(e){let t,i,n,r,o,s,a,h,m=e[25].type+"",f=e[7]("history.limitRemoved")+"",g=e[25].date+"";return{c(){t=p("div"),i=p("span"),n=p("span"),r=d(m),o=p("span"),s=d(f),a=p("span"),h=d(g),b(n,"class","LimitType"),b(o,"class","LimitAmountPeriod"),b(i,"class","GeneralLimitInformation"),b(a,"class","DateLimitInformation"),b(t,"class","HistoryRow")},m(e,u){c(e,t,u),l(t,i),l(i,n),l(n,r),l(i,o),l(o,s),l(t,a),l(a,h)},p(e,t){16&t&&m!==(m=e[25].type+"")&&E(r,m),128&t&&f!==(f=e[7]("history.limitRemoved")+"")&&E(s,f),16&t&&g!==(g=e[25].date+"")&&E(h,g)},d(e){e&&u(t)}}}function $r(e){let t;function i(e,t){return e[25].removed?Ar:xr}let n=i(e),r=n(e);return{c(){r.c(),t=g()},m(e,i){r.m(e,i),c(e,t,i)},p(e,o){n===(n=i(e))&&r?r.p(e,o):(r.d(1),r=n(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&u(t)}}}function Sr(t){let i;function n(e,t){return e[2]?_r:e[3]?wr:Tr}let r=n(t),o=r(t);return{c(){i=p("div"),o.c(),this.c=e},m(e,n){c(e,i,n),o.m(i,null),t[16](i)},p(e,[t]){r===(r=n(e))&&o?o.p(e,t):(o.d(1),o=r(e),o&&(o.c(),o.m(i,null)))},i:e,o:e,d(e){e&&u(i),o.d(),t[16](null)}}}function Pr(e,t,i){let n;a(e,pi,(e=>i(7,n=e)));let r,o=window.navigator.userAgent,s=!Tn(o),{lang:l=""}=t,{userid:c=""}=t,{session:u=""}=t,{endpoint:h=""}=t,{apiversion:p=""}=t,{clientstyling:m=""}=t,{clientstylingurl:d=""}=t,f=!1,g=!0,y=[],b=!0,v=!1,L={EUR:"€",RON:"lei"};Object.keys(Lr).forEach((e=>{!function(e,t){Ut(e,t)}(e,Lr[e])}));const E=e=>{const t=!!Lr[l];return e.map((e=>{let i={amount:"",currency:"",date:"",period:"",type:"",removed:!1};return i.amount=Intl.NumberFormat("en-US",{maximumFractionDigits:0}).format(e.limitAmount),i.currency=t?L[e.limitCurrencyCode]:e.limitCurrencyCode,i.date=new Intl.DateTimeFormat("de",{dateStyle:"medium"}).format(new Date(e.limitDate)),i.period=n(`history.${e.limitPeriod.toLowerCase()}`),i.type=n(`history.${e.limitType.split(" ")[0].toLowerCase()}`),i.removed=-1===e.limitAmount,i}))},T=()=>{var e;e=l,ei.set(e)};return e.$$set=e=>{"lang"in e&&i(0,l=e.lang),"userid"in e&&i(10,c=e.userid),"session"in e&&i(11,u=e.session),"endpoint"in e&&i(12,h=e.endpoint),"apiversion"in e&&i(13,p=e.apiversion),"clientstyling"in e&&i(14,m=e.clientstyling),"clientstylingurl"in e&&i(15,d=e.clientstylingurl)},e.$$.update=()=>{15360&e.$$.dirty&&h&&c&&u&&p&&(()=>{let e=new URL("gmcore"===p?`v2/player/${c}/transactions/limit`:`v1/player/${c}/limits/monetary/history`,h);console.log("HERE!",e.href),e.searchParams.append("startDate","1970"),e.searchParams.append("endDate","2099");let t={method:"GET",headers:{"X-SessionID":u}};fetch(e.href,t).then((e=>{if(e.status>=300)throw i(3,g=!1),i(2,f=!0),new Error("There was an error fetching the limits");return e.json()})).then((e=>{e.length&&i(4,y=E(e)),i(3,g=!1)}),(e=>{console.error("There was an error",e),i(2,f=!0)}))})(),1&e.$$.dirty&&l&&T(),32768&e.$$.dirty&&d&&(()=>{let e=new URL(d),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,r&&(setTimeout((()=>{r.appendChild(t)}),1),setTimeout((()=>{}),500))}))})(),16384&e.$$.dirty&&m&&(()=>{let e=document.createElement("style");e.innerHTML=m,r.appendChild(e)})()},[l,r,f,g,y,b,v,n,s,()=>{i(5,b=!b),i(6,v=!v)},c,u,h,p,m,d,function(e){H[e?"unshift":"push"]((()=>{r=e,i(1,r)}))}]}function Br(e,t,i){const n=e.slice();return n[25]=t[i],n}function Hr(e,t,i){const n=e.slice();return n[28]=t[i],n[30]=i,n}function Ir(e){let t,i,n,r,o=e[10].length>1&&Cr(e),s=e[10],a=[];for(let t=0;t<s.length;t+=1)a[t]=Mr(Br(e,s,t));let l="true"===e[6]&&Ur(e);return{c(){o&&o.c(),t=f(),i=p("div");for(let e=0;e<a.length;e+=1)a[e].c();n=f(),l&&l.c(),r=g(),b(i,"class","player-account-gaming-limits-wrapper-2")},m(s,u){o&&o.m(s,u),c(s,t,u),c(s,i,u);for(let e=0;e<a.length;e+=1)a[e].m(i,null);e[20](i),c(s,n,u),l&&l.m(s,u),c(s,r,u)},p(e,n){if(e[10].length>1?o?o.p(e,n):(o=Cr(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null),1087&n){let t;for(s=e[10],t=0;t<s.length;t+=1){const r=Br(e,s,t);a[t]?a[t].p(r,n):(a[t]=Mr(r),a[t].c(),a[t].m(i,null))}for(;t<a.length;t+=1)a[t].d(1);a.length=s.length}"true"===e[6]?l?l.p(e,n):(l=Ur(e),l.c(),l.m(r.parentNode,r)):l&&(l.d(1),l=null)},d(s){o&&o.d(s),s&&u(t),s&&u(i),h(a,s),e[20](null),s&&u(n),l&&l.d(s),s&&u(r)}}}function Dr(t){return{c:e,m:e,p:e,d:e}}function Cr(e){let t,i=e[10],n=[];for(let t=0;t<i.length;t+=1)n[t]=Or(Hr(e,i,t));return{c(){t=p("div");for(let e=0;e<n.length;e+=1)n[e].c();b(t,"class","TabsContainer")},m(i,r){c(i,t,r);for(let e=0;e<n.length;e+=1)n[e].m(t,null);e[19](t)},p(e,r){if(11264&r){let o;for(i=e[10],o=0;o<i.length;o+=1){const s=Hr(e,i,o);n[o]?n[o].p(s,r):(n[o]=Or(s),n[o].c(),n[o].m(t,null))}for(;o<n.length;o+=1)n[o].d(1);n.length=i.length}},d(i){i&&u(t),h(n,i),e[19](null)}}}function Or(e){let t,i,n,r,o=(e[11][e[30]]??e[28])+"";function s(){return e[18](e[30])}return{c(){t=p("div"),i=d(o),b(t,"class","LimitsTab"),w(t,"width",100/e[10].length+"%")},m(e,o){c(e,t,o),l(t,i),n||(r=y(t,"click",s),n=!0)},p(n,r){e=n,3072&r&&o!==(o=(e[11][e[30]]??e[28])+"")&&E(i,o),1024&r&&w(t,"width",100/e[10].length+"%")},d(e){e&&u(t),n=!1,r()}}}function Nr(e){let t,i;return{c(){t=p("player-account-gaming-limits-page-2-gm16"),v(t,"class","hidden selected"),v(t,"lang",e[0]),v(t,"currency",e[4]),v(t,"limits",i=e[25]),v(t,"userid",e[1]),v(t,"session",e[2]),v(t,"endpoint",e[3]),v(t,"apiversion",e[5])},m(e,i){c(e,t,i)},p(e,n){1&n&&v(t,"lang",e[0]),16&n&&v(t,"currency",e[4]),1024&n&&i!==(i=e[25])&&v(t,"limits",i),2&n&&v(t,"userid",e[1]),4&n&&v(t,"session",e[2]),8&n&&v(t,"endpoint",e[3]),32&n&&v(t,"apiversion",e[5])},d(e){e&&u(t)}}}function Rr(e){let t,i;return{c(){t=p("player-account-gaming-limits-page-2-gmcore"),v(t,"class","hidden selected"),v(t,"lang",e[0]),v(t,"currency",e[4]),v(t,"limits",i=e[25]),v(t,"userid",e[1]),v(t,"session",e[2]),v(t,"endpoint",e[3]),v(t,"apiversion",e[5])},m(e,i){c(e,t,i)},p(e,n){1&n&&v(t,"lang",e[0]),16&n&&v(t,"currency",e[4]),1024&n&&i!==(i=e[25])&&v(t,"limits",i),2&n&&v(t,"userid",e[1]),4&n&&v(t,"session",e[2]),8&n&&v(t,"endpoint",e[3]),32&n&&v(t,"apiversion",e[5])},d(e){e&&u(t)}}}function Mr(e){let t;function i(e,t){return"gmcore"==e[5]?Rr:Nr}let n=i(e),r=n(e);return{c(){r.c(),t=g()},m(e,i){r.m(e,i),c(e,t,i)},p(e,o){n===(n=i(e))&&r?r.p(e,o):(r.d(1),r=n(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&u(t)}}}function Ur(e){let t;return{c(){t=p("player-account-gaming-limits-history-2"),v(t,"lang",e[0]),v(t,"userid",e[1]),v(t,"session",e[2]),v(t,"endpoint",e[3])},m(e,i){c(e,t,i)},p(e,i){1&i&&v(t,"lang",e[0]),2&i&&v(t,"userid",e[1]),4&i&&v(t,"session",e[2]),8&i&&v(t,"endpoint",e[3])},d(e){e&&u(t)}}}function kr(t){let i;function n(e,t){return e[8]?Dr:Ir}let r=n(t),o=r(t);return{c(){i=p("div"),o.c(),this.c=e},m(e,n){c(e,i,n),o.m(i,null),t[21](i)},p(e,[t]){r===(r=n(e))&&o?o.p(e,t):(o.d(1),o=r(e),o&&(o.c(),o.m(i,null)))},i:e,o:e,d(e){e&&u(i),o.d(),t[21](null)}}}function Gr(e,t,i){let n,r,{lang:o=""}=t,{userid:s=""}=t,{session:a=""}=t,{endpoint:l=""}=t,{currency:c=""}=t,{apiversion:u=""}=t,{includedlimits:h=""}=t,{tablabels:p=""}=t,{historyenabled:m="true"}=t,{clientstyling:d=""}=t,{clientstylingurl:f=""}=t,g=!0,y=[],b="",v="";const L=e=>{if(b.children.length>0)for(let t=0;t<b.children.length;t++)e===t?(b.children[t].classList.remove("hidden"),null==v||v.children[t].classList.add("selected")):(b.children[t].classList.add("hidden"),null==v||v.children[t].classList.remove("selected"))};return e.$$set=e=>{"lang"in e&&i(0,o=e.lang),"userid"in e&&i(1,s=e.userid),"session"in e&&i(2,a=e.session),"endpoint"in e&&i(3,l=e.endpoint),"currency"in e&&i(4,c=e.currency),"apiversion"in e&&i(5,u=e.apiversion),"includedlimits"in e&&i(14,h=e.includedlimits),"tablabels"in e&&i(15,p=e.tablabels),"historyenabled"in e&&i(6,m=e.historyenabled),"clientstyling"in e&&i(16,d=e.clientstyling),"clientstylingurl"in e&&i(17,f=e.clientstylingurl)},e.$$.update=()=>{128&e.$$.dirty&&b&&L(0),131072&e.$$.dirty&&f&&(()=>{let e=new URL(f),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,n&&setTimeout((()=>{n.appendChild(t)}),1)}))})(),65536&e.$$.dirty&&d&&(()=>{let e=document.createElement("style");e.innerHTML=d,n.appendChild(e)})(),49166&e.$$.dirty&&s&&a&&l&&h&&p&&(i(10,y=h.split(",").map((e=>e.trim()))),i(11,r=p.split(",").map((e=>e.trim()))),i(8,g=!1))},[o,s,a,l,c,u,m,b,g,n,y,r,v,L,h,p,d,f,e=>L(e),function(e){H[e?"unshift":"push"]((()=>{v=e,i(12,v)}))},function(e){H[e?"unshift":"push"]((()=>{b=e,i(7,b)}))},function(e){H[e?"unshift":"push"]((()=>{n=e,i(9,n)}))}]}!customElements.get("player-account-gaming-limits-history-2")&&customElements.define("player-account-gaming-limits-history-2",class extends W{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';font-size:1.3rem}*,*::before,*::after{color:#555;margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.player-account-gaming-limits-history-2{color:var(--emfe-w-color-white, #FFFFFF)}button{font-size:1rem;border:0;padding:0}.ExpandButton{color:#999;display:flex;justify-content:center;align-items:center;margin-right:-14px;background:transparent}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.extended{transform:rotate(180deg)}.HistoryWrapper{display:flex;flex-direction:column}.HistoryWrapper.Desktop{width:63%;padding:0 12px;margin:12px auto}.hidden{display:none}.HistoryRow{padding:12px 0;display:flex;justify-content:space-between;align-items:center;border-bottom:#ccc 1px solid}.GeneralLimitInformation{display:flex;flex-direction:column;gap:4px}.LimitType{font-size:1.3rem}.LimitAmountPeriod{color:#999}</style>",F(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},Pr,Sr,o,{lang:0,userid:10,session:11,endpoint:12,apiversion:13,clientstyling:14,clientstylingurl:15},null),e&&(e.target&&c(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["lang","userid","session","endpoint","apiversion","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[0]}set lang(e){this.$$set({lang:e}),U()}get userid(){return this.$$.ctx[10]}set userid(e){this.$$set({userid:e}),U()}get session(){return this.$$.ctx[11]}set session(e){this.$$set({session:e}),U()}get endpoint(){return this.$$.ctx[12]}set endpoint(e){this.$$set({endpoint:e}),U()}get apiversion(){return this.$$.ctx[13]}set apiversion(e){this.$$set({apiversion:e}),U()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(e){this.$$set({clientstyling:e}),U()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),U()}});class jr extends W{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';color:#666}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TabsContainer{height:42px;display:flex;margin-bottom:12px;cursor:pointer;border-bottom:1px solid #ccc}.LimitsTab{font-size:18px;margin-bottom:3px;display:flex;justify-content:center;align-items:center;box-sizing:content-box}.hidden{display:none}.selected{border-bottom:3px solid #7ac317;color:#7ac317;margin:0}</style>",F(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},Gr,kr,o,{lang:0,userid:1,session:2,endpoint:3,currency:4,apiversion:5,includedlimits:14,tablabels:15,historyenabled:6,clientstyling:16,clientstylingurl:17},null),e&&(e.target&&c(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["lang","userid","session","endpoint","currency","apiversion","includedlimits","tablabels","historyenabled","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[0]}set lang(e){this.$$set({lang:e}),U()}get userid(){return this.$$.ctx[1]}set userid(e){this.$$set({userid:e}),U()}get session(){return this.$$.ctx[2]}set session(e){this.$$set({session:e}),U()}get endpoint(){return this.$$.ctx[3]}set endpoint(e){this.$$set({endpoint:e}),U()}get currency(){return this.$$.ctx[4]}set currency(e){this.$$set({currency:e}),U()}get apiversion(){return this.$$.ctx[5]}set apiversion(e){this.$$set({apiversion:e}),U()}get includedlimits(){return this.$$.ctx[14]}set includedlimits(e){this.$$set({includedlimits:e}),U()}get tablabels(){return this.$$.ctx[15]}set tablabels(e){this.$$set({tablabels:e}),U()}get historyenabled(){return this.$$.ctx[6]}set historyenabled(e){this.$$set({historyenabled:e}),U()}get clientstyling(){return this.$$.ctx[16]}set clientstyling(e){this.$$set({clientstyling:e}),U()}get clientstylingurl(){return this.$$.ctx[17]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),U()}}return!customElements.get("player-account-gaming-limits-wrapper-2")&&customElements.define("player-account-gaming-limits-wrapper-2",jr),jr}));
724
2
  //# sourceMappingURL=player-account-gaming-limits-wrapper-2.js.map