@everymatrix/player-account-vault 0.19.11 → 0.19.13

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 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountVault-DAU8Ricg.cjs")).then(({default:t})=>{!customElements.get("player-account-vault")&&customElements.define("player-account-vault",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountVault-B-jaJVWl.cjs")).then(({default:t})=>{!customElements.get("player-account-vault")&&customElements.define("player-account-vault",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/PlayerAccountVault-CaHAbTnV.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/PlayerAccountVault-BtEskMQw.js").then(({ default: t }) => {
14
14
  !customElements.get("player-account-vault") && customElements.define("player-account-vault", t.element);
15
15
  });
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-vault",
3
- "version": "0.19.11",
3
+ "version": "0.19.13",
4
4
  "type": "module",
5
5
  "main": "es2015/player-account-vault.cjs",
6
6
  "module": "es2015/player-account-vault.js",
@@ -1,3 +0,0 @@
1
- "use strict";var Nr=Object.defineProperty,Or=Object.defineProperties;var Rr=Object.getOwnPropertyDescriptors;var wn=Object.getOwnPropertySymbols;var Dr=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable;var Ft=(e,t,n)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ve=(e,t)=>{for(var n in t||(t={}))Dr.call(t,n)&&Ft(e,n,t[n]);if(wn)for(var n of wn(t))Mr.call(t,n)&&Ft(e,n,t[n]);return e},Gt=(e,t)=>Or(e,Rr(t));var le=(e,t,n)=>(Ft(e,typeof t!="symbol"?t+"":t,n),n);var $t=(e,t,n)=>new Promise((r,i)=>{var a=l=>{try{s(n.next(l))}catch(u){i(u)}},o=l=>{try{s(n.throw(l))}catch(u){i(u)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,o);s((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function L(){}function nr(e){return e()}function An(){return Object.create(null)}function we(e){e.forEach(nr)}function ft(e){return typeof e=="function"}function Lt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function kr(e){return Object.keys(e).length===0}function rr(e,...t){if(e==null){for(const r of t)r(void 0);return L}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Ur(e){let t;return rr(e,n=>t=n)(),t}function Vr(e){return e&&ft(e.destroy)?e.destroy:L}function v(e,t){e.appendChild(t)}function dn(e,t,n){const r=Fr(e);if(!r.getElementById(t)){const i=A("style");i.id=t,i.textContent=n,Gr(r,i)}}function Fr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Gr(e,t){return v(e.head||e,t),t.sheet}function H(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode&&e.parentNode.removeChild(e)}function ir(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function A(e){return document.createElement(e)}function Tn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Z(e){return document.createTextNode(e)}function R(){return Z(" ")}function $r(){return Z("")}function ne(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function jr(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function b(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Bt(e){return e===""?null:+e}function Xr(e){return Array.from(e.childNodes)}function re(e,t){t=""+t,e.data!==t&&(e.data=t)}function Et(e,t){e.value=t==null?"":t}function ue(e,t,n){e.classList.toggle(t,!!n)}function Wr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let lt;function st(e){lt=e}function ar(){if(!lt)throw new Error("Function called outside component initialization");return lt}function or(e){ar().$$.on_mount.push(e)}function zr(e){ar().$$.on_destroy.push(e)}const $e=[],Xe=[];let je=[];const qt=[],Zr=Promise.resolve();let en=!1;function Qr(){en||(en=!0,Zr.then(G))}function tn(e){je.push(e)}function Cn(e){qt.push(e)}const jt=new Set;let Fe=0;function G(){if(Fe!==0)return;const e=lt;do{try{for(;Fe<$e.length;){const t=$e[Fe];Fe++,st(t),Kr(t.$$)}}catch(t){throw $e.length=0,Fe=0,t}for(st(null),$e.length=0,Fe=0;Xe.length;)Xe.pop()();for(let t=0;t<je.length;t+=1){const n=je[t];jt.has(n)||(jt.add(n),n())}je.length=0}while($e.length);for(;qt.length;)qt.pop()();en=!1,jt.clear(),st(e)}function Kr(e){if(e.fragment!==null){e.update(),we(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(tn)}}function Yr(e){const t=[],n=[];je.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),je=t}const wt=new Set;let Ne;function Oe(){Ne={r:0,c:[],p:Ne}}function Re(){Ne.r||we(Ne.c),Ne=Ne.p}function $(e,t){e&&e.i&&(wt.delete(e),e.i(t))}function z(e,t,n,r){if(e&&e.o){if(wt.has(e))return;wt.add(e),Ne.c.push(()=>{wt.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function St(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Bn(e,t,n){const r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function ut(e){e&&e.c()}function We(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),tn(()=>{const a=e.$$.on_mount.map(nr).filter(ft);e.$$.on_destroy?e.$$.on_destroy.push(...a):we(a),e.$$.on_mount=[]}),i.forEach(tn)}function ze(e,t){const n=e.$$;n.fragment!==null&&(Yr(n.after_update),we(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Jr(e,t){e.$$.dirty[0]===-1&&($e.push(e),Qr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function pn(e,t,n,r,i,a,o=null,s=[-1]){const l=lt;st(e);const u=e.$$={fragment:null,ctx:[],props:a,update:L,not_equal:i,bound:An(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:An(),dirty:s,skip_bound:!1,root:t.target||l.$$.root};o&&o(u.root);let c=!1;if(u.ctx=n?n(e,t.props||{},(f,h,...m)=>{const _=m.length?m[0]:h;return u.ctx&&i(u.ctx[f],u.ctx[f]=_)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](_),c&&Jr(e,f)),h}):[],u.update(),c=!0,we(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const f=Xr(t.target);u.fragment&&u.fragment.l(f),f.forEach(S)}else u.fragment&&u.fragment.c();t.intro&&$(e.$$.fragment),We(e,t.target,t.anchor),G()}st(l)}let sr;typeof HTMLElement=="function"&&(sr=class extends HTMLElement{constructor(t,n,r){super();le(this,"$$ctor");le(this,"$$s");le(this,"$$c");le(this,"$$cn",!1);le(this,"$$d",{});le(this,"$$r",!1);le(this,"$$p_d",{});le(this,"$$l",{});le(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return $t(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(a){return()=>{let o;return{c:function(){o=A("slot"),a!=="default"&&b(o,"name",a)},m:function(u,c){H(u,o,c)},d:function(u){u&&S(o)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=Wr(this);for(const a of this.$$s)a in r&&(n[a]=[t(a)]);for(const a of this.attributes){const o=this.$$g_p(a.name);o in this.$$d||(this.$$d[o]=At(o,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Gt(Ve({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const a in this.$$p_d)if(this.$$d[a]=this.$$c.$$.ctx[this.$$c.$$.props[a]],this.$$p_d[a].reflect){const o=At(a,this.$$d[a],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,o)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const a in this.$$l)for(const o of this.$$l[a]){const s=this.$$c.$on(a,o);this.$$l_u.set(o,s)}this.$$l={}}})}attributeChangedCallback(t,n,r){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=At(t,r,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function At(e,t,n,r){var a;const i=(a=n[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function mn(e,t,n,r,i,a){let o=class extends sr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Object.keys(t).forEach(s=>{Object.defineProperty(o.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(l){var u;l=At(s,l,t),this.$$d[s]=l,(u=this.$$c)==null||u.$set({[s]:l})}})}),r.forEach(s=>{Object.defineProperty(o.prototype,s,{get(){var l;return(l=this.$$c)==null?void 0:l[s]}})}),e.element=o,o}class gn{constructor(){le(this,"$$");le(this,"$$set")}$destroy(){ze(this,1),this.$destroy=L}$on(t,n){if(!ft(n))return L;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!kr(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const qr="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(qr);const Ge=[];function ei(e,t){return{subscribe:Nt(e,t).subscribe}}function Nt(e,t=L){let n;const r=new Set;function i(s){if(Lt(e,s)&&(e=s,n)){const l=!Ge.length;for(const u of r)u[1](),Ge.push(u,e);if(l){for(let u=0;u<Ge.length;u+=2)Ge[u][0](Ge[u+1]);Ge.length=0}}}function a(s){i(s(e))}function o(s,l=L){const u=[s,l];return r.add(u),r.size===1&&(n=t(i,a)||L),s(e),()=>{r.delete(u),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function Je(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=t.length<2;return ei(n,(o,s)=>{let l=!1;const u=[];let c=0,f=L;const h=()=>{if(c)return;f();const _=t(r?u[0]:u,o,s);a?o(_):f=ft(_)?_:L},m=i.map((_,p)=>rr(_,E=>{u[p]=E,c&=~(1<<p),l&&h()},()=>{c|=1<<p}));return l=!0,h(),function(){we(m),f(),l=!1}})}function ti(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ni=function(t){return ri(t)&&!ii(t)};function ri(e){return!!e&&typeof e=="object"}function ii(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||si(e)}var ai=typeof Symbol=="function"&&Symbol.for,oi=ai?Symbol.for("react.element"):60103;function si(e){return e.$$typeof===oi}function li(e){return Array.isArray(e)?[]:{}}function ct(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ze(li(e),e,t):e}function ui(e,t,n){return e.concat(t).map(function(r){return ct(r,n)})}function ci(e,t){if(!t.customMerge)return Ze;var n=t.customMerge(e);return typeof n=="function"?n:Ze}function hi(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Sn(e){return Object.keys(e).concat(hi(e))}function lr(e,t){try{return t in e}catch(n){return!1}}function fi(e,t){return lr(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function di(e,t,n){var r={};return n.isMergeableObject(e)&&Sn(e).forEach(function(i){r[i]=ct(e[i],n)}),Sn(t).forEach(function(i){fi(e,i)||(lr(e,i)&&n.isMergeableObject(t[i])?r[i]=ci(i,n)(e[i],t[i],n):r[i]=ct(t[i],n))}),r}function Ze(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||ui,n.isMergeableObject=n.isMergeableObject||ni,n.cloneUnlessOtherwiseSpecified=ct;var r=Array.isArray(t),i=Array.isArray(e),a=r===i;return a?r?n.arrayMerge(e,t,n):di(e,t,n):ct(t,n)}Ze.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ze(r,i,n)},{})};var pi=Ze,mi=pi;const gi=ti(mi);var nn=function(e,t){return nn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},nn(e,t)};function Ot(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");nn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var me=function(){return me=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},me.apply(this,arguments)};function bi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Xt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Wt(e,t){var n=t&&t.cache?t.cache:Ai,r=t&&t.serializer?t.serializer:xi,i=t&&t.strategy?t.strategy:Ei;return i(e,{cache:n,serializer:r})}function yi(e){return e==null||typeof e=="number"||typeof e=="boolean"}function vi(e,t,n,r){var i=yi(r)?r:n(r),a=t.get(i);return typeof a=="undefined"&&(a=e.call(this,r),t.set(i,a)),a}function ur(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a=="undefined"&&(a=e.apply(this,r),t.set(i,a)),a}function cr(e,t,n,r,i){return n.bind(t,e,r,i)}function Ei(e,t){var n=e.length===1?vi:ur;return cr(e,this,n,t.cache.create(),t.serializer)}function _i(e,t){return cr(e,this,ur,t.cache.create(),t.serializer)}var xi=function(){return JSON.stringify(arguments)},wi=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),Ai={create:function(){return new wi}},zt={variadic:_i},Ht=function(){return Ht=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ht.apply(this,arguments)};var I;(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"})(I||(I={}));var U;(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"})(U||(U={}));var Qe;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Qe||(Qe={}));function Hn(e){return e.type===U.literal}function Ti(e){return e.type===U.argument}function hr(e){return e.type===U.number}function fr(e){return e.type===U.date}function dr(e){return e.type===U.time}function pr(e){return e.type===U.select}function mr(e){return e.type===U.plural}function Ci(e){return e.type===U.pound}function gr(e){return e.type===U.tag}function br(e){return!!(e&&typeof e=="object"&&e.type===Qe.number)}function rn(e){return!!(e&&typeof e=="object"&&e.type===Qe.dateTime)}var yr=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Bi=/(?:[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 Si(e){var t={};return e.replace(Bi,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"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"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.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");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-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"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.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");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<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 V=function(){return V=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},V.apply(this,arguments)};var Hi=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Pi(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Hi).filter(function(h){return h.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],o=a.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var s=o[0],l=o.slice(1),u=0,c=l;u<c.length;u++){var f=c[u];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:l})}return n}function Ii(e){return e.replace(/^(.*?)-/,"")}var Pn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,vr=/^(@+)?(\+|#+)?[rs]?$/g,Li=/(\*)(0+)|(#+)(0+)|(0+)/g,Er=/^(0+)$/;function In(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(vr,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function _r(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 Ni(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Er.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ln(e){var t={},n=_r(e);return n||t}function Oi(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.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=Ii(i.options[0]);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=V(V(V({},t),{notation:"scientific"}),i.options.reduce(function(l,u){return V(V({},l),Ln(u))},{}));continue;case"engineering":t=V(V(V({},t),{notation:"engineering"}),i.options.reduce(function(l,u){return V(V({},l),Ln(u))},{}));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(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Li,function(l,u,c,f,h,m){if(u)t.minimumIntegerDigits=c.length;else{if(f&&h)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Er.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Pn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Pn,function(l,u,c,f,h,m){return c==="*"?t.minimumFractionDigits=u.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:h&&m?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+m.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var a=i.options[0];a==="w"?t=V(V({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=V(V({},t),In(a)));continue}if(vr.test(i.stem)){t=V(V({},t),In(i.stem));continue}var o=_r(i.stem);o&&(t=V(V({},t),o));var s=Ni(i.stem);s&&(t=V(V({},t),s))}return t}var _t={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Ri(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var o=1+(a&1),s=a<2?1:3+(a>>1),l="a",u=Di(t);for((u=="H"||u=="k")&&(s=0);s-- >0;)n+=l;for(;o-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function Di(e){var t=e.hourCycle;if(t===void 0&&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 n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=_t[r||""]||_t[n||""]||_t["".concat(n,"-001")]||_t["001"];return i[0]}var Zt,Mi=new RegExp("^".concat(yr.source,"*")),ki=new RegExp("".concat(yr.source,"*$"));function N(e,t){return{start:e,end:t}}var Ui=!!String.prototype.startsWith&&"_a".startsWith("a",1),Vi=!!String.fromCodePoint,Fi=!!Object.fromEntries,Gi=!!String.prototype.codePointAt,$i=!!String.prototype.trimStart,ji=!!String.prototype.trimEnd,Xi=!!Number.isSafeInteger,Wi=Xi?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},an=!0;try{var zi=wr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");an=((Zt=zi.exec("a"))===null||Zt===void 0?void 0:Zt[0])==="a"}catch(e){an=!1}var Nn=Ui?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},on=Vi?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,o;i>a;){if(o=t[a++],o>1114111)throw RangeError(o+" is not a valid code point");r+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return r},On=Fi?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],o=a[0],s=a[1];n[o]=s}return n},xr=Gi?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Zi=$i?function(t){return t.trimStart()}:function(t){return t.replace(Mi,"")},Qi=ji?function(t){return t.trimEnd()}:function(t){return t.replace(ki,"")};function wr(e,t){return new RegExp(e,t)}var sn;if(an){var Rn=wr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");sn=function(t,n){var r;Rn.lastIndex=n;var i=Rn.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else sn=function(t,n){for(var r=[];;){var i=xr(t,n);if(i===void 0||Ar(i)||qi(i))break;r.push(i),n+=i>=65536?2:1}return on.apply(void 0,r)};var Ki=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var o=this.parseArgument(t,r);if(o.err)return o;i.push(o.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:U.pound,location:N(s,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(I.UNMATCHED_CLOSING_TAG,N(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&ln(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:U.literal,value:"<".concat(i,"/>"),location:N(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var o=a.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ln(this.char()))return this.error(I.INVALID_TAG,N(s,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(I.UNMATCHED_CLOSING_TAG,N(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:U.tag,value:i,children:o,location:N(r,this.clonePosition())},err:null}:this.error(I.INVALID_TAG,N(s,this.clonePosition())))}else return this.error(I.UNCLOSED_TAG,N(r,this.clonePosition()))}else return this.error(I.INVALID_TAG,N(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Ji(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var o=this.tryParseUnquoted(t,n);if(o){i+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var l=N(r,this.clonePosition());return{val:{type:U.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Yi(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return on.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),on(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,N(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(I.EMPTY_ARGUMENT,N(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(I.MALFORMED_ARGUMENT,N(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,N(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:U.argument,value:i,location:N(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,N(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(I.MALFORMED_ARGUMENT,N(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=sn(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),o=N(t,a);return{value:r,location:o}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(s){case"":return this.error(I.EXPECT_ARGUMENT_TYPE,N(o,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var h=Qi(f.val);if(h.length===0)return this.error(I.EXPECT_ARGUMENT_STYLE,N(this.clonePosition(),this.clonePosition()));var m=N(c,this.clonePosition());u={style:h,styleLocation:m}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var p=N(i,this.clonePosition());if(u&&Nn(u==null?void 0:u.style,"::",0)){var E=Zi(u.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(E,u.styleLocation);return f.err?f:{val:{type:U.number,value:r,location:p,style:f.val},err:null}}else{if(E.length===0)return this.error(I.EXPECT_DATE_TIME_SKELETON,p);var T=E;this.locale&&(T=Ri(E,this.locale));var h={type:Qe.dateTime,pattern:T,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Si(T):{}},O=s==="date"?U.date:U.time;return{val:{type:O,value:r,location:p,style:h},err:null}}}return{val:{type:s==="number"?U.number:s==="date"?U.date:U.time,value:r,location:p,style:(a=u==null?void 0:u.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(I.EXPECT_SELECT_ARGUMENT_OPTIONS,N(y,Ht({},y)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),M=0;if(s!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,N(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,I.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),D=this.parseIdentifierIfPossible(),M=f.val}var X=this.tryParsePluralOrSelectOptions(t,s,n,D);if(X.err)return X;var _=this.tryParseArgumentClose(i);if(_.err)return _;var ge=N(i,this.clonePosition());return s==="select"?{val:{type:U.select,value:r,options:On(X.val),location:ge},err:null}:{val:{type:U.plural,value:r,options:On(X.val),offset:M,pluralType:s==="plural"?"cardinal":"ordinal",location:ge},err:null}}default:return this.error(I.INVALID_ARGUMENT_TYPE,N(o,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,N(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(I.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,N(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=Pi(t)}catch(i){return this.error(I.INVALID_NUMBER_SKELETON,n)}return{val:{type:Qe.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Oi(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,o=!1,s=[],l=new Set,u=i.value,c=i.location;;){if(u.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_SELECTOR,I.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=N(f,this.clonePosition()),u=this.message.slice(f.offset,this.offset())}else break}if(l.has(u))return this.error(n==="select"?I.DUPLICATE_SELECT_ARGUMENT_SELECTOR:I.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);u==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?I.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:I.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,N(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,n,r);if(_.err)return _;var p=this.tryParseArgumentClose(m);if(p.err)return p;s.push([u,{value:_.val,location:N(m,this.clonePosition())}]),l.add(u),this.bumpSpace(),a=this.parseIdentifierIfPossible(),u=a.value,c=a.location}return s.length===0?this.error(n==="select"?I.EXPECT_SELECT_ARGUMENT_SELECTOR:I.EXPECT_PLURAL_ARGUMENT_SELECTOR,N(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(I.MISSING_OTHER_CLAUSE,N(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)a=!0,o=o*10+(s-48),this.bump();else break}var l=N(i,this.clonePosition());return a?(o*=r,Wi(o)?{val:o,err:null}:this.error(n,l)):this.error(t,l)},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 t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=xr(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Nn(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.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 n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ar(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r!=null?r:null},e}();function ln(e){return e>=97&&e<=122||e>=65&&e<=90}function Yi(e){return ln(e)||e===47}function Ji(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||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 Ar(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function qi(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===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>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||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||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===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>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===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>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||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||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function un(e){e.forEach(function(t){if(delete t.location,pr(t)||mr(t))for(var n in t.options)delete t.options[n].location,un(t.options[n].value);else hr(t)&&br(t.style)||(fr(t)||dr(t))&&rn(t.style)?delete t.style.location:gr(t)&&un(t.children)})}function ea(e,t){t===void 0&&(t={}),t=Ht({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ki(e,t).parse();if(n.err){var r=SyntaxError(I[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||un(n.val),n.val}var Ke;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ke||(Ke={}));var Rt=function(e){Ot(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Dn=function(e){Ot(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Ke.INVALID_VALUE,a)||this}return t}(Rt),ta=function(e){Ot(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ke.INVALID_VALUE,i)||this}return t}(Rt),na=function(e){Ot(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Ke.MISSING_VALUE,r)||this}return t}(Rt),J;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(J||(J={}));function ra(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==J.literal||n.type!==J.literal?t.push(n):r.value+=n.value,t},[])}function ia(e){return typeof e=="function"}function Tt(e,t,n,r,i,a,o){if(e.length===1&&Hn(e[0]))return[{type:J.literal,value:e[0].value}];for(var s=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Hn(c)){s.push({type:J.literal,value:c.value});continue}if(Ci(c)){typeof a=="number"&&s.push({type:J.literal,value:n.getNumberFormat(t).format(a)});continue}var f=c.value;if(!(i&&f in i))throw new na(f,o);var h=i[f];if(Ti(c)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),s.push({type:typeof h=="string"?J.literal:J.object,value:h});continue}if(fr(c)){var m=typeof c.style=="string"?r.date[c.style]:rn(c.style)?c.style.parsedOptions:void 0;s.push({type:J.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(dr(c)){var m=typeof c.style=="string"?r.time[c.style]:rn(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:J.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(hr(c)){var m=typeof c.style=="string"?r.number[c.style]:br(c.style)?c.style.parsedOptions:void 0;m&&m.scale&&(h=h*(m.scale||1)),s.push({type:J.literal,value:n.getNumberFormat(t,m).format(h)});continue}if(gr(c)){var _=c.children,p=c.value,E=i[p];if(!ia(E))throw new ta(p,"function",o);var T=Tt(_,t,n,r,i,a),O=E(T.map(function(M){return M.value}));Array.isArray(O)||(O=[O]),s.push.apply(s,O.map(function(M){return{type:typeof M=="string"?J.literal:J.object,value:M}}))}if(pr(c)){var y=c.options[h]||c.options.other;if(!y)throw new Dn(c.value,h,Object.keys(c.options),o);s.push.apply(s,Tt(y.value,t,n,r,i));continue}if(mr(c)){var y=c.options["=".concat(h)];if(!y){if(!Intl.PluralRules)throw new Rt(`Intl.PluralRules is not available in this environment.
2
- Try polyfilling it using "@formatjs/intl-pluralrules"
3
- `,Ke.MISSING_INTL_API,o);var D=n.getPluralRules(t,{type:c.pluralType}).select(h-(c.offset||0));y=c.options[D]||c.options.other}if(!y)throw new Dn(c.value,h,Object.keys(c.options),o);s.push.apply(s,Tt(y.value,t,n,r,i,h-(c.offset||0)));continue}}return ra(s)}function aa(e,t){return t?me(me(me({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=me(me({},e[r]),t[r]||{}),n},{})):e}function oa(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=aa(e[r],t[r]),n},me({},e)):e}function Qt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function sa(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Wt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Xt([void 0],n,!1)))},{cache:Qt(e.number),strategy:zt.variadic}),getDateTimeFormat:Wt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Xt([void 0],n,!1)))},{cache:Qt(e.dateTime),strategy:zt.variadic}),getPluralRules:Wt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Xt([void 0],n,!1)))},{cache:Qt(e.pluralRules),strategy:zt.variadic})}}var la=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var u=a.formatToParts(l);if(u.length===1)return u[0].value;var c=u.reduce(function(f,h){return!f.length||h.type!==J.literal||typeof f[f.length-1]!="string"?f.push(h.value):f[f.length-1]+=h.value,f},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(l){return Tt(a.ast,a.locales,a.formatters,a.formats,l,void 0,a.message)},this.resolvedOptions=function(){var l;return{locale:((l=a.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var o=i||{};o.formatters;var s=bi(o,["formatters"]);this.ast=e.__parse(t,me(me({},s),{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=oa(e.formats,r),this.formatters=i&&i.formatters||sa(this.formatterCache)}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(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=ea,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}();function ua(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const a=n.slice(i,n.length).join(".");if(a in r){r=r[a];break}}r=r[n[i]]}else r=void 0;return r}const Ie={},ca=(e,t,n)=>n&&(t in Ie||(Ie[t]={}),e in Ie[t]||(Ie[t][e]=n),n),Tr=(e,t)=>{if(t==null)return;if(t in Ie&&e in Ie[t])return Ie[t][e];const n=Dt(t);for(let r=0;r<n.length;r++){const i=n[r],a=fa(i,e);if(a)return ca(e,t,a)}};let bn;const qe=Nt({});function ha(e){return bn[e]||null}function Cr(e){return e in bn}function fa(e,t){if(!Cr(e))return null;const n=ha(e);return ua(n,t)}function da(e){if(e==null)return;const t=Dt(e);for(let n=0;n<t.length;n++){const r=t[n];if(Cr(r))return r}}function Br(e,...t){delete Ie[e],qe.update(n=>(n[e]=gi.all([n[e]||{},...t]),n))}Je([qe],([e])=>Object.keys(e));qe.subscribe(e=>bn=e);const Ct={};function pa(e,t){Ct[e].delete(t),Ct[e].size===0&&delete Ct[e]}function Sr(e){return Ct[e]}function ma(e){return Dt(e).map(t=>{const n=Sr(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function cn(e){return e==null?!1:Dt(e).some(t=>{var n;return(n=Sr(t))==null?void 0:n.size})}function ga(e,t){return Promise.all(t.map(r=>(pa(e,r),r().then(i=>i.default||i)))).then(r=>Br(e,...r))}const ot={};function Hr(e){if(!cn(e))return e in ot?ot[e]:Promise.resolve();const t=ma(e);return ot[e]=Promise.all(t.map(([n,r])=>ga(n,r))).then(()=>{if(cn(e))return Hr(e);delete ot[e]}),ot[e]}const ba={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"}}},ya={fallbackLocale:null,loadingDelay:200,formats:ba,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},va=ya;function Ye(){return va}const Kt=Nt(!1);var Ea=Object.defineProperty,_a=Object.defineProperties,xa=Object.getOwnPropertyDescriptors,Mn=Object.getOwnPropertySymbols,wa=Object.prototype.hasOwnProperty,Aa=Object.prototype.propertyIsEnumerable,kn=(e,t,n)=>t in e?Ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ta=(e,t)=>{for(var n in t||(t={}))wa.call(t,n)&&kn(e,n,t[n]);if(Mn)for(var n of Mn(t))Aa.call(t,n)&&kn(e,n,t[n]);return e},Ca=(e,t)=>_a(e,xa(t));let hn;const Pt=Nt(null);function Un(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function Dt(e,t=Ye().fallbackLocale){const n=Un(e);return t?[...new Set([...n,...Un(t)])]:n}function De(){return hn!=null?hn:void 0}Pt.subscribe(e=>{hn=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Ba=e=>{if(e&&da(e)&&cn(e)){const{loadingDelay:t}=Ye();let n;return typeof window!="undefined"&&De()!=null&&t?n=window.setTimeout(()=>Kt.set(!0),t):Kt.set(!0),Hr(e).then(()=>{Pt.set(e)}).finally(()=>{clearTimeout(n),Kt.set(!1)})}return Pt.set(e)},Le=Ca(Ta({},Pt),{set:Ba}),Mt=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var Sa=Object.defineProperty,It=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,Vn=(e,t,n)=>t in e?Sa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yn=(e,t)=>{for(var n in t||(t={}))Pr.call(t,n)&&Vn(e,n,t[n]);if(It)for(var n of It(t))Ir.call(t,n)&&Vn(e,n,t[n]);return e},et=(e,t)=>{var n={};for(var r in e)Pr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&It)for(var r of It(e))t.indexOf(r)<0&&Ir.call(e,r)&&(n[r]=e[r]);return n};const ht=(e,t)=>{const{formats:n}=Ye();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Ha=Mt(e=>{var t=e,{locale:n,format:r}=t,i=et(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=ht("number",r)),new Intl.NumberFormat(n,i)}),Pa=Mt(e=>{var t=e,{locale:n,format:r}=t,i=et(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=ht("date",r):Object.keys(i).length===0&&(i=ht("date","short")),new Intl.DateTimeFormat(n,i)}),Ia=Mt(e=>{var t=e,{locale:n,format:r}=t,i=et(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=ht("time",r):Object.keys(i).length===0&&(i=ht("time","short")),new Intl.DateTimeFormat(n,i)}),La=(e={})=>{var t=e,{locale:n=De()}=t,r=et(t,["locale"]);return Ha(yn({locale:n},r))},Na=(e={})=>{var t=e,{locale:n=De()}=t,r=et(t,["locale"]);return Pa(yn({locale:n},r))},Oa=(e={})=>{var t=e,{locale:n=De()}=t,r=et(t,["locale"]);return Ia(yn({locale:n},r))},Ra=Mt((e,t=De())=>new la(e,t,Ye().formats,{ignoreTag:Ye().ignoreTag})),Da=(e,t={})=>{var n,r,i,a;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:s,locale:l=De(),default:u}=o;if(l==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Tr(e,l);if(!c)c=(a=(i=(r=(n=Ye()).handleMissingMessage)==null?void 0:r.call(n,{locale:l,id:e,defaultValue:u}))!=null?i:u)!=null?a:e;else if(typeof c!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c;if(!s)return c;let f=c;try{f=Ra(c,l).format(s)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return f},Ma=(e,t)=>Oa(t).format(e),ka=(e,t)=>Na(t).format(e),Ua=(e,t)=>La(t).format(e),Va=(e,t=De())=>Tr(e,t),Fa=Je([Le,qe],()=>Da);Je([Le],()=>Ma);Je([Le],()=>ka);Je([Le],()=>Ua);Je([Le,qe],()=>Va);function Ga({withLocale:e,translations:t}){Le.subscribe(n=>{n==null&&(qe.set(t),Le.set(e))})}function Fn(e,t){Br(e,t)}function $a(e){Le.set(e)}const k=Ur(Fa),Gn={en:{vaultExchange:"Vault Exchange",debitPlaceHolder:"Debit amount",creditPlaceHolder:"Credit amount",totalBalance:"Total balance",currentBalance:"Balance",balanceUnavailable:"Balance unavailable. Please try again.",exchangeFrom:"From",exchangeTo:"To",creditAmount:"Credit Amount",debitAmount:"Debit Amount",exchange:"Exchange",accept:"Accept",decline:"Decline",reset:"Reset",select:"Select",exchangeSuccess:"Exchange completed successfully!",feesIncluded:"Fees included",feesUnavailable:"Fees unavailable.",invalidValue:"Invalid value",exceededValue:"Amount exceeds balance",generalError:"An error occurred during the wallet exchange. Please try again.",InternalError:"A technical error occurred. Please try again.",InvalidSession:"Invalid session. Please try again.",1001:"A technical error occurred. Please try again later.",1002:"A database error occurred. Please try again later.",1003:"Invalid parameters provided. Please check your input.",1004:"No changes were detected.",1005:"The data was updated by someone else. Please try again.",1006:"An API error occurred. Please try again later.",1007:"The request timed out. Please try again later.",1008:"Failed to acquire necessary lock. Please try again.",1009:"This feature is currently not enabled.",1010:"Database connection timed out. Please try again later.",1011:"Database command timed out. Please try again later.",1012:"Database is not properly configured. Please contact support.",1013:"Failed to update internal state. Please try again.",1103:"A transaction error occurred. Please try again later.",1105:"Wallet not found.",1504:"You are not permitted to perform this action.",1506:"Fee has been invalidated. Please recalculate.",1507:"This fee addition type is not supported.",1508:"Insufficient funds to apply the fee.",10101:"An unknown technical error occurred.",10102:"User is blocked from performing this action.",10103:"User not found.",10104:"Insufficient funds to withdraw. Requested amount is greater than available balance.",10106:"The selected currency is not supported.",10107:"Transaction is currently being processed. Please wait.",10108:"Transaction not found.",10113:"User is self-excluded. Action cannot be performed.",10114:"User account is not active.",10115:"Transaction intent not found."},tr:{vaultExchange:"Kasa Değişimi",debitPlaceHolder:"Borç miktarı",creditPlaceHolder:"Alacak miktarı",totalBalance:"Toplam bakiye",currentBalance:"Bakiye",balanceUnavailable:"Bakiye kullanılamıyor. Lütfen tekrar deneyin.",exchangeFrom:"Şuradan Değiştir",exchangeTo:"Şuraya Değiştir",creditAmount:"Kredi Tutarı",debitAmount:"Borç Tutarı",exchange:"Değiştir",accept:"Kabul etmek",decline:"Reddetmek",reset:"Sıfırla",select:"Seç",feesIncluded:"Ücretler dahil",feesUnavailable:"Ücretler mevcut değil.",exchangeSuccess:"Değişim başarıyla tamamlandı!",invalidValue:"Geçersiz değer",exceededValue:"Tutar, bakiyeyi aşıyor",generalError:"Cüzdan değişimi sırasında bir hata oluştu. Lütfen tekrar deneyin.",InternalError:"Teknik bir hata oluştu. Lütfen tekrar deneyin.",InvalidSession:"Geçersiz oturum. Lütfen tekrar deneyin.",1001:"Bir teknik hata oluştu. Lütfen daha sonra tekrar deneyin.",1002:"Bir veritabanı hatası oluştu. Lütfen daha sonra tekrar deneyin.",1003:"Geçersiz parametreler sağlandı. Lütfen girdilerinizi kontrol edin.",1004:"Herhangi bir değişiklik tespit edilmedi.",1005:"Veri başka biri tarafından güncellendi. Lütfen tekrar deneyin.",1006:"Bir API hatası oluştu. Lütfen daha sonra tekrar deneyin.",1007:"İstek zaman aşımına uğradı. Lütfen daha sonra tekrar deneyin.",1008:"Gerekli kilit alınamadı. Lütfen tekrar deneyin.",1009:"Bu özellik şu anda etkin değil.",1010:"Veritabanı bağlantısı zaman aşımına uğradı. Lütfen daha sonra tekrar deneyin.",1011:"Veritabanı komutu zaman aşımına uğradı. Lütfen daha sonra tekrar deneyin.",1012:"Veritabanı düzgün yapılandırılmamış. Lütfen destek ile iletişime geçin.",1013:"İç durum güncellenemedi. Lütfen tekrar deneyin.",1103:"Bir işlem hatası oluştu. Lütfen daha sonra tekrar deneyin.",1105:"Cüzdan bulunamadı.",1504:"Bu işlemi gerçekleştirme izniniz yok.",1506:"Ücret geçersiz hale getirildi. Lütfen yeniden hesaplayın.",1507:"Bu ücret ekleme türü desteklenmiyor.",1508:"Ücreti uygulamak için yetersiz bakiye.",10101:"Bilinmeyen bir teknik hata oluştu.",10102:"Kullanıcı bu işlemi gerçekleştirmekten engellenmiştir.",10103:"Kullanıcı bulunamadı.",10104:"Yetersiz bakiye. Talep edilen tutar, mevcut bakiyeden fazladır.",10106:"Seçilen para birimi desteklenmiyor.",10107:"İşlem şu anda işleniyor. Lütfen bekleyin.",10108:"İşlem bulunamadı.",10113:"Kullanıcı kendini dışladı. İşlem gerçekleştirilemez.",10114:"Kullanıcı hesabı aktif değil.",10115:"İşlem niyeti bulunamadı."}},ja={"1INCH":"",AAVE:"",ADA:"₳",ADF:"",ADP:"",AED:"د.إ",AFN:"؋",ALGO:"Ⱥ",ALL:"L",AMD:"Դ",AMP:"",ANG:"ƒ",AOA:"Kz",AQAQAAUKXMYQOUSOUJHLTNBOI:"",AQAQAAUXKBXDCWFVEDYIDYHWD:"",AQAQADPGMAZQICGIVARVFRSQS:"",AQAQAFDJIKCUBVVVGVQNBWRDX:"",AQAQAFMRIPFFPCHYHKSGDDGOF:"",AQAQAFRMNSQNCLRLEJGEIDLDO:"",AQAQAJMRAJIZSQTNLYHHJNUIA:"",AQAQAOLFQBZJAPJMVXZDAXXKJ:"",AR:"",ARS:"$",ATOM:"",AUD:"$",AVAX:"",AWG:"ƒ",AXS:"",AZN:"₼",BAM:"KM",BAT:"",BBD:"$",BCH:"Ƀ",BDT:"৳",BGN:"лв",BHD:"ب.د",BIF:"",BMD:"$",BNB:"",BND:"$",BOB:"$b",BORA:"",BRL:"R$",BSD:"$",BSV:"Ɓ",BTC:"₿",BTCB:"",BTN:"Nu.",BTT:"",BUSD:"₮",BWP:"P",BYN:"Br",BYR:"",BZD:"BZ$",CAD:"$",CAKE:"",CDF:"",CEL:"",CELO:"",CHF:"CHF",CHZ:"",CLP:"$",CNY:"¥",COMP:"",COP:"$",CRC:"₡",CRO:"",CRV:"",CUC:"",CUP:"₱",CVE:"",CZK:"Kč",DAI:"◈",DASH:"Đ",DCR:"",DJF:"",DKK:"kr",DOGE:"Ð",DOP:"RD$",DOT:"●",DZD:"د.ج",EEK:"",EGLD:"",EGP:"£",ELON:"",ENJ:"",EOS:"ε",ETB:"",ETC:"ξ",ETH:"Ξ",EUR:"€",FIL:"⨎",FJD:"$",FKP:"£",FLOW:"",FTM:"",FTT:"",FUN:"",GALA:"",GBP:"£",GCC:"",GEL:"",GHS:"¢",GIP:"£",GMD:"",GNF:"",GRT:"",GTQ:"Q",GYD:"$",HBAR:"",HKD:"$",HNL:"L",HNT:"",HOT:"",HRK:"",HT:"",HTG:"",HUF:"Ft",ICP:"∞",ICX:"",IDR:"Rp",ILS:"₪",INR:"₹",IOTX:"",IQD:"د.ع",IRR:"﷼",ISK:"kr",JMD:"J$",JOD:"د.ا",JPY:"¥",KCS:"",KDA:"",KES:"KSh",KGS:"лв",KHR:"៛",KLAY:"",KPW:"₩",KRW:"₩",KSM:"",KWD:"د.ك",KYD:"$",KZT:"лв",LAK:"₭",LBP:"£",LEO:"",LINK:"",LKR:"₨",LPT:"",LRC:"",LRD:"$",LSL:"",LTC:"Ł",LTL:"",LUNA:"",LVL:"",LYD:"د.ل",MAD:"د.م",MANA:"",MATIC:"",MDL:"",MGA:"",MINA:"",MIOTA:"ɨ",MKD:"ден",MKR:"Μ",MMK:"",MNT:"₮",MOP:"",MRO:"",MUR:"₨",MVR:"",MWK:"",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NEAR:"",NEO:"",NEXO:"",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OKB:"",OMG:"",OMR:"﷼",ONE:"",PAB:"B/.",PEN:"S/.",PGK:"",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"₲",QAR:"﷼",QNT:"",QTUM:"",RON:"lei",ROSE:"",RSD:"Дин.",RUB:"₽",RUNE:"",RVN:"",RWF:"",SAND:"",SAR:"﷼",SBD:"$",SCC:"",SCR:"₨",SDG:"د.س",SEK:"kr",SGD:"$",SHIB:"",SHP:"£",SLL:"",SOL:"",SOS:"S",SRD:"$",STD:"",STX:"",SUSHI:"",SVC:"$",SYP:"£",SZL:"",TES:"",TFUEL:"",THB:"฿",THETA:"ϑ",TJS:"",TMT:"",TND:"د.ت",TOP:"",TRX:"",TRY:"₺",TTD:"TT$",TUSD:"",TWD:"NT$",TZS:"",UAH:"₴",UGX:"",UNI:"",USD:"$",USDC:"",USDT:"₮",UST:"",UYU:"$U",UZS:"лв",VEF:"",VES:"Bs",VET:"",VND:"₫",VUV:"",WAVES:"",WBTC:"₿",WST:"",XAF:"",XCD:"$",XDC:"",XEC:"",XEM:"",XFUN:"",XLM:"✕",XMR:"ɱ",XOF:"",XPF:"",XRP:"✕",XTZ:"ꜩ",YER:"﷼",YFI:"",ZAR:"R",ZEC:"ⓩ",ZMK:"",ZMW:"",ZWD:"Z$"},Xa=6e3,Wa={InvalidSession:"Invalid session"},Q={BalanceError:"BalanceError",CheckWalletExchangeError:"CheckWalletExchangeError",WalletExchangeError:"WalletExchangeError",CurrenciesError:"CurrenciesError"},$n={ResetVaultWidget:"ResetVaultWidget",CloseVaultWidget:"CloseVaultWidget"},Yt={VaultWidgetReset:"VaultWidgetReset",VaultWidgetClosed:"VaultWidgetClosed",VaultDropdownToggled:"VaultDropdownToggled"},jn={Real:"Real",Vault:"Vault"},He={success:"success",error:"error"},Jt=String(Number.MAX_SAFE_INTEGER).length+1,xt={ArrowDown:"ArrowDown",ArrowUp:"ArrowUp",Enter:"Enter",Escape:"Escape"},Pe={true:"true"},Xn={Fiat:"Fiat",CryptoCurrency:"CryptoCurrency"};function za(e,t){let n;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(r)},t)}}const Wn=(e,t=null,n=2)=>{try{return JSON.stringify(e,t,n)}catch(r){return console.warn("Failed to stringify:",r),null}};function Za(e){const t=n=>{e.contains(n.target)||e.dispatchEvent(new CustomEvent("outclick"))};return document.addEventListener("click",t),{destroy(){document.removeEventListener("click",t)}}}function Qa(e){dn(e,"svelte-ieaeyb",".selectWrapper.svelte-ieaeyb.svelte-ieaeyb{position:relative;min-width:96px;font-family:inherit;height:var(--emw--base-height, 36px);font-size:var(--emw--font-size-small, 12px);border-radius:var(--emw--border-radius-small, 8px)}.selectButton.svelte-ieaeyb.svelte-ieaeyb{width:100%;height:100%;cursor:pointer;text-align:left;border:unset;display:flex;align-items:center;justify-content:space-between;color:var(--emw--select-typography, #595959);background-color:rgba(255, 255, 255, var(--emw--background-opacity, 0.9));-webkit-backdrop-filter:blur(var(--emw--filter-blur, 31.5px));backdrop-filter:blur(var(--emw--filter-blur, 31.5px));padding:0 var(--emw--spacing-small, 10px);font-size:var(--emw--font-size-small, 12px);border-radius:var(--emw--border-radius-small, 8px);font-family:inherit}.label.svelte-ieaeyb.svelte-ieaeyb{display:flex;align-items:center}.selectDropdown.svelte-ieaeyb.svelte-ieaeyb{position:absolute;top:calc(100% + 2px);left:0;right:0;display:flex;flex-direction:column;gap:4px;max-height:150px;overflow-y:auto;scrollbar-width:thin;z-index:100;background-color:rgba(255, 255, 255, var(--emw--background-opacity, 0.9));-webkit-backdrop-filter:blur(var(--emw--filter-blur, 31.5px));backdrop-filter:blur(var(--emw--filter-blur, 31.5px));border-radius:var(--emw--border-radius-small, 8px)}.selectDropdown.svelte-ieaeyb li.svelte-ieaeyb{height:24px;flex:0 0 24px;display:flex;align-items:center;;;padding:0 var(--emw--spacing-small, 10px);cursor:pointer;transition:all 0.3s ease}.selectDropdown.svelte-ieaeyb li.svelte-ieaeyb:hover,.selectDropdown.svelte-ieaeyb li.active.svelte-ieaeyb{background:var(--emw--selected-option, #f0f0f0)}.symbol.svelte-ieaeyb.svelte-ieaeyb{display:inline-flex;width:14px;height:14px;border-radius:50%;align-items:center;justify-content:center;line-height:0;margin-right:5px;overflow:hidden;background:var(--emw--symbol-background, #595959);font-size:var(--emw--font-size-small, 12px);color:var(--emw--symbol-typography, #fff)}")}function zn(e,t,n){const r=e.slice();return r[16]=t[n],r[18]=n,r}function Zn(e){var i;let t,n=(((i=e[0])==null?void 0:i.symbol)||"")+"",r;return{c(){t=A("span"),r=Z(n),b(t,"class","symbol svelte-ieaeyb")},m(a,o){H(a,t,o),v(t,r)},p(a,o){var s;o&1&&n!==(n=(((s=a[0])==null?void 0:s.symbol)||"")+"")&&re(r,n)},d(a){a&&S(t)}}}function Qn(e){let t,n=St(e[1]),r=[];for(let i=0;i<n.length;i+=1)r[i]=Kn(zn(e,n,i));return{c(){t=A("ul");for(let i=0;i<r.length;i+=1)r[i].c();b(t,"class","selectDropdown svelte-ieaeyb")},m(i,a){H(i,t,a);for(let o=0;o<r.length;o+=1)r[o]&&r[o].m(t,null);e[14](t)},p(i,a){if(a&547){n=St(i[1]);let o;for(o=0;o<n.length;o+=1){const s=zn(i,n,o);r[o]?r[o].p(s,a):(r[o]=Kn(s),r[o].c(),r[o].m(t,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(i){i&&S(t),ir(r,i),e[14](null)}}}function Kn(e){var h,m;let t,n,r=((h=e[16])==null?void 0:h.symbol)+"",i,a,o=((m=e[16])==null?void 0:m.currency)+"",s,l,u,c,f;return{c(){var _,p,E,T;t=A("li"),n=A("span"),i=Z(r),a=R(),s=Z(o),l=R(),b(n,"class","symbol svelte-ieaeyb"),b(t,"role","option"),b(t,"aria-selected",u=((_=e[16])==null?void 0:_.currency)===((p=e[0])==null?void 0:p.currency)||e[18]===e[5]),b(t,"class","svelte-ieaeyb"),ue(t,"active",((E=e[16])==null?void 0:E.currency)===((T=e[0])==null?void 0:T.currency)||e[18]===e[5])},m(_,p){H(_,t,p),v(t,n),v(n,i),v(t,a),v(t,s),v(t,l),c||(f=[ne(t,"keydown",Ya),ne(t,"click",function(){ft(e[9](e[16],e[18]))&&e[9](e[16],e[18]).apply(this,arguments)})],c=!0)},p(_,p){var E,T,O,y,D,M;e=_,p&2&&r!==(r=((E=e[16])==null?void 0:E.symbol)+"")&&re(i,r),p&2&&o!==(o=((T=e[16])==null?void 0:T.currency)+"")&&re(s,o),p&35&&u!==(u=((O=e[16])==null?void 0:O.currency)===((y=e[0])==null?void 0:y.currency)||e[18]===e[5])&&b(t,"aria-selected",u),p&35&&ue(t,"active",((D=e[16])==null?void 0:D.currency)===((M=e[0])==null?void 0:M.currency)||e[18]===e[5])},d(_){_&&S(t),c=!1,we(f)}}}function Ka(e){var _,p;let t,n,r,i,a=(((_=e[0])==null?void 0:_.currency)||e[2])+"",o,s,l,u,c,f,h=((p=e[0])==null?void 0:p.symbol)&&e[3]===Pe.true&&Zn(e),m=e[7]&&Qn(e);return{c(){t=A("div"),n=A("button"),r=A("span"),h&&h.c(),i=R(),o=Z(a),s=R(),l=A("span"),l.innerHTML='<svg width="12" height="7" viewBox="0 0 12 7" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M0.984228 0.664666C0.928537 0.612038 0.863025 0.570896 0.791433 0.543587C0.719842 0.516278 0.643572 0.503337 0.566979 0.505504C0.490386 0.50767 0.41497 0.524902 0.345037 0.556215C0.275103 0.587527 0.212022 0.632308 0.159395 0.687999C0.106768 0.74369 0.0656252 0.809203 0.0383161 0.880794C0.0110071 0.952386 -0.00193361 1.02866 0.000233093 1.10525C0.0023998 1.18184 0.0196314 1.25726 0.050944 1.32719C0.0822566 1.39712 0.127037 1.46021 0.182728 1.51283L5.43273 6.47117C5.54104 6.57356 5.68443 6.63061 5.83348 6.63061C5.98253 6.63061 6.12592 6.57356 6.23423 6.47117L11.4848 1.51283C11.5417 1.46055 11.5877 1.39748 11.62 1.32729C11.6523 1.2571 11.6704 1.18119 11.6731 1.10396C11.6759 1.02673 11.6633 0.949723 11.636 0.877415C11.6087 0.805107 11.5674 0.738937 11.5143 0.68275C11.4612 0.626563 11.3976 0.581479 11.3269 0.550115C11.2563 0.518751 11.1801 0.501734 11.1029 0.500051C11.0256 0.498369 10.9488 0.512054 10.8769 0.540313C10.8049 0.568572 10.7393 0.610841 10.6839 0.664665L5.83348 5.245L0.984228 0.664666Z" fill="currentColor"></path></svg>',u=R(),m&&m.c(),b(r,"class","label svelte-ieaeyb"),b(l,"class","arrow"),ue(l,"open",e[7]),b(n,"class","selectButton svelte-ieaeyb"),b(n,"aria-haspopup","listbox"),b(n,"aria-expanded",e[7]),b(n,"aria-controls","custom-select"),b(n,"tabindex","0"),n.disabled=e[4],b(t,"class","selectWrapper svelte-ieaeyb")},m(E,T){H(E,t,T),v(t,n),v(n,r),h&&h.m(r,null),v(r,i),v(r,o),v(n,s),v(n,l),v(t,u),m&&m.m(t,null),c||(f=[ne(n,"keydown",e[11]),ne(n,"click",jr(e[8])),Vr(Za.call(null,t)),ne(t,"outclick",e[10])],c=!0)},p(E,[T]){var O,y;(O=E[0])!=null&&O.symbol&&E[3]===Pe.true?h?h.p(E,T):(h=Zn(E),h.c(),h.m(r,i)):h&&(h.d(1),h=null),T&5&&a!==(a=(((y=E[0])==null?void 0:y.currency)||E[2])+"")&&re(o,a),T&128&&ue(l,"open",E[7]),T&128&&b(n,"aria-expanded",E[7]),T&16&&(n.disabled=E[4]),E[7]?m?m.p(E,T):(m=Qn(E),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},i:L,o:L,d(E){E&&S(t),h&&h.d(),m&&m.d(),c=!1,we(f)}}}const Ya=e=>e.preventDefault();function Ja(e,t,n){let{options:r=[]}=t,{selected:i=null}=t,{placeholder:a=k("select")}=t,{withSymbol:o="true"}=t,{id:s}=t,{disabled:l=!1}=t,{onChange:u=()=>{}}=t,c=-1,f,h=!1;const m=()=>{r.length!==0&&(n(7,h=!h),h&&(n(5,c=r.findIndex(y=>(y==null?void 0:y.currency)===(i==null?void 0:i.currency))),setTimeout(()=>f==null?void 0:f.focus(),0),window.dispatchEvent(new CustomEvent("dropdown-opened",{detail:s}))))},_=y=>{y.detail!==s&&h&&n(7,h=!1)},p=(y,D)=>()=>{n(7,h=!1),n(0,i=y),u&&typeof u=="function"&&u(y,D)},E=()=>{n(7,h=!1)},T=y=>{h&&(y.key===xt.ArrowDown?(y.preventDefault(),n(5,c=(c+1)%r.length)):y.key===xt.ArrowUp?(y.preventDefault(),n(5,c=(c-1+r.length)%r.length)):y.key===xt.Enter?(y.preventDefault(),p(i,c)()):y.key===xt.Escape&&n(7,h=!1))};or(()=>{window.addEventListener("dropdown-opened",_)}),zr(()=>{window.removeEventListener("dropdown-opened",_)});function O(y){Xe[y?"unshift":"push"](()=>{f=y,n(6,f)})}return e.$$set=y=>{"options"in y&&n(1,r=y.options),"selected"in y&&n(0,i=y.selected),"placeholder"in y&&n(2,a=y.placeholder),"withSymbol"in y&&n(3,o=y.withSymbol),"id"in y&&n(12,s=y.id),"disabled"in y&&n(4,l=y.disabled),"onChange"in y&&n(13,u=y.onChange)},[i,r,a,o,l,c,f,h,m,p,E,T,s,u,O]}class fn extends gn{constructor(t){super(),pn(this,t,Ja,Ka,Lt,{options:1,selected:0,placeholder:2,withSymbol:3,id:12,disabled:4,onChange:13},Qa)}get options(){return this.$$.ctx[1]}set options(t){this.$$set({options:t}),G()}get selected(){return this.$$.ctx[0]}set selected(t){this.$$set({selected:t}),G()}get placeholder(){return this.$$.ctx[2]}set placeholder(t){this.$$set({placeholder:t}),G()}get withSymbol(){return this.$$.ctx[3]}set withSymbol(t){this.$$set({withSymbol:t}),G()}get id(){return this.$$.ctx[12]}set id(t){this.$$set({id:t}),G()}get disabled(){return this.$$.ctx[4]}set disabled(t){this.$$set({disabled:t}),G()}get onChange(){return this.$$.ctx[13]}set onChange(t){this.$$set({onChange:t}),G()}}mn(fn,{options:{},selected:{},placeholder:{},withSymbol:{},id:{},disabled:{type:"Boolean"},onChange:{}},[],[],!0);function qa(e){dn(e,"svelte-2fhtvy",".warningIcon.svelte-2fhtvy{line-height:1;margin-right:0.4rem}")}function eo(e){let t,n,r=k("balanceUnavailable")+"",i;return{c(){t=A("span"),t.innerHTML='<svg fill="currentColor" width="20px" height="20px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><g><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z" style="fill-rule:nonzero;"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z" style="fill-rule:nonzero;"></path></g></svg>',n=R(),i=Z(r),b(t,"class","warningIcon svelte-2fhtvy")},m(a,o){H(a,t,o),H(a,n,o),H(a,i,o)},p:L,i:L,o:L,d(a){a&&(S(t),S(n),S(i))}}}class kt extends gn{constructor(t){super(),pn(this,t,null,eo,Lt,{},qa)}}mn(kt,{},[],[],!0);function to(e){dn(e,"svelte-rr3qrx",'@charset "UTF-8";*{margin:0;padding:0}.playerAccountVault{max-width:400px;display:flex;flex-direction:column;justify-content:center;align-items:center;margin:auto;font-family:inherit;overflow:hidden;gap:var(--emw--spacing-small, 10px);font-size:var(--emw--font-size-small, 12px);background:var(--emw--widget-background, #F8F8F8);color:var(--emw--typography, #595959);padding:var(--emw--spacing-medium, 16px);position:relative}.playerAccountVault .closeButton{position:absolute;background:none;border:none;top:var(--emw--spacing-medium, 16px);right:var(--emw--spacing-small, 10px);line-height:0;cursor:pointer}.playerAccountVault .closeButton svg{fill:var(--emw--color-faded, #A0A29F)}.playerAccountVault .playerVaultContainer{width:100%;display:flex;justify-content:space-between;align-items:center;gap:var(--emw--spacing-small, 10px);border-radius:var(--emw--border-radius-smaller, 5px);box-sizing:border-box}.playerAccountVault .amountContainer{display:flex;align-items:center}.playerAccountVault .headerContainer{display:flex;width:100%;gap:var(--emw--spacing-small, 10px);justify-content:space-between;flex-direction:column}.playerAccountVault .headerContainer .headerTitle{font-family:inherit;color:var(--emw--color-secondary, #24B04F);font-size:var(--emw--font-size-large, 16px);font-weight:var(--emw--font-weight-normal, 400)}.playerAccountVault .headerContainer .totalAmount{margin-right:4px;color:var(--emw--color-faded, #A0A29F)}.playerAccountVault .exchangesContainer{width:100%;height:100%;box-sizing:border-box;position:relative;display:flex;flex-direction:column;gap:var(--emw--spacing-small, 10px)}.playerAccountVault .exchangesContainer .containerExchangeFrom .exchangeHeader,.playerAccountVault .exchangesContainer .containerExchangeTo .exchangeHeader{font-size:inherit;font-family:inherit;font-family:inherit}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow{display:flex;align-items:center;gap:var(--emw--spacing-small, 10px)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow input[type=number]::-webkit-inner-spin-button,.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow input[type=number]::-webkit-outer-spin-button,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow input[type=number]::-webkit-inner-spin-button,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow input[type=number],.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow input[type=number]{-moz-appearance:textfield}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .exchangeInput,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .exchangeInput{flex:1;min-width:50px;border:unset;height:var(--emw--base-height, 36px);font-size:var(--emw--font-size-medium, 14px);padding:0 var(--emw--spacing-small, 10px);border-radius:var(--emw--border-radius-small, 8px);background-color:rgba(255, 255, 255, var(--emw--background-opacity, 0.9));-webkit-backdrop-filter:blur(var(--emw--filter-blur, 31.5px));backdrop-filter:blur(var(--emw--filter-blur, 31.5px));font-family:inherit;color:var(--emw--input-typography, #000)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .exchangeInput:focus,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .exchangeInput:focus{outline:none}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .exchangeInput[disabled],.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .exchangeInput[disabled]{color:var(--emw--input-disabled, #a0a29f)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .exchangeInput::placeholder,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .exchangeInput::placeholder{color:var(--emw--input-placeholder, #a0a29f)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .currenciesSelect,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .currenciesSelect{min-width:96px;border:unset;white-space:nowrap;height:var(--emw--base-height, 36px);padding:0 var(--emw--spacing-small, 10px)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .currenciesSelect:focus,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .currenciesSelect:focus{outline:none}.playerAccountVault .exchangesContainer .containerExchangeFrom .balanceContainer,.playerAccountVault .exchangesContainer .containerExchangeTo .balanceContainer{display:flex;justify-content:space-between;gap:var(--emw--spacing-small, 10px)}.playerAccountVault .exchangesContainer .containerExchangeFrom .balanceContainer.hasError,.playerAccountVault .exchangesContainer .containerExchangeTo .balanceContainer.hasError{color:var(--emw--color-error, #ed0909)}.playerAccountVault .exchangesContainer .containerExchangeFrom .balanceContainer.hasError span,.playerAccountVault .exchangesContainer .containerExchangeTo .balanceContainer.hasError span{color:var(--emw--color-error, #ed0909)}.playerAccountVault .exchangesContainer .containerExchangeFrom .balanceContainer .validationError,.playerAccountVault .exchangesContainer .containerExchangeTo .balanceContainer .validationError{flex:1}.playerAccountVault .exchangesContainer .containerExchangeFrom .playerBalance,.playerAccountVault .exchangesContainer .containerExchangeTo .playerBalance{white-space:nowrap;justify-content:flex-end}.playerAccountVault .exchangesContainer .containerExchangeFrom .playerBalance .amount,.playerAccountVault .exchangesContainer .containerExchangeTo .playerBalance .amount{color:var(--emw--color-faded, #A0A29F);margin-right:4px}.playerAccountVault .vaultsContainer{display:flex;flex-direction:column;width:100%}.playerAccountVault .vaultsContainer .vaultToggleButton{display:flex;align-items:center;justify-content:center;width:35px;height:35px;cursor:pointer;border:unset;align-self:flex-end;padding:var(--emw--spacing-small, 10px);background:var(--emw--color-primary, #24B04F);border-radius:var(--emw--border-radius-small, 8px)}.playerAccountVault .vaultsContainer .vaultToggleButton .vaultToggleIcon{transform:rotateZ(0deg);transition:all 0.3s ease-in-out}.playerAccountVault .vaultsContainer .vaultToggleButton .vaultToggleIcon path{fill:var(--emw--color-white, #fff)}.playerAccountVault .vaultsContainer .vaultToggleButton.active .vaultToggleIcon{transform:rotateZ(180deg)}.playerAccountVault .vaultsContainer .vaultDropdown{width:80%;max-height:0;height:200px;margin:0 auto;display:flex;flex-direction:column;overflow:auto;opacity:0;scrollbar-width:thin;gap:var(--emw--spacing-small, 10px);font-size:var(--emw--font-size-medium, 14px);color:var(--emw--color-white, #fff);font-family:inherit;transition:max-height 0.4s ease-out, opacity 0.4s ease-out}.playerAccountVault .vaultsContainer .vaultDropdown .vaultItem{display:inherit;font-size:var(--emw--font-size-medium, 14px);justify-content:space-between;width:100%;margin:0 auto;box-sizing:border-box;height:var(--emw--base-height, 36px);padding:var(--emw--spacing-small, 10px);background:var(--emw--color-primary, #24B04F);border-radius:var(--emw--border-radius-small, 8px)}.playerAccountVault .vaultsContainer .vaultDropdown.expanded{transition:max-height 1s ease-in, opacity 0.4s ease-in;max-height:1000vh;opacity:1}.playerAccountVault .notificationsContainer{width:100%;min-height:var(--emw--base-height, 36px);padding:0px}.playerAccountVault .notificationsContainer.error{color:var(--emw--color-error, #FF2424)}.playerAccountVault .notificationsContainer.success{color:var(--emw--color-success, #24B04F)}.playerAccountVault .feesContainer{width:100%;height:var(--emw--base-height, 36px);display:flex;align-items:center;justify-content:space-between;background-color:rgba(255, 255, 255, var(--emw--background-opacity, 0.9));-webkit-backdrop-filter:blur(var(--emw--filter-blur, 31.5px));backdrop-filter:blur(var(--emw--filter-blur, 31.5px));border-radius:var(--emw--border-radius-small, 8px);padding:0 var(--emw--spacing-small, 10px);box-sizing:border-box}.playerAccountVault .feesContainer .feesLabel{color:var(--emw--color-faded, #A0A29F)}.playerAccountVault .actionsContainer{width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;gap:var(--emw--spacing-small, 10px)}.playerAccountVault .actionsContainer button{flex:1;height:var(--emw--base-height, 36px);border:none;cursor:pointer;font-family:inherit;font-size:var(--emw--font-size-small, 12px);border-radius:var(--emw--border-radius-small, 8px);font-weight:var(--emw--font-weight-bold, 500);transition:background 0.3s ease, color 0.3s ease, filter 0.3s ease}.playerAccountVault .actionsContainer .exchangeButton{background:var(--emw--color-primary, #24B04F);color:var(--emw--button-typography, #fff)}.playerAccountVault .actionsContainer .exchangeButton:hover{filter:brightness(110%)}.playerAccountVault .actionsContainer .resetButton{background:transparent;color:var(--emw--color-primary, #24B04F);border:1px solid var(--emw--color-primary, #24B04F)}.playerAccountVault .actionsContainer .resetButton:hover{background:var(--emw--color-primary, #24B04F);color:var(--emw--button-typography, #fff)}.playerAccountVault .actionsContainer .exchangeButton.disabled{cursor:default;filter:none;background:var(--emw--button-disabled, #595959)}.playerAccountVault .actionsContainer .exchangeButton.disabled:hover{background:var(--emw--button-disabled, #595959)}.playerAccountVault .actionsContainer .exchangeButton.disabled.pending{background:var(--emw--color-primary, #24B04F);pointer-events:none;opacity:0.5}.playerAccountVault .skeleton{background-color:rgba(0, 0, 0, 0.11);height:auto;min-height:0.1rem;-webkit-animation:loading 1.5s ease-in-out 0.5s infinite;animation:loading 1.5s ease-in-out 0.5s infinite}.playerAccountVault .skeleton::before{content:" "}@keyframes loading{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.playerAccountVault .exchangeContainer{display:flex;flex-direction:column;gap:4px}')}function Yn(e,t,n){const r=e.slice();return r[62]=t[n],r}function Jn(e){let t,n,r;return{c(){t=A("button"),t.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13.414 12l4.95-4.95-1.414-1.414-4.95 4.95-4.95-4.95L5.636 7.05l4.95 4.95-4.95 4.95 1.414 1.414 4.95-4.95 4.95 4.95 1.414-1.414-4.95-4.95z"></path></svg>',b(t,"type","button"),b(t,"class","closeButton")},m(i,a){H(i,t,a),n||(r=ne(t,"click",e[23]),n=!0)},p:L,d(i){i&&S(t),n=!1,r()}}}function qn(e){let t,n,r,i;const a=[ro,no],o=[];function s(l,u){return!l[16]||!l[17]?0:1}return t=s(e),n=o[t]=a[t](e),{c(){n.c(),r=$r()},m(l,u){o[t].m(l,u),H(l,r,u),i=!0},p(l,u){let c=t;t=s(l),t===c?o[t].p(l,u):(Oe(),z(o[c],1,1,()=>{o[c]=null}),Re(),n=o[t],n?n.p(l,u):(n=o[t]=a[t](l),n.c()),$(n,1),n.m(r.parentNode,r))},i(l){i||($(n),i=!0)},o(l){z(n),i=!1},d(l){l&&S(r),o[t].d(l)}}}function no(e){let t,n,r,i;const a=[ao,io],o=[];function s(l,u){var c;return((c=l[12])==null?void 0:c.source)===Q.BalanceError?0:1}return n=s(e),r=o[n]=a[n](e),{c(){t=A("div"),r.c(),b(t,"class","headerPlayerBalance amountContainer")},m(l,u){H(l,t,u),o[n].m(t,null),i=!0},p(l,u){let c=n;n=s(l),n===c?o[n].p(l,u):(Oe(),z(o[c],1,1,()=>{o[c]=null}),Re(),r=o[n],r?r.p(l,u):(r=o[n]=a[n](l),r.c()),$(r,1),r.m(t,null))},i(l){i||($(r),i=!0)},o(l){z(r),i=!1},d(l){l&&S(t),o[n].d()}}}function ro(e){let t;return{c(){t=A("div"),b(t,"class","skeleton")},m(n,r){H(n,t,r)},p:L,i:L,o:L,d(n){n&&S(t)}}}function io(e){var l,u;let t,n,r=(((l=e[10])==null?void 0:l.amount)||0)+"",i,a,o=(((u=e[10])==null?void 0:u.currency)||"")+"",s;return{c(){t=A("span"),t.textContent=`${k("totalBalance")}`,n=R(),i=Z(r),a=R(),s=Z(o),b(t,"class","totalAmount")},m(c,f){H(c,t,f),H(c,n,f),H(c,i,f),H(c,a,f),H(c,s,f)},p(c,f){var h,m;f[0]&1024&&r!==(r=(((h=c[10])==null?void 0:h.amount)||0)+"")&&re(i,r),f[0]&1024&&o!==(o=(((m=c[10])==null?void 0:m.currency)||"")+"")&&re(s,o)},i:L,o:L,d(c){c&&(S(t),S(n),S(i),S(a),S(s))}}}function ao(e){let t,n;return t=new kt({}),{c(){ut(t.$$.fragment)},m(r,i){We(t,r,i),n=!0},p:L,i(r){n||($(t.$$.fragment,r),n=!0)},o(r){z(t.$$.fragment,r),n=!1},d(r){ze(t,r)}}}function oo(e){let t,n,r,i,a,o,s,l,u;const c=[uo,lo],f=[];function h(m,_){var p;return((p=m[12])==null?void 0:p.source)===Q.BalanceError?0:1}return o=h(e),s=f[o]=c[o](e),{c(){t=A("div"),n=A("p"),r=Z(e[13]),i=R(),a=A("div"),s.c(),b(n,"class","validationError"),b(a,"class","playerBalance amountContainer"),b(t,"class",l="balanceContainer "+(e[13]?"hasError":""))},m(m,_){H(m,t,_),v(t,n),v(n,r),v(t,i),v(t,a),f[o].m(a,null),u=!0},p(m,_){(!u||_[0]&8192)&&re(r,m[13]);let p=o;o=h(m),o===p?f[o].p(m,_):(Oe(),z(f[p],1,1,()=>{f[p]=null}),Re(),s=f[o],s?s.p(m,_):(s=f[o]=c[o](m),s.c()),$(s,1),s.m(a,null)),(!u||_[0]&8192&&l!==(l="balanceContainer "+(m[13]?"hasError":"")))&&b(t,"class",l)},i(m){u||($(s),u=!0)},o(m){z(s),u=!1},d(m){m&&S(t),f[o].d()}}}function so(e){let t;return{c(){t=A("div"),b(t,"class","skeleton")},m(n,r){H(n,t,r)},p:L,i:L,o:L,d(n){n&&S(t)}}}function lo(e){var l,u;let t,n,r=(((l=e[5])==null?void 0:l.amount)||0)+"",i,a,o=(((u=e[5])==null?void 0:u.currency)||"")+"",s;return{c(){t=A("span"),t.textContent=`${k("currentBalance")}`,n=R(),i=Z(r),a=R(),s=Z(o),b(t,"class","amount")},m(c,f){H(c,t,f),H(c,n,f),H(c,i,f),H(c,a,f),H(c,s,f)},p(c,f){var h,m;f[0]&32&&r!==(r=(((h=c[5])==null?void 0:h.amount)||0)+"")&&re(i,r),f[0]&32&&o!==(o=(((m=c[5])==null?void 0:m.currency)||"")+"")&&re(s,o)},i:L,o:L,d(c){c&&(S(t),S(n),S(i),S(a),S(s))}}}function uo(e){let t,n;return t=new kt({}),{c(){ut(t.$$.fragment)},m(r,i){We(t,r,i),n=!0},p:L,i(r){n||($(t.$$.fragment,r),n=!0)},o(r){z(t.$$.fragment,r),n=!1},d(r){ze(t,r)}}}function co(e){let t,n,r,i;const a=[po,fo],o=[];function s(l,u){var c;return((c=l[12])==null?void 0:c.source)===Q.BalanceError?0:1}return n=s(e),r=o[n]=a[n](e),{c(){t=A("div"),r.c(),b(t,"class","playerBalance amountContainer")},m(l,u){H(l,t,u),o[n].m(t,null),i=!0},p(l,u){let c=n;n=s(l),n===c?o[n].p(l,u):(Oe(),z(o[c],1,1,()=>{o[c]=null}),Re(),r=o[n],r?r.p(l,u):(r=o[n]=a[n](l),r.c()),$(r,1),r.m(t,null))},i(l){i||($(r),i=!0)},o(l){z(r),i=!1},d(l){l&&S(t),o[n].d()}}}function ho(e){let t;return{c(){t=A("div"),b(t,"class","skeleton")},m(n,r){H(n,t,r)},p:L,i:L,o:L,d(n){n&&S(t)}}}function fo(e){var l,u;let t,n,r=(((l=e[6])==null?void 0:l.amount)||0)+"",i,a,o=(((u=e[6])==null?void 0:u.currency)||"")+"",s;return{c(){t=A("span"),t.textContent=`${k("currentBalance")}`,n=R(),i=Z(r),a=R(),s=Z(o),b(t,"class","amount")},m(c,f){H(c,t,f),H(c,n,f),H(c,i,f),H(c,a,f),H(c,s,f)},p(c,f){var h,m;f[0]&64&&r!==(r=(((h=c[6])==null?void 0:h.amount)||0)+"")&&re(i,r),f[0]&64&&o!==(o=(((m=c[6])==null?void 0:m.currency)||"")+"")&&re(s,o)},i:L,o:L,d(c){c&&(S(t),S(n),S(i),S(a),S(s))}}}function po(e){let t,n;return t=new kt({}),{c(){ut(t.$$.fragment)},m(r,i){We(t,r,i),n=!0},p:L,i(r){n||($(t.$$.fragment,r),n=!0)},o(r){z(t.$$.fragment,r),n=!1},d(r){ze(t,r)}}}function er(e){let t,n,r,i,a,o,s,l,u,c,f=St(e[19]),h=[];for(let m=0;m<f.length;m+=1)h[m]=tr(Yn(e,f,m));return{c(){t=A("div"),n=A("button"),r=Tn("svg"),i=Tn("path"),o=R(),s=A("div");for(let m=0;m<h.length;m+=1)h[m].c();b(i,"d","M0.984228 0.664666C0.928537 0.612038 0.863025 0.570896 0.791433 0.543587C0.719842 0.516278 0.643572 0.503337 0.566979 0.505504C0.490386 0.50767 0.41497 0.524902 0.345037 0.556215C0.275103 0.587527 0.212022 0.632308 0.159395 0.687999C0.106768 0.74369 0.0656252 0.809203 0.0383161 0.880794C0.0110071 0.952386 -0.00193361 1.02866 0.000233093 1.10525C0.0023998 1.18184 0.0196314 1.25726 0.050944 1.32719C0.0822566 1.39712 0.127037 1.46021 0.182728 1.51283L5.43273 6.47117C5.54104 6.57356 5.68443 6.63061 5.83348 6.63061C5.98253 6.63061 6.12592 6.57356 6.23423 6.47117L11.4848 1.51283C11.5417 1.46055 11.5877 1.39748 11.62 1.32729C11.6523 1.2571 11.6704 1.18119 11.6731 1.10396C11.6759 1.02673 11.6633 0.949723 11.636 0.877415C11.6087 0.805107 11.5674 0.738937 11.5143 0.68275C11.4612 0.626563 11.3976 0.581479 11.3269 0.550115C11.2563 0.518751 11.1801 0.501734 11.1029 0.500051C11.0256 0.498369 10.9488 0.512054 10.8769 0.540313C10.8049 0.568572 10.7393 0.610841 10.6839 0.664665L5.83348 5.245L0.984228 0.664666Z"),b(i,"fill","currentColor"),b(r,"class","vaultToggleIcon"),b(r,"width","12"),b(r,"height","7"),b(r,"viewBox","0 0 12 7"),b(r,"fill","currentColor"),b(r,"xmlns","http://www.w3.org/2000/svg"),b(n,"type","button"),b(n,"class",a="vaultToggleButton "+(e[15]&&e[19].length>0?"active":"")),b(s,"class",l="vaultDropdown "+(e[15]&&e[19].length>0?"expanded":"")),b(t,"class","vaultsContainer")},m(m,_){H(m,t,_),v(t,n),v(n,r),v(r,i),v(t,o),v(t,s);for(let p=0;p<h.length;p+=1)h[p]&&h[p].m(s,null);u||(c=ne(n,"click",e[22]),u=!0)},p(m,_){if(_[0]&557056&&a!==(a="vaultToggleButton "+(m[15]&&m[19].length>0?"active":""))&&b(n,"class",a),_[0]&524288){f=St(m[19]);let p;for(p=0;p<f.length;p+=1){const E=Yn(m,f,p);h[p]?h[p].p(E,_):(h[p]=tr(E),h[p].c(),h[p].m(s,null))}for(;p<h.length;p+=1)h[p].d(1);h.length=f.length}_[0]&557056&&l!==(l="vaultDropdown "+(m[15]&&m[19].length>0?"expanded":""))&&b(s,"class",l)},d(m){m&&S(t),ir(h,m),u=!1,c()}}}function tr(e){var c,f;let t,n,r=((c=e[62])==null?void 0:c.currency)+"",i,a,o,s=((f=e[62])==null?void 0:f.amount)+"",l,u;return{c(){t=A("div"),n=A("p"),i=Z(r),a=R(),o=A("p"),l=Z(s),u=R(),b(t,"class","vaultItem")},m(h,m){H(h,t,m),v(t,n),v(n,i),v(t,a),v(t,o),v(o,l),v(t,u)},p(h,m){var _,p;m[0]&524288&&r!==(r=((_=h[62])==null?void 0:_.currency)+"")&&re(i,r),m[0]&524288&&s!==(s=((p=h[62])==null?void 0:p.amount)+"")&&re(l,s)},d(h){h&&S(t)}}}function mo(e){var r,i,a,o;let t=`${((i=(r=e[11])==null?void 0:r.fees[0])==null?void 0:i.amount)||0} ${((o=(a=e[11])==null?void 0:a.fees[0])==null?void 0:o.currency)||""}`,n;return{c(){n=Z(t)},m(s,l){H(s,n,l)},p(s,l){var u,c,f,h;l[0]&2048&&t!==(t=`${((c=(u=s[11])==null?void 0:u.fees[0])==null?void 0:c.amount)||0} ${((h=(f=s[11])==null?void 0:f.fees[0])==null?void 0:h.currency)||""}`)&&re(n,t)},d(s){s&&S(n)}}}function go(e){let t=k("feesUnavailable")+"",n;return{c(){n=Z(t)},m(r,i){H(r,n,i)},p:L,d(r){r&&S(n)}}}function bo(e){var j;let t,n,r,i,a,o,s,l,u,c,f,h,m,_,p,E,T,O,y,D,M,X,ge,ie,W,be,Ae,se,he,Te,K,q,fe,tt,Ce,Me,dt,ke,nt,ae,ye=k(((j=e[12])==null?void 0:j.message)||"")+"",Be,ve,Ee,Ue,ee,Se=k("exchange")+"",pt,_e,te,rt,it,Y=e[3]===Pe.true&&Jn(e),F=e[2]===Pe.true&&qn(e);function Ut(g){e[39](g)}let mt={id:"senderSelect",withSymbol:e[4],disabled:!e[16]||!e[17],options:e[20],onChange:e[25]};e[5]!==void 0&&(mt.selected=e[5]),p=new fn({props:mt}),Xe.push(()=>Bn(p,"selected",Ut));const gt=[so,oo],de=[];function at(g,C){return!g[16]||!g[17]?0:1}O=at(e),y=de[O]=gt[O](e);function Vt(g){e[41](g)}let bt={id:"destinationSelect",withSymbol:e[4],disabled:!e[0]||!!e[13]||!e[16]||!e[17],options:e[21],onChange:e[25]};e[6]!==void 0&&(bt.selected=e[6]),se=new fn({props:bt}),Xe.push(()=>Bn(se,"selected",Vt));const yt=[ho,co],pe=[];function vt(g,C){return!g[16]||!g[17]?0:1}K=vt(e),q=pe[K]=yt[K](e);let d=e[1]===Pe.true&&er(e);function w(g,C){var oe;return((oe=g[12])==null?void 0:oe.source)===Q.CheckWalletExchangeError?go:mo}let P=w(e),x=P(e);return{c(){var g,C,oe;t=A("div"),Y&&Y.c(),n=R(),r=A("div"),i=A("h1"),i.textContent=`${k("vaultExchange")}`,a=R(),F&&F.c(),o=R(),s=A("div"),l=A("div"),u=A("p"),u.textContent=`${k("exchangeFrom")}`,c=R(),f=A("div"),h=A("input"),_=R(),ut(p.$$.fragment),T=R(),y.c(),D=R(),M=A("div"),X=A("p"),X.textContent=`${k("exchangeTo")}`,ge=R(),ie=A("div"),W=A("input"),Ae=R(),ut(se.$$.fragment),Te=R(),q.c(),fe=R(),d&&d.c(),tt=R(),Ce=A("div"),Me=A("span"),Me.textContent=`${k("feesIncluded")}`,dt=R(),ke=A("span"),x.c(),nt=R(),ae=A("div"),Be=R(),ve=A("div"),Ee=A("button"),Ee.textContent=`${k("reset")}`,Ue=R(),ee=A("button"),pt=Z(Se),b(i,"class","headerTitle"),b(r,"class","headerContainer"),b(u,"class","exchangeHeader"),b(h,"id","senderInput"),h.disabled=m=!e[0]||!e[16]||!e[17],b(h,"placeholder",k("debitPlaceHolder")),b(h,"class","exchangeInput"),b(h,"type","number"),b(h,"aria-label","Enter exchange amount"),b(h,"inputmode","decimal"),b(h,"step","0.000000000000001"),b(h,"min","0"),b(f,"class","flexingContainerRow"),b(l,"class","containerExchangeFrom exchangeContainer"),b(X,"class","exchangeHeader"),b(W,"id","destinationInput"),W.disabled=be=!e[0]||!e[16]||!e[17],b(W,"placeholder",k("creditPlaceHolder")),b(W,"class","exchangeInput"),b(W,"type","number"),W.readOnly=!0,b(W,"min","0"),b(ie,"class","flexingContainerRow"),b(M,"class","containerExchangeTo exchangeContainer"),b(s,"class","exchangesContainer"),b(Me,"class","feesLabel"),b(Ce,"class","feesContainer"),b(ae,"class","notificationsContainer"),ue(ae,"error",((g=e[12])==null?void 0:g.type)==="error"),ue(ae,"success",((C=e[12])==null?void 0:C.type)==="success"),b(Ee,"class","resetButton"),b(Ee,"type","button"),b(ee,"type","button"),b(ee,"class","exchangeButton"),ee.disabled=_e=e[14]||e[18]||e[8]===0&&!((oe=e[5])!=null&&oe.amount),ue(ee,"disabled",e[14]||e[18]),ue(ee,"pending",e[18]),b(ve,"class","actionsContainer"),b(t,"class","playerAccountVault")},m(g,C){H(g,t,C),Y&&Y.m(t,null),v(t,n),v(t,r),v(r,i),v(r,a),F&&F.m(r,null),v(t,o),v(t,s),v(s,l),v(l,u),v(l,c),v(l,f),v(f,h),Et(h,e[8]),v(f,_),We(p,f,null),v(l,T),de[O].m(l,null),v(s,D),v(s,M),v(M,X),v(M,ge),v(M,ie),v(ie,W),Et(W,e[9]),v(ie,Ae),We(se,ie,null),v(M,Te),pe[K].m(M,null),v(t,fe),d&&d.m(t,null),v(t,tt),v(t,Ce),v(Ce,Me),v(Ce,dt),v(Ce,ke),x.m(ke,null),v(t,nt),v(t,ae),ae.innerHTML=ye,v(t,Be),v(t,ve),v(ve,Ee),v(ve,Ue),v(ve,ee),v(ee,pt),e[42](t),te=!0,rt||(it=[ne(h,"input",e[38]),ne(h,"input",e[26]),ne(h,"beforeinput",e[27]),ne(h,"focus",e[28]),ne(W,"input",e[40]),ne(Ee,"click",e[24]),ne(ee,"click",e[29])],rt=!0)},p(g,C){var vn,En,_n,xn;g[3]===Pe.true?Y?Y.p(g,C):(Y=Jn(g),Y.c(),Y.m(t,n)):Y&&(Y.d(1),Y=null),g[2]===Pe.true?F?(F.p(g,C),C[0]&4&&$(F,1)):(F=qn(g),F.c(),$(F,1),F.m(r,null)):F&&(Oe(),z(F,1,1,()=>{F=null}),Re()),(!te||C[0]&196609&&m!==(m=!g[0]||!g[16]||!g[17]))&&(h.disabled=m),C[0]&256&&Bt(h.value)!==g[8]&&Et(h,g[8]);const oe={};C[0]&16&&(oe.withSymbol=g[4]),C[0]&196608&&(oe.disabled=!g[16]||!g[17]),C[0]&1048576&&(oe.options=g[20]),!E&&C[0]&32&&(E=!0,oe.selected=g[5],Cn(()=>E=!1)),p.$set(oe);let B=O;O=at(g),O===B?de[O].p(g,C):(Oe(),z(de[B],1,1,()=>{de[B]=null}),Re(),y=de[O],y?y.p(g,C):(y=de[O]=gt[O](g),y.c()),$(y,1),y.m(l,null)),(!te||C[0]&196609&&be!==(be=!g[0]||!g[16]||!g[17]))&&(W.disabled=be),C[0]&512&&Bt(W.value)!==g[9]&&Et(W,g[9]);const ce={};C[0]&16&&(ce.withSymbol=g[4]),C[0]&204801&&(ce.disabled=!g[0]||!!g[13]||!g[16]||!g[17]),C[0]&2097152&&(ce.options=g[21]),!he&&C[0]&64&&(he=!0,ce.selected=g[6],Cn(()=>he=!1)),se.$set(ce);let xe=K;K=vt(g),K===xe?pe[K].p(g,C):(Oe(),z(pe[xe],1,1,()=>{pe[xe]=null}),Re(),q=pe[K],q?q.p(g,C):(q=pe[K]=yt[K](g),q.c()),$(q,1),q.m(M,null)),g[1]===Pe.true?d?d.p(g,C):(d=er(g),d.c(),d.m(t,tt)):d&&(d.d(1),d=null),P===(P=w(g))&&x?x.p(g,C):(x.d(1),x=P(g),x&&(x.c(),x.m(ke,null))),(!te||C[0]&4096)&&ye!==(ye=k(((vn=g[12])==null?void 0:vn.message)||"")+"")&&(ae.innerHTML=ye),(!te||C[0]&4096)&&ue(ae,"error",((En=g[12])==null?void 0:En.type)==="error"),(!te||C[0]&4096)&&ue(ae,"success",((_n=g[12])==null?void 0:_n.type)==="success"),(!te||C[0]&278816&&_e!==(_e=g[14]||g[18]||g[8]===0&&!((xn=g[5])!=null&&xn.amount)))&&(ee.disabled=_e),(!te||C[0]&278528)&&ue(ee,"disabled",g[14]||g[18]),(!te||C[0]&262144)&&ue(ee,"pending",g[18])},i(g){te||($(F),$(p.$$.fragment,g),$(y),$(se.$$.fragment,g),$(q),te=!0)},o(g){z(F),z(p.$$.fragment,g),z(y),z(se.$$.fragment,g),z(q),te=!1},d(g){g&&S(t),Y&&Y.d(),F&&F.d(),ze(p),de[O].d(),ze(se),pe[K].d(),d&&d.d(),x.d(),e[42](null),rt=!1,we(it)}}}function yo(e,t,n){let{session:r=""}=t,{userid:i=""}=t,{endpoint:a=""}=t,{lang:o="en"}=t,{clientstyling:s=""}=t,{clientstylingurl:l=""}=t,{translationurl:u=""}=t,{playercurrency:c=""}=t,{showvaults:f="true"}=t,{showtotalbalance:h="true"}=t,{showclosebutton:m="true"}=t,{showcurrencysymbol:_="true"}=t,p=null,E=null,T=0,O=0,y=0,D=null,M=null,X=null,ge="",ie=!0,W=!1,be=!1,Ae=!1,se=!1,he=[],Te=[],K=[],q=[],fe;Ga({withLocale:"en",translations:{}}),Object.keys(Gn).forEach(d=>{Fn(d,Gn[d])});const tt=()=>{$a(o)},Ce=()=>{fetch(u).then(d=>d.json()).then(d=>{Object.keys(d).forEach(w=>{Fn(w,d[w])})}).catch(d=>{console.error("There was a problem with the translations request.",d)})},Me=()=>{let d=document.createElement("style");d.innerHTML=s,fe.appendChild(d)},dt=()=>{let d,w=new URL(l),P=document.createElement("style");fetch(w.href).then(x=>x.text()).then(x=>{P.innerHTML=x,d&&clearTimeout(d),d=setTimeout(()=>{fe.appendChild(P)},1)})},ke=()=>{Te.length!==0&&(n(15,W=!W),window.postMessage({type:Yt.VaultDropdownToggled,state:W},window.location.href))},nt=()=>{window.postMessage({type:Yt.VaultWidgetClosed},window.location.href)},ae=()=>{n(14,ie=!0),Be(),ve(),Ee(),Ue(),window.postMessage({type:Yt.VaultWidgetReset},window.location.href)},ye=()=>{n(14,ie=!0),n(9,y=0)},Be=()=>{n(11,M=null)},ve=()=>{n(8,T=0),n(9,y=0)},Ee=()=>{n(13,ge="")},Ue=()=>{n(12,X=null)},ee=d=>{d&&n(13,ge=d)},Se=({type:d,message:w,source:P=""})=>{let x;switch(n(12,X={message:w,source:P,type:d}),d){case He.error:n(14,ie=!0),window.postMessage({type:P,data:{type:d,message:w}},window.location.href);break;case He.success:n(14,ie=!0),window.postMessage({type:P,data:{type:d,message:w}},window.location.href),x&&clearTimeout(x),x=setTimeout(()=>{Ue()},Xa);break}},pt=()=>new Promise((d,w)=>{const P=X==null?void 0:X.message.includes(Wa.InvalidSession);P&&w(),isNaN(Number(T))&&(ye(),Be(),w(k("invalidValue"))),T>(p==null?void 0:p.amount)&&(ye(),Be(),w(k("exceededValue"))),T===null&&!P&&(ye(),Be(),w()),T===0&&T===0&&!P&&(ae(),w()),(!p||!E)&&!P&&w(),Ee(),d()}),_e=(d,w)=>$t(this,null,function*(){var x,j;const P=yield d.json();return(d==null?void 0:d.status)>=200&&(d==null?void 0:d.status)<400?P:(w===Q.CheckWalletExchangeError&&ye(),!be&&w===Q.BalanceError&&(n(16,be=!0),n(17,Ae=!0)),!Ae&&w===Q.CurrenciesError&&n(17,Ae=!0),Se({type:He.error,message:k((x=P==null?void 0:P.thirdPartyResponse)==null?void 0:x.code)||k((j=P==null?void 0:P.thirdPartyResponse)==null?void 0:j.errorCode)||"generalError",source:w}))}),te=()=>new Promise((d,w)=>{const P=new URL(`${a}/v1/player/${i}/wallet-exchange/currencies`);fetch(P,{method:"GET",headers:{"X-SessionId":r,"Content-Type":"application/json",Accept:"application/json"}}).then(j=>_e(j,Q.CurrenciesError)).then(j=>{d(j==null?void 0:j.currencies)}).catch(j=>{Se({type:He.error,message:k("generalError"),source:Q.CurrenciesError}),w(),console.error("There was an error on the allowed currencies request.",j)}).finally(()=>{n(17,Ae=!0)})}),rt=({data:d,shouldUpdateSelectedCurrencies:w,allowed:P=[]})=>{const{items:x=[],totalAmount:j={},totalRealAmount:g}=d||{};n(10,D=Object.entries(g||j).map(([B="",ce=0])=>({currency:B,amount:ce}))[0]);let C=null;const oe=new Map(P.map(B=>[B.code,B]));for(const B of x)if((B==null?void 0:B.type)===jn.Real){const ce=oe.get(B==null?void 0:B.currency);if(ce&&ce.code===(B==null?void 0:B.currency)){const xe=Gt(Ve(Ve({},B),ce),{symbol:ja[B==null?void 0:B.currency]});n(37,he=[...he,xe]),(B==null?void 0:B.currency)===(D==null?void 0:D.currency)&&n(10,D=Ve(Ve({},D),xe)),(B==null?void 0:B.currency)!==(D==null?void 0:D.currency)&&(B==null?void 0:B.walletAccountType)===jn.Vault&&n(19,Te=[...Te,xe]),w&&(B==null?void 0:B.amount)>0&&n(5,p=D!=null&&D.currency?D:C),p&&(p==null?void 0:p.currency)===(B==null?void 0:B.currency)&&n(5,p=xe),E&&(E==null?void 0:E.currency)===(B==null?void 0:B.currency)&&n(6,E=xe)}}},it=(d=!0)=>{const w=new URL(`${a}/v2/player/${i}/balance`);fetch(w,{method:"GET",headers:{"X-SessionId":r,"Content-Type":"application/json",Accept:"application/json"}}).then(x=>_e(x,Q.BalanceError)).then(x=>{x&&te().then(j=>{n(37,he=[]),n(19,Te=[]),rt({data:x,shouldUpdateSelectedCurrencies:d,allowed:j})})}).catch(x=>{Se({type:He.error,message:k("generalError"),source:Q.BalanceError}),console.error("There was an error with the player balance request.",x)}).finally(()=>{n(16,be=!0)})},F=za(()=>{pt().then(()=>{const d=new URL(`${a}/v2/player/${i}/check/wallet-exchange`),w={userId:i,amount:T,currency:p==null?void 0:p.currency,fromCurrency:p==null?void 0:p.currency,toCurrency:E==null?void 0:E.currency,payload:{PlayerCurrency:c}},P={method:"POST",headers:{"X-SessionId":r,"Content-Type":"application/json",Accept:"application/json"},body:Wn(w)};fetch(d,P).then(x=>_e(x,Q.CheckWalletExchangeError)).then(x=>{var j,g;x&&((X==null?void 0:X.source)===Q.CheckWalletExchangeError&&Ue(),Array.isArray((j=x==null?void 0:x.fees)==null?void 0:j.fees)&&n(11,M=x.fees),Array.isArray(x==null?void 0:x.walletActions)&&n(9,y=((g=x.walletActions.find(C=>(C==null?void 0:C.directionName)==="Credit"))==null?void 0:g.amount)||0),T>0&&(p!=null&&p.currency)&&(E!=null&&E.currency)&&c&&n(14,ie=!1))}).catch(x=>{Se({type:He.error,message:k("generalError"),source:Q.CheckWalletExchangeError}),console.error("There was a problem with the wallet exchange request.",x)})}).catch(d=>{ee(d)})},500),Ut=d=>{const w=d.target.value,[P,x]=w.split(".");!x&&w.length>=Jt&&n(8,T=w.slice(0,Jt)),x&&(p==null?void 0:p.type)===Xn.Fiat&&(x.length<=(p==null?void 0:p.precision)?(n(8,T=w),O=w):n(8,T=O)),x&&(p==null?void 0:p.type)===Xn.CryptoCurrency&&(w.length<=Jt?(n(8,T=w),O=w):n(8,T=O)),F()},mt=d=>{const w=d.data;[">","<",","].includes(w)&&d.preventDefault(),w&&!w.match(/[\d.]/)&&d.preventDefault(),w==="."&&d.target.value.includes(".")&&d.preventDefault()},gt=()=>{T===0&&n(8,T=null)},de=()=>{const d=new URL(`${a}/v2/player/${i}/wallet-exchange`);n(18,se=!0);const w={feeDetails:M,userId:i,amount:T,currency:p==null?void 0:p.currency,fromCurrency:p==null?void 0:p.currency,toCurrency:E==null?void 0:E.currency,payload:{PlayerCurrency:c}},P={method:"PUT",headers:{"X-SessionId":r,"Content-Type":"application/json",Accept:"application/json"},body:Wn(w)};fetch(d,P).then(x=>_e(x,Q.WalletExchangeError)).then(x=>{x&&(Se({type:He.success,message:k("exchangeSuccess"),source:"ExchangeSuccess"}),it(!1))}).catch(x=>{Se({type:He.error,message:k("generalError"),source:Q.WalletExchangeError}),console.error("There was an error with the wallet exchange request.",x)}).finally(()=>{n(18,se=!1),ve(),Be()})},at=d=>{const{data:{type:w}={}}=d||{};switch(w){case $n.ResetVaultWidget:ae();break;case $n.CloseVaultWidget:nt();break}};or(()=>(window.addEventListener("message",at),()=>{window.removeEventListener("message",at)}));function Vt(){T=Bt(this.value),n(8,T)}function bt(d){p=d,n(5,p)}function yt(){y=Bt(this.value),n(9,y)}function pe(d){E=d,n(6,E)}function vt(d){Xe[d?"unshift":"push"](()=>{fe=d,n(7,fe)})}return e.$$set=d=>{"session"in d&&n(0,r=d.session),"userid"in d&&n(30,i=d.userid),"endpoint"in d&&n(31,a=d.endpoint),"lang"in d&&n(32,o=d.lang),"clientstyling"in d&&n(33,s=d.clientstyling),"clientstylingurl"in d&&n(34,l=d.clientstylingurl),"translationurl"in d&&n(35,u=d.translationurl),"playercurrency"in d&&n(36,c=d.playercurrency),"showvaults"in d&&n(1,f=d.showvaults),"showtotalbalance"in d&&n(2,h=d.showtotalbalance),"showclosebutton"in d&&n(3,m=d.showclosebutton),"showcurrencysymbol"in d&&n(4,_=d.showcurrencysymbol)},e.$$.update=()=>{e.$$.dirty[1]&2&&o&&tt(),e.$$.dirty[0]&1073741825|e.$$.dirty[1]&33&&r&&i&&a&&c&&it(),e.$$.dirty[0]&128|e.$$.dirty[1]&4&&s&&fe&&Me(),e.$$.dirty[0]&128|e.$$.dirty[1]&8&&l&&fe&&dt(),e.$$.dirty[1]&16&&u&&Ce(),e.$$.dirty[0]&64|e.$$.dirty[1]&64&&n(20,K=he.filter(d=>(d==null?void 0:d.amount)>0&&(d==null?void 0:d.currency)!==(E==null?void 0:E.currency))),e.$$.dirty[0]&32|e.$$.dirty[1]&64&&n(21,q=he.filter(d=>(p==null?void 0:p.currency)!==(d==null?void 0:d.currency)))},[r,f,h,m,_,p,E,fe,T,y,D,M,X,ge,ie,W,be,Ae,se,Te,K,q,ke,nt,ae,F,Ut,mt,gt,de,i,a,o,s,l,u,c,he,Vt,bt,yt,pe,vt]}class Lr extends gn{constructor(t){super(),pn(this,t,yo,bo,Lt,{session:0,userid:30,endpoint:31,lang:32,clientstyling:33,clientstylingurl:34,translationurl:35,playercurrency:36,showvaults:1,showtotalbalance:2,showclosebutton:3,showcurrencysymbol:4},to,[-1,-1,-1])}get session(){return this.$$.ctx[0]}set session(t){this.$$set({session:t}),G()}get userid(){return this.$$.ctx[30]}set userid(t){this.$$set({userid:t}),G()}get endpoint(){return this.$$.ctx[31]}set endpoint(t){this.$$set({endpoint:t}),G()}get lang(){return this.$$.ctx[32]}set lang(t){this.$$set({lang:t}),G()}get clientstyling(){return this.$$.ctx[33]}set clientstyling(t){this.$$set({clientstyling:t}),G()}get clientstylingurl(){return this.$$.ctx[34]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),G()}get translationurl(){return this.$$.ctx[35]}set translationurl(t){this.$$set({translationurl:t}),G()}get playercurrency(){return this.$$.ctx[36]}set playercurrency(t){this.$$set({playercurrency:t}),G()}get showvaults(){return this.$$.ctx[1]}set showvaults(t){this.$$set({showvaults:t}),G()}get showtotalbalance(){return this.$$.ctx[2]}set showtotalbalance(t){this.$$set({showtotalbalance:t}),G()}get showclosebutton(){return this.$$.ctx[3]}set showclosebutton(t){this.$$set({showclosebutton:t}),G()}get showcurrencysymbol(){return this.$$.ctx[4]}set showcurrencysymbol(t){this.$$set({showcurrencysymbol:t}),G()}}mn(Lr,{session:{},userid:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},playercurrency:{},showvaults:{},showtotalbalance:{},showclosebutton:{},showcurrencysymbol:{}},[],[],!0);exports.default=Lr;