@everymatrix/general-player-sms-verification-form 1.13.15 → 1.13.17

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.
@@ -27,29 +27,29 @@ function v(e){(function(){if(!E)throw new Error("Function called outside compone
27
27
  // 3. During afterUpdate, any updated components will NOT have their afterUpdate
28
28
  // callback called a second time; the seen_callbacks set, outside the flush()
29
29
  // function, guarantees this behavior.
30
- const L=new Set;let C=0;// Do *not* move this inside the flush() function
31
- function I(){
30
+ const L=new Set;let w=0;// Do *not* move this inside the flush() function
31
+ function C(){
32
32
  // Do not reenter flush while dirty components are updated, as this can
33
33
  // result in an infinite loop. Instead, let the inner flush handle it.
34
34
  // Reentrancy is ok afterwards for bindings etc.
35
- if(0!==C)return;const e=E;do{
35
+ if(0!==w)return;const e=E;do{
36
36
  // first, call beforeUpdate functions
37
37
  // and update components
38
- try{for(;C<T.length;){const e=T[C];C++,y(e),w(e.$$)}}catch(e){
38
+ try{for(;w<T.length;){const e=T[w];w++,y(e),I(e.$$)}}catch(e){
39
39
  // reset dirty state to not end up in a deadlocked state and then rethrow
40
- throw T.length=0,C=0,e}for(y(null),T.length=0,C=0;H.length;)H.pop()();
40
+ throw T.length=0,w=0,e}for(y(null),T.length=0,w=0;H.length;)H.pop()();
41
41
  // then, once components are updated, call
42
42
  // afterUpdate functions. This may cause
43
43
  // subsequent updates...
44
44
  for(let e=0;e<_.length;e+=1){const t=_[e];L.has(t)||(
45
45
  // ...so guard against infinite loops
46
- L.add(t),t())}_.length=0}while(T.length);for(;B.length;)B.pop()();S=!1,L.clear(),y(e)}function w(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(P)}}
46
+ L.add(t),t())}_.length=0}while(T.length);for(;B.length;)B.pop()();S=!1,L.clear(),y(e)}function I(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(P)}}
47
47
  /**
48
48
  * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
49
49
  */const N=new Set;function M(e,t){const r=e.$$;null!==r.fragment&&(!function(e){const t=[],r=[];_.forEach((n=>-1===e.indexOf(n)?t.push(n):r.push(n))),r.forEach((e=>e())),_=t}(r.after_update),n(r.on_destroy),r.fragment&&r.fragment.d(t),
50
50
  // TODO null out other refs, including component.$$ (but need to
51
51
  // preserve final state?)
52
- r.on_destroy=r.fragment=null,r.ctx=[])}function R(e,t){-1===e.$$.dirty[0]&&(T.push(e),S||(S=!0,A.then(I)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function O(o,s,a,c,l,u,f,p=[-1]){const m=E;y(o);const d=o.$$={fragment:null,ctx:[],
52
+ r.on_destroy=r.fragment=null,r.ctx=[])}function R(e,t){-1===e.$$.dirty[0]&&(T.push(e),S||(S=!0,A.then(C)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function O(o,s,a,c,l,u,f,p=[-1]){const m=E;y(o);const d=o.$$={fragment:null,ctx:[],
53
53
  // state
54
54
  props:u,update:e,not_equal:l,bound:r(),
55
55
  // lifecycle
@@ -70,7 +70,7 @@ P((()=>{const r=e.$$.on_mount.map(t).filter(i);
70
70
  e.$$.on_destroy?e.$$.on_destroy.push(...r):
71
71
  // Edge case - component was destroyed immediately,
72
72
  // most likely as a result of a binding initialising
73
- n(r),e.$$.on_mount=[]})),c.forEach(P)}(o,s.target,s.anchor,s.customElement),I()}var b,v;y(m)}let U;"function"==typeof HTMLElement&&(U=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(i);
73
+ n(r),e.$$.on_mount=[]})),c.forEach(P)}(o,s.target,s.anchor,s.customElement),C()}var b,v;y(m)}let U;"function"==typeof HTMLElement&&(U=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(i);
74
74
  // @ts-ignore todo: improve typings
75
75
  for(const e in this.$$.slotted)
76
76
  // @ts-ignore todo: improve typings
@@ -88,16 +88,16 @@ if(!i(r))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return
88
88
  * @param {StartStopNotifier=} start
89
89
  */
90
90
  function D(t,r=e){let n;const i=new Set;function s(e){if(o(t,e)&&(t=e,n)){// store is ready
91
- const e=!G.length;for(const e of i)e[1](),G.push(e,t);if(e){for(let e=0;e<G.length;e+=2)G[e][0](G[e+1]);G.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(o,a=e){const c=[o,a];return i.add(c),1===i.size&&(n=r(s)||e),o(t),()=>{i.delete(c),0===i.size&&n&&(n(),n=null)}}}}function F(t,r,o){const a=!Array.isArray(t),c=a?[t]:t,h=r.length<2;return l=t=>{let o=!1;const l=[];let u=0,f=e;const p=()=>{if(u)return;f();const n=r(a?l[0]:l,t);h?t(n):f=i(n)?n:e},m=c.map(((e,t)=>s(e,(e=>{l[t]=e,u&=~(1<<t),o&&p()}),(()=>{u|=1<<t}))));return o=!0,p(),function(){n(m),f(),
91
+ const e=!G.length;for(const e of i)e[1](),G.push(e,t);if(e){for(let e=0;e<G.length;e+=2)G[e][0](G[e+1]);G.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(o,a=e){const c=[o,a];return i.add(c),1===i.size&&(n=r(s)||e),o(t),()=>{i.delete(c),0===i.size&&n&&(n(),n=null)}}}}function $(t,r,o){const a=!Array.isArray(t),c=a?[t]:t,h=r.length<2;return l=t=>{let o=!1;const l=[];let u=0,f=e;const p=()=>{if(u)return;f();const n=r(a?l[0]:l,t);h?t(n):f=i(n)?n:e},m=c.map(((e,t)=>s(e,(e=>{l[t]=e,u&=~(1<<t),o&&p()}),(()=>{u|=1<<t}))));return o=!0,p(),function(){n(m),f(),
92
92
  // We need to set this to false because callbacks can still happen despite having unsubscribed:
93
93
  // Callbacks might already be placed in the queue which doesn't know it should no longer
94
94
  // invoke this derived store.
95
- o=!1}},{subscribe:D(o,l).subscribe};var l}var $=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===k}(e)}
95
+ o=!1}},{subscribe:D(o,l).subscribe};var l}var k=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===F}(e)}
96
96
  // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
97
- (e)};var k="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function x(e,t){return!1!==t.clone&&t.isMergeableObject(e)?z((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function V(e,t,r){return e.concat(t).map((function(e){return x(e,r)}))}function j(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function X(e,t){try{return t in e}catch(e){return!1}}
97
+ (e)};var F="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function x(e,t){return!1!==t.clone&&t.isMergeableObject(e)?z((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function V(e,t,r){return e.concat(t).map((function(e){return x(e,r)}))}function j(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function X(e,t){try{return t in e}catch(e){return!1}}
98
98
  // Protects from prototype poisoning and unexpected merging up the prototype chain.
99
99
  function K(e,t,r){var n={};return r.isMergeableObject(e)&&j(e).forEach((function(t){n[t]=x(e[t],r)})),j(t).forEach((function(i){(function(e,t){return X(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
100
- })(e,i)||(X(e,i)&&r.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return z;var r=t.customMerge(e);return"function"==typeof r?r:z}(i,r)(e[i],t[i],r):n[i]=x(t[i],r))})),n}function z(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||V,r.isMergeableObject=r.isMergeableObject||$,
100
+ })(e,i)||(X(e,i)&&r.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return z;var r=t.customMerge(e);return"function"==typeof r?r:z}(i,r)(e[i],t[i],r):n[i]=x(t[i],r))})),n}function z(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||V,r.isMergeableObject=r.isMergeableObject||k,
101
101
  // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
102
102
  // implementations can use it. The caller may not replace it.
103
103
  r.cloneUnlessOtherwiseSpecified=x;var n=Array.isArray(t);return n===Array.isArray(e)?n?r.arrayMerge(e,t,r):K(e,t,r):x(t,r)}z.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return z(e,r,t)}),{})};var Y=z,Z=function(e,t){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Z(e,t)};function W(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Z(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var J,q,Q,ee=function(){return ee=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ee.apply(this,arguments)};function te(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}
@@ -296,17 +296,17 @@ e.hourCycles.length&&(
296
296
  // @ts-ignore
297
297
  t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
298
298
  // TODO: Once hourCycle is fully supported remove the following with data generation
299
- var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(Pe[r||""]||Pe[n||""]||Pe["".concat(n,"-001")]||Pe["001"])[0]}var Ce=new RegExp("^".concat(pe.source,"*")),Ie=new RegExp("".concat(pe.source,"*$"));function we(e,t){return{start:e,end:t}}
299
+ var r,n=e.language;return"root"!==n&&(r=e.maximize().region),(Pe[r||""]||Pe[n||""]||Pe["".concat(n,"-001")]||Pe["001"])[0]}var we=new RegExp("^".concat(pe.source,"*")),Ce=new RegExp("".concat(pe.source,"*$"));function Ie(e,t){return{start:e,end:t}}
300
300
  // #region Ponyfills
301
301
  // Consolidate these variables up top for easier toggling during debugging
302
- var Ne=!!String.prototype.startsWith,Me=!!String.fromCodePoint,Re=!!Object.fromEntries,Oe=!!String.prototype.codePointAt,Ue=!!String.prototype.trimStart,Ge=!!String.prototype.trimEnd,De=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Fe=!0;try{
302
+ var Ne=!!String.prototype.startsWith,Me=!!String.fromCodePoint,Re=!!Object.fromEntries,Oe=!!String.prototype.codePointAt,Ue=!!String.prototype.trimStart,Ge=!!String.prototype.trimEnd,De=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},$e=!0;try{
303
303
  /**
304
304
  * legacy Edge or Xbox One browser
305
305
  * Unicode flag support: supported
306
306
  * Pattern_Syntax support: not supported
307
307
  * See https://github.com/formatjs/formatjs/issues/2822
308
308
  */
309
- Fe="a"===(null===(Se=ze("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Se?void 0:Se[0])}catch(e){Fe=!1}var $e,ke=Ne?// Native
309
+ $e="a"===(null===(Se=ze("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Se?void 0:Se[0])}catch(e){$e=!1}var ke,Fe=Ne?// Native
310
310
  function(e,t,r){return e.startsWith(t,r)}:// For IE11
311
311
  function(e,t,r){return e.slice(r,r+t.length)===t},xe=Me?String.fromCodePoint:// IE11
312
312
  function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n="",i=e.length,o=0;i>o;){if((r=e[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},Ve=
@@ -316,17 +316,17 @@ function(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r],o=i[0],s=i[1];t[o]=s
316
316
  function(e,t){return e.codePointAt(t)}:// IE 11
317
317
  function(e,t){var r=e.length;if(!(t<0||t>=r)){var n,i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},Xe=Ue?// Native
318
318
  function(e){return e.trimStart()}:// Ponyfill
319
- function(e){return e.replace(Ce,"")},Ke=Ge?// Native
319
+ function(e){return e.replace(we,"")},Ke=Ge?// Native
320
320
  function(e){return e.trimEnd()}:// Ponyfill
321
- function(e){return e.replace(Ie,"")};
321
+ function(e){return e.replace(Ce,"")};
322
322
  // Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
323
323
  function ze(e,t){return new RegExp(e,t)}
324
324
  // #endregion
325
- if(Fe){
325
+ if($e){
326
326
  // Native
327
- var Ye=ze("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");$e=function(e,t){var r;return Ye.lastIndex=t,null!==(r=Ye.exec(e)[1])&&void 0!==r?r:""}}else
327
+ var Ye=ze("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ke=function(e,t){var r;return Ye.lastIndex=t,null!==(r=Ye.exec(e)[1])&&void 0!==r?r:""}}else
328
328
  // IE11
329
- $e=function(e,t){for(var r=[];;){var n=je(e,t);if(void 0===n||qe(n)||Qe(n))break;r.push(n),t+=n>=65536?2:1}return xe.apply(void 0,r)};var Ze=/** @class */function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var n=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(e,r)).err)return o;n.push(o.val)}else{if(125/* `}` */===i&&e>0)break;if(35/* `#` */!==i||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(J.UNMATCHED_CLOSING_TAG,we(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&We(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:q.pound,location:we(s,this.clonePosition())})}}}return{val:n,err:null}},
329
+ ke=function(e,t){for(var r=[];;){var n=je(e,t);if(void 0===n||qe(n)||Qe(n))break;r.push(n),t+=n>=65536?2:1}return xe.apply(void 0,r)};var Ze=/** @class */function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,r){for(var n=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(e,r)).err)return o;n.push(o.val)}else{if(125/* `}` */===i&&e>0)break;if(35/* `#` */!==i||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(J.UNMATCHED_CLOSING_TAG,Ie(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&We(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:q.pound,location:Ie(s,this.clonePosition())})}}}return{val:n,err:null}},
330
330
  /**
331
331
  * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
332
332
  * [custom element name][] except that a dash is NOT always mandatory and uppercase letters
@@ -348,14 +348,14 @@ $e=function(e,t){for(var r=[];;){var n=je(e,t);if(void 0===n||qe(n)||Qe(n))break
348
348
  e.prototype.parseTag=function(e,t){var r=this.clonePosition();this.bump();// `<`
349
349
  var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
350
350
  // Self closing tag
351
- return{val:{type:q.literal,value:"<".concat(n,"/>"),location:we(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
351
+ return{val:{type:q.literal,value:"<".concat(n,"/>"),location:Ie(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
352
352
  // Expecting a close tag
353
- if(this.bumpIf("</")){if(this.isEOF()||!We(this.char()))return this.error(J.INVALID_TAG,we(s,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(J.UNMATCHED_CLOSING_TAG,we(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:q.tag,value:n,children:o,location:we(r,this.clonePosition())},err:null}:this.error(J.INVALID_TAG,we(s,this.clonePosition())))}return this.error(J.UNCLOSED_TAG,we(r,this.clonePosition()))}return this.error(J.INVALID_TAG,we(r,this.clonePosition()))},
353
+ if(this.bumpIf("</")){if(this.isEOF()||!We(this.char()))return this.error(J.INVALID_TAG,Ie(s,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(J.UNMATCHED_CLOSING_TAG,Ie(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:q.tag,value:n,children:o,location:Ie(r,this.clonePosition())},err:null}:this.error(J.INVALID_TAG,Ie(s,this.clonePosition())))}return this.error(J.UNCLOSED_TAG,Ie(r,this.clonePosition()))}return this.error(J.INVALID_TAG,Ie(r,this.clonePosition()))},
354
354
  /**
355
355
  * This method assumes that the caller has peeked ahead for the first tag character.
356
356
  */
357
357
  e.prototype.parseTagName=function(){var e=this.offset();// the first tag name character
358
- for(this.bump();!this.isEOF()&&Je(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=we(r,this.clonePosition());return{val:{type:q.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(We(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
358
+ for(this.bump();!this.isEOF()&&Je(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(t);if(i)n+=i;else{var o=this.tryParseUnquoted(e,t);if(o)n+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=Ie(r,this.clonePosition());return{val:{type:q.literal,value:n,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(We(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
359
359
  /** See `parseTag` function docs. */},
360
360
  /**
361
361
  * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
@@ -378,34 +378,34 @@ for(this.bump();!this.isEOF();){var r=this.char();if(39/* `'` */===r){if(39/* `'
378
378
  this.bump();break}t.push(39),
379
379
  // Bump one more time because we need to skip 2 characters.
380
380
  this.bump()}else t.push(r);this.bump()}return xe.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var r=this.char();return 60/* `<` */===r||123/* `{` */===r||35/* `#` */===r&&("plural"===t||"selectordinal"===t)||125/* `}` */===r&&e>0?null:(this.bump(),xe(r))},e.prototype.parseArgument=function(e,t){var r=this.clonePosition();if(this.bump(),// `{`
381
- this.bumpSpace(),this.isEOF())return this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,we(r,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(J.EMPTY_ARGUMENT,we(r,this.clonePosition()));
381
+ this.bumpSpace(),this.isEOF())return this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(J.EMPTY_ARGUMENT,Ie(r,this.clonePosition()));
382
382
  // argument name
383
- var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(J.MALFORMED_ARGUMENT,we(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,we(r,this.clonePosition()));switch(this.char()){
383
+ var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(J.MALFORMED_ARGUMENT,Ie(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition()));switch(this.char()){
384
384
  // Simple argument: `{name}`
385
385
  case 125/* `}` */:// `}`
386
386
  return this.bump(),{val:{type:q.argument,
387
387
  // value does not include the opening and closing braces.
388
- value:n,location:we(r,this.clonePosition())},err:null};
388
+ value:n,location:Ie(r,this.clonePosition())},err:null};
389
389
  // Argument with options: `{name, format, ...}`
390
390
  case 44/* `,` */:return this.bump(),// `,`
391
- this.bumpSpace(),this.isEOF()?this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,we(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(J.MALFORMED_ARGUMENT,we(r,this.clonePosition()))}},
391
+ this.bumpSpace(),this.isEOF()?this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition())):this.parseArgumentOptions(e,t,n,r);default:return this.error(J.MALFORMED_ARGUMENT,Ie(r,this.clonePosition()))}},
392
392
  /**
393
393
  * Advance the parser until the end of the identifier, if it is currently on
394
394
  * an identifier character. Return an empty string otherwise.
395
395
  */
396
- e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=$e(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:we(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,n){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
396
+ e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),r=ke(this.message,t),n=t+r.length;return this.bumpTo(n),{value:r,location:Ie(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,r,n){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
397
397
  // Parse this range:
398
398
  // {name, type, style}
399
399
  // ^---^
400
400
  switch(s){case"":
401
401
  // Expecting a style string number, date, time, plural, selectordinal, or select.
402
- return this.error(J.EXPECT_ARGUMENT_TYPE,we(o,a));case"number":case"date":case"time":
402
+ return this.error(J.EXPECT_ARGUMENT_TYPE,Ie(o,a));case"number":case"date":case"time":
403
403
  // Parse this range:
404
404
  // {name, number, style}
405
405
  // ^-------^
406
- this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(p=Ke(b.val)).length)return this.error(J.EXPECT_ARGUMENT_STYLE,we(this.clonePosition(),this.clonePosition()));c={style:p,styleLocation:we(h,this.clonePosition())}}if((E=this.tryParseArgumentClose(n)).err)return E;var l=we(n,this.clonePosition());
406
+ this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(p=Ke(b.val)).length)return this.error(J.EXPECT_ARGUMENT_STYLE,Ie(this.clonePosition(),this.clonePosition()));c={style:p,styleLocation:Ie(h,this.clonePosition())}}if((E=this.tryParseArgumentClose(n)).err)return E;var l=Ie(n,this.clonePosition());
407
407
  // Extract style or skeleton
408
- if(c&&ke(null==c?void 0:c.style,"::",0)){
408
+ if(c&&Fe(null==c?void 0:c.style,"::",0)){
409
409
  // Skeleton starts with `::`.
410
410
  var u=Xe(c.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(u,c.styleLocation)).err?b:{val:{type:q.number,value:r,location:l,style:b.val},err:null};if(0===u.length)return this.error(J.EXPECT_DATE_TIME_SKELETON,l);var f=u;
411
411
  // Get "best match" pattern only if locale is passed, if not, let it
@@ -417,25 +417,25 @@ return{val:{type:"number"===s?q.number:"date"===s?q.date:q.time,value:r,location
417
417
  // Parse this range:
418
418
  // {name, plural, options}
419
419
  // ^---------^
420
- var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(J.EXPECT_SELECT_ARGUMENT_OPTIONS,we(m,ee({},m)));this.bumpSpace();
420
+ var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(J.EXPECT_SELECT_ARGUMENT_OPTIONS,Ie(m,ee({},m)));this.bumpSpace();
421
421
  // Parse offset:
422
422
  // {name, plural, offset:1, options}
423
423
  // ^-----^
424
424
  // or the first option:
425
425
  // {name, plural, one {...} other {...}}
426
426
  // ^--^
427
- var d=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(J.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,we(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(J.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,J.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
427
+ var d=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(J.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ie(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(J.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,J.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
428
428
  // Parse another identifier for option parsing
429
- this.bumpSpace(),d=this.parseIdentifierIfPossible(),g=b.val}var E,y=this.tryParsePluralOrSelectOptions(e,s,t,d);if(y.err)return y;if((E=this.tryParseArgumentClose(n)).err)return E;var v=we(n,this.clonePosition());return"select"===s?{val:{type:q.select,value:r,options:Ve(y.val),location:v},err:null}:{val:{type:q.plural,value:r,options:Ve(y.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:v},err:null};default:return this.error(J.INVALID_ARGUMENT_TYPE,we(o,a))}},e.prototype.tryParseArgumentClose=function(e){
429
+ this.bumpSpace(),d=this.parseIdentifierIfPossible(),g=b.val}var E,y=this.tryParsePluralOrSelectOptions(e,s,t,d);if(y.err)return y;if((E=this.tryParseArgumentClose(n)).err)return E;var v=Ie(n,this.clonePosition());return"select"===s?{val:{type:q.select,value:r,options:Ve(y.val),location:v},err:null}:{val:{type:q.plural,value:r,options:Ve(y.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:v},err:null};default:return this.error(J.INVALID_ARGUMENT_TYPE,Ie(o,a))}},e.prototype.tryParseArgumentClose=function(e){
430
430
  // Parse: {value, number, ::currency/GBP }
431
- return this.isEOF()||125/* `}` */!==this.char()?this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,we(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
431
+ return this.isEOF()||125/* `}` */!==this.char()?this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
432
432
  /**
433
433
  * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
434
434
  */
435
435
  e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
436
436
  // Treat apostrophe as quoting but include it in the style part.
437
437
  // Find the end of the quoted literal text.
438
- this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(J.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,we(r,this.clonePosition()));this.bump();break;case 123/* `{` */:e+=1,this.bump();break;case 125/* `}` */:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
438
+ this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(J.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ie(r,this.clonePosition()));this.bump();break;case 123/* `{` */:e+=1,this.bump();break;case 125/* `}` */:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var r=[];try{r=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
439
439
  // Parse the skeleton
440
440
  for(var t=e.split(ge).filter((function(e){return e.length>0})),r=[],n=0,i=t;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),c=0,h=a;c<h.length;c++)if(0===h[c].length)throw new Error("Invalid number skeleton");r.push({stem:s,options:a})}return r}(e)}catch(e){return this.error(J.INVALID_NUMBER_SKELETON,t)}return{val:{type:Q.number,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?Ae(r):{}},err:null}},
441
441
  /**
@@ -454,17 +454,17 @@ e.prototype.tryParsePluralOrSelectOptions=function(e,t,r,n){
454
454
  // ^--^
455
455
  for(var i,o=!1,s=[],a=new Set,c=n.value,h=n.location;;){if(0===c.length){var l=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
456
456
  // Try parse `={number}` selector
457
- var u=this.tryParseDecimalInteger(J.EXPECT_PLURAL_ARGUMENT_SELECTOR,J.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=we(l,this.clonePosition()),c=this.message.slice(l.offset,this.offset())}
457
+ var u=this.tryParseDecimalInteger(J.EXPECT_PLURAL_ARGUMENT_SELECTOR,J.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=Ie(l,this.clonePosition()),c=this.message.slice(l.offset,this.offset())}
458
458
  // Duplicate selector clauses
459
459
  if(a.has(c))return this.error("select"===t?J.DUPLICATE_SELECT_ARGUMENT_SELECTOR:J.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);"other"===c&&(o=!0),
460
460
  // Parse:
461
461
  // one {one apple}
462
462
  // ^----------^
463
- this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?J.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:J.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,we(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,r);if(p.err)return p;var m=this.tryParseArgumentClose(f);if(m.err)return m;s.push([c,{value:p.val,location:we(f,this.clonePosition())}]),
463
+ this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?J.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:J.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ie(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,r);if(p.err)return p;var m=this.tryParseArgumentClose(f);if(m.err)return m;s.push([c,{value:p.val,location:Ie(f,this.clonePosition())}]),
464
464
  // Keep track of the existing selectors
465
465
  a.add(c),
466
466
  // Prep next selector clause.
467
- this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,h=i.location}return 0===s.length?this.error("select"===t?J.EXPECT_SELECT_ARGUMENT_SELECTOR:J.EXPECT_PLURAL_ARGUMENT_SELECTOR,we(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(J.MISSING_OTHER_CLAUSE,we(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;i=!0,o=10*o+(s-48),this.bump()}var a=we(n,this.clonePosition());return i?De(o*=r)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
467
+ this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,h=i.location}return 0===s.length?this.error("select"===t?J.EXPECT_SELECT_ARGUMENT_SELECTOR:J.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ie(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(J.MISSING_OTHER_CLAUSE,Ie(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;i=!0,o=10*o+(s-48),this.bump()}var a=Ie(n,this.clonePosition());return i?De(o*=r)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
468
468
  // This is much faster than `Object.assign` or spread.
469
469
  return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
470
470
  /**
@@ -482,7 +482,7 @@ this.position.offset+=e<65536?1:2)}},
482
482
  * following the prefix and return true. Otherwise, don't bump the parser
483
483
  * and return false.
484
484
  */
485
- e.prototype.bumpIf=function(e){if(ke(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
485
+ e.prototype.bumpIf=function(e){if(Fe(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
486
486
  /**
487
487
  * Bump the parser until the pattern character is found and return `true`.
488
488
  * Otherwise bump to the end of the file and return `false`.
@@ -580,22 +580,22 @@ e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
580
580
  Copyright (c) 2014, Yahoo! Inc. All rights reserved.
581
581
  Copyrights licensed under the New BSD License.
582
582
  See the accompanying LICENSE file for terms.
583
- */const _t={},Bt=(e,t,r)=>r?(t in _t||(_t[t]={}),e in _t[t]||(_t[t][e]=r),r):r,At=(e,t)=>{if(null==t)return;if(t in _t&&e in _t[t])return _t[t][e];const r=xt(t);for(let n=0;n<r.length;n++){const i=Ct(r[n],e);if(i)return Bt(e,t,i)}};let St;const Pt=D({});function Lt(e){return e in St}function Ct(e,t){if(!Lt(e))return null;const r=function(e){return St[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let e=0;e<r.length;e++)if("object"==typeof n){if(e>0){const t=r.slice(e,r.length).join(".");if(t in n){n=n[t];break}}n=n[r[e]]}else n=void 0;return n}(r,t)}function It(e,...t){delete _t[e],Pt.update((r=>(r[e]=Y.all([r[e]||{},...t]),r)))}F([Pt],(([e])=>Object.keys(e))),Pt.subscribe((e=>St=e));const wt={};function Nt(e){return wt[e]}function Mt(e){return null!=e&&xt(e).some((e=>{var t;return null===(t=Nt(e))||void 0===t?void 0:t.size}))}const Rt={};function Ot(e){if(!Mt(e))return e in Rt?Rt[e]:Promise.resolve();const t=function(e){return xt(e).map((e=>{const t=Nt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Rt[e]=Promise.all(t.map((([e,t])=>function(e,t){const r=Promise.all(t.map((t=>(function(e,t){wt[e].delete(t),0===wt[e].size&&delete wt[e]}(e,t),t().then((e=>e.default||e))))));return r.then((t=>It(e,...t)))}(e,t)))).then((()=>{if(Mt(e))return Ot(e);delete Rt[e]})),Rt[e]}const Ut={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Gt(){return Ut}const Dt=D(!1);let Ft;const $t=D(null);function kt(e){return e.split("-").map(((e,t,r)=>r.slice(0,t+1).join("-"))).reverse()}function xt(e,t=Gt().fallbackLocale){const r=kt(e);return t?[...new Set([...r,...kt(t)])]:r}function Vt(){return null!=Ft?Ft:void 0}$t.subscribe((e=>{Ft=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const jt={...$t,set:e=>{if(e&&function(e){if(null==e)return;const t=xt(e);for(let e=0;e<t.length;e++){const r=t[e];if(Lt(r))return r}}(e)&&Mt(e)){const{loadingDelay:t}=Gt();let r;return"undefined"!=typeof window&&null!=Vt()&&t?r=window.setTimeout((()=>Dt.set(!0)),t):Dt.set(!0),Ot(e).then((()=>{$t.set(e)})).finally((()=>{clearTimeout(r),Dt.set(!1)}))}return $t.set(e)}},Xt=e=>{const t=Object.create(null);return r=>{const n=JSON.stringify(r);return n in t?t[n]:t[n]=e(r)}},Kt=(e,t)=>{const{formats:r}=Gt();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},zt=Xt((({locale:e,format:t,...r})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(r=Kt("number",t)),new Intl.NumberFormat(e,r)})),Yt=Xt((({locale:e,format:t,...r})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?r=Kt("date",t):0===Object.keys(r).length&&(r=Kt("date","short")),new Intl.DateTimeFormat(e,r)})),Zt=Xt((({locale:e,format:t,...r})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?r=Kt("time",t):0===Object.keys(r).length&&(r=Kt("time","short")),new Intl.DateTimeFormat(e,r)})),Wt=Xt(((e,t=Vt())=>new Ht(e,t,Gt().formats,{ignoreTag:Gt().ignoreTag}))),Jt=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:c=Vt(),default:h}=s;if(null==c)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let l=At(e,c);if(l){if("string"!=typeof l)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof l}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),l}else l=null!==(o=null!==(i=null===(n=(r=Gt()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:c,id:e,defaultValue:h}))&&void 0!==i?i:h)&&void 0!==o?o:e;if(!a)return l;let u=l;try{u=Wt(l,c).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return u},qt=(e,t)=>(({locale:e=Vt(),...t}={})=>Zt({locale:e,...t}))(t).format(e),Qt=(e,t)=>(({locale:e=Vt(),...t}={})=>Yt({locale:e,...t}))(t).format(e),er=(e,t)=>(({locale:e=Vt(),...t}={})=>zt({locale:e,...t}))(t).format(e),tr=(e,t=Vt())=>At(e,t),rr=F([jt,Pt],(()=>Jt));function nr(e,t){It(e,t)}F([jt],(()=>qt)),F([jt],(()=>Qt)),F([jt],(()=>er)),F([jt,Pt],(()=>tr));const ir={en:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"},"zh-hk":{title:"请输入您在号码上收到的验证码",errorTitle:"您的代码无效,您可以重新发送代码并重试",code:"短信代码",smsCodeError:"短信验证码无效,请重新发送验证码",resendMessage:"新的验证码已发送至您的手机号码",activate:"激活账户",resend:"重发"},fr:{title:"Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",errorTitle:"Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",code:"Code SMS",smsCodeError:"Code sms invalide, vous pouvez renvoyer le code",resendMessage:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",activate:"Activer le compte",resend:"Renvoyer"},tr:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Telefon numaranıza yeni bir doğrulama kodu gönderildi.",activate:"Activate Account",resend:"Resend"},ro:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",activate:"Activate Account",resend:"Resend"},es:{title:"Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",errorTitle:"Su código es invalido",code:"Código SMS",smsCodeError:"Código SMS invalido",resendMessage:"Un nuevo codigo de verificación ha sido enviado a tu número celular.",activate:"Activar Cuenta",resend:"Reenviar"},pt:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Um novo código de verificação foi enviado para o seu número de telefone.",activate:"Activate Account",resend:"Resend"}};
583
+ */const _t={},Bt=(e,t,r)=>r?(t in _t||(_t[t]={}),e in _t[t]||(_t[t][e]=r),r):r,At=(e,t)=>{if(null==t)return;if(t in _t&&e in _t[t])return _t[t][e];const r=xt(t);for(let n=0;n<r.length;n++){const i=wt(r[n],e);if(i)return Bt(e,t,i)}};let St;const Pt=D({});function Lt(e){return e in St}function wt(e,t){if(!Lt(e))return null;const r=function(e){return St[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let e=0;e<r.length;e++)if("object"==typeof n){if(e>0){const t=r.slice(e,r.length).join(".");if(t in n){n=n[t];break}}n=n[r[e]]}else n=void 0;return n}(r,t)}function Ct(e,...t){delete _t[e],Pt.update((r=>(r[e]=Y.all([r[e]||{},...t]),r)))}$([Pt],(([e])=>Object.keys(e))),Pt.subscribe((e=>St=e));const It={};function Nt(e){return It[e]}function Mt(e){return null!=e&&xt(e).some((e=>{var t;return null===(t=Nt(e))||void 0===t?void 0:t.size}))}const Rt={};function Ot(e){if(!Mt(e))return e in Rt?Rt[e]:Promise.resolve();const t=function(e){return xt(e).map((e=>{const t=Nt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Rt[e]=Promise.all(t.map((([e,t])=>function(e,t){const r=Promise.all(t.map((t=>(function(e,t){It[e].delete(t),0===It[e].size&&delete It[e]}(e,t),t().then((e=>e.default||e))))));return r.then((t=>Ct(e,...t)))}(e,t)))).then((()=>{if(Mt(e))return Ot(e);delete Rt[e]})),Rt[e]}const Ut={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Gt(){return Ut}const Dt=D(!1);let $t;const kt=D(null);function Ft(e){return e.split("-").map(((e,t,r)=>r.slice(0,t+1).join("-"))).reverse()}function xt(e,t=Gt().fallbackLocale){const r=Ft(e);return t?[...new Set([...r,...Ft(t)])]:r}function Vt(){return null!=$t?$t:void 0}kt.subscribe((e=>{$t=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const jt={...kt,set:e=>{if(e&&function(e){if(null==e)return;const t=xt(e);for(let e=0;e<t.length;e++){const r=t[e];if(Lt(r))return r}}(e)&&Mt(e)){const{loadingDelay:t}=Gt();let r;return"undefined"!=typeof window&&null!=Vt()&&t?r=window.setTimeout((()=>Dt.set(!0)),t):Dt.set(!0),Ot(e).then((()=>{kt.set(e)})).finally((()=>{clearTimeout(r),Dt.set(!1)}))}return kt.set(e)}},Xt=e=>{const t=Object.create(null);return r=>{const n=JSON.stringify(r);return n in t?t[n]:t[n]=e(r)}},Kt=(e,t)=>{const{formats:r}=Gt();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},zt=Xt((({locale:e,format:t,...r})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(r=Kt("number",t)),new Intl.NumberFormat(e,r)})),Yt=Xt((({locale:e,format:t,...r})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?r=Kt("date",t):0===Object.keys(r).length&&(r=Kt("date","short")),new Intl.DateTimeFormat(e,r)})),Zt=Xt((({locale:e,format:t,...r})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?r=Kt("time",t):0===Object.keys(r).length&&(r=Kt("time","short")),new Intl.DateTimeFormat(e,r)})),Wt=Xt(((e,t=Vt())=>new Ht(e,t,Gt().formats,{ignoreTag:Gt().ignoreTag}))),Jt=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:c=Vt(),default:h}=s;if(null==c)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let l=At(e,c);if(l){if("string"!=typeof l)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof l}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),l}else l=null!==(o=null!==(i=null===(n=(r=Gt()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:c,id:e,defaultValue:h}))&&void 0!==i?i:h)&&void 0!==o?o:e;if(!a)return l;let u=l;try{u=Wt(l,c).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return u},qt=(e,t)=>(({locale:e=Vt(),...t}={})=>Zt({locale:e,...t}))(t).format(e),Qt=(e,t)=>(({locale:e=Vt(),...t}={})=>Yt({locale:e,...t}))(t).format(e),er=(e,t)=>(({locale:e=Vt(),...t}={})=>zt({locale:e,...t}))(t).format(e),tr=(e,t=Vt())=>At(e,t),rr=$([jt,Pt],(()=>Jt));function nr(e,t){Ct(e,t)}$([jt],(()=>qt)),$([jt],(()=>Qt)),$([jt],(()=>er)),$([jt,Pt],(()=>tr));const ir={en:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"},"zh-hk":{title:"请输入您在号码上收到的验证码",errorTitle:"您的代码无效,您可以重新发送代码并重试",code:"短信代码",smsCodeError:"短信验证码无效,请重新发送验证码",resendMessage:"新的验证码已发送至您的手机号码",activate:"激活账户",resend:"重发"},fr:{title:"Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",errorTitle:"Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",code:"Code SMS",smsCodeError:"Code sms invalide, vous pouvez renvoyer le code",resendMessage:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",activate:"Activer le compte",resend:"Renvoyer"},tr:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Telefon numaranıza yeni bir doğrulama kodu gönderildi.",activate:"Activate Account",resend:"Resend"},ro:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",activate:"Activate Account",resend:"Resend"},es:{title:"Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",errorTitle:"Su código es invalido",code:"Código SMS",smsCodeError:"Código SMS invalido",resendMessage:"Un nuevo codigo de verificación ha sido enviado a tu número celular.",activate:"Activar Cuenta",resend:"Reenviar"},pt:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Um novo código de verificação foi enviado para o seu número de telefone.",activate:"Activate Account",resend:"Resend"}};
584
584
  /* src/GeneralPlayerSmsVerificationForm.svelte generated by Svelte v3.59.2 */function or(e){let t,r=/*$_*/e[5]("errorTitle")+"";return{c(){t=u(r)},m(e,r){c(e,t,r)},p(e,n){/*$_*/32&n&&r!==(r=/*$_*/e[5]("errorTitle")+"")&&d(t,r)},d(e){e&&h(t)}}}
585
585
  // (155:4) {#if isSmsValid}
586
586
  function sr(e){let t,r=/*$_*/e[5]("title")+"";return{c(){t=u(r)},m(e,r){c(e,t,r)},p(e,n){/*$_*/32&n&&r!==(r=/*$_*/e[5]("title")+"")&&d(t,r)},d(e){e&&h(t)}}}
587
587
  // (168:4) {#if !isSmsValid}
588
- function ar(e){let t,r,n=/*$_*/e[5]("smsCodeError")+"";return{c(){t=l("p"),r=u(n),m(t,"class","InvalidInput"),m(t,"part","InvalidInput")},m(e,n){c(e,t,n),a(t,r)},p(e,t){/*$_*/32&t&&n!==(n=/*$_*/e[5]("smsCodeError")+"")&&d(r,n)},d(e){e&&h(t)}}}
588
+ function ar(e){let t,r,n=/*$_*/e[5]("smsCodeError")+"";return{c(){t=l("p"),r=u(n),m(t,"class","InvalidInput")},m(e,n){c(e,t,n),a(t,r)},p(e,t){/*$_*/32&t&&n!==(n=/*$_*/e[5]("smsCodeError")+"")&&d(r,n)},d(e){e&&h(t)}}}
589
589
  // (173:2) {#if timer}
590
- function cr(e){let t,r,n=/*$_*/e[5]("resendMessage")+"";return{c(){t=l("p"),r=u(n),m(t,"class","SmsVerificationResendMessage"),m(t,"part","SmsVerificationResendMessage")},m(e,n){c(e,t,n),a(t,r)},p(e,t){/*$_*/32&t&&n!==(n=/*$_*/e[5]("resendMessage")+"")&&d(r,n)},d(e){e&&h(t)}}}
591
- // (188:19) {#if timer}
592
- function hr(e){let t,r,n,i,o,s=/*secondsLeft*/e[4]<10?"0":"";return{c(){t=l("span"),r=u("(0:"),n=u(s),i=u(/*secondsLeft*/e[4]),o=u(")"),m(t,"class","SmsVerificationResendTimer")},m(e,s){c(e,t,s),a(t,r),a(t,n),a(t,i),a(t,o)},p(e,t){/*secondsLeft*/16&t&&s!==(s=/*secondsLeft*/e[4]<10?"0":"")&&d(n,s),/*secondsLeft*/16&t&&d(i,/*secondsLeft*/e[4])},d(e){e&&h(t)}}}function lr(t){let r,i,o,s,b,E,y,v,T,H,_,B,A,S,P,L,C,I,w,N,M,R,O,U=/*$_*/t[5]("code")+"",G=/*$_*/t[5]("activate")+"",D=/*$_*/t[5]("resend")+"";function F(e,t){/*isSmsValid*/
593
- return e[2]?sr:or}let $=F(t),k=$(t),x=!/*isSmsValid*/t[2]&&ar(t),V=/*timer*/t[3]&&cr(t),j=/*timer*/t[3]&&hr(t);return{c(){r=l("div"),i=l("h3"),k.c(),o=f(),s=l("div"),b=l("label"),E=u(U),y=u(":"),v=l("span"),v.textContent="*",T=f(),H=l("input"),_=f(),x&&x.c(),S=f(),V&&V.c(),P=f(),L=l("button"),C=u(G),I=f(),w=l("button"),N=u(D),M=f(),j&&j.c(),this.c=e,m(i,"class","Title"),m(i,"part","Title"),m(v,"class","FormRequired"),m(v,"part","FormRequired"),m(b,"for","SmsCode"),m(H,"type","text"),m(H,"id","SmsCode"),m(H,"inputmode","numeric"),m(H,"pattern","[0-9]*"),m(H,"maxlength","6"),m(s,"class",B="Field SmsVerificationField "+(/*isSmsValid*/t[2]?"":"InvalidField")),m(s,"part",A="SmsVerificationField "+(/*isSmsValid*/t[2]?"":"InvalidField")),m(L,"class","Button SmsVerificationValidate"),m(L,"part","SmsVerificationValidate"),m(w,"class","Button SmsVerificationResend"),m(w,"part","SmsVerificationResend"),w.disabled=/*timer*/t[3],m(r,"class","Container SmsVerificationContainer"),m(r,"part","SmsVerificationContainer")},m(e,n){c(e,r,n),a(r,i),k.m(i,null),a(r,o),a(r,s),a(s,b),a(b,E),a(b,y),a(b,v),a(s,T),a(s,H),g(H,/*smsCode*/t[1]),a(s,_),x&&x.m(s,null),a(r,S),V&&V.m(r,null),a(r,P),a(r,L),a(L,C),a(r,I),a(r,w),a(w,N),a(w,M),j&&j.m(w,null)
594
- /*div1_binding*/,t[19](r),R||(O=[p(H,"input",/*input_input_handler*/t[17]),p(H,"keydown",/*keydown_handler*/t[18]),p(L,"click",/*activateUser*/t[6]),p(w,"click",/*resendCode*/t[7])],R=!0)},p(e,[t]){$===($=F(e))&&k?k.p(e,t):(k.d(1),k=$(e),k&&(k.c(),k.m(i,null))),/*$_*/32&t&&U!==(U=/*$_*/e[5]("code")+"")&&d(E,U),/*smsCode*/2&t&&H.value!==/*smsCode*/e[1]&&g(H,/*smsCode*/e[1]),/*isSmsValid*/e[2]?x&&(x.d(1),x=null):x?x.p(e,t):(x=ar(e),x.c(),x.m(s,null)),/*isSmsValid*/4&t&&B!==(B="Field SmsVerificationField "+(/*isSmsValid*/e[2]?"":"InvalidField"))&&m(s,"class",B),/*isSmsValid*/4&t&&A!==(A="SmsVerificationField "+(/*isSmsValid*/e[2]?"":"InvalidField"))&&m(s,"part",A),/*timer*/e[3]?V?V.p(e,t):(V=cr(e),V.c(),V.m(r,P)):V&&(V.d(1),V=null),/*$_*/32&t&&G!==(G=/*$_*/e[5]("activate")+"")&&d(C,G),/*$_*/32&t&&D!==(D=/*$_*/e[5]("resend")+"")&&d(N,D),/*timer*/e[3]?j?j.p(e,t):(j=hr(e),j.c(),j.m(w,null)):j&&(j.d(1),j=null),/*timer*/8&t&&(w.disabled=/*timer*/e[3])},i:e,o:e,d(e){e&&h(r),k.d(),x&&x.d(),V&&V.d(),j&&j.d()
595
- /*div1_binding*/,t[19](null),R=!1,n(O)}}}function ur(e,t,r){let n;var i,o;i=rr,o=e=>r(5,n=e),e.$$.on_destroy.push(s(i,o));let a,c,h,{endpoint:l=""}=t,{tokenid:u=""}=t,{playerid:f=""}=t,{smstemplate:p="Please use this code {0} to activate your accout"}=t,{number:m=""}=t,{clientstyling:d=""}=t,{clientstylingurl:g=""}=t,{translationurl:b=""}=t,E=!0,y=!1,T=+localStorage.getItem("smsTimer")||0,_=Date.now()/1e3-T,B=60-Math.floor(_);const A={numeric:/^[0-9]{0,6}$/};!function({withLocale:e,translations:t}){jt.subscribe((r=>{null==r&&(Pt.set(t),jt.set(e))}));// maybe we will need this to make sure that the i18n is set up only once
590
+ function cr(e){let t,r,n=/*$_*/e[5]("resendMessage")+"";return{c(){t=l("p"),r=u(n),m(t,"class","SmsVerificationResendMessage")},m(e,n){c(e,t,n),a(t,r)},p(e,t){/*$_*/32&t&&n!==(n=/*$_*/e[5]("resendMessage")+"")&&d(r,n)},d(e){e&&h(t)}}}
591
+ // (186:19) {#if timer}
592
+ function hr(e){let t,r,n,i,o,s=/*secondsLeft*/e[4]<10?"0":"";return{c(){t=l("span"),r=u("(0:"),n=u(s),i=u(/*secondsLeft*/e[4]),o=u(")"),m(t,"class","SmsVerificationResendTimer")},m(e,s){c(e,t,s),a(t,r),a(t,n),a(t,i),a(t,o)},p(e,t){/*secondsLeft*/16&t&&s!==(s=/*secondsLeft*/e[4]<10?"0":"")&&d(n,s),/*secondsLeft*/16&t&&d(i,/*secondsLeft*/e[4])},d(e){e&&h(t)}}}function lr(t){let r,i,o,s,b,E,y,v,T,H,_,B,A,S,P,L,w,C,I,N,M,R,O=/*$_*/t[5]("code")+"",U=/*$_*/t[5]("activate")+"",G=/*$_*/t[5]("resend")+"";function D(e,t){/*isSmsValid*/
593
+ return e[2]?sr:or}let $=D(t),k=$(t),F=!/*isSmsValid*/t[2]&&ar(t),x=/*timer*/t[3]&&cr(t),V=/*timer*/t[3]&&hr(t);return{c(){r=l("div"),i=l("h3"),k.c(),o=f(),s=l("div"),b=l("label"),E=u(O),y=u(":"),v=l("span"),v.textContent="*",T=f(),H=l("input"),_=f(),F&&F.c(),A=f(),x&&x.c(),S=f(),P=l("button"),L=u(U),w=f(),C=l("button"),I=u(G),N=f(),V&&V.c(),this.c=e,m(i,"class","Title"),m(v,"class","FormRequired"),m(b,"for","SmsCode"),m(H,"type","text"),m(H,"id","SmsCode"),m(H,"inputmode","numeric"),m(H,"pattern","[0-9]*"),m(H,"maxlength","6"),m(s,"class",B="Field SmsVerificationField "+(/*isSmsValid*/t[2]?"":"InvalidField")),m(P,"class","Button SmsVerificationValidate"),m(C,"class","Button SmsVerificationResend"),C.disabled=/*timer*/t[3],m(r,"class","Container SmsVerificationContainer")},m(e,n){c(e,r,n),a(r,i),k.m(i,null),a(r,o),a(r,s),a(s,b),a(b,E),a(b,y),a(b,v),a(s,T),a(s,H),g(H,/*smsCode*/t[1]),a(s,_),F&&F.m(s,null),a(r,A),x&&x.m(r,null),a(r,S),a(r,P),a(P,L),a(r,w),a(r,C),a(C,I),a(C,N),V&&V.m(C,null)
594
+ /*div1_binding*/,t[19](r),M||(R=[p(H,"input",/*input_input_handler*/t[17]),p(H,"keydown",/*keydown_handler*/t[18]),p(P,"click",/*activateUser*/t[6]),p(C,"click",/*resendCode*/t[7])],M=!0)},p(e,[t]){$===($=D(e))&&k?k.p(e,t):(k.d(1),k=$(e),k&&(k.c(),k.m(i,null))),/*$_*/32&t&&O!==(O=/*$_*/e[5]("code")+"")&&d(E,O),/*smsCode*/2&t&&H.value!==/*smsCode*/e[1]&&g(H,/*smsCode*/e[1]),/*isSmsValid*/e[2]?F&&(F.d(1),F=null):F?F.p(e,t):(F=ar(e),F.c(),F.m(s,null)),/*isSmsValid*/4&t&&B!==(B="Field SmsVerificationField "+(/*isSmsValid*/e[2]?"":"InvalidField"))&&m(s,"class",B),/*timer*/e[3]?x?x.p(e,t):(x=cr(e),x.c(),x.m(r,S)):x&&(x.d(1),x=null),/*$_*/32&t&&U!==(U=/*$_*/e[5]("activate")+"")&&d(L,U),/*$_*/32&t&&G!==(G=/*$_*/e[5]("resend")+"")&&d(I,G),/*timer*/e[3]?V?V.p(e,t):(V=hr(e),V.c(),V.m(C,null)):V&&(V.d(1),V=null),/*timer*/8&t&&(C.disabled=/*timer*/e[3])},i:e,o:e,d(e){e&&h(r),k.d(),F&&F.d(),x&&x.d(),V&&V.d()
595
+ /*div1_binding*/,t[19](null),M=!1,n(R)}}}function ur(e,t,r){let n;var i,o;i=rr,o=e=>r(5,n=e),e.$$.on_destroy.push(s(i,o));let a,c,h,{endpoint:l=""}=t,{tokenid:u=""}=t,{playerid:f=""}=t,{smstemplate:p="Please use this code {0} to activate your accout"}=t,{number:m=""}=t,{clientstyling:d=""}=t,{clientstylingurl:g=""}=t,{translationurl:b=""}=t,E=!0,y=!1,T=+localStorage.getItem("smsTimer")||0,_=Date.now()/1e3-T,B=60-Math.floor(_);const A={numeric:/^[0-9]{0,6}$/};!function({withLocale:e,translations:t}){jt.subscribe((r=>{null==r&&(Pt.set(t),jt.set(e))}));// maybe we will need this to make sure that the i18n is set up only once
596
596
  /*dictionary.set(translations);
597
597
  locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(ir).forEach((e=>{nr(e,ir[e])}));const S=()=>{B>0?r(4,B--,B):(clearInterval(c),r(3,c=!1),r(4,B=60))},P=()=>{_<60&&r(3,c=setInterval((()=>{S()}),1e3))},L=e=>{A.numeric.test(e.key)||8===e.keyCode||9===e.keyCode||46===e.keyCode||e.preventDefault()};v((()=>{if(!f||!m){
598
598
  /* fix for when trying to log in after registeration & mail confirmation (without sms confirmation),
599
599
  upon switching between sms validation and register, the playerid and phone number would be lost */
600
- let e=JSON.parse(localStorage.getItem("playerData"));r(10,f=e.playerid),r(11,m=e.number)}P()}));return e.$$set=e=>{"endpoint"in e&&r(12,l=e.endpoint),"tokenid"in e&&r(9,u=e.tokenid),"playerid"in e&&r(10,f=e.playerid),"smstemplate"in e&&r(13,p=e.smstemplate),"number"in e&&r(11,m=e.number),"clientstyling"in e&&r(14,d=e.clientstyling),"clientstylingurl"in e&&r(15,g=e.clientstylingurl),"translationurl"in e&&r(16,b=e.translationurl)},e.$$.update=()=>{e.$$.dirty,/*clientstyling, customStylingContainer*/16385&e.$$.dirty&&d&&h&&(()=>{let e=document.createElement("style");e.innerHTML=d,h.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/32769&e.$$.dirty&&g&&h&&(()=>{let e=new URL(g),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{h.appendChild(t)}),1),setTimeout((()=>{}),500)}))})(),/*translationurl*/65536&e.$$.dirty&&b&&fetch(b).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{nr(t,e[t])}))})).catch((e=>{console.log(e)}))},[h,a,E,c,B,n,async()=>{try{if(!(await fetch(`${l}/player/${f}/activateSMS?tokenId=${u}&validationCode=${a}`,{headers:{"Content-Type":"application/json",accept:"application/json"}})).ok)throw window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Could not activate user"}},window.location.href),r(2,E=!1),new Error("Could not activate user");r(2,E=!0),window.postMessage({type:"SmsHasBeenValidated"},window.location.href)}catch(e){console.log(e)}},async()=>{localStorage.setItem("smsTimer",JSON.stringify(Math.floor(Date.now()/1e3))),P();try{const e=await fetch(`${l}/player/sms/token`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({userId:f,messageTemplate:p,destination:m})}),t=await e.json();if(!e.ok)throw y=!0,new Error("Failed to fetch");r(9,u=t.id),y=!1,S()}catch(e){y=!0,console.error(e)}},L,u,f,m,l,p,d,g,b,function(){a=this.value,r(1,a)},e=>L(e),function(e){H[e?"unshift":"push"]((()=>{h=e,r(0,h)}))}]}class fr extends U{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emfe-w-color-gray-300, #58586B);display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input{width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.Field.InvalidField input{border:1px solid var(--emfe-w-color-primary, #D0046C);background:var(--emfe-w-color-primary-50, #FBECF4);color:var(--emfe-w-color-primary, #D0046C)}.InvalidInput{color:var(--emfe-w-color-error, #FD2839);font-size:10px;line-height:10px}.Button{color:var(--emfe-w-color-white, #FFFFFF);background:var(--emfe-w-color-primary, #D0046C);border:1px solid var(--emfe-w-color-primary, #D0046C);border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.Button[disabled]{background:var(--emfe-w-color-gray-100, #E6E6E6);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emfe-w-color-gray-50, #F9F8F8);color:var(--emfe-w-color-black, #000000)}",this.shadowRoot.appendChild(t),O(this,{target:this.shadowRoot,props:b(this.attributes),customElement:!0},ur,lr,o,{endpoint:12,tokenid:9,playerid:10,smstemplate:13,number:11,clientstyling:14,clientstylingurl:15,translationurl:16},null),e&&(e.target&&c(e.target,this,e.anchor),e.props&&(this.$set(e.props),I()))}static get observedAttributes(){return["endpoint","tokenid","playerid","smstemplate","number","clientstyling","clientstylingurl","translationurl"]}get endpoint(){return this.$$.ctx[12]}set endpoint(e){this.$$set({endpoint:e}),I()}get tokenid(){return this.$$.ctx[9]}set tokenid(e){this.$$set({tokenid:e}),I()}get playerid(){return this.$$.ctx[10]}set playerid(e){this.$$set({playerid:e}),I()}get smstemplate(){return this.$$.ctx[13]}set smstemplate(e){this.$$set({smstemplate:e}),I()}get number(){return this.$$.ctx[11]}set number(e){this.$$set({number:e}),I()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(e){this.$$set({clientstyling:e}),I()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),I()}get translationurl(){return this.$$.ctx[16]}set translationurl(e){this.$$set({translationurl:e}),I()}}return!customElements.get("general-player-sms-verification-form")&&customElements.define("general-player-sms-verification-form",fr),fr}));
600
+ let e=JSON.parse(localStorage.getItem("playerData"));r(10,f=e.playerid),r(11,m=e.number)}P()}));return e.$$set=e=>{"endpoint"in e&&r(12,l=e.endpoint),"tokenid"in e&&r(9,u=e.tokenid),"playerid"in e&&r(10,f=e.playerid),"smstemplate"in e&&r(13,p=e.smstemplate),"number"in e&&r(11,m=e.number),"clientstyling"in e&&r(14,d=e.clientstyling),"clientstylingurl"in e&&r(15,g=e.clientstylingurl),"translationurl"in e&&r(16,b=e.translationurl)},e.$$.update=()=>{e.$$.dirty,/*clientstyling, customStylingContainer*/16385&e.$$.dirty&&d&&h&&(()=>{let e=document.createElement("style");e.innerHTML=d,h.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/32769&e.$$.dirty&&g&&h&&(()=>{let e=new URL(g),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{h.appendChild(t)}),1),setTimeout((()=>{}),500)}))})(),/*translationurl*/65536&e.$$.dirty&&b&&fetch(b).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{nr(t,e[t])}))})).catch((e=>{console.log(e)}))},[h,a,E,c,B,n,async()=>{try{if(!(await fetch(`${l}/player/${f}/activateSMS?tokenId=${u}&validationCode=${a}`,{headers:{"Content-Type":"application/json",accept:"application/json"}})).ok)throw window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Could not activate user"}},window.location.href),r(2,E=!1),new Error("Could not activate user");r(2,E=!0),window.postMessage({type:"SmsHasBeenValidated"},window.location.href)}catch(e){console.log(e)}},async()=>{localStorage.setItem("smsTimer",JSON.stringify(Math.floor(Date.now()/1e3))),P();try{const e=await fetch(`${l}/player/sms/token`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({userId:f,messageTemplate:p,destination:m})}),t=await e.json();if(!e.ok)throw y=!0,new Error("Failed to fetch");r(9,u=t.id),y=!1,S()}catch(e){y=!0,console.error(e)}},L,u,f,m,l,p,d,g,b,function(){a=this.value,r(1,a)},e=>L(e),function(e){H[e?"unshift":"push"]((()=>{h=e,r(0,h)}))}]}class fr extends U{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emfe-w-registration-contrast, var(--emfe-w-color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input{width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.Field.InvalidField input{border:1px solid vvar(--emfe-w-registration-color-primary, var(--emfe-w-color-pink-500, #D0046C));background:var(--emfe-w-color-primary-50, #FBECF4);color:var(--emfe-w-registration-color-primary, var(--emfe-w-color-pink-500, #D0046C))}.InvalidInput{color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));font-size:10px;line-height:10px}.Button{color:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));background:var(--emfe-w-registration-color-primary, var(--emfe-w-color-pink-500, #D0046C));border:1px solid var(--emfe-w-registration-color-primary, var(--emfe-w-color-pink-500, #D0046C));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;margin-top:24px}.Button[disabled]{background:var(--emfe-w-color-gray-100, #E6E6E6);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emfe-w-registration-color-bg, var(--emfe-w-color-gray-50, #F9F8F8));color:var(--emfe-w-registration-typography, var(--emfe-w-color-dunkel, #07072A))}",this.shadowRoot.appendChild(t),O(this,{target:this.shadowRoot,props:b(this.attributes),customElement:!0},ur,lr,o,{endpoint:12,tokenid:9,playerid:10,smstemplate:13,number:11,clientstyling:14,clientstylingurl:15,translationurl:16},null),e&&(e.target&&c(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["endpoint","tokenid","playerid","smstemplate","number","clientstyling","clientstylingurl","translationurl"]}get endpoint(){return this.$$.ctx[12]}set endpoint(e){this.$$set({endpoint:e}),C()}get tokenid(){return this.$$.ctx[9]}set tokenid(e){this.$$set({tokenid:e}),C()}get playerid(){return this.$$.ctx[10]}set playerid(e){this.$$set({playerid:e}),C()}get smstemplate(){return this.$$.ctx[13]}set smstemplate(e){this.$$set({smstemplate:e}),C()}get number(){return this.$$.ctx[11]}set number(e){this.$$set({number:e}),C()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),C()}get translationurl(){return this.$$.ctx[16]}set translationurl(e){this.$$set({translationurl:e}),C()}}return!customElements.get("general-player-sms-verification-form")&&customElements.define("general-player-sms-verification-form",fr),fr}));
601
601
  //# sourceMappingURL=general-player-sms-verification-form.js.map