var XsollaLogin=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}c((r=r.apply(e,t||[])).next())})}function s(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var a="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function c(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}var u=c,d=l;function f(e){if(u===setTimeout)return setTimeout(e,0);if((u===c||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}"function"==typeof a.setTimeout&&(u=setTimeout),"function"==typeof a.clearTimeout&&(d=clearTimeout);var p,h=[],g=!1,m=-1;function w(){g&&p&&(g=!1,p.length?h=p.concat(h):m=-1,h.length&&y())}function y(){if(!g){var e=f(w);g=!0;for(var t=h.length;t;){for(p=h,h=[];++m<t;)p&&p[m].run();m=-1,t=h.length}p=null,g=!1,function(e){if(d===clearTimeout)return clearTimeout(e);if((d===l||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}(e)}}function v(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new b(e,t)),1!==h.length||g||f(y)}function b(e,t){this.fun=e,this.array=t}b.prototype.run=function(){this.fun.apply(null,this.array)};function _(){}var E=_,O=_,k=_,S=_,P=_,R=_,x=_;var L=a.performance||{},A=L.now||L.mozNow||L.msNow||L.oNow||L.webkitNow||function(){return(new Date).getTime()};var T=new Date;var C={nextTick:v,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:E,addListener:O,once:k,off:S,removeListener:P,removeAllListeners:R,emit:x,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*A.call(L),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-T)/1e3}};function U(e,t){return function(){return e.apply(t,arguments)}}const{toString:j}=Object.prototype,{getPrototypeOf:I}=Object,{iterator:N,toStringTag:M}=Symbol,D=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),B=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),F=(e,t,n)=>e===Object.prototype||!n&&null===t,q=(e,t)=>{let n=e;const r=[];for(;null!=n;){if(-1!==r.indexOf(n))return!1;r.push(n);const o=I(n);if(F(n,o,n===e))return!1;if(D(n,t))return!0;n=o}return!1},H=(e=>t=>{const n=j.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),W=e=>(e=e.toLowerCase(),t=>H(t)===e),G=e=>t=>typeof t===e,{isArray:X}=Array,z=G("undefined");function V(e){return null!==e&&!z(e)&&null!==e.constructor&&!z(e.constructor)&&$(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const J=W("ArrayBuffer");const K=G("string"),$=G("function"),Z=G("number"),Q=e=>null!==e&&"object"==typeof e,Y=e=>{if(!Q(e))return!1;const t=I(e);return!(null!==t&&t!==Object.prototype&&null!==I(t)||q(e,M)||q(e,N))},ee=W("Date"),te=W("File"),ne=W("Blob"),re=W("FileList"),oe=W("Set");const ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==a?a:{},se=void 0!==ie.FormData?ie.FormData:void 0,ae=W("URLSearchParams"),[ce,le,ue,de]=["ReadableStream","Request","Response","Headers"].map(W);function fe(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),X(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(V(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function pe(e,t){if(V(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(t===(r=n[o]).toLowerCase())return r;return null}const he=(()=>"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:a)(),ge=e=>!z(e)&&e!==he;const me=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&I(Uint8Array)),we=W("HTMLFormElement"),{propertyIsEnumerable:ye}=Object.prototype,ve=W("RegExp"),be=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fe(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const _e=W("AsyncFunction"),Ee=((e,t)=>e?setImmediate:t?((e,t)=>(he.addEventListener("message",({source:n,data:r})=>{n===he&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),he.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))("function"==typeof setImmediate,$(he.postMessage)),Oe="undefined"!=typeof queueMicrotask?queueMicrotask.bind(he):void 0!==C&&v||Ee,ke=e=>null!=e&&$(e[N]);var Se={isArray:X,isArrayBuffer:J,isBuffer:V,isFormData:e=>{if(!e)return!1;if(se&&e instanceof se)return!0;const t=I(e);if(!t||t===Object.prototype)return!1;if(!$(e.append))return!1;const n=H(e);return"formdata"===n||"object"===n&&$(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&J(e.buffer)},isString:K,isNumber:Z,isBoolean:e=>!0===e||!1===e,isObject:Q,isPlainObject:Y,isEmptyObject:e=>{if(!Q(e)||V(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ce,isRequest:le,isResponse:ue,isHeaders:de,isUndefined:z,isDate:ee,isFile:te,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:ne,isRegExp:ve,isFunction:$,isStream:e=>Q(e)&&$(e.pipe),isURLSearchParams:ae,isTypedArray:me,isFileList:re,forEach:fe,merge:function e(...t){const{caseless:n,skipUndefined:r}=ge(this)&&this||{},o={},i=(t,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const s=n&&"string"==typeof i&&pe(o,i)||i,a=D(o,s)?o[s]:void 0;Y(a)&&Y(t)?o[s]=e(a,t):Y(t)?o[s]=e({},t):X(t)?o[s]=t.slice():r&&z(t)||(o[s]=t)};for(let e=0,n=t.length;e<n;e++){const n=t[e];if(!n||V(n))continue;if(fe(n,i),"object"!=typeof n||X(n))continue;const r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){const t=r[e];ye.call(n,t)&&i(n[t],t)}}return o},extend:(e,t,n,{allOwnKeys:r}={})=>(fe(t,(t,r)=>{n&&$(t)?Object.defineProperty(e,r,{__proto__:null,value:U(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&I(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:H,kindOfTest:W,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(X(e))return e;let t=e.length;if(!Z(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[N]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:we,hasOwnProperty:D,hasOwnProp:D,hasOwnInPrototypeChain:q,getSafeProp:(e,t)=>null!=e&&q(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;const t=I(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(B(t))return!1;const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&!0===n.writable})})(e))return e;const n=Object.create(null),r=Object.create(null),o=[];let i=e;for(;null!=i&&-1===o.indexOf(i);){o.push(i);const s=i===e?t:I(i);if(F(i,s,i===e))break;const a=Object.getOwnPropertyNames(i);Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(i));for(const t of a)B(t)||D(r,t)||(n[t]=e[t],r[t]=!0);i=s}return n},reduceDescriptors:be,freezeMethods:e=>{be(e,(t,n)=>{if($(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];$(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=(()=>{throw Error("Can not rewrite read-only method '"+n+"'")})))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return X(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:pe,global:he,isContextDefined:ge,isSpecCompliantForm:function(e){return!!(e&&$(e.append)&&"FormData"===e[M]&&e[N])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(Q(e)){if(t.has(e))return;if(V(e))return e;if(!("toJSON"in e)){let r;if(t.add(e),oe(e)){r=[];for(const t of e){const e=n(t);!z(e)&&r.push(e)}}else r=X(e)?[]:{},fe(e,(e,t)=>{const o=n(e);!z(o)&&(r[t]=o)});return t.delete(e),r}}return e};return n(e)},isAsyncFn:_e,isThenable:e=>e&&(Q(e)||$(e))&&$(e.then)&&$(e.catch),setImmediate:Ee,asap:Oe,isIterable:ke,isSafeIterable:e=>null!=e&&q(e,N)&&ke(e)};const Pe=Se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Re=e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim();const i=Se.hasOwnProp(t,n);!n||i&&Se.hasOwnProp(Pe,n)||("set-cookie"===n?i?t[n].push(r):t[n]=[r]:t[n]=i?t[n]+", "+r:r)}),t};const xe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Le=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ae(e,t){return Se.isArray(e)?e.map(e=>Ae(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}const Te=e=>Ae(e,xe),Ce=e=>Ae(e,Le);function Ue(e){const t=Object.create(null);return Se.forEach(e.toJSON(),(e,n)=>{t[n]=Ce(e)}),t}const je=Symbol("internals");function Ie(e){return e&&String(e).trim().toLowerCase()}function Ne(e){return!1===e||null==e?e:Se.isArray(e)?e.map(Ne):Te(String(e))}const Me=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function De(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}const Be=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fe(e,t,n,r,o){return Se.isFunction(r)?r.call(this,t,n):(o&&(t=n),Se.isString(t)?Se.isString(r)?-1!==t.indexOf(r):Se.isRegExp(r)?r.test(t):void 0:void 0)}class qe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Ie(t);if(!o)return;const i=Se.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ne(e))}const i=(e,t)=>Se.forEach(e,(e,n)=>o(e,n,t));if(Se.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Se.isString(e)&&(e=e.trim())&&!Be(e))i(Re(e),t);else if(Se.isObject(e)&&Se.isSafeIterable(e)){let n,r,o=Object.create(null);for(const t of e){if(!Se.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],Se.hasOwnProp(o,r)?(n=o[r],o[r]=Se.isArray(n)?[...n,t[1]]:[n,t[1]]):o[r]=t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Ie(e)){const n=Se.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Se.isFunction(t))return t.call(this,e,n);if(Se.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ie(e)){const n=Se.findKey(this,e);return!(!n||void 0===this[n]||t&&!Fe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Ie(e)){const o=Se.findKey(n,e);!o||t&&!Fe(0,n[o],o,t)||(delete n[o],r=!0)}}return Se.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Fe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Se.forEach(this,(r,o)=>{const i=Se.findKey(n,o);if(i)return t[i]=Ne(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=Ne(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Se.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Se.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){const e=this.get("set-cookie");return Se.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){const t=Object.create(null),n=String(e);let r=0,o=!1,i=!1;function s(e){const o=De(n.slice(r,e)),i=o.indexOf("=");if(i<1)return;const s=De(o.slice(0,i));if(!Me.test(s))return;const a=s.toLowerCase();if("__proto__"===a||"constructor"===a||"prototype"===a)return;const c=De(o.slice(i+1));t[a]=function(e){const t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let n="";for(let r=1;r<t;r++){const o=e.charCodeAt(r);if(34===o)return e;if(92===o&&(r+=1)>=t)return e;n+=e[r]}return n}(c)}for(let e=0;e<n.length;e++){const t=n.charCodeAt(e);o?i?i=!1:92===t?i=!0:34===t&&(o=!1):34===t?o=!0:44!==t&&59!==t||(s(e),r=e+1)}return s(n.length),t}(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[je]=this[je]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ie(e);t[r]||(!function(e,t){const n=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Se.isArray(e)?e.forEach(r):r(e),this}}qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(qe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Se.freezeMethods(qe);const He="[REDACTED ****]";function We(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(Se.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof qe&&(e=e.toJSON()),r.push(e),Se.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);Se.isUndefined(r)||(t[n]=r)});else{if(!Se.isPlainObject(e)&&function(e){if(Se.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Se.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,i]of Object.entries(e)){const e=n.has(r.toLowerCase())?He:o(i);Se.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}function Ge(e){try{return String(e)}catch(e){return""}}class Xe extends Error{static from(e,t,n,r,o,i){let s=e.message;!s&&Se.isArray(e.errors)&&e.errors.length&&(s=function(e){return e.errors.map(e=>{try{return e&&e.message?Ge(e.message):Ge(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}(e));const a=new Xe(s,t||e.code,n,r,o);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,null!=e.status&&null==a.status&&(a.status=e.status),i&&Object.assign(a,i),a}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&Se.hasOwnProp(e,"redact")?e.redact:void 0,n=Se.isArray(t)&&t.length>0?We(e,t):Se.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}}Xe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Xe.ERR_BAD_OPTION="ERR_BAD_OPTION",Xe.ECONNABORTED="ECONNABORTED",Xe.ETIMEDOUT="ETIMEDOUT",Xe.ECONNREFUSED="ECONNREFUSED",Xe.ERR_NETWORK="ERR_NETWORK",Xe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Xe.ERR_DEPRECATED="ERR_DEPRECATED",Xe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Xe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Xe.ERR_CANCELED="ERR_CANCELED",Xe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Xe.ERR_INVALID_URL="ERR_INVALID_URL",Xe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const ze=100;function Ve(e){return Se.isPlainObject(e)||Se.isArray(e)}function Je(e){return Se.endsWith(e,"[]")?e.slice(0,-2):e}function Ke(e,t,n){return e?e.concat(t).map(function(e,t){return e=Je(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const $e=Se.toFlatObject(Se,{},null,function(e){return/^is[A-Z]/.test(e)});function Ze(e,t,n){if(!Se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(e,t)=>{const r=Se.getSafeProp(n,e);return Se.isUndefined(r)?t:r},o=r("metaTokens",!0),i=r("visitor")||h,s=r("dots",!1),a=r("indexes",!1),c=r("Blob")||"undefined"!=typeof Blob&&Blob,l=r("maxDepth",ze),u=c&&Se.isSpecCompliantForm(t),d=[];if(!Se.isFunction(i))throw new TypeError("visitor must be a function");function f(e){if(null===e)return"";if(Se.isDate(e))return e.toISOString();if(Se.isBoolean(e))return e.toString();if(!u&&Se.isBlob(e))throw new Xe("Blob is not supported. Use a Buffer instead.");if(Se.isArrayBuffer(e)||Se.isTypedArray(e)){if(u&&"function"==typeof c)return new c([e]);throw new Xe("Blob is not supported. Use a Buffer instead.",Xe.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new Xe("Object is too deeply nested ("+e+" levels). Max depth: "+l,Xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,r){let i=e;if(Se.isReactNative(t)&&Se.isReactNativeBlob(e))return t.append(Ke(r,n,s),f(e)),!1;if(e&&!r&&"object"==typeof e)if(Se.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!Se.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}(e,1);else if(Se.isArray(e)&&function(e){return Se.isArray(e)&&!e.some(Ve)}(e)||(Se.isFileList(e)||Se.endsWith(n,"[]"))&&(i=Se.toArray(e)))return n=Je(n),i.forEach(function(e,r){!Se.isUndefined(e)&&null!==e&&t.append(!0===a?Ke([n],r,s):null===a?n:n+"[]",f(e))}),!1;return!!Ve(e)||(t.append(Ke(r,n,s),f(e)),!1)}const g=Object.assign($e,{defaultVisitor:h,convertValue:f,isVisitable:Ve});if(!Se.isObject(e))throw new TypeError("data must be an object");return function e(n,r,o=0){if(!Se.isUndefined(n)){if(p(o),-1!==d.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));d.push(n),Se.forEach(n,function(n,s){!0===(!(Se.isUndefined(n)||null===n)&&i.call(t,n,Se.isString(s)?s.trim():s,r,g))&&e(n,r?r.concat(s):[s],o+1)}),d.pop()}}(e),t}function Qe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Ye(e,t){this._pairs=[],e&&Ze(e,this,t)}const et=Ye.prototype;function tt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function nt(e,t,n){if(!t)return e;e=e||"";const r=Se.isFunction(n)?{serialize:n}:n,o=Se.getSafeProp(r,"encode")||tt,i=Se.getSafeProp(r,"serialize");let s;if(s=i?i(t,r):Se.isURLSearchParams(t)?t.toString():new Ye(t,r).toString(o)){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}et.append=function(e,t){this._pairs.push([e,t])},et.toString=function(e){const t=e?t=>e.call(this,t,Qe):Qe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const rt=Symbol("internals");function ot(e){return e?e.length:0}function it(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function st(e,t){const n=e.handlers,r=ot(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()),t.handlersLength=r}class at{constructor(){this.handlers=[],this[rt]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){const r={fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null},o=this[rt];null==this.handlers&&(this.handlers=[]),st(this,o);const i=o.nextId++;return this.handlers.push(r),o.handlerEntries.set(i,{handler:r,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,i}eject(e){const t=this[rt];st(this,t);const n=t.handlerEntries.get(e);if(n){if(t.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(it(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],st(this,this[rt]))}forEach(e){const t=this[rt];st(this,t),t.iterationDepth++;try{Se.forEach(this.handlers,function(t){null!==t&&e(t)})}finally{--t.iterationDepth||(st(this,t),it(this.handlers),t.handlersLength=ot(this.handlers))}}}var ct={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},lt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ye,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ut="undefined"!=typeof window&&"undefined"!=typeof document,dt="object"==typeof navigator&&navigator||void 0,ft=ut&&(!dt||["ReactNative","NativeScript","NS"].indexOf(dt.product)<0),pt=(()=>"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts)(),ht=ut&&window.location.href||"http://localhost";var gt={...Object.freeze({hasBrowserEnv:ut,hasStandardBrowserWebWorkerEnv:pt,hasStandardBrowserEnv:ft,navigator:dt,origin:ht}),...lt};const mt=ze;function wt(e){if(e>mt)throw new Xe("FormData field is too deeply nested ("+e+" levels). Max depth: "+mt,Xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function yt(e){function t(e,n,r,o){wt(o);let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&Se.isArray(r)?r.length:i,a?(Se.hasOwnProp(r,i)?r[i]=Se.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!s):(Se.hasOwnProp(r,i)&&Se.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Se.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)t[i=n[r]]=e[i];return t}(r[i])),!s)}if(Se.isFormData(e)&&Se.isFunction(e.entries)){const n={};return Se.forEachEntry(e,(e,r)=>{t(function(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;null!==(r=n.exec(e));)wt(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),n}return null}const vt=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),bt=(e,t)=>null!=e&&Se.hasOwnProp(e,t)?e[t]:void 0;const _t={transitional:ct,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Se.isObject(e);if(o&&Se.isHTMLForm(e)&&(e=new FormData(e)),Se.isFormData(e))return r?JSON.stringify(yt(e)):e;if(Se.isArrayBuffer(e)||Se.isBuffer(e)||Se.isStream(e)||Se.isFile(e)||Se.isBlob(e)||Se.isReadableStream(e))return e;if(Se.isArrayBufferView(e))return e.buffer;if(Se.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){const t=bt(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ze(e,new gt.classes.URLSearchParams,{visitor:function(e,t,n,r){return gt.isNode&&Se.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((i=Se.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=bt(this,"env"),r=n&&n.FormData;return Ze(i?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Se.isString(e))try{return(t||JSON.parse)(e),Se.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=bt(this,"transitional")||_t.transitional,n=t&&t.forcedJSONParsing,r=bt(this,"responseType"),o="json"===r;if(Se.isResponse(e)||Se.isReadableStream(e))return e;if(e&&Se.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,bt(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw Xe.from(e,Xe.ERR_BAD_RESPONSE,this,null,bt(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Et(e,t){const n=this||_t,r=t||n,o=qe.from(r.headers);let i=r.data;return Se.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Ot(e){return!(!e||!e.__CANCEL__)}Se.forEach(vt,e=>{_t.headers[e]={}});class kt extends Xe{constructor(e,t,n){super(null==e?"canceled":e,Xe.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}}function St(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Xe("Request failed with status code "+n.status,n.status>=400&&n.status<500?Xe.ERR_BAD_REQUEST:Xe.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Pt=/[\t\n\r]/g;function Rt(e){if("string"!=typeof e)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(Pt,"")}function xt(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}const Lt=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];o||(o=c),n[i]=a,r[i]=c;let u=s,d=0;for(;u!==i;)d+=n[u++],u%=e;if((i=(i+1)%e)===s&&(s=(s+1)%e),c-o<t)return;const f=l&&c-l;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n),(...e)=>s(e)]}(n=>{if(!n||!Se.isNumber(n.loaded))return;const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=Math.max(0,null!=s?Math.min(i,s):i),c=Math.max(0,a-r),l=o(c);r=Math.max(r,a),e({loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s?(s-a)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},At=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Tt=(e,t=Se.asap)=>(...n)=>t(()=>e(...n));var Ct=gt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gt.origin),gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent)):()=>!0,Ut=gt.hasStandardBrowserEnv?{write(e,t,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];Se.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Se.isString(r)&&a.push(`path=${r}`),Se.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),Se.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(e){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const jt=/^https?:(?!\/\/)/i;function It(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${He}@`),n=t.indexOf("#"),r=(-1===n?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${He}`);return-1===n?r:`${r}#${o=t.slice(n+1),o?o.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n="")=>`${t}${n}${He}`):o}`;var o}function Nt(e,t){if("string"==typeof e){const n=Rt(e);if(jt.test(n))throw new Xe(`Invalid URL ${JSON.stringify(It(n))}: missing "//" after protocol`,Xe.ERR_INVALID_URL,t)}}function Mt(e,t,n,r){Nt(t,r);let o=!("string"==typeof(i=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i));var i;return e&&(o||!1===n)?(Nt(e,r),function(e,t){if(!t)return e;let n=e.length;for(;n>0&&47===e.charCodeAt(n-1);)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}(e,t)):t}const Dt=e=>e instanceof qe?{...e}:e,Bt=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Ft(e,t){e=e||{},t=t||{};const n=Object.create(null);function r(e,t,n,r){return Se.isPlainObject(e)&&Se.isPlainObject(t)?Se.merge.call({caseless:r},e,t):Se.isPlainObject(t)?Se.merge({},t):Se.isArray(t)?t.slice():t}function o(e,t,n,o){return Se.isUndefined(t)?Se.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Se.isUndefined(t))return r(void 0,t)}function s(e,t){return Se.isUndefined(t)?Se.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return Se.hasOwnProp(t,i)?r(n,o):Se.hasOwnProp(e,i)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutErrorMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(Dt(e),Dt(t),0,!0)};return Se.forEach(Bt({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const i=Se.hasOwnProp(c,r)?c[r]:o,s=i(Se.hasOwnProp(e,r)?e[r]:void 0,Se.hasOwnProp(t,r)?t[r]:void 0,r);Se.isUndefined(s)&&i!==a||(n[r]=s)}),Se.hasOwnProp(t,"validateStatus")&&Se.isUndefined(t.validateStatus)&&!1===function(n){const r=Se.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Se.isUndefined(r)){if(!Se.isPlainObject(r))return;if(Se.hasOwnProp(r,n))return r[n]}const o=Se.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Se.isPlainObject(o)&&Se.hasOwnProp(o,n))return o[n]}("validateStatusUndefinedResolves")&&(Se.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const qt=["content-type","content-length"];const Ht=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function Wt(e){const t=Ft({},e),n=e=>Se.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let a=n("headers");const c=n("auth"),l=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");if(t.headers=a=qe.from(a),t.url=nt(Mt(l,d,u,t),n("params"),n("paramsSerializer")),c){const t=Se.getSafeProp(c,"username")||"",n=Se.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(t+":"+(n?Ht(n):"")))}catch(t){throw Xe.from(t,Xe.ERR_BAD_OPTION_VALUE,e)}}if(Se.isFormData(r)){const e=Se.getSafeProp(r,"getHeaders");gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv||Se.isReactNative(r)?a.setContentType(void 0):Se.isFunction(e)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{qt.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(a,e.call(r),n("formDataHeaderPolicy"))}if(gt.hasStandardBrowserEnv){if(Se.isFunction(o)&&(o=o(t)),!0===o||null==o&&Ct(t.url)){const e=i&&s&&Ut.read(s);e&&a.set(i,e)}}return t}var Gt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Wt(e);let o=r.data;const i=qe.from(r.headers).normalize();let s,a,c,l,u,d,{responseType:f,onUploadProgress:p,onDownloadProgress:h}=r;function g(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function w(o){if(!m)return;if(!(0!==m.status||"file"===(xt(Rt(r.url))||xt(gt.origin))||m.responseURL&&m.responseURL.startsWith("file:")))return n(new Xe("Request aborted",Xe.ECONNABORTED,e,m)),g(),void(m=null);try{o?d&&d(o):u&&u()}catch(e){setTimeout(()=>{throw e})}if(!m)return;const i=qe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());St(function(e){t(e),g()},function(e){n(e),g()},{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:i,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(w)},m.onabort=function(){m&&(n(new Xe("Request aborted",Xe.ECONNABORTED,e,m)),g(),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new Xe(r,Xe.ERR_NETWORK,e,m);o.event=t||null,n(o),g(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ct;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Xe(t,o.clarifyTimeoutError?Xe.ETIMEDOUT:Xe.ECONNABORTED,e,m)),g(),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Se.forEach(Ue(i),function(e,t){m.setRequestHeader(t,e)}),Se.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),h&&([c,u,d]=Lt(h,!0),m.addEventListener("progress",c)),p&&m.upload&&([a,l]=Lt(p),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=(t=>{m&&(n(!t||t.type?new kt(null,e,m):t),m.abort(),g(),m=null)}),r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const y=xt(r.url);if(y&&!gt.protocols.includes(y))return n(new Xe("Unsupported protocol "+y+":",Xe.ERR_BAD_REQUEST,e)),void g();m.send(o||null)})};const Xt=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Xe?t:new kt(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Xe(`timeout of ${t}ms exceeded`,Xe.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>{r||(e.aborted?o.call(e):e.addEventListener("abort",o,{once:!0}))});const{signal:a}=n;return a.unsubscribe=(()=>Se.asap(s)),a},zt=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Vt=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Jt=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Vt(e))yield*zt(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Kt=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,$t=(e,t,n)=>t+2<n&&Kt(e.charCodeAt(t+1))&&Kt(e.charCodeAt(t+2)),Zt=e=>e<=57?e-48:(223&e)-55,Qt=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,Yt=e=>9===e||10===e||12===e||13===e||32===e,en=e=>{const t=e.length;let n=0,r=0,o=!1;for(let i=0;i<t;i++){let s=e.charCodeAt(i);37===s&&$t(e,i,t)&&(s=16*Zt(e.charCodeAt(i+1))+Zt(e.charCodeAt(i+2)),i+=2),Yt(s)||(61!==s?!Qt(s)||r>0?o=!0:n++:r++)}return o||r>2||r>0&&(n+r)%4!=0||n%4==1?(e=>{const t=e.length;let n=0;return t>0&&61===e.charCodeAt(t-1)&&(n++,t>1&&61===e.charCodeAt(t-2)&&n++),Math.floor(3*(t-n)/4)})(e):(e=>{const t=e%4;return 3*Math.floor(e/4)+(2===t?1:3===t?2:0)})(n)},tn=(e,t)=>{if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),o=e.slice(n+1);if(/;base64/i.test(r))return t(o);let i=0;for(let e=0,t=o.length;e<t;e++){const n=o.charCodeAt(e);if(37===n&&$t(o,e,t))i+=1,e+=2;else if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=o.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i};const nn="1.20.0",rn={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:on}=Se,sn=e=>{if(!Se.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},an=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},cn=e=>{const t=void 0!==Se.global&&null!==Se.global?Se.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Se.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:s}=e,a=o?on(o):"function"==typeof fetch,c=on(i),l=on(s);if(!a)return!1;const u=a&&on(n),d=a&&("function"==typeof r?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new i(e).arrayBuffer())),f=c&&u&&an(()=>{let e=!1;const t=new i(gt.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),p=l&&u&&an(()=>Se.isReadableStream(new s("").body)),h={stream:p&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=((t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Xe(`Response type '${e}' is not supported`,Xe.ERR_NOT_SUPPORT,n)}))});const g=async e=>{if(null==e)return 0;if(Se.isBlob(e))return e.size;if(Se.isSpecCompliantForm(e)){const t=new i(gt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Se.isArrayBufferView(e)||Se.isArrayBuffer(e)?e.byteLength:(Se.isURLSearchParams(e)&&(e+=""),Se.isString(e)?(await d(e)).byteLength:void 0)};return async e=>{let{url:t,method:n,data:a,signal:l,cancelToken:d,timeout:m,onDownloadProgress:w,onUploadProgress:y,responseType:v,headers:b,withCredentials:_="same-origin",fetchOptions:E,maxContentLength:O,maxBodyLength:k,maxRedirects:S}=Wt(e);const P=Se.isNumber(O)&&O>-1,R=Se.isNumber(k)&&k>-1;let x=o||fetch;v=v?(v+"").toLowerCase():"text";let L=Xt([l,d&&d.toAbortSignal()],m),A=null;const T=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let C,U=null;const j=()=>new Xe("Request body larger than maxBodyLength limit",Xe.ERR_BAD_REQUEST,e,A);try{let o=void 0;const l=(t=>Se.hasOwnProp(e,t)?e[t]:void 0)("auth");if(l){o={username:Se.getSafeProp(l,"username")||"",password:Se.getSafeProp(l,"password")||""}}if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,gt.origin);if(!o&&(e.username||e.password)){o={username:sn(e.username),password:sn(e.password)}}(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(o&&(b.delete("authorization"),b.set("Authorization","Basic "+btoa((e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))((o.username||"")+":"+(o.password||""))))),P&&"string"==typeof t&&t.startsWith("data:")){if(function(e){const t="string"==typeof e?e.indexOf("#"):-1;return tn(-1===t?e:e.slice(0,t),en)}(t)>O)throw new Xe("maxContentLength size of "+O+" exceeded",Xe.ERR_BAD_RESPONSE,e,A)}if(R&&"get"!==n&&"head"!==n){const e=await g(a);if("number"==typeof e&&isFinite(e)&&(C=e,e>k))throw j()}const d=R&&(Se.isReadableStream(a)||Se.isStream(a)),m=(e,t,n)=>Jt(e,65536,e=>{if(R&&e>k)throw U=j();t&&t(e)},n);if(f&&"get"!==n&&"head"!==n&&(y||d)){if(0!==(C=null==C?await(async(e,t)=>{const n=Se.toFiniteNumber(e.getContentLength());return null==n?g(t):n})(b,a):C)||d){let e,n=new i(t,{method:"POST",body:a,duplex:"half"});if(Se.isFormData(a)&&(e=n.headers.get("content-type"))&&b.setContentType(e),n.body){const[e,t]=y&&At(C,Lt(Tt(y)))||[];a=m(n.body,e,t)}}}else if(d&&!c&&u&&"get"!==n&&"head"!==n)a=m(a);else if(d&&c&&!f&&"get"!==n&&"head"!==n)throw new Xe("Stream request bodies are not supported by the current fetch implementation",Xe.ERR_NOT_SUPPORT,e,A);Se.isString(_)||(_=_?"include":"omit");const I=c&&"credentials"in i.prototype;if(Se.isFormData(a)){const e=b.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&b.delete("content-type")}b.set("User-Agent","axios/"+nn,!1);const N=null==E?E:Object.assign(Object.create(null),E);N&&(delete N.body,delete N.headers,delete N.method,delete N.signal,delete N.duplex,delete N.credentials);const M=Object.assign(Object.create(null),N,{signal:L,method:n.toUpperCase(),headers:Ue(b.normalize()),body:a,duplex:"half",credentials:I?_:void 0});c&&(Se.forEach(rn,(e,t)=>{void 0===M[t]&&(M[t]=e)}),void 0===M.signal&&(M.signal=null),void 0===M.body&&(M.body=null)),0===S&&(M.redirect="manual",N&&(N.redirect="manual")),A=c&&new i(t,M);let D=await(c?x(A,N):x(t,M));const B=qe.from(D.headers);if(P){const t=Se.toFiniteNumber(B.getContentLength());if(null!=t&&t>O)throw new Xe("maxContentLength size of "+O+" exceeded",Xe.ERR_BAD_RESPONSE,e,A)}const F=p&&("stream"===v||"response"===v);if(p&&D.body&&(w||P||F&&T)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=D[e]});const n=Se.toFiniteNumber(B.getContentLength()),[r,o]=w&&At(n,Lt(Tt(w),!0))||[];let i=0;const a=t=>{if(P&&(i=t)>O)throw new Xe("maxContentLength size of "+O+" exceeded",Xe.ERR_BAD_RESPONSE,e,A);r&&r(t)};D=new s(Jt(D.body,65536,a,()=>{o&&o(),T&&T()}),t)}v=v||"text";let q=await h[Se.findKey(h,v)||"text"](D,e);if(P&&!p&&!F){let t;if(null!=q&&("number"==typeof q.byteLength?t=q.byteLength:"number"==typeof q.size?t=q.size:"string"==typeof q&&(t="function"==typeof r?(new r).encode(q).byteLength:q.length)),"number"==typeof t&&t>O)throw new Xe("maxContentLength size of "+O+" exceeded",Xe.ERR_BAD_RESPONSE,e,A)}return!F&&T&&T(),await new Promise((t,n)=>{St(t,n,{data:q,headers:qe.from(D.headers),status:D.status,statusText:D.statusText,config:e,request:A})})}catch(t){if(T&&T(),L&&L.aborted&&L.reason instanceof Xe){const n=L.reason;throw n.config=e,A&&(n.request=A),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(U)throw A&&!U.request&&(U.request=A),U;if(t instanceof Xe)throw A&&!t.request&&(t.request=A),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new Xe("Network Error",Xe.ERR_NETWORK,e,A,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw Xe.from(t,t&&t.code,e,A,t&&t.response)}}},ln=new Map,un=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,c=i.length,l=ln;for(;c--;)s=i[c],void 0===(a=l.get(s))&&l.set(s,a=c?new Map:cn(t)),l=a;return a},dn=(un(),{http:null,xhr:Gt,fetch:{get:un}});Se.forEach(dn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const fn=e=>`- ${e}`,pn=e=>Se.isFunction(e)||null===e||!1===e;var hn={getAdapter:function(e,t){e=Se.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){let n;if(o=r=e[s],!pn(r)&&void 0===(o=dn[(n=String(r)).toLowerCase()]))throw new Xe(`Unknown adapter '${n}'`);if(o&&(Se.isFunction(o)||(o=o.get(t))))break;i[n||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(fn).join("\n"):" "+fn(e[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+t,Xe.ERR_NOT_SUPPORT)}return o},adapters:dn};function gn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kt(null,e)}function mn(e){const t=Se.toSafeFlatObject(e);return gn(t),t.headers=qe.from(Se.getSafeProp(t,"headers")),t.data=Et.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),hn.getAdapter(t.adapter||_t.adapter,t)(t).then(function(e){gn(t),t.response=e;try{e.data=Et.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=qe.from(e.headers),e},function(e){if(!Ot(e)&&(gn(t),e&&e.response)){t.response=e.response;try{e.response.data=Et.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=qe.from(e.response.headers)}return Promise.reject(e)})}const wn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const yn={};wn.transitional=function(e,t,n){function r(e,t){return"[Axios v"+nn+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Xe(r(o," has been removed"+(t?" in "+t:"")),Xe.ERR_DEPRECATED);return t&&!yn[o]&&(yn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},wn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var vn={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Xe("option "+i+" must be "+n,Xe.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Xe("Unknown option "+i,Xe.ERR_BAD_OPTION)}},validators:wn};const bn=vn.validators;class _n{constructor(e){this.defaults=e||{},this.interceptors={request:new at,response:new at}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack;let r="";if("string"==typeof n){const e=n.indexOf("\n");r=-1===e?"":n.slice(e+1)}if(e.stack){if(r){const t=r.indexOf("\n"),n=-1===t?-1:r.indexOf("\n",t+1),o=-1===n?"":r.slice(n+1);String(e.stack).endsWith(o)||(e.stack+="\n"+r)}}else e.stack=r}catch(e){}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ft(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&vn.assertOptions(n,{silentJSONParsing:bn.transitional(bn.boolean),forcedJSONParsing:bn.transitional(bn.boolean),clarifyTimeoutError:bn.transitional(bn.boolean),legacyInterceptorReqResOrdering:bn.transitional(bn.boolean),advertiseZstdAcceptEncoding:bn.transitional(bn.boolean),validateStatusUndefinedResolves:bn.transitional(bn.boolean)},!1),null!=r&&(Se.isFunction(r)?t.paramsSerializer={serialize:r}:vn.assertOptions(r,{encode:bn.function,serialize:bn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),vn.assertOptions(t,{baseUrl:bn.spelling("baseURL"),withXsrfToken:bn.spelling("withXSRFToken")},!0),t.method=(Se.getSafeProp(t,"method")||Se.getSafeProp(this.defaults,"method")||"get").toLowerCase();let i=o&&Se.merge(o.common,o[t.method]);o&&Se.forEach(vt.concat("common"),e=>{delete o[e]}),t.headers=qe.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||ct;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[mn.bind(this),void 0];for(e.unshift(...s),e.push(...c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=s.length;let f=t;for(;d<u;){const e=s[d++],t=s[d++];try{f=e?e(f):f}catch(e){if(!t){l=Promise.reject(e);break}try{const n=t.call(this,e);Se.isThenable(n)&&(l=Promise.resolve(n).then(()=>mn.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=mn.call(this,f)}catch(e){l=Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return nt(Mt((e=Ft(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}Se.forEach(["delete","get","head","options"],function(e){_n.prototype[e]=function(t,n){return this.request(Ft(n||{},{method:e,url:t,data:n&&Se.hasOwnProp(n,"data")?n.data:void 0}))}}),Se.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(Ft(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}_n.prototype[e]=t(),"query"!==e&&(_n.prototype[e+"Form"]=t(!0))});class En{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=(e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r}),e(function(e,r,o){n.reason||(n.reason=new kt(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=(()=>this.unsubscribe(t)),e.signal}static source(){let e;return{token:new En(function(t){e=t}),cancel:e}}}const On={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(On).forEach(([e,t])=>{void 0===On[t]&&(On[t]=e)});const kn=function e(t){const n=new _n(t),r=U(_n.prototype.request,n);return Se.extend(r,_n.prototype,n,{allOwnKeys:!0}),Se.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ft(t,n))},r}(_t);kn.Axios=_n,kn.CanceledError=kt,kn.CancelToken=En,kn.isCancel=Ot,kn.VERSION=nn,kn.toFormData=Ze,kn.AxiosError=Xe,kn.Cancel=kn.CanceledError,kn.all=function(e){return Promise.all(e)},kn.spread=function(e){return function(t){return e.apply(null,t)}},kn.isAxiosError=function(e){return Se.isObject(e)&&!0===e.isAxiosError},kn.mergeConfig=Ft,kn.AxiosHeaders=qe,kn.formToJSON=(e=>yt(Se.isHTMLForm(e)?new FormData(e):e)),kn.getAdapter=hn.getAdapter,kn.HttpStatusCode=On,kn.default=kn;"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Sn(e,t){return e(t={exports:{}},t.exports),t.exports}var Pn,Rn,xn,Ln,An=Sn(function(e,t){e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)"__proto__"!==r&&(e[r]=n[r])}return e}return function t(n,r){function o(t,o,i){if("undefined"!=typeof document){"number"==typeof(i=e({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=t+"="+n.write(o,t)+s}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},o=0;o<t.length;o++){var i=t[o].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(a in r||(r[a]=n.read(s,a)),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(t,n){o(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()}),Tn=function(e){function t(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i=e.apply(this,r)||this;return i.code=n,i.name=i.constructor.name,i.message=n,Object.setPrototypeOf(i,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return n(t,e),t}(Error),Cn=function(e){function t(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i=e.apply(this,r)||this;return i.message=n,i.name=i.constructor.name,i.message=n,Object.setPrototypeOf(i,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return n(t,e),t}(Error),Un=["ar","bg","cs","de","en","es","fr","he","hu","it","ja","ko","pl","pt","ro","ru","th","tr","vi","zh","km","id","lo","my","ph","ne"],jn=[navigator.language].concat(navigator.languages),In=function(e){return n=[t=e].concat(jn).find(function(e){return!!e&&Un.includes(e.substring(0,2))})||"en-XX",t&&n!==t?(console.error("Locale "+n+" cannot be applied, language code should be one of "+Un.join(", ")),"en-XX"):n;var t,n};(Pn=e.ConfirmationType||(e.ConfirmationType={})).CODE="code",Pn.LINK="link",(Rn=e.PostMessageEvents||(e.PostMessageEvents={})).ThemeUpdate="@xsolla-login/sdk:theme-update",Rn.Close="@xsolla-login/sdk:close",Rn.Open="@xsolla-login/sdk:open",Rn.Dimensions="@xsolla-login/sdk:dimensions",Rn.PageOpen="@xsolla-login/sdk:page:open",Rn.IframeOpen="@xsolla-login/sdk:iframe:open",Rn.GetRedirectCode="@xsolla-login/sdk:get-redirect-url",Rn.WidgetStep="@xsolla-login/sdk:widget:step",Rn.GoogleOneTapOpen="@xsolla-login/sdk:google-one-tap:open",Rn.GoogleOneTapSuccess="@xsolla-login/sdk:google-one-tap:success",Rn.LoginSuccess="@xsolla-login/sdk:login:success",Rn.LoginError="@xsolla-login/sdk:login:error",Rn.SignupSuccess="@xsolla-login/sdk:signup:success",Rn.SignupError="@xsolla-login/sdk:signup:error",Rn.SocialLogin="@xsolla-login/sdk:social-login",Rn.SocialLoginSuccess="@xsolla-login/sdk:social-login-success",Rn.BabkaLogin="@xsolla-login/sdk:babka-login",Rn.BabkaLoginPopup="@xsolla-login/sdk:babka-login-popup",Rn.OpenBabkaPopupWidget="@xsolla-login/sdk:open-babka-popup-widget",Rn.RequestAncestorsLocation="@xsolla-login/sdk:request-ancestors-location",Rn.ResponseAncestorsLocation="@xsolla-login/sdk:response-ancestors-location",Rn.BabkaPopupWidgetLoad="@xsolla-login/sdk/babka-widget:open",Rn.BabkaPopupWidgetClose="@xsolla-login/sdk/babka-widget:close",(xn=e.WidgetPages||(e.WidgetPages={})).SignUpPage="signUp",xn.LogInPage="logIn",xn.LogInPresetPage="logInUserPreset",xn.ResetPasswordPage="passwordReset",xn.SetPasswordPage="passwordSet",xn.AskPage="ask",xn.ErrorPage="error",xn.SocialsPage="socials",xn.AgreementPage="agreement",xn.TwoFactorPage="otp",(Ln=e.CloseSource||(e.CloseSource={}))[Ln.Button=0]="Button";var Nn=function(t){var n=t.message,o=t.targetOrigin,i=t.target,s=t.globalObject,a=void 0===s?window:s,c=a.parent;if(!c||c===a){if(void 0!==i)switch(n.type){case e.PostMessageEvents.PageOpen:case e.PostMessageEvents.ThemeUpdate:case e.PostMessageEvents.GoogleOneTapSuccess:case e.PostMessageEvents.IframeOpen:case e.PostMessageEvents.BabkaLoginPopup:case e.PostMessageEvents.BabkaPopupWidgetLoad:case e.PostMessageEvents.RequestAncestorsLocation:case e.PostMessageEvents.ResponseAncestorsLocation:case e.PostMessageEvents.SocialLoginSuccess:i.postMessage(r({},n),o)}}else switch(n.type.replace("@xsolla/login-sdk","@xsolla-login/sdk")){case e.PostMessageEvents.Close:case e.PostMessageEvents.Open:case e.PostMessageEvents.Dimensions:case e.PostMessageEvents.WidgetStep:case e.PostMessageEvents.PageOpen:case e.PostMessageEvents.GetRedirectCode:case e.PostMessageEvents.GoogleOneTapOpen:case e.PostMessageEvents.LoginSuccess:case e.PostMessageEvents.LoginError:case e.PostMessageEvents.SignupSuccess:case e.PostMessageEvents.SignupError:case e.PostMessageEvents.SocialLogin:case e.PostMessageEvents.OpenBabkaPopupWidget:c.postMessage(r({},n),o);break;case e.PostMessageEvents.ThemeUpdate:case e.PostMessageEvents.IframeOpen:case e.PostMessageEvents.GoogleOneTapSuccess:case e.PostMessageEvents.BabkaPopupWidgetLoad:case e.PostMessageEvents.RequestAncestorsLocation:case e.PostMessageEvents.ResponseAncestorsLocation:void 0!==i&&i.postMessage(r({},n),o);break;case e.PostMessageEvents.BabkaLogin:c.opener.postMessage(r({},n),o)}},Mn=window.addEventListener?"addEventListener":"attachEvent",Dn=window[Mn],Bn="addEventListener"!==Mn?"on":"";Sn(function(e){var t;t=function(e){var t={counterId:0,clientId:0,siteDomains:null,server:"",hitUrl:"",userParamsUrl:"",externalId:null,extraValues:"",hit:!0,extLink:!0,click:!0,scroll:!0,sendLoadMetrics:!1,abParams:"",isBrowser:"undefined"!=typeof window},n=null,r=!1,o=!1,i=!1,s=0,a=0;t.isBrowser&&(a="hidden"===document.visibilityState?0:1/0);var c={isArray:function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},random:function(e,t){return 2>arguments.length&&(t=e,e=0),1>arguments.length&&(t=1073741824),Math.floor(Math.random()*(t-e))+e},mergeObjects:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},apiHelper:function(e,n){2!=e&&(r=!1,o=!1,i=!1);var s=n&&n.eid?n.eid:t.externalId,a=n&&n.exv?JSON.stringify(n.exv):t.extraValues,l=n&&"object"==typeof n.abParams?JSON.stringify(n.abParams):t.abParams,u={et:e,eid:s};return a&&(u.exv=a),l&&(u.abParams=l),"object"!=typeof n&&(n={}),n=c.mergeObjects(n,u)}},l=function(){if(0===a)return null;var e=0;if(window.performance&&window.performance.getEntriesByType){for(var t=window.performance.getEntriesByType("paint"),n=0;n<t.length;n++)if("first-contentful-paint"===t[n].name)return(e=Math.round(t[n].startTime))<a?e:null;return null}if("object"==typeof window.chrome&&window.chrome.loadTimes){var r=window.chrome.loadTimes();if(r.requestTime&&r.firstPaintTime&&window.performance&&window.performance.timing)return(e=Math.round(1e3*r.firstPaintTime-window.performance.timing.navigationStart))<a?e:null}else if(window.performance&&window.performance.timing&&((r=window.performance.timing).navigationStart&&r.msFirstPaint))return(e=r.msFirstPaint-r.navigationStart)<a?e:null;return null},u=function(){try{function e(e){if(e.startTime<a&&(s=Math.round(e.startTime),t.sendLoadMetrics)){var n=document.documentElement.scrollHeight||0;(document.documentElement.clientHeight||0)>=n&&O.eventForLCP()}}var n=new PerformanceObserver(function(t){for(var n=t.getEntries(),r=0;r<n.length;r++)e(n[r])});n.observe({type:"largest-contentful-paint",buffered:!0}),document.addEventListener("visibilitychange",function t(){if("hidden"===document.visibilityState){document.removeEventListener("visibilitychange",t,!0);var r=[];n.takeRecords&&(r=n.takeRecords());for(var o=0;o<r.length;o++)e(r[o]);n.disconnect()}},!0)}catch(e){}},d=function(){var e=(navigator.connection||{type:""}).type;return void 0===e?"":e},f=function(){var e=(window.navigator?navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage:"").toLowerCase();return c.isString(e)?e:""},p=function(){try{return navigator.javaEnabled()}catch(e){return!1}},h=function(){try{var e=Notification.permission}catch(e){}switch(e){case"denied":return 0;case"granted":return 1}},g=function(){try{return window.top!==window.self}catch(e){return!1}},m=function(){if(navigator.cookieEnabled)return!0;document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e},w=function(){return Math.round(+new Date/1e3)},y=function(){return-(new Date).getTimezoneOffset()},v={getVid:function(){var e=b.isFromAd()?0:this.readM("vid");return e||(e=w()+""+c.random()),this.create("vid",e,30),e},getUid:function(){this.globalDomain();var e=this.readM("uid"),t=this.readLocalStorage("uid");return e||t?!e&&t?(e=t,this.create("uid",t,1036800)):e&&!t&&this.createLocalStorage("uid",e):(e=w()+""+c.random(),this.create("uid",e,1036800),this.createLocalStorage("uid",e)),e},getXsollauid:function(e){this.globalDomain();var t=this.readM("xsollauid"),n=this.readLocalStorage("xsollauid");return e?(this.create("xsollauid",e,5184e3),this.createLocalStorage("xsollauid",e),e):(t&&!n?this.createLocalStorage("xsollauid",t):!t&&n&&this.create("xsollauid",n,5184e3),t||n)},createLocalStorage:function(e,t){try{localStorage.setItem(this._prepareName(e),encodeURIComponent(t))}catch(e){}},create:function(e,t,n){var r,o=[this._prepareName(e)+"="+encodeURIComponent(t)];n&&((r=new Date).setTime(r.getTime()+6e4*n),o.push("expires="+r.toGMTString())),this._domain&&o.push("domain="+this._domain),o.push("path=/");try{document.cookie=o.join(";")}catch(e){}},globalDomain:function(){return this._domain=b.extractHostname(window.location.host),this._domain},readM:function(e){return e=this._prepareName(e),this.read(e)},read:function(e){try{var t=document.cookie}catch(e){}return t&&t.match(new RegExp("(?:^|;\\s*)"+e+"=([^;]*)"))?decodeURIComponent(RegExp.$1):null},readLocalStorage:function(e){e=this._prepareName(e);try{return localStorage.getItem(e)}catch(e){return null}},erase:function(e){this.create(e,"",-1)},_prepareName:function(e){return"xsollauid"===e?e:"_mm_"+e+(t.counterId?"_"+t.counterId:"")}},b={getDocumentCharset:function(){return(""+(document.characterSet||document.charset||"")).toLowerCase()},getRootElement:function(){var e=document.documentElement;return"CSS1Compat"===document.compatMode?e:document.body||e},getViewportSize:function(){var e=this.getRootElement();return[e.clientWidth||window.innerWidth,e.clientHeight||window.innerHeight]},getDocumentTitle:function(){var e=document.title;return"string"!=typeof e&&(e=(e=document.getElementsByTagName("title"))&&e.length?e[0].innerHTML:""),e},isFromAd:function(){if(!document.referrer)return!1;var e=["adfox","admitad","adnews","adnous","adriver","advmaker","aport","aport.ru","AvitoPromo","AvitoContext","begun","bing","B2BContext","criteo","directadvert","directadvert.ru","drivenetwork","facebook","fb","facebook.com","fb.com","giraffio","google","adwords","adsense","instagram","kavanga","ladycenter","link","magna","marketgid","medialand","merchant","moimir","nnn","nnn.ru","odnoklassniki","price","price.ru","prre","mytarget","targetmailru","taboola","torg.mail.ru","trorer","rorer","Ttarget","ubn.ua","banner.ua","videonow","vkontakte","vk","vk.com","whisla","youtube"],t=["cpc","ppc","paidsearch","cpv","cpa","cpp","display","cpm","banner"],n=window.location.search.replace("?","").split("&"),r=window.location.hash.replace("#","").split("&").concat(n),o=!1;return r.forEach(function(n){var r=n.split("=");return"utm_source"===r[0]&&r[1]&&e.indexOf(r[1])?o=!0:"utm_medium"===r[0]&&r[1]&&t.indexOf(r[1])?o=!0:void 0}),o},extractHostname:function(e){return void 0===e||""===e?"":(e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0]).split(":")[0].split("?")[0].replace(/^www\./,"").replace("#","")},isExternal:function(e){var n=this.extractHostname(e);return Array.isArray(t.siteDomains)?!(t.siteDomains.indexOf(n)>-1||""===n):!(this.extractHostname(window.location.hostname)===n||""===n)},isInternal:function(e){var n=this.extractHostname(e);return this.extractHostname(window.location.hostname)!==n&&(!Array.isArray(t.siteDomains)||(t.siteDomains.indexOf(n)>-1||""===n))}},_={send:function(e,n){if(e===t.hitUrl&&(n.ident=this.prepareBrowserInfo()),t.xsollauid&&-1===e.indexOf("_xm")){var r="_xm="+t.xsollauid;e=-1===e.indexOf("?")?e+"?"+r:e+"&"+r}var o="string"!=typeof n?JSON.stringify(n):n;t.xsollauid||0!==t.hitCount?t.xsollauid||1!==t.hitCount?this.sendBeacon(e,o)||this.sendXHR(e,o):setTimeout(function(){t.hitCount=2,_.send(e,n)},1e3):(t.hitCount=1,this.sendXHR(e,o))},sendUserParams:function(e){e.clid=t.clientId,e.cid=t.counterId;var n=JSON.stringify(e),r=t.userParamsUrl;this.sendBeacon(r,n)||this.sendXHR(r,n)},sendBeacon:function(e,t){return!("function"!=typeof navigator.sendBeacon||!navigator.onLine)&&(navigator.sendBeacon(e,t),!0)},sendXHR:function(e,n){if(window.XMLHttpRequest){var r=new XMLHttpRequest;try{r.open("POST",e,!0)}catch(e){return!1}return r.timeout=1e4,r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.withCredentials=!0,r.ontimeout=function(){_.sendXHR(e,n)},r.onload=function(){var e=_.getValueFromUrl(r.responseURL,"_xm");if(e&&e!==t.xsollauid)t.xsollauid=v.getXsollauid(e);else{var n=_.getValueFromBody(r.responseText,"xsollauid");n&&n!==t.xsollauid&&(t.xsollauid=v.getXsollauid(n))}},r.send(n),!0}return!1},getValueFromUrl:function(e,t){if(e&&e.indexOf(t+"=")>-1){var n=new RegExp("https?://.*"+t+"=([^&]*)"),r=e.match(n);if(r&&r.length>1)return r[1]}return null},getValueFromBody:function(e,t){try{var n=e?JSON.parse(e)[t]:null}catch(e){n=null}return n},setXsollauidFromUrl:function(e){var n=_.getValueFromUrl(e,"_xm");n?(n=n.split("."))&&2===n.length&&n[0]===""+t.counterId&&n[1]!==t.xsollauid&&(t.xsollauid=v.getXsollauid(n[1])):(n=_.getValueFromUrl(e,"_xsollauid"))&&n!==t.xsollauid&&(t.xsollauid=v.getXsollauid(n))},prepareBrowserInfo:function(){var e={},n=window.screen,r=h();""!==r&&(e.ntf=r);var o=d();""!==o&&(e.net=o),e.t=b.getDocumentTitle(),e.pc=b.getDocumentCharset(),e.tz=y();var i=b.getViewportSize();e.wcw=i[0],e.wch=i[1],e.plt=l(),e.lcp=t.sendLoadMetrics?s:0,e.la=f(),e.j=p()?1:0,e.clid=t.clientId,e.cid=t.counterId,e.vid=v.getVid(),e.c=m()?1:0,e.sw=n.width,e.sh=n.height,e.sc=n.colorDepth||n.pixelDepth,g()&&(e.ifr=1);var a=v.read("_ym_uid");a&&(e.yid=a);try{var c=v.read("_ga");c.length>0&&(c=c.split("."),e.gaid=c[2]+"."+c[3])}catch(e){}var u=v.read("paystation_visit");u&&(e.pv=u);var w=v.read("corpsite_visit");w&&(e.cv=w);var _=v.read("pa_visit");_&&(e.pav=_);var E=v.read("dev_visit");E&&(e.dv=E);var O=v.read("first_visit");return O&&(e.fvp=O),e}},E={setHandlers:function(e,t,n,r,o,i){o&&this.documentVisibilityChange(),o&&this.documentReadyEvent(u),e&&this.documentReadyEvent(this.onDocumentReady),t&&this.documentReadyEvent(this.clickEvent),n&&this.documentReadyEvent(this.selectorEvent),r&&this.documentReadyEvent(this.scrollEvent),i&&this.documentReadyEvent(this.externalTransitionEvent)},documentReadyEvent:function(e){(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?e():document.addEventListener("DOMContentLoaded",e)},documentVisibilityChange:function(){document.addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(a=Math.min(a,Math.round(t.timeStamp)),document.removeEventListener("visibilitychange",e))})},clickEvent:function(){for(var e=document.getElementsByTagName("a"),t=0;t<e.length;t++)E.setEvents(e[t],"click",E.onClick)},setEvents:function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on"+t,n)},onDocumentReady:function(){var e=window.location.href,n={et:1,url:e,eid:t.externalId,exv:t.extraValues,abParams:t.abParams};n.eid&&2340===n.eid||(document.referrer&&(n.referer=document.referrer,b.isExternal(n.referer)||(n.ss=1),_.setXsollauidFromUrl(e)),_.send(t.hitUrl,n))},onClick:function(){b.isExternal(this.href)&&_.send(t.hitUrl,{et:2,referer:window.location.href,url:this.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})},selectorEvent:function(){for(var e=document.querySelectorAll("[data-analytics]"),t=0;t<e.length;t++)E.setEvents(e[t],"click",E.onSelectorClick)},onSelectorClick:function(){_.send(t.hitUrl,{et:3,en:this.dataset.analytics,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})},scrollEvent:function(){E.setEvents(window,"scroll",E.onScroll)},onScroll:function(){null!==n&&clearTimeout(n),n=setTimeout(function(){var e=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.scrollHeight||document.body.scrollHeight;!r&&e>0&&(r=!0,_.send(t.hitUrl,{et:10,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})),!o&&2*e>n-document.documentElement.clientHeight&&(o=!0,_.send(t.hitUrl,{et:11,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})),!i&&e>=.9*(n-document.documentElement.clientHeight)&&(i=!0,_.send(t.hitUrl,{et:12,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams}))},150)},onFormSubmit:function(){},externalTransitionEvent:function(){E.setEvents(document,"mousedown",E.onExternalTransition),E.setEvents(document,"keyup",E.onExternalTransition)},onExternalTransition:function(e){e:{var n=(e=e||window.event).target||e.srcElement;for(e=100;n&&0<e;){if(n.href&&n.nodeName.match(/^a(?:rea)?$/i)){var r=n;break e}n=n.parentNode,e--}r={}}if(("http:"===r.protocol||"https:"===r.protocol)&&r.href&&b.isInternal(r.href)&&!(r.href.indexOf("_xm=")>-1)&&t.xsollauid&&t.counterId){var o="_xm="+t.counterId+"."+t.xsollauid;r.href=-1!==r.href.indexOf("?")?r.href+"&"+o:r.href+"?"+o}}},O={hit:function(e,n){if(t.isBrowser){var r=c.apiHelper(1,n),o=window.location!=window.parent.location?document.referrer:document.location.href,i=r&&r.referer?r.referer:o;r.referer=i,r.referer!=document.location.href&&_.setXsollauidFromUrl(e),r.url=e,_.send(t.hitUrl,r)}},externalLink:function(e,n){if(t.isBrowser){var r=c.apiHelper(2,n);r.referer=window.location.href,r.url=e,_.send(t.hitUrl,r)}},elementClick:function(e,n){if(t.isBrowser){var r=c.apiHelper(3,n);r.url=window.location.href,r.en=e,_.send(t.hitUrl,r)}},formData:function(e,n,r){if(t.isBrowser){var o=c.apiHelper(4,r);o.url=window.location.href;var i=n?JSON.stringify(n):"";o.form=i,o.en=e,_.send(t.hitUrl,o)}},customEvent:function(e,n){if(t.isBrowser){var r=c.apiHelper(5,n);r.url=window.location.href,r.en=e,_.send(t.hitUrl,r)}},eventForLCP:function(){if(t.isBrowser){var e={et:6,url:window.location.href};_.send(t.hitUrl,e)}},setABParams:function(e){t.isBrowser&&(t.abParams="object"==typeof e?JSON.stringify(e):"")},setUserParams:function(e){var t="object"!=typeof e?"":{uprm:e};t&&_.sendUserParams(t)},addXsollauidToUrl:function(e){if(e.indexOf("_xsollauid=")>-1)return e;var t=v.getXsollauid(),n=t?"_xsollauid="+t:"";return n?-1!==e.indexOf("?")?e+"&"+n:e+"?"+n:e},sendCustomData:function(e,n){var r=e?t.server+"/"+e:"",o=t.xsollauid?"_xm="+t.xsollauid:"";(r=o?-1!==r.indexOf("?")?r+"&"+o:r+"?"+o:r)&&_.send(r,n)}};t.counterId=e.id,t.siteDomains=e.siteDomains;var k=e.server.match(/(https?:\/\/[^\/]*)/g);return t.server=k&&k.length?k[0]:console.log("Не удалось извлечь адрес сервера! Установлено значение по умолчанию - https://datagather.xsolla.com")||"https://datagather.xsolla.com",t.hitUrl=t.server+"/hit",t.userParamsUrl=t.server+"/users_params",t.externalId=e.externalId||e.merchantId,t.extraValues=e.extraValues?JSON.stringify(e.extraValues):"",t.hit=void 0===e.hit||e.hit,t.extLink=void 0===e.extLink||e.extLink,t.click=void 0===e.click||e.click,t.scroll=void 0===e.scroll||e.scroll,t.sendLoadMetrics=void 0!==e.sendLoadMetrics&&e.sendLoadMetrics,t.crossDomainTracking=void 0===e.crossDomainTracking||e.crossDomainTracking,t.hitCount=0,t.isBrowser&&(t.clientId=v.getUid(),t.visitId=v.getVid(),t.xsollauid=e.xsollauid||v.getXsollauid(),e.abParams&&O.setABParams(e.abParams),t.server&&t.counterId&&E.setHandlers(t.hit,t.extLink,t.click,t.scroll,t.sendLoadMetrics,t.crossDomainTracking),e.userParams&&O.setUserParams(e.userParams)),O},"undefined"!=typeof window?window.XsollaAnalytics=t:e.exports=t});var Fn,qn,Hn=new RegExp("([?&#;])("+["token","code","access_token","refresh_token"].join("|")+")=[^&#]*","gi"),Wn=function(e){return"string"!=typeof e||0===e.length?e:e.replace(Hn,"$1$2=[REDACTED]")},Gn=function(e,t){("undefined"!=typeof History&&History.prototype.replaceState||window.history.replaceState).call(window.history,e,"",t)},Xn=function(e){var t=window.location.href,n=Wn(t);if(n!==t){try{Gn(window.history.state,n)}catch(e){return}try{e()}finally{Gn(window.history.state,t)}}else e()};(Fn=e.MetrikaEventNames||(e.MetrikaEventNames={})).initiate="login-widget_sign-in_initiate",Fn.secure_account="login-widget_sign-in_secure-account",Fn.email_confirm="login-widget_email-verification_confirm",Fn.confirm_secure_email="login-widget_email-verification_secure-confirm",Fn.phone_confirm="login-widget_phone-verification_confirm",Fn.confirm_secure_phone="login-widget_phone-verification_secure-confirm",Fn.sign_up="login-widget_sign-up_email",Fn.reset_pass_init="login-widget_reset-pass_initiate",Fn.widget_open="login-widget_opening_initiate",Fn.performance="widget_performance",Fn.performanceJSLoad="widget_performance_js_load",Fn.performanceRequest="widget_performance_request",Fn.pageOpen="widget_page_open",Fn.passwordlessAuthDeclined="passwordless_auth_declined",Fn.attemptToInputRussianLocalPhone="attempt_to_input_russian_local_phone",Fn.babka_login_consent_open="babka-login_consent_open",Fn.babka_login_consent_allow="babka-login_consent_allow",Fn.babka_login_consent_deny="babka-login_consent_deny",Fn.babka_login_consent_error="babka-login_consent_error",Fn.passkey_offer_shown="login-widget_passkey_offer-shown",Fn.passkey_enrollment_started="login-widget_passkey_enrollment-started",Fn.passkey_enrollment_finished="login-widget_passkey_enrollment-finished",Fn.passkey_signin_started="login-widget_passkey_signin-started",Fn.passkey_signin_completed="login-widget_passkey_signin-completed",Fn.passkey_signin_failed="login-widget_passkey_signin-failed",Fn.passkey_fallback_selected="login-widget_passkey_fallback-selected",(qn=e.SocialPosition||(e.SocialPosition={})).primary="primary",qn.secondary="secondary",qn.other="other";var zn="",Vn="",Jn=function(e){var t=r({},e,{exv:r({},e&&e.exv?e.exv:{},{projectId:zn,trackId:""})});return t.exv.trackId=Kn()||Vn||"",t},Kn=function(){return An.get("xl_track_id")},$n=function(e,t){var n=function(e){return"object"==typeof e?"lg_"+e.block+"_"+e.section+"_"+e.action:"lg_"+e}(e);if(window.XA){var r=Jn(t);Xn(function(){return window.XA.elementClick(n,r)})}},Zn={AD:6,AE:6,AF:6,AG:6,AI:6,AL:1,AM:4,AO:6,AQ:6,AR:4,AS:5,AT:1,AU:6,AW:5,AX:1,AZ:4,BA:1,BB:5,BD:6,BE:1,BF:6,BG:1,BH:6,BI:6,BJ:6,BL:5,BM:5,BN:6,BO:5,BQ:5,BR:5,BS:5,BT:6,BV:6,BW:6,BY:4,BZ:5,CA:5,CC:5,CD:6,CF:6,CG:6,CH:1,CI:6,CK:6,CL:1,CM:6,CN:2,CO:1,CR:1,CU:1,CV:6,CW:5,CX:6,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:5,DO:5,DZ:6,EC:5,EE:1,EG:6,EH:6,ER:6,ES:1,ET:6,FI:1,FJ:6,FK:5,FM:5,FO:6,FR:1,GA:6,GB:1,GD:5,GE:4,GF:5,GG:1,GH:6,GI:1,GL:6,GM:6,GN:6,GP:5,GQ:6,GR:1,GS:1,GT:5,GU:6,GW:6,GY:6,HK:2,HM:6,HN:5,HR:1,HT:5,HU:1,ID:6,IE:1,IL:6,IM:1,IN:6,IO:6,IQ:6,IR:6,IS:6,IT:1,JE:1,JM:5,JO:6,JP:6,KE:6,KG:4,KH:6,KI:6,KM:6,KN:5,KP:3,KR:3,KW:6,KY:5,KZ:4,LA:6,LB:6,LC:5,LI:1,LK:6,LR:6,LS:6,LT:1,LU:1,LV:1,LY:6,MA:6,MC:1,MD:4,ME:1,MF:1,MG:6,MH:6,MK:1,ML:6,MM:6,MN:6,MO:2,MP:6,MQ:1,MR:5,MS:5,MT:1,MU:6,MV:6,MW:6,MX:5,MY:6,MZ:6,NA:6,NC:6,NE:6,NF:6,NG:6,NI:5,NL:1,NO:1,NP:6,NR:6,NU:6,NZ:6,OM:6,PA:5,PE:5,PF:6,PG:6,PH:6,PK:6,PL:1,PM:5,PN:6,PR:6,PS:6,PT:1,PW:6,PY:5,QA:6,RE:6,RO:1,RS:1,RU:4,RW:6,SA:6,SB:6,SC:6,SD:6,SE:1,SG:6,SH:6,SI:1,SJ:6,SK:1,SL:6,SM:1,SN:6,SO:6,SR:5,SS:6,ST:6,SV:5,SX:5,SY:6,SZ:6,TC:5,TD:6,TF:6,TG:6,TH:6,TJ:4,TK:6,TL:6,TM:4,TN:6,TO:6,TR:1,TT:5,TV:6,TW:2,TZ:6,UA:4,UG:6,UM:6,US:5,UY:5,UZ:4,VA:1,VC:5,VE:5,VG:6,VI:6,VN:6,VU:6,WF:1,WS:6,YE:6,YT:6,ZA:6,ZM:6,ZW:6,ZZ:6},Qn=function(e,t){var n=e;return Object.entries(t).forEach(function(e,t){var r=e[0],o=e[1];0!==t||n.includes("?")?n+="&"+r+"="+o:n+="?"+r+"="+o}),n},Yn=function(e){return e.appendIfNotEmpty=function(t,n){n&&e.append(t,n)},e},er=function(e,t){return e?Qn(e,{xsolla_lang:t}):""},tr=function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src="https://accounts.google.com/gsi/client",n.async=!0,n.defer=!0,document.getElementsByTagName("head")[0].appendChild(n),window.onGoogleLibraryLoad=function(){window.google.accounts.id.initialize({client_id:e,callback:function(e){return t(e)},context:"signin",cancel_on_tap_outside:!1}),window.google.accounts.id.prompt()}};var nr,rr={apiUrl:"https://login.xsolla.com/api/",cdnUrl:"https://cdn.xsolla.net/login-widget/",consentUrl:"https://consent-api.xsolla.com/v2/consen",projectId:"",theme:{background:{color:"#FFFFFF",image:{url:"",opacity:"1"}},primary_color:"#0073F7",secondary_color:"#DADADA",text_color:"#000000",error_color:"#eb002f",button_image:"",rounding:{inputs:"6px",buttons:"100px",widget:"6px"},scene:{color:"#f7faff"}},is_oauth2:!1},or=function(e){return e&&e.data&&e.data.error&&(e.data.error.code||0===e.data.error.code&&"0")||null},ir=["clientId","scope","state","redirectUri","responseType"],sr=ir.concat(["audience"]),ar=["projectId","fullLocale","callbackUrl","payload","with_logout"],cr=["customStyle","customLabels"],lr=["emailTemplate"],ur=["challenge_id","fullLocale"],dr=function(e,t,n){void 0===t&&(t=[]);var r={projectId:e.projectId};return n&&(r["x-request-id"]=n),t.forEach(function(t){if(e[t])switch(t){case"callbackUrl":r.login_url=e.callbackUrl;break;case"fullLocale":r.locale=e.fullLocale?e.fullLocale.replace("-","_"):e.fullLocale;break;case"clientId":r.client_id=e.clientId;break;case"redirectUri":r.redirect_uri=e.redirectUri;break;case"responseType":r.response_type=e.responseType;break;case"emailTemplate":r.email_template=e.emailTemplate;break;default:r[t]=e[t]}}),r},fr=function(t){return function(n){var i=kn.create();i.defaults.baseURL=t.apiUrl||"https://login.xsolla.com/api",i.defaults.withCredentials=!0;var s=["/login/email/request","/login/phone/request","/login/email/confirm","/login/phone/confirm","/login","/user"];return i.interceptors.request.use(function(e){return e.analytics={requestName:n,requestUrl:""+e.baseURL+e.url,projectId:t.projectId,startTime:(new Date).getTime(),requestType:e.method},e.url&&s.includes(e.url)&&(e.headers["X-REQUEST-ID"]=Kn()),e},function(e){return Promise.reject(e)}),i.interceptors.response.use(function(t){var n=t.config.analytics,i=n.startTime,s=o(n,["startTime"]);return $n(e.MetrikaEventNames.performanceRequest,{exv:r({},s,{isError:!1,load_time:(new Date).getTime()-i})}),t},function(t){var n=t.response.config.analytics,i=n.startTime,s=o(n,["startTime"]),a=or(t.response);return $n(e.MetrikaEventNames.performanceRequest,{exv:r({},s,{isError:a,load_time:(new Date).getTime()-i})}),Promise.reject(t)}),i}},pr=function(){function t(e){this.config=rr,this.updateConfig(e),this.loginApi=fr(e)}return t.prototype.getConfig=function(){return this.config},t.prototype.updateConfig=function(e){var t=function e(t){if(null!=t){var n=Array.isArray(t)?[]:{};return Object.keys(t).forEach(function(r){var o=t[r];"object"==typeof o?n[r]=e(o):""!==o&&(n[r]=o)}),n}}(e);!function e(t,n){if(void 0===t)return n;for(var r in n)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(r in t&&"object"==typeof n[r]?e(t[r],n[r]):void 0!==n[r]&&(t[r]=n[r]));return t}(this.config,t);var n=this.config,r=n.clientId,o=n.redirectUri,i=n.responseType,s=n.state;return r&&i&&o&&s&&(this.config.is_oauth2=!0),this.config},t.prototype.fetchConfig=function(){return i(this,void 0,void 0,function(){var t,n,o,i,a,c,l,u,d,f,p,h,g,m,w,y,v=this;return s(this,function(s){return t=dr(this.config,ar.concat(ir)),n=this.config,o=n.settingsJSON,i=n.socialsJSON,a=n.themeJSON,c=n.projectId,l=n.apiUrl,u=n.disableCache,d="undefined"!=typeof window?window.location.href:void 0,f=new URL(o||l+"/projects/"+c+"/settings/auth",d),p=new URL(i||l+"/projects/"+c+"/settings/socials/by_region",d),h=new URL(a||l+"/projects/"+c+"/settings/widget",d),g=(new Date).getTime(),m={projectId:c,requestName:"fetchConfigWidget",requestType:"get",requestUrl:[f,p,h,l+"/client/details"]},u&&(w=Date.now(),f.searchParams.append("currTime",w.toString()),p.searchParams.append("currTime",w.toString()),h.searchParams.append("currTime",w.toString())),y=[kn.get(f.toString(),{withCredentials:!1}),kn.get(p.toString(),{withCredentials:!1}),kn.get(h.toString(),{withCredentials:!1}),this.loginApi("details").get("/client/details")],[2,Promise.all(y).then(function(n){$n(e.MetrikaEventNames.performanceRequest,{exv:r({},m,{isError:!1,load_time:(new Date).getTime()-g})});var o,i,s,a,c,l,u=n,d=u[0],f=u[1],p=u[2],h=u[3].data.geo_ip_country.toUpperCase()||"US",w=function(e,t,n,r){var o=r.projectId,i=r.client_id,s=void 0===i?"":i,a=r.scope,c=void 0===a?"":a,l=r.state,u=void 0===l?"":l,d=r.response_type,f=void 0===d?"":d,p=r.redirect_uri,h=void 0===p?"":p,g=r.login_url,m=void 0===g?"":g,w=r.payload,y=void 0===w?"":w,v=r.locale,b=void 0===v?"":v,_=Yn(new URLSearchParams);_.appendIfNotEmpty("projectId",o),_.appendIfNotEmpty("login_url",m),_.appendIfNotEmpty("payload",y),_.appendIfNotEmpty("locale",b),n&&(_.appendIfNotEmpty("client_id",s.toString()),_.appendIfNotEmpty("redirect_uri",h),_.appendIfNotEmpty("response_type",f),_.appendIfNotEmpty("scope",c),_.appendIfNotEmpty("state",u));var E="?"+_.toString(),O=Object.keys(Zn).includes(t)?e[Zn[t]]:e[Zn.US],k=O.primary.map(function(e){return{name:e.name,url:n?""+e.oauth2+E:""+e.jwt+E}}),S=O.secondary.map(function(e){return{name:e.name,url:n?""+e.oauth2+E:""+e.jwt+E}});return O.custom&&k.unshift({name:O.custom.name,url:n?""+O.custom.oauth2+E:""+O.custom.jwt+E}),{primary:k,secondary:S,all:k.concat(S),showOtherLink:!1}}(f.data,h,v.config.is_oauth2||!1,t),y=(o=d.data,i=o.tos_url,s=o.consent_url,a=o.cookie_policy,c=o.privacy_policy,l="en",navigator.language&&(l=navigator.language.trim().split(/-|_/)[0]),r({},o,{tos_url:er(i,l),consent_url:er(s,l),cookie_policy:er(a,l),privacy_policy:er(c,l)}));return v.updateConfig(r({apiUrl:"",projectId:""},y,{social_links:r({},w),theme:p.data,geo_ip_country:h}))}).then(function(e){return a?kn.get(a,{withCredentials:!1}).then(function(t){return v.updateConfig(r({},e,{theme:t.data}))}):e}).catch(function(t){var n=or(t.response);if($n(e.MetrikaEventNames.performanceRequest,{exv:r({},m,{isError:n,load_time:(new Date).getTime()-g})}),n)throw new Tn(n);throw t})]})})},t.prototype.signup=function(e){var t=e.userInfo;return i(this,void 0,void 0,function(){var e,n;return s(this,function(r){return e=dr(this.config,ar.concat(ir,lr)),n=this.config.is_oauth2?"/oauth2/user":"/user",[2,this.loginApi("signup").post(n,t,{params:e}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.login=function(e){var t=e.credentials,n=e.captchaData;return i(this,void 0,void 0,function(){var e,r,o;return s(this,function(i){return e=dr(this.config,ar.concat(ir)),r={},this.config.callbackUrl&&(e.login_url=this.config.callbackUrl),n&&(r["X-LOT-NUMBER"]=n.lot_number,r["X-CAPTCHA-OUTPUT"]=n.captcha_output,r["X-PASS-TOKEN"]=n.pass_token,r["X-GEN-TIME"]=n.gen_time),o=this.config.is_oauth2?"/oauth2/login":"/login",[2,this.loginApi("login").post(o,t,{params:e,headers:r}).then(function(e){return e.data}).catch(function(e){var t=or(e.response),n=e.response.headers["x-captcha-enabled"];if("003-038"===t&&n&&"1"===n)throw new Tn("003-338");if(t)throw new Tn(t);throw e})]})})},t.prototype.agreement=function(e){var t=e.token,n=e.isAccepted,r=e.consentId;return i(this,void 0,void 0,function(){var e;return s(this,function(o){return e={token:t,projectId:this.config.projectId,accept_consent:n},r&&(e.consent_id=r),[2,this.loginApi("socialConsent").put("/social/consent",e).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.reset=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){return t=dr(this.config,ar.concat(lr)),this.config.callbackUrl&&(t.login_url=this.config.callbackUrl),[2,this.loginApi("passwordResetRequest").post("/password/reset/request",e,{params:t}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.set=function(e){return i(this,void 0,void 0,function(){var t,n;return s(this,function(r){return t=dr(this.config,ar),this.config.callbackUrl&&(t.login_url=this.config.callbackUrl),n={new_password:e.newPassword,reset_code:e.code,user_id:e.user_id},[2,this.loginApi("passwordResetConfirm").post("/password/reset/confirm",n,{params:t}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.getConfirmCode=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){return t={projectId:this.config.projectId,login:e.login.toLowerCase(),operation_id:e.operation_id},[2,this.loginApi("getConfirmCode").get("/otc/code",{params:t,cancelToken:e.cancelToken.token}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.pushConfirmCode=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){return t=r({projectId:this.config.projectId},e),[2,this.loginApi("pushConfirmCode").get("/otc/push",{params:t}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.ask=function(e){return i(this,void 0,void 0,function(){var t,n,r,i,a,c,l,u,d,f,p,h,g;return s(this,function(s){return t=dr(this.config,ar.concat(ir,lr,cr)),n=t.customLabels,r=void 0===n?"":n,i=t.customStyle,a=void 0===i?"":i,c=o(t,["customLabels","customStyle"]),(l=Yn(new URLSearchParams)).appendIfNotEmpty("customStyle",a),l.appendIfNotEmpty("customLabels",r),u=l.toString(),(g={})[e.fields.email?"email":"phone_number"]={link_url:u?e.link_url+"/?"+u:e.link_url,send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},d=g,f={},e.captchaData&&(f["X-LOT-NUMBER"]=e.captchaData.lot_number,f["X-CAPTCHA-OUTPUT"]=e.captchaData.captcha_output,f["X-PASS-TOKEN"]=e.captchaData.pass_token,f["X-GEN-TIME"]=e.captchaData.gen_time),p={updatedFields:e.fields,token:e.token,settings:d,email:this.config.is_oauth2?e.fields.email:""},h=this.config.is_oauth2?"/oauth2/user/ask":"/token/update",[2,this.loginApi("userAsk").post(h,p,{params:c,headers:f}).then(function(e){return e.data}).catch(function(e){var t=or(e.response),n=e.response.headers["x-captcha-enabled"];if("003-038"===t&&n&&"1"===n)throw new Tn("003-338");if(t)throw new Tn(t);throw e})]})})},t.prototype.getAskFields=function(e){return i(this,void 0,void 0,function(){var t,n;return s(this,function(r){return t={projectId:this.config.projectId},(n={}).Authorization="Bearer "+e,[2,this.loginApi("getAskFields").get("/users/me/ask",{params:t,headers:n}).then(function(e){return 0!==e.data.length?e.data:function(){var e=[],t=new URLSearchParams(window.location.search).getAll("fields");if(0!==t.length)for(var n=0,r=t[0].split(",");n<r.length;n++)if("email"===r[n]){e.push({name:"email",required:!0,type:"email",validation:{regexps:[]},step:0});break}return e}()}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.getSocialLink=function(e,t){return i(this,void 0,void 0,function(){var n,o,i;return s(this,function(s){return n=An.get()._mm_vid_2222,o=dr(r({},this.config,t),ar.concat(ir),n),i=this.config.is_oauth2?"oauth2/social/"+e+"/login_url":"/social/"+e+"/login_url",[2,this.loginApi("getSocialLink").get(i,{params:o}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.otpLogin=function(e){var t=e.code,n=e.remember_me,r=void 0===n||n;return i(this,void 0,void 0,function(){var e;return s(this,function(n){return e=dr(this.config,ur),[2,this.loginApi("otpLoginValidate").get("/otp/validate",{params:{code:t,remember_me:r,challenge_id:e.challenge_id}}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.otpResendCode=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){return e=dr(this.config,ur),[2,this.loginApi("otpResendCode").put("/otp/resend",{locale:e.locale},{params:{challenge_id:e.challenge_id}}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.phoneGetCode=function(e){var t=e.phone_number,n=e.link_url,r=e.isOauth2,a=e.captchaData;return i(this,void 0,void 0,function(){var e,i,c,l,u,d,f,p,h,g;return s(this,function(s){return e=dr(this.config,ar.concat(ir,cr)),i=e.customLabels,c=void 0===i?"":i,l=e.customStyle,u=void 0===l?"":l,d=o(e,["customLabels","customStyle"]),f={},a&&(f["X-LOT-NUMBER"]=a.lot_number,f["X-CAPTCHA-OUTPUT"]=a.captcha_output,f["X-PASS-TOKEN"]=a.pass_token,f["X-GEN-TIME"]=a.gen_time),p=(r?"/oauth2":"")+"/login/phone/request",(h=Yn(new URLSearchParams)).appendIfNotEmpty("customStyle",u),h.appendIfNotEmpty("customLabels",c),g=h.toString(),[2,this.loginApi("phoneGetCode").post(p,{link_url:g?n+"/?"+g:n,phone_number:t||"",send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},{params:d,headers:f}).then(function(e){return e.data}).catch(function(e){var t=or(e.response),n=e.response.headers["x-captcha-enabled"];if("003-038"===t&&n&&"1"===n)throw new Tn("003-338");if(t)throw new Tn(t);throw e})]})})},t.prototype.loginWithPhoneCode=function(e){var t=e.phone_number,n=e.code,r=e.operation_id,o=e.isOauth2;return i(this,void 0,void 0,function(){var e,i;return s(this,function(s){return e=dr(this.config,ar.concat(ir)),i=(o?"/oauth2":"")+"/login/phone/confirm",[2,this.loginApi("loginWithPhoneCodeConfirm").post(i,{phone_number:t,code:n,operation_id:r},{params:e}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.emailGetCode=function(e){var t=e.email,n=e.isOauth2,r=e.link_url,a=e.captchaData;return i(this,void 0,void 0,function(){var e,i,c,l,u,d,f,p,h,g;return s(this,function(s){return e=dr(this.config,ar.concat(ir,cr)),i=e.customLabels,c=void 0===i?"":i,l=e.customStyle,u=void 0===l?"":l,d=o(e,["customLabels","customStyle"]),f={},a&&(f["X-LOT-NUMBER"]=a.lot_number,f["X-CAPTCHA-OUTPUT"]=a.captcha_output,f["X-PASS-TOKEN"]=a.pass_token,f["X-GEN-TIME"]=a.gen_time),p=(n?"/oauth2":"")+"/login/email/request",(h=Yn(new URLSearchParams)).appendIfNotEmpty("customStyle",u),h.appendIfNotEmpty("customLabels",c),g=h.toString(),[2,this.loginApi("emailGetCode").post(p,{link_url:g?r+"/?"+g:r,email:t?t.toLowerCase():"",send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},{params:d,headers:f}).then(function(e){return e.data}).catch(function(e){var t=or(e.response),n=e.response.headers["x-captcha-enabled"];if("003-038"===t&&n&&"1"===n)throw new Tn("003-338");if(t)throw new Tn(t);throw e})]})})},t.prototype.loginWithEmailCode=function(e){var t=e.email,n=e.code,r=e.operation_id,o=e.isOauth2;return i(this,void 0,void 0,function(){var e,i;return s(this,function(s){return e=dr(this.config,ar.concat(ir)),i=(o?"/oauth2":"")+"/login/email/confirm",[2,this.loginApi("loginWithEmail_CodeConfirm").post(i,{email:t,code:n,operation_id:r},{params:e}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.resendEmail=function(e){var t=dr(this.config,ar.concat(ir,lr)),n=(this.config.is_oauth2?"/oauth2":"")+"/user/resend_confirmation_link";return this.loginApi("resendEmailConfirmationLink").post(n,{username:e},{params:t}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})},t.prototype.oneTapLogin=function(e,t){return i(this,void 0,void 0,function(){var n,r;return s(this,function(o){return n=dr(this.config,ar.concat(ir)),r=(this.config.is_oauth2?"/oauth2":"")+"/social/"+t+"/one_tap/complete",[2,this.loginApi("oneTapLoginComplete").post(r,{access_token:e},{params:n}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.checkUserAuthSSO=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){return e=dr(this.config,ar),[2,this.loginApi("oneTapLoginComplete").get("/jwt/sso",{params:e}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.userAuthSSOWithRedirect=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){return t=dr(this.config,ar),[2,this.loginApi("userAuthSSOWithRedirect").get("/jwt/sso/redirect",{params:r({},t,{login_url:e})}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.logout=function(e,t){return i(this,void 0,void 0,function(){var n;return s(this,function(r){return(n={}).Authorization="Bearer "+e,[2,this.loginApi("logout").get("/oauth2/logout",{headers:n,params:{sessions:t}}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.oauth2Auth=function(){var t=dr(this.config,sr),n=this.config,r=n.payload,o=n.enablePostMessageLogin,i=r&&function(e){try{return JSON.parse(e),!0}catch(e){return!1}}(r)&&JSON.parse(r).trackId,s=this.config.apiUrl+"/oauth2/auth?response_type=code";i&&(s+="&trackId="+i),Object.entries(t).forEach(function(e){var t=e[0],n=e[1];s+="&"+t+"="+encodeURIComponent(n)}),o&&window.parent.opener?(Nn({message:{loginUri:s,type:e.PostMessageEvents.BabkaLogin},targetOrigin:window.location.origin}),window.parent.close()):window.top&&(window.top.location.href=s)},t.prototype.oauth2ConsentValidate=function(e){return i(this,void 0,void 0,function(){var t,n,r;return s(this,function(o){return t=dr(this.config,ir),(n={}).Authorization="Bearer "+e,r=this.config.apiUrl+"/oauth2/consent/validate",[2,this.loginApi("oauth2ConsentValidate").post(r,{client_id:t.client_id,scope:t.scope},{headers:n}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.oauth2PostConsent=function(e,t){return i(this,void 0,void 0,function(){var n,o;return s(this,function(i){return n=dr(this.config,ir),(o={}).Authorization="Bearer "+e,[2,this.loginApi("oauth2PostConsent").post("/oauth2/consent",r({},n,{approval:t}),{headers:o}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.clearSSO=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){return e=dr(this.config),[2,this.loginApi("clear_sso").get("/oauth2/clear_sso",{params:e}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.protectedRedirect=function(e){var t=this.config,n=t.projectId,r=t.clientId,o=this.config.apiUrl+"/protected_redirect?url="+e;return o+=r?"&client_id="+r:"&projectId="+n},t.prototype.getCustomStylesLabels=function(e){return i(this,void 0,void 0,function(){return s(this,function(t){return[2,this.loginApi("").get("/client/customisation?client_id="+e).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.getPasskeyRegistrationOptions=function(e){return i(this,void 0,void 0,function(){var t,n;return s(this,function(r){return t={projectId:this.config.projectId},n={Authorization:"Bearer "+e},[2,this.loginApi("getPasskeyRegistrationOptions").get("/users/me/passkeys/request",{params:t,headers:n}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.isLoginUrlAllowed=function(e){return i(this,void 0,void 0,function(){var t,n=this;return s(this,function(r){return t={projectId:this.config.projectId,login_url:e},[2,new Promise(function(e,r){n.loginApi("isLoginUrlAllowed").get("/widget/settings",{params:t,timeout:1e4}).then(function(){return e(!0)},function(t){var n=t?t.response:void 0;n&&422===n.status&&"010-003"===or(n)?e(!1):r(t)})})]})})},t.prototype.confirmPasskeyRegistration=function(e,t){return i(this,void 0,void 0,function(){var n,r;return s(this,function(o){return n={projectId:this.config.projectId},r={Authorization:"Bearer "+e},[2,this.loginApi("confirmPasskeyRegistration").post("/users/me/passkeys/registration/confirm",t,{params:n,headers:r}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.getPasskeyAuthOptions=function(){return i(this,void 0,void 0,function(){var e;return s(this,function(t){return e=dr(this.config,ar.concat(ir)),[2,this.loginApi("getPasskeyAuthOptions").get("/login/passkey/request",{params:e,timeout:15e3}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t.prototype.confirmPasskeyAuth=function(e){return i(this,void 0,void 0,function(){var t;return s(this,function(n){return t=dr(this.config,ar.concat(ir)),this.config.callbackUrl&&(t.login_url=this.config.callbackUrl),[2,this.loginApi("confirmPasskeyAuth").post("/login/passkey/confirm",e,{params:t,timeout:15e3}).then(function(e){return e.data}).catch(function(e){var t=or(e.response);if(t)throw new Tn(t);throw e})]})})},t}(),hr="object"==typeof Reflect?Reflect:null,gr=hr&&"function"==typeof hr.apply?hr.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};nr=hr&&"function"==typeof hr.ownKeys?hr.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var mr=Number.isNaN||function(e){return e!=e};function wr(){wr.init.call(this)}var yr=wr;wr.EventEmitter=wr,wr.prototype._events=void 0,wr.prototype._eventsCount=0,wr.prototype._maxListeners=void 0;var vr=10;function br(e){return void 0===e._maxListeners?wr.defaultMaxListeners:e._maxListeners}function _r(e,t,n,r){var o,i,s,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=br(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function Er(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,gr(this.listener,this.target,e))}.bind(r);return o.listener=n,r.wrapFn=o,o}function Or(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):Sr(o,o.length)}function kr(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function Sr(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(wr,"defaultMaxListeners",{enumerable:!0,get:function(){return vr},set:function(e){if("number"!=typeof e||e<0||mr(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");vr=e}}),wr.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},wr.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||mr(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},wr.prototype.getMaxListeners=function(){return br(this)},wr.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)gr(a,this,t);else{var c=a.length,l=Sr(a,c);for(n=0;n<c;++n)gr(l[n],this,t)}return!0},wr.prototype.addListener=function(e,t){return _r(this,e,t,!1)},wr.prototype.on=wr.prototype.addListener,wr.prototype.prependListener=function(e,t){return _r(this,e,t,!0)},wr.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,Er(this,e,t)),this},wr.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,Er(this,e,t)),this},wr.prototype.removeListener=function(e,t){var n,r,o,i,s;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},wr.prototype.off=wr.prototype.removeListener,wr.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},wr.prototype.listeners=function(e){return Or(this,e,!0)},wr.prototype.rawListeners=function(e){return Or(this,e,!1)},wr.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):kr.call(e,t)},wr.prototype.listenerCount=kr,wr.prototype.eventNames=function(){return this._eventsCount>0?nr(this._events):[]};var Pr,Rr=function(e){e.sandbox.add("allow-forms"),e.sandbox.add("allow-scripts"),e.sandbox.add("allow-same-origin"),e.sandbox.add("allow-top-navigation"),e.sandbox.add("allow-modals"),e.sandbox.add("allow-popups"),e.sandbox.add("allow-popups-to-escape-sandbox"),e.sandbox.add("allow-presentation"),e.sandbox.add("allow-orientation-lock"),e.sandbox.add("allow-pointer-lock")},xr={projectId:"8513c380-0336-4927-b351-02ccec7f3cb6",url:"https://login-widget.xsolla.com/latest",popupBackgroundColor:"rgba(0, 0, 0, 0.6)",showPopupBackground:!0,iframeZIndex:9e3,siteHaveGDPRBanner:!1,showCloseButton:!1},Lr=["preferredLocale","callbackUrl","disableConfirmByLink","payload","with_logout","clientId","emailTemplate","scope","state","redirectUri","responseType","isDemo","challenge_id","analyticsProductName","theme","authData","page","customStyle","customLabels","parentIsFrame","settingsJSON","socialsJSON","themeJSON","siteHaveGDPRBanner","sendLoadMetrics","enablePostMessageLogin","disableCache","audience","token","showCloseButton","babkaLoginFlow","socialLoginFlow","disableSocials","appleIdPriority","trackId","disable_passwordless_email","forcePrimarySocial"],Ar={signUp:"/sign-up",confirm:"/confirm",logIn:"/",passwordReset:"/password/reset",passwordSet:"/password/set",ask:"/ask",error:"/404",socials:"/socials",agreement:"/agreement",otp:"/otp",logInUserPreset:"/",externalOauth2:"/external_oauth2",loginCustomRedirection:"/login-custom-redirection"},Tr=function(t){function o(n){var o=t.call(this)||this;return o.events=e.PostMessageEvents,o.eventsArray=Object.values(e.PostMessageEvents),o.handler={},o.config=r({},xr,n),o.api=new pr(r({},rr,n)),o.inFullscreenMode=!1,o.page=o.config.page?Ar[o.config.page]:"",o.setLocale(o.config.preferredLocale),o.on("newListener",function(t){if(!(o.eventsArray.indexOf(t)>-1))throw new Cn("Invalid event");t===e.PostMessageEvents.Close&&(o.handler[t]=!0)}),o.postMessageHandler=o.onPostMessage.bind(o),window.addEventListener("message",o.postMessageHandler),o}return n(o,t),o.prototype.mount=function(t){var n=this.config,r=n.isHardMounted,o=n.babkaLoginPopup;this.iframe=document.createElement("iframe"),this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.border="none",this.iframe.style.borderRadius="inherit",r&&(this.iframe.style.position="absolute",this.iframe.style.top="0",this.iframe.style.bottom="0",this.iframe.style.left="0",this.iframe.style.right="0"),this.iframe.sandbox&&Rr(this.iframe),this.iframe.setAttribute("allow","publickey-credentials-get; publickey-credentials-create");var i=r?document.body:document.getElementById(t);if(i){var s=window.getComputedStyle(i);this.config.sendLoadMetrics="none"!==s.display&&"hidden"!==s.visibility,o&&(i.style.display="none"),i.appendChild(this.iframe)}this.updateWidget(),$n(e.MetrikaEventNames.widget_open),this.initDispatcher(),"popup"===this.config.babkaLoginFlow&&(this.babkaLoginIframe=document.createElement("iframe"),this.babkaLoginIframe.style.width="100%",this.babkaLoginIframe.style.height="100%",this.babkaLoginIframe.style.border="none",this.babkaLoginIframe.style.borderRadius="inherit",this.babkaLoginIframe.style.position="absolute",this.babkaLoginIframe.style.top="0",this.babkaLoginIframe.style.bottom="0",this.babkaLoginIframe.style.left="0",this.babkaLoginIframe.style.right="0",this.babkaLoginIframe.style.zIndex="9999",this.babkaLoginIframe.style.display="none",this.babkaLoginIframe.style.background="rgba(0, 0, 0, 0.4)",this.babkaLoginIframe.sandbox&&Rr(this.babkaLoginIframe),i&&i.appendChild(this.babkaLoginIframe))},o.prototype.unmount=function(){if(!this.iframe||!this.iframe.parentNode)throw new Cn("Widget is not mounted");this.iframe.parentNode.removeChild(this.iframe),window.removeEventListener("message",this.postMessageHandler)},o.prototype.setLocale=function(e){e&&(this.locale=In(e),this.updateWidget())},o.prototype.setTheme=function(t){if(!this.iframe||!this.iframe.contentWindow)throw new Cn("Widget is not mounted");Nn({message:{theme:t,type:e.PostMessageEvents.ThemeUpdate},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})},o.prototype.setPage=function(t){if(t){if(!this.iframe||!this.iframe.contentWindow)throw new Cn("Widget is not mounted");Nn({message:{page:t,type:e.PostMessageEvents.PageOpen},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})}},o.prototype.open=function(){if(!this.iframe||!this.iframe.contentWindow)return Error("Widget is not mounted");if(this.config.babkaLoginPopup)Nn({message:{type:e.PostMessageEvents.BabkaLoginPopup},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow});else{var t=this.iframe.style;t.position="fixed",t.zIndex=String(this.config.iframeZIndex),t.left="0",t.top="0",t.width="100%",t.height="100%",this.inFullscreenMode=!0,this.config.showPopupBackground&&this.config.popupBackgroundColor?t.backgroundColor=this.config.popupBackgroundColor:t.backgroundColor="transparent"}$n(e.MetrikaEventNames.widget_open),Nn({message:{type:e.PostMessageEvents.IframeOpen},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})},o.prototype.close=function(){if(!this.iframe||!this.iframe.contentWindow)return Error("Widget is not mounted");var e=this.iframe.style;e.position="",e.zIndex="",e.left="",e.top="",e.width="0",e.height="0",e.backgroundColor=""},o.prototype.initDispatcher=function(){var t=this;Dn(Bn+"message",function(n){n.data.type!==e.PostMessageEvents.Close||t.handler[e.PostMessageEvents.Close]||t.onCloseEvent(n.data.source),n.data.type===e.PostMessageEvents.GoogleOneTapOpen?t.onOpenGoogleOneTapEvent(n.data.params):t.emit(n.data.type,n.data)},!1)},o.prototype.onCloseEvent=function(t){(this.inFullscreenMode||t===e.CloseSource.Button)&&this.close()},o.prototype.onOpenGoogleOneTapEvent=function(t){var n=this;if(!this.iframe||!this.iframe.parentNode)throw new Cn("Widget is not mounted");var r=t.appId;tr(r,function(t){Nn({message:{type:e.PostMessageEvents.GoogleOneTapSuccess,credential:t.credential},targetOrigin:n.config.url||window.location.origin,target:n.iframe.contentWindow})})},o.prototype.updateWidget=function(){var e=this;if(this.iframe){var t="";Lr.forEach(function(n){var r=e.config[n];if(r)switch(n){case"preferredLocale":t+="&locale="+r;break;case"clientId":t+="&client_id="+r;break;case"redirectUri":t+="&redirect_uri="+r;break;case"responseType":t+="&response_type="+r;break;case"theme":t+="&theme="+JSON.stringify(r);break;case"authData":t+="&auth_data="+JSON.stringify(r);break;case"siteHaveGDPRBanner":default:t+="&"+n+"="+r}}),this.iframe.src=""+this.config.url+this.page+"?projectId="+this.config.projectId,this.iframe.src+=t}},o.prototype.onPostMessage=function(t){switch(t.data.type){case e.PostMessageEvents.OpenBabkaPopupWidget:if(!this.babkaLoginIframe)return;return void(t.data.src?this.babkaLoginIframe.src=t.data.src:this.babkaLoginIframe.style.display="block");case e.PostMessageEvents.BabkaPopupWidgetClose:return void(this.babkaLoginIframe&&(this.babkaLoginIframe.style.display="none"));case e.PostMessageEvents.BabkaPopupWidgetLoad:if(this.babkaLoginIframe&&(this.babkaLoginIframe.style.display="block"),!this.iframe||!this.iframe.src||!this.iframe.contentWindow)return;return void Nn({message:{type:e.PostMessageEvents.BabkaPopupWidgetLoad},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow});case e.PostMessageEvents.SocialLoginSuccess:if(!window.top||!this.config.callbackUrl||this.config.enablePostMessageLogin)return;var n=new URL(this.config.callbackUrl);return n.searchParams.append("token",t.data.params.token),void(window.top.location.href=n.toString());default:return}},o}(yr);return(Pr=e.Socials||(e.Socials={})).amazon="amazon",Pr.apple="apple",Pr.babka="babka",Pr.baidu="baidu",Pr.battlenet="battlenet",Pr.china_telecom="china_telecom",Pr.discord="discord",Pr.email="email",Pr.epicgames="epicgames",Pr.facebook="facebook",Pr.github="github",Pr.google="google",Pr["google-plus"]="google-plus",Pr.instagram="instagram",Pr.kabam="kabam",Pr.kakao="kakao",Pr.kefir="kefir",Pr.linkedin="linkedin",Pr.mailru="mailru",Pr.microsoft="microsoft",Pr.msn="msn",Pr.naver="naver",Pr.ok="ok",Pr.okta="okta",Pr.paradox="paradox",Pr.paypal="paypal",Pr.paxdei="paxdei",Pr.paxdeidev="paxdeidev",Pr.pinterest="pinterest",Pr.qq="qq",Pr.reddit="reddit",Pr.steam="steam",Pr.slack="slack",Pr.twitch="twitch",Pr.twitter="twitter",Pr.vimeo="vimeo",Pr.vk="vk",Pr.wbgames="wbgames",Pr.wechat="wechat",Pr.weibo="weibo",Pr.xbox="xbox",Pr["xsolla-id"]="xsolla-id",Pr.yahoo="yahoo",Pr.yandex="yandex",Pr.youtube="youtube",e.Api=pr,e.defaultConfig=rr,e.Widget=Tr,e.redactUrl=Wn,e.REDACTED="[REDACTED]",e.APIError=Tn,e.SUPPORTED_LANGUAGES=Un,e.LANGUAGE_MAP={ae:"ar",bh:"ar",dz:"ar",eg:"ar",iq:"ar",jo:"ar",km:"km",kw:"ar",lb:"ar",ly:"ar",ma:"ar",mr:"ar",om:"ar",ps:"ar",qa:"ar",sa:"ar",sd:"ar",sy:"ar",tn:"ar",ye:"ar",bg:"bg",cz:"cs",de:"de",at:"de",li:"de",ch:"de",es:"es",ar:"es",bo:"es",cl:"es",co:"es",cr:"es",cu:"es",do:"es",ec:"es",eh:"es",gq:"es",gt:"es",hn:"es",mx:"es",ni:"es",pa:"es",pe:"es",pr:"es",py:"es",sv:"es",uy:"es",ve:"es",fr:"fr",bf:"fr",bi:"fr",bj:"fr",bl:"fr",cd:"fr",cf:"fr",cg:"fr",ci:"fr",dj:"fr",ga:"fr",gf:"fr",gn:"fr",gp:"fr",ht:"fr",lu:"fr",mc:"fr",mg:"fr",ml:"fr",mq:"fr",nc:"fr",ne:"fr",pf:"fr",pm:"fr",re:"fr",sc:"fr",sn:"fr",td:"fr",tf:"fr",tg:"fr",wf:"fr",yt:"fr",il:"he",hu:"hu",it:"it",sm:"it",va:"it",jp:"ja",kr:"ko",kp:"ko",pt:"pt",ao:"pt",br:"pt",cv:"pt",gw:"pt",mz:"pt",st:"pt",tl:"pt",ro:"ro",md:"ro",ru:"ru",kz:"ru",ua:"ru",by:"ru",th:"th",tr:"tr",vn:"vi",cn:"zh",hk:"zh",mo:"zh",tw:"zh",id:"id",lo:"lo",my:"my",ph:"ph"},e.sendMessage=Nn,e.initGoogleOneTap=tr,e.getUrlVersion=function(e){var t=e.match(/\/([^/]+)\//);return null!==t?t[1]:"latest"},e.getPageName=function(e){var t=e.lastIndexOf("/");return e.substring(t+1,e.length)},e.initAnalytics=function(e){var t=e.projectId,n=e.trackId,o=e.analyticsProductName,i=e.sendLoadMetrics;try{var s=["login-widget.xsolla.com"],a=s.concat(["account.xsolla.com"]),c={projectId:zn=t,trackId:Vn=n};o&&(c.productName=o);var l={extraValues:c,sendLoadMetrics:i,server:"https://datagather.xsolla.com/hit",externalId:zn};return window.XA=new window.XsollaAnalytics(r({},l,{id:2222,siteDomains:s})),window.XA_BabkaLogin=new window.XsollaAnalytics(r({},l,{id:2002,hit:!1,extLink:!1,click:!1,scroll:!1,siteDomains:a})),!0}catch(e){return e}},e.TRACK_ID_COOKIE_NAME="xl_track_id",e.getTrackId=Kn,e.addEvent=$n,e.openEvent=function(e,t){if(window.XA){var n=Jn(t);Xn(function(){return window.XA.hit(Wn(e),n)})}},e.addBabkaLoginEvent=function(e,t){if(window.XA_BabkaLogin){var n=Jn(t);Xn(function(){return window.XA_BabkaLogin.elementClick(e,n)})}},e.addQueryParamsToURL=Qn,e}({});
//# sourceMappingURL=sdk.js.map
