Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads
"use strict";(()=>{var nr=Object.defineProperty;var sr=(t,e)=>{for(var r in e)nr(t,r,{get:e[r],enumerable:!0})};var ke=class{constructor(){this.API_URL="http://87.106.224.51:5010/api";this.ProdOrDebug="production";this.IsProduction=()=>this.ProdOrDebug==="production";this.IsDebug=()=>this.ProdOrDebug==="development";this.RequestStability=500}},ir=new ke,O=ir;var G=class{};var de=class{constructor(e,r){this.field=e.toString(),this.ascending=r}};function ut(t){let e=document.cookie.split("; ");for(let r of e){let[o,n]=r.split("=");if(o===t)return decodeURIComponent(n)}return null}function ve(t,e,r={}){let o=`${encodeURIComponent(t)}=${encodeURIComponent(e)}`;if(r.expires){let n=r.expires instanceof Date?r.expires.toUTCString():r.expires;o+=`; expires=${n}`}r.path&&(o+=`; path=${r.path}`),r.domain&&(o+=`; domain=${r.domain}`),r.secure&&(o+="; secure"),document.cookie=o}var R=class{static{this.UserID=null}static{this.SessionToken=null}static getSessionId(){return ut("sessionId")}static setSessionId(e,r){ve("sessionId",e,{expires:r})}static clearSessionId(){ve("sessionId","",{expires:new Date(0)})}static login(e,r){this.setSessionId(e,r)}static logout(){this.clearSessionId()}static isLoggedIn(){let e=this.getSessionId();return e!=null&&e!==""}};function K(t,e){return function(){return t.apply(e,arguments)}}var{toString:ar}=Object.prototype,{getPrototypeOf:Me}=Object,{iterator:pe,toStringTag:ft}=Symbol,me=(t=>e=>{let r=ar.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>me(e)===t),he=t=>e=>typeof e===t,{isArray:j}=Array,X=he("undefined");function cr(t){return t!==null&&!X(t)&&t.constructor!==null&&!X(t.constructor)&&I(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var pt=D("ArrayBuffer");function lr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&pt(t.buffer),e}var ur=he("string"),I=he("function"),mt=he("number"),be=t=>t!==null&&typeof t=="object",dr=t=>t===!0||t===!1,fe=t=>{if(me(t)!=="object")return!1;let e=Me(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ft in t)&&!(pe in t)},fr=D("Date"),pr=D("File"),mr=D("Blob"),hr=D("FileList"),br=t=>be(t)&&I(t.pipe),gr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||I(t.append)&&((e=me(t))==="formdata"||e==="object"&&I(t.toString)&&t.toString()==="[object FormData]"))},yr=D("URLSearchParams"),[Er,wr,xr,Lr]=["ReadableStream","Request","Response","Headers"].map(D),Sr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Q(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let o,n;if(typeof t!="object"&&(t=[t]),j(t))for(o=0,n=t.length;o<n;o++)e.call(null,t[o],o,t);else{let s=r?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length,c;for(o=0;o<i;o++)c=s[o],e.call(null,t[c],c,t)}}function ht(t,e){e=e.toLowerCase();let r=Object.keys(t),o=r.length,n;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}var W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bt=t=>!X(t)&&t!==W;function Ue(){let{caseless:t}=bt(this)&&this||{},e={},r=(o,n)=>{let s=t&&ht(e,n)||n;fe(e[s])&&fe(o)?e[s]=Ue(e[s],o):fe(o)?e[s]=Ue({},o):j(o)?e[s]=o.slice():e[s]=o};for(let o=0,n=arguments.length;o<n;o++)arguments[o]&&Q(arguments[o],r);return e}var Cr=(t,e,r,{allOwnKeys:o}={})=>(Q(e,(n,s)=>{r&&I(n)?t[s]=K(n,r):t[s]=n},{allOwnKeys:o}),t),Tr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Rr=(t,e,r,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Ar=(t,e,r,o)=>{let n,s,i,c={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),s=n.length;s-- >0;)i=n[s],(!o||o(i,t,e))&&!c[i]&&(e[i]=t[i],c[i]=!0);t=r!==!1&&Me(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Ir=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let o=t.indexOf(e,r);return o!==-1&&o===r},Pr=t=>{if(!t)return null;if(j(t))return t;let e=t.length;if(!mt(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Or=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Me(Uint8Array)),Dr=(t,e)=>{let o=(t&&t[pe]).call(t),n;for(;(n=o.next())&&!n.done;){let s=n.value;e.call(t,s[0],s[1])}},Br=(t,e)=>{let r,o=[];for(;(r=t.exec(e))!==null;)o.push(r);return o},Nr=D("HTMLFormElement"),Fr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,n){return o.toUpperCase()+n}),dt=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),kr=D("RegExp"),gt=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),o={};Q(r,(n,s)=>{let i;(i=e(n,s,t))!==!1&&(o[s]=i||n)}),Object.defineProperties(t,o)},vr=t=>{gt(t,(e,r)=>{if(I(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let o=t[r];if(I(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Ur=(t,e)=>{let r={},o=n=>{n.forEach(s=>{r[s]=!0})};return j(t)?o(t):o(String(t).split(e)),r},Mr=()=>{},_r=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Hr(t){return!!(t&&I(t.append)&&t[ft]==="FormData"&&t[pe])}var Wr=t=>{let e=new Array(10),r=(o,n)=>{if(be(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[n]=o;let s=j(o)?[]:{};return Q(o,(i,c)=>{let d=r(i,n+1);!X(d)&&(s[c]=d)}),e[n]=void 0,s}}return o};return r(t,0)},jr=D("AsyncFunction"),qr=t=>t&&(be(t)||I(t))&&I(t.then)&&I(t.catch),yt=((t,e)=>t?setImmediate:e?((r,o)=>(W.addEventListener("message",({source:n,data:s})=>{n===W&&s===r&&o.length&&o.shift()()},!1),n=>{o.push(n),W.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",I(W.postMessage)),zr=typeof queueMicrotask<"u"?queueMicrotask.bind(W):typeof process<"u"&&process.nextTick||yt,Jr=t=>t!=null&&I(t[pe]),a={isArray:j,isArrayBuffer:pt,isBuffer:cr,isFormData:gr,isArrayBufferView:lr,isString:ur,isNumber:mt,isBoolean:dr,isObject:be,isPlainObject:fe,isReadableStream:Er,isRequest:wr,isResponse:xr,isHeaders:Lr,isUndefined:X,isDate:fr,isFile:pr,isBlob:mr,isRegExp:kr,isFunction:I,isStream:br,isURLSearchParams:yr,isTypedArray:Or,isFileList:hr,forEach:Q,merge:Ue,extend:Cr,trim:Sr,stripBOM:Tr,inherits:Rr,toFlatObject:Ar,kindOf:me,kindOfTest:D,endsWith:Ir,toArray:Pr,forEachEntry:Dr,matchAll:Br,isHTMLForm:Nr,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:gt,freezeMethods:vr,toObjectSet:Ur,toCamelCase:Fr,noop:Mr,toFiniteNumber:_r,findKey:ht,global:W,isContextDefined:bt,isSpecCompliantForm:Hr,toJSONObject:Wr,isAsyncFn:jr,isThenable:qr,setImmediate:yt,asap:zr,isIterable:Jr};function q(t,e,r,o,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),o&&(this.request=o),n&&(this.response=n,this.status=n.status?n.status:null)}a.inherits(q,Error,{toJSON:function(){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:a.toJSONObject(this.config),code:this.code,status:this.status}}});var Et=q.prototype,wt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{wt[t]={value:t}});Object.defineProperties(q,wt);Object.defineProperty(Et,"isAxiosError",{value:!0});q.from=(t,e,r,o,n,s)=>{let i=Object.create(Et);return a.toFlatObject(t,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),q.call(i,t.message,e,r,o,n),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};var h=q;var ge=null;function _e(t){return a.isPlainObject(t)||a.isArray(t)}function Lt(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function xt(t,e,r){return t?t.concat(e).map(function(n,s){return n=Lt(n),!r&&s?"["+n+"]":n}).join(r?".":""):e}function Vr(t){return a.isArray(t)&&!t.some(_e)}var $r=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function Gr(t,e,r){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new(ge||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,m){return!a.isUndefined(m[b])});let o=r.metaTokens,n=r.visitor||u,s=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!d&&a.isBlob(p))throw new h("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?d&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,b,m){let E=p;if(p&&!m&&typeof p=="object"){if(a.endsWith(b,"{}"))b=o?b:b.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&Vr(p)||(a.isFileList(p)||a.endsWith(b,"[]"))&&(E=a.toArray(p)))return b=Lt(b),E.forEach(function(T,v){!(a.isUndefined(T)||T===null)&&e.append(i===!0?xt([b],v,s):i===null?b:b+"[]",l(T))}),!1}return _e(p)?!0:(e.append(xt(m,b,s),l(p)),!1)}let f=[],g=Object.assign($r,{defaultVisitor:u,convertValue:l,isVisitable:_e});function L(p,b){if(!a.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+b.join("."));f.push(p),a.forEach(p,function(E,S){(!(a.isUndefined(E)||E===null)&&n.call(e,E,a.isString(S)?S.trim():S,b,g))===!0&&L(E,b?b.concat(S):[S])}),f.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return L(t),e}var M=Gr;function St(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Ct(t,e){this._pairs=[],t&&M(t,this,e)}var Tt=Ct.prototype;Tt.append=function(e,r){this._pairs.push([e,r])};Tt.toString=function(e){let r=e?function(o){return e.call(this,o,St)}:St;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var ye=Ct;function Kr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Z(t,e,r){if(!e)return t;let o=r&&r.encode||Kr;a.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,s;if(n?s=n(e,r):s=a.isURLSearchParams(e)?e.toString():new ye(e,r).toString(o),s){let i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var He=class{constructor(){this.handlers=[]}use(e,r,o){return this.handlers.push({fulfilled:e,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(o){o!==null&&e(o)})}},We=He;var Ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Rt=typeof URLSearchParams<"u"?URLSearchParams:ye;var At=typeof FormData<"u"?FormData:null;var It=typeof Blob<"u"?Blob:null;var Pt={isBrowser:!0,classes:{URLSearchParams:Rt,FormData:At,Blob:It},protocols:["http","https","file","blob","url","data"]};var ze={};sr(ze,{hasBrowserEnv:()=>qe,hasStandardBrowserEnv:()=>Xr,hasStandardBrowserWebWorkerEnv:()=>Qr,navigator:()=>je,origin:()=>Zr});var qe=typeof window<"u"&&typeof document<"u",je=typeof navigator=="object"&&navigator||void 0,Xr=qe&&(!je||["ReactNative","NativeScript","NS"].indexOf(je.product)<0),Qr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zr=qe&&window.location.href||"http://localhost";var y={...ze,...Pt};function Je(t,e){return M(t,new y.classes.URLSearchParams,Object.assign({visitor:function(r,o,n,s){return y.isNode&&a.isBuffer(r)?(this.append(o,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Yr(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function eo(t){let e={},r=Object.keys(t),o,n=r.length,s;for(o=0;o<n;o++)s=r[o],e[s]=t[s];return e}function to(t){function e(r,o,n,s){let i=r[s++];if(i==="__proto__")return!0;let c=Number.isFinite(+i),d=s>=r.length;return i=!i&&a.isArray(n)?n.length:i,d?(a.hasOwnProp(n,i)?n[i]=[n[i],o]:n[i]=o,!c):((!n[i]||!a.isObject(n[i]))&&(n[i]=[]),e(r,o,n[i],s)&&a.isArray(n[i])&&(n[i]=eo(n[i])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){let r={};return a.forEachEntry(t,(o,n)=>{e(Yr(o),n,r,0)}),r}return null}var we=to;function ro(t,e,r){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(t)}var Ve={transitional:Ee,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let o=r.getContentType()||"",n=o.indexOf("application/json")>-1,s=a.isObject(e);if(s&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return n?JSON.stringify(we(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Je(e,this.formSerializer).toString();if((c=a.isFileList(e))||o.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return M(c?{"files[]":e}:e,d&&new d,this.formSerializer)}}return s||n?(r.setContentType("application/json",!1),ro(e)):e}],transformResponse:[function(e){let r=this.transitional||Ve.transitional,o=r&&r.forcedJSONParsing,n=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(o&&!this.responseType||n)){let i=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(c){if(i)throw c.name==="SyntaxError"?h.from(c,h.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:y.classes.FormData,Blob:y.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{Ve.headers[t]={}});var z=Ve;var oo=a.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"]),Ot=t=>{let e={},r,o,n;return t&&t.split(`
`).forEach(function(i){n=i.indexOf(":"),r=i.substring(0,n).trim().toLowerCase(),o=i.substring(n+1).trim(),!(!r||e[r]&&oo[r])&&(r==="set-cookie"?e[r]?e[r].push(o):e[r]=[o]:e[r]=e[r]?e[r]+", "+o:o)}),e};var Dt=Symbol("internals");function Y(t){return t&&String(t).trim().toLowerCase()}function xe(t){return t===!1||t==null?t:a.isArray(t)?t.map(xe):String(t)}function no(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,o;for(;o=r.exec(t);)e[o[1]]=o[2];return e}var so=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function $e(t,e,r,o,n){if(a.isFunction(o))return o.call(this,e,r);if(n&&(e=r),!!a.isString(e)){if(a.isString(o))return e.indexOf(o)!==-1;if(a.isRegExp(o))return o.test(e)}}function io(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,o)=>r.toUpperCase()+o)}function ao(t,e){let r=a.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+r,{value:function(n,s,i){return this[o].call(this,e,n,s,i)},configurable:!0})})}var J=class{constructor(e){e&&this.set(e)}set(e,r,o){let n=this;function s(c,d,l){let u=Y(d);if(!u)throw new Error("header name must be a non-empty string");let f=a.findKey(n,u);(!f||n[f]===void 0||l===!0||l===void 0&&n[f]!==!1)&&(n[f||d]=xe(c))}let i=(c,d)=>a.forEach(c,(l,u)=>s(l,u,d));if(a.isPlainObject(e)||e instanceof this.constructor)i(e,r);else if(a.isString(e)&&(e=e.trim())&&!so(e))i(Ot(e),r);else if(a.isObject(e)&&a.isIterable(e)){let c={},d,l;for(let u of e){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(d=c[l])?a.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}i(c,r)}else e!=null&&s(r,e,o);return this}get(e,r){if(e=Y(e),e){let o=a.findKey(this,e);if(o){let n=this[o];if(!r)return n;if(r===!0)return no(n);if(a.isFunction(r))return r.call(this,n,o);if(a.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Y(e),e){let o=a.findKey(this,e);return!!(o&&this[o]!==void 0&&(!r||$e(this,this[o],o,r)))}return!1}delete(e,r){let o=this,n=!1;function s(i){if(i=Y(i),i){let c=a.findKey(o,i);c&&(!r||$e(o,o[c],c,r))&&(delete o[c],n=!0)}}return a.isArray(e)?e.forEach(s):s(e),n}clear(e){let r=Object.keys(this),o=r.length,n=!1;for(;o--;){let s=r[o];(!e||$e(this,this[s],s,e,!0))&&(delete this[s],n=!0)}return n}normalize(e){let r=this,o={};return a.forEach(this,(n,s)=>{let i=a.findKey(o,s);if(i){r[i]=xe(n),delete r[s];return}let c=e?io(s):String(s).trim();c!==s&&delete r[s],r[c]=xe(n),o[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return a.forEach(this,(o,n)=>{o!=null&&o!==!1&&(r[n]=e&&a.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let o=new this(e);return r.forEach(n=>o.set(n)),o}static accessor(e){let o=(this[Dt]=this[Dt]={accessors:{}}).accessors,n=this.prototype;function s(i){let c=Y(i);o[c]||(ao(n,i),o[c]=!0)}return a.isArray(e)?e.forEach(s):s(e),this}};J.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(J.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[r]=o}}});a.freezeMethods(J);var C=J;function ee(t,e){let r=this||z,o=e||r,n=C.from(o.headers),s=o.data;return a.forEach(t,function(c){s=c.call(r,s,n.normalize(),e?e.status:void 0)}),n.normalize(),s}function te(t){return!!(t&&t.__CANCEL__)}function Bt(t,e,r){h.call(this,t??"canceled",h.ERR_CANCELED,e,r),this.name="CanceledError"}a.inherits(Bt,h,{__CANCEL__:!0});var N=Bt;function re(t,e,r){let o=r.config.validateStatus;!r.status||!o||o(r.status)?t(r):e(new h("Request failed with status code "+r.status,[h.ERR_BAD_REQUEST,h.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ge(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function co(t,e){t=t||10;let r=new Array(t),o=new Array(t),n=0,s=0,i;return e=e!==void 0?e:1e3,function(d){let l=Date.now(),u=o[s];i||(i=l),r[n]=d,o[n]=l;let f=s,g=0;for(;f!==n;)g+=r[f++],f=f%t;if(n=(n+1)%t,n===s&&(s=(s+1)%t),l-i<e)return;let L=u&&l-u;return L?Math.round(g*1e3/L):void 0}}var Nt=co;function lo(t,e){let r=0,o=1e3/e,n,s,i=(l,u=Date.now())=>{r=u,n=null,s&&(clearTimeout(s),s=null),t.apply(null,l)};return[(...l)=>{let u=Date.now(),f=u-r;f>=o?i(l,u):(n=l,s||(s=setTimeout(()=>{s=null,i(n)},o-f)))},()=>n&&i(n)]}var Ft=lo;var V=(t,e,r=3)=>{let o=0,n=Nt(50,250);return Ft(s=>{let i=s.loaded,c=s.lengthComputable?s.total:void 0,d=i-o,l=n(d),u=i<=c;o=i;let f={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:l||void 0,estimated:l&&c&&u?(c-i)/l:void 0,event:s,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},r)},Ke=(t,e)=>{let r=t!=null;return[o=>e[0]({lengthComputable:r,total:t,loaded:o}),e[1]]},Xe=t=>(...e)=>a.asap(()=>t(...e));var kt=y.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,y.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(y.origin),y.navigator&&/(msie|trident)/i.test(y.navigator.userAgent)):()=>!0;var vt=y.hasStandardBrowserEnv?{write(t,e,r,o,n,s){let i=[t+"="+encodeURIComponent(e)];a.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),a.isString(o)&&i.push("path="+o),a.isString(n)&&i.push("domain="+n),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){let e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Qe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ze(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function oe(t,e,r){let o=!Qe(e);return t&&(o||r==!1)?Ze(t,e):e}var Ut=t=>t instanceof C?{...t}:t;function B(t,e){e=e||{};let r={};function o(l,u,f,g){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:g},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function n(l,u,f,g){if(a.isUndefined(u)){if(!a.isUndefined(l))return o(void 0,l,f,g)}else return o(l,u,f,g)}function s(l,u){if(!a.isUndefined(u))return o(void 0,u)}function i(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return o(void 0,l)}else return o(void 0,u)}function c(l,u,f){if(f in e)return o(l,u);if(f in t)return o(void 0,l)}let d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(l,u,f)=>n(Ut(l),Ut(u),f,!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(u){let f=d[u]||n,g=f(t[u],e[u],u);a.isUndefined(g)&&f!==c||(r[u]=g)}),r}var Le=t=>{let e=B({},t),{data:r,withXSRFToken:o,xsrfHeaderName:n,xsrfCookieName:s,headers:i,auth:c}=e;e.headers=i=C.from(i),e.url=Z(oe(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(a.isFormData(r)){if(y.hasStandardBrowserEnv||y.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){let[l,...u]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(y.hasStandardBrowserEnv&&(o&&a.isFunction(o)&&(o=o(e)),o||o!==!1&&kt(e.url))){let l=n&&s&&vt.read(s);l&&i.set(n,l)}return e};var uo=typeof XMLHttpRequest<"u",Mt=uo&&function(t){return new Promise(function(r,o){let n=Le(t),s=n.data,i=C.from(n.headers).normalize(),{responseType:c,onUploadProgress:d,onDownloadProgress:l}=n,u,f,g,L,p;function b(){L&&L(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout;function E(){if(!m)return;let T=C.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),A={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:t,request:m};re(function(H){r(H),b()},function(H){o(H),b()},A),m=null}"onloadend"in m?m.onloadend=E:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(E)},m.onabort=function(){m&&(o(new h("Request aborted",h.ECONNABORTED,t,m)),m=null)},m.onerror=function(){o(new h("Network Error",h.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let v=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",A=n.transitional||Ee;n.timeoutErrorMessage&&(v=n.timeoutErrorMessage),o(new h(v,A.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,m)),m=null},s===void 0&&i.setContentType(null),"setRequestHeader"in m&&a.forEach(i.toJSON(),function(v,A){m.setRequestHeader(A,v)}),a.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),c&&c!=="json"&&(m.responseType=n.responseType),l&&([g,p]=V(l,!0),m.addEventListener("progress",g)),d&&m.upload&&([f,L]=V(d),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",L)),(n.cancelToken||n.signal)&&(u=T=>{m&&(o(!T||T.type?new N(null,t,m):T),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));let S=Ge(n.url);if(S&&y.protocols.indexOf(S)===-1){o(new h("Unsupported protocol "+S+":",h.ERR_BAD_REQUEST,t));return}m.send(s||null)})};var fo=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let o=new AbortController,n,s=function(l){if(!n){n=!0,c();let u=l instanceof Error?l:this.reason;o.abort(u instanceof h?u:new N(u instanceof Error?u.message:u))}},i=e&&setTimeout(()=>{i=null,s(new h(`timeout ${e} of ms exceeded`,h.ETIMEDOUT))},e),c=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),t=null)};t.forEach(l=>l.addEventListener("abort",s));let{signal:d}=o;return d.unsubscribe=()=>a.asap(c),d}},_t=fo;var po=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let o=0,n;for(;o<r;)n=o+e,yield t.slice(o,n),o=n},mo=async function*(t,e){for await(let r of ho(t))yield*po(r,e)},ho=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:o}=await e.read();if(r)break;yield o}}finally{await e.cancel()}},Ye=(t,e,r,o)=>{let n=mo(t,e),s=0,i,c=d=>{i||(i=!0,o&&o(d))};return new ReadableStream({async pull(d){try{let{done:l,value:u}=await n.next();if(l){c(),d.close();return}let f=u.byteLength;if(r){let g=s+=f;r(g)}d.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(d){return c(d),n.return()}},{highWaterMark:2})};var Ce=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Wt=Ce&&typeof ReadableStream=="function",bo=Ce&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),jt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},go=Wt&&jt(()=>{let t=!1,e=new Request(y.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ht=64*1024,et=Wt&&jt(()=>a.isReadableStream(new Response("").body)),Se={stream:et&&(t=>t.body)};Ce&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Se[e]&&(Se[e]=a.isFunction(t[e])?r=>r[e]():(r,o)=>{throw new h(`Response type '${e}' is not supported`,h.ERR_NOT_SUPPORT,o)})})})(new Response);var yo=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(y.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await bo(t)).byteLength},Eo=async(t,e)=>{let r=a.toFiniteNumber(t.getContentLength());return r??yo(e)},qt=Ce&&(async t=>{let{url:e,method:r,data:o,signal:n,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:d,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:g}=Le(t);l=l?(l+"").toLowerCase():"text";let L=_t([n,s&&s.toAbortSignal()],i),p,b=L&&L.unsubscribe&&(()=>{L.unsubscribe()}),m;try{if(d&&go&&r!=="get"&&r!=="head"&&(m=await Eo(u,o))!==0){let A=new Request(e,{method:"POST",body:o,duplex:"half"}),U;if(a.isFormData(o)&&(U=A.headers.get("content-type"))&&u.setContentType(U),A.body){let[H,ue]=Ke(m,V(Xe(d)));o=Ye(A.body,Ht,H,ue)}}a.isString(f)||(f=f?"include":"omit");let E="credentials"in Request.prototype;p=new Request(e,{...g,signal:L,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:E?f:void 0});let S=await fetch(p),T=et&&(l==="stream"||l==="response");if(et&&(c||T&&b)){let A={};["status","statusText","headers"].forEach(lt=>{A[lt]=S[lt]});let U=a.toFiniteNumber(S.headers.get("content-length")),[H,ue]=c&&Ke(U,V(Xe(c),!0))||[];S=new Response(Ye(S.body,Ht,H,()=>{ue&&ue(),b&&b()}),A)}l=l||"text";let v=await Se[a.findKey(Se,l)||"text"](S,t);return!T&&b&&b(),await new Promise((A,U)=>{re(A,U,{data:v,headers:C.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:p})})}catch(E){throw b&&b(),E&&E.name==="TypeError"&&/Load failed|fetch/i.test(E.message)?Object.assign(new h("Network Error",h.ERR_NETWORK,t,p),{cause:E.cause||E}):h.from(E,E&&E.code,t,p)}});var tt={http:ge,xhr:Mt,fetch:qt};a.forEach(tt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var zt=t=>`- ${t}`,wo=t=>a.isFunction(t)||t===null||t===!1,Te={getAdapter:t=>{t=a.isArray(t)?t:[t];let{length:e}=t,r,o,n={};for(let s=0;s<e;s++){r=t[s];let i;if(o=r,!wo(r)&&(o=tt[(i=String(r)).toLowerCase()],o===void 0))throw new h(`Unknown adapter '${i}'`);if(o)break;n[i||"#"+s]=o}if(!o){let s=Object.entries(n).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build")),i=e?s.length>1?`since :
`+s.map(zt).join(`
`):" "+zt(s[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:tt};function rt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new N(null,t)}function Re(t){return rt(t),t.headers=C.from(t.headers),t.data=ee.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Te.getAdapter(t.adapter||z.adapter)(t).then(function(o){return rt(t),o.data=ee.call(t,t.transformResponse,o),o.headers=C.from(o.headers),o},function(o){return te(o)||(rt(t),o&&o.response&&(o.response.data=ee.call(t,t.transformResponse,o.response),o.response.headers=C.from(o.response.headers))),Promise.reject(o)})}var Ae="1.9.0";var Ie={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ie[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});var Jt={};Ie.transitional=function(e,r,o){function n(s,i){return"[Axios v"+Ae+"] Transitional option '"+s+"'"+i+(o?". "+o:"")}return(s,i,c)=>{if(e===!1)throw new h(n(i," has been removed"+(r?" in "+r:"")),h.ERR_DEPRECATED);return r&&!Jt[i]&&(Jt[i]=!0,console.warn(n(i," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,i,c):!0}};Ie.spelling=function(e){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${e}`),!0)};function xo(t,e,r){if(typeof t!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let o=Object.keys(t),n=o.length;for(;n-- >0;){let s=o[n],i=e[s];if(i){let c=t[s],d=c===void 0||i(c,s,t);if(d!==!0)throw new h("option "+s+" must be "+d,h.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new h("Unknown option "+s,h.ERR_BAD_OPTION)}}var ne={assertOptions:xo,validators:Ie};var F=ne.validators,$=class{constructor(e){this.defaults=e||{},this.interceptors={request:new We,response:new We}}async request(e,r){try{return await this._request(e,r)}catch(o){if(o instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;let s=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
`+s):o.stack=s}catch{}}throw o}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=B(this.defaults,r);let{transitional:o,paramsSerializer:n,headers:s}=r;o!==void 0&&ne.assertOptions(o,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),n!=null&&(a.isFunction(n)?r.paramsSerializer={serialize:n}:ne.assertOptions(n,{encode:F.function,serialize:F.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ne.assertOptions(r,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&a.merge(s.common,s[r.method]);s&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),r.headers=C.concat(i,s);let c=[],d=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(d=d&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});let l=[];this.interceptors.response.forEach(function(b){l.push(b.fulfilled,b.rejected)});let u,f=0,g;if(!d){let p=[Re.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,l),g=p.length,u=Promise.resolve(r);f<g;)u=u.then(p[f++],p[f++]);return u}g=c.length;let L=r;for(f=0;f<g;){let p=c[f++],b=c[f++];try{L=p(L)}catch(m){b.call(this,m);break}}try{u=Re.call(this,L)}catch(p){return Promise.reject(p)}for(f=0,g=l.length;f<g;)u=u.then(l[f++],l[f++]);return u}getUri(e){e=B(this.defaults,e);let r=oe(e.baseURL,e.url,e.allowAbsoluteUrls);return Z(r,e.params,e.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(e){$.prototype[e]=function(r,o){return this.request(B(o||{},{method:e,url:r,data:(o||{}).data}))}});a.forEach(["post","put","patch"],function(e){function r(o){return function(s,i,c){return this.request(B(c||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}$.prototype[e]=r(),$.prototype[e+"Form"]=r(!0)});var se=$;var ot=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let o=this;this.promise.then(n=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](n);o._listeners=null}),this.promise.then=n=>{let s,i=new Promise(c=>{o.subscribe(c),s=c}).then(n);return i.cancel=function(){o.unsubscribe(s)},i},e(function(s,i,c){o.reason||(o.reason=new N(s,i,c),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=o=>{e.abort(o)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(n){e=n}),cancel:e}}},Vt=ot;function nt(t){return function(r){return t.apply(null,r)}}function st(t){return a.isObject(t)&&t.isAxiosError===!0}var it={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,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity: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};Object.entries(it).forEach(([t,e])=>{it[e]=t});var $t=it;function Gt(t){let e=new se(t),r=K(se.prototype.request,e);return a.extend(r,se.prototype,e,{allOwnKeys:!0}),a.extend(r,e,null,{allOwnKeys:!0}),r.create=function(n){return Gt(B(t,n))},r}var x=Gt(z);x.Axios=se;x.CanceledError=N;x.CancelToken=Vt;x.isCancel=te;x.VERSION=Ae;x.toFormData=M;x.AxiosError=h;x.Cancel=x.CanceledError;x.all=function(e){return Promise.all(e)};x.spread=nt;x.isAxiosError=st;x.mergeConfig=B;x.AxiosHeaders=C;x.formToJSON=t=>we(a.isHTMLForm(t)?new FormData(t):t);x.getAdapter=Te.getAdapter;x.HttpStatusCode=$t;x.default=x;var ie=x;var{Axios:vi,AxiosError:Ui,CanceledError:Mi,isCancel:_i,CancelToken:Hi,VERSION:Wi,all:ji,Cancel:qi,isAxiosError:zi,spread:Ji,toFormData:Vi,AxiosHeaders:$i,HttpStatusCode:Gi,formToJSON:Ki,getAdapter:Xi,mergeConfig:Qi}=ie;var w=class{static async POST(e,r){let o=R.getSessionId()||"";return r=r||{},(await ie.post(O.API_URL+e,r,{headers:{sessiontoken:o||"","Content-Type":"application/json",Accept:"application/json"}})).data}static async GET(e){let r=R.getSessionId()||"";return(await ie.get(O.API_URL+e,{headers:{sessiontoken:r||"","Content-Type":"application/json",Accept:"application/json"}})).data}};var Kt=async(t,e)=>{let r="/login/login",o={Email:t,Password:e};try{let n=await w.POST(r,o);if(n&&n.Token&&n.ExpirationDate){let s=new Date(n.ExpirationDate);R.login(n.Token,s)}else throw new Error("Login failed: No session ID returned")}catch(n){throw console.error("Login failed:",n),new Error("Login failed: "+n.message)}},Xt=async(t,e,r)=>{let o="/login/register";try{let n={Username:t,Email:e,Password:r},s=await w.POST(o,n);if(s&&s.Token&&s.ExpirationDate){let i=new Date(s.ExpirationDate);R.login(s.Token,i)}else throw new Error("Registration failed: No session ID returned")}catch(n){throw console.error("Registration failed:",n),new Error("Registration failed: "+n.message)}},Qt=async t=>{let e="/login/checksession";try{let r=await w.POST(e);if(!r||!r.message||r.message!=="ok")throw new Error("Invalid session ID");return r}catch(r){console.error("Session check failed:",r);return}};var _=class{static async GetLists(e,r,o,n){let c={page:e,length:r,filters:o||{},sort:n||{}};return await w.POST("/lists/getLists",c)}static async GetMyLists(e,r,o,n){let c={page:e,length:r,filters:o||{},sort:n||{}};return await w.POST("/lists/getMyLists",c)}static async GetSpecificList(e){let r={ListID:e};return await w.POST("/lists/getspecificlist",r)}static async UpdateList(e,r,o,n){let s={ListID:e,Name:r,IsPublic:o,Words:n.map(c=>({Word_EN:c.Word_EN,Word_NL:c.Word_NL,Word_ID:c.Word_ID,WordIndex:c.WordIndex}))};return await w.POST("/lists/updateList",s)}static async DeleteList(e){let r={ListID:e};return await w.POST("/lists/deletelist",r)}static async CreateList(e){let r={Name:e};return await w.POST("/lists/createlist",r)}};var P=class{static log(e){console.log(e)}static error(e){console.log("[ERROR] "+e)}static warn(e){console.log("[WARN] "+e)}static debug(e){O.IsDebug()&&console.log("[DEBUG] "+e)}static info(e){console.log("[INFO] "+e)}};var ae=class{static async GetUserInfo(){let e=await w.POST("/account/getuserinfo");if(e===void 0){P.error("Failed to fetch user info");return}return e}};var Pe=class{constructor(e,r,o){this.Correct=e,this.Finished=r,this.WordIndex=o}};var Oe=class{constructor(e,r,o,n){this.Question=e,this.Answer=r,this.CorrectAnswer=o,this.Correct=n}},ce=class{constructor(e,r,o,n,s,i,c,d,l){this.ListID=e,this.Name=r,this.Description=o,this.WordCount=n,this.PracticeCount=s,this.CreatedAt=i,this.UpdatedAt=c,this.Owner=d,this.IsPublic=l}},De=class{constructor(e,r,o,n,s,i,c,d){this.Orientation=e,this.StartTime=r,this.Duration=o,this.Score=n,this.Words=s,this.CurrentWordIndex=i,this.IsFinished=c,this.ListInfo=d}};var Be=class{constructor(e,r,o,n,s,i,c,d){this.ListID=e,this.Name=r,this.Description=o,this.WordCount=n,this.CreatedAt=s,this.UpdatedAt=i,this.Owner=c,this.IsPublic=d}},Ne=class{constructor(e,r,o,n,s){this.Word=e,this.WordIndex=r,this.Orientation=o,this.ListInfo=n,this.ExerciseStartedAt=s}};var Zt=async(t,e)=>{let r="/exercise/startexercise",o={listID:t,orientation:e};P.debug("Starting exercise with body: "+JSON.stringify(o));try{if(!await w.POST(r,o))throw new Error("Failed to start exercise: No session ID returned");return}catch(n){throw console.error("Failed to start exercise:",n),new Error("Failed to start exercise: "+n.message)}},Yt=async()=>{let t="/exercise/getword";try{let e=await w.POST(t);if(!e||!e.Word)throw new Error("Failed to get word: No word returned");let r=new Be(e.ListInfo.ListID,e.ListInfo.Name,e.ListInfo.Description,e.ListInfo.WordCount,new Date(e.ListInfo.CreatedAt),new Date(e.ListInfo.UpdatedAt),e.ListInfo.Owner,e.ListInfo.IsPublic);return new Ne(e.Word,e.WordIndex,e.Orientation,r,new Date(e.ExerciseStartTime))}catch(e){throw console.error("Failed to get word:",e),new Error("Failed to get word: "+e.message)}},er=async()=>{let t="/exercise/getresult";try{let e=await w.POST(t);if(!e||!e)throw new Error("Failed to get exercise result: No result returned");let r=[];e&&e.Words&&(r=e.Words.map(s=>new Oe(s.Question,s.Answer,s.CorrectAnswer,s.Correct)));let o;return e&&e.ListInfo?o=new ce(e.ListInfo.ListID,e.ListInfo.Name,e.ListInfo.Description,e.ListInfo.WordCount,e.ListInfo.PracticeCount,new Date(e.ListInfo.CreatedAt),new Date(e.ListInfo.UpdatedAt),e.ListInfo.Owner,e.ListInfo.IsPublic):o=new ce(0,"","",0,0,new Date,new Date,"",!1),new De(e.Orientation,new Date(e.StartTime),e.Duration,e.Score,r,e.CurrentWordIndex,e.IsFinished,o)}catch(e){throw console.error("Failed to get exercise result:",e),new Error("Failed to get exercise result: "+e.message)}},tr=async t=>{let e="/exercise/checkanswer",r={answer:t};try{let o=await w.POST(e,r);if(!o)throw new Error("Failed to check answer: No result returned");return new Pe(o.Correct,o.Finished,o.WordIndex)}catch(o){throw console.error("Failed to check answer:",o),new Error("Failed to check answer: "+o.message)}};var Fe={Login:{Login:Kt,Register:Xt,CheckSession:Qt},GetLists:{GetLists:_.GetLists,GetSpecificList:_.GetSpecificList,UpdateList:_.UpdateList,DeleteList:_.DeleteList},Exercise:{StartExercise:Zt,GetWord:Yt,getResult:er,CheckAnswer:tr},Account:{GetUserInfo:ae.GetUserInfo}};var Lo=t=>{if(!t){console.error("Invalid URL");return}window.location.href=t},k=Lo;var So=Fe.GetLists,at=class{constructor(){this.page=1;this.pageSize=6;this.filters=new G;this.sortField=new de("PracticeCount",!1);this.pageCount=0;this.filterTimeout=0;this.searchTimeout=0;this.listsContainer=document.getElementById("lists-container"),this.nameSearchBar=document.getElementById("name-search-bar"),this.filterBelowWordCount=document.getElementById("filter-below-wordcount-inpt"),this.filterAboveWordCount=document.getElementById("filter-above-wordcount-inpt"),this.filterAbovePracticeCount=document.getElementById("filter-above-practicecount-inpt"),this.filterBelowPracticeCount=document.getElementById("filter-below-practicecount-inpt"),this.filterClearButton=document.getElementById("filter-clear-btn"),this.sortByDropdown=document.getElementById("sort-by"),this.sortByAscDesc=document.getElementById("sort-order"),this.prevPageBtn=document.getElementById("prev-page-btn"),this.nextPageBtn=document.getElementById("next-page-btn"),this.pageInfo=document.getElementById("page-info")}async Init(e){this.AddEventListeners(),this.updateLists(),e===void 0||await e}async updateLists(){try{let e=await So.GetLists(this.page,this.pageSize,this.filters,this.sortField);this.listsContainer&&(this.listsContainer.innerHTML="",e.Lists.forEach(r=>{let o=document.createElement("div");o.className="list-item";let n=document.createElement("div");n.className="list-name-block";let s=document.createElement("p");s.className="list-name",s.innerText=r.Name,n.appendChild(s),o.appendChild(n);let i=document.createElement("div");i.className="list-stats";let c=document.createElement("div");c.className="list-stats-block";let d=document.createElement("div");d.className="list-stats-block";let l=document.createElement("p");l.className="list-stats-item",l.innerText=`Owner: ${r.Owner}`,c.appendChild(l);let u=document.createElement("p");u.className="list-stats-item",u.innerText=`Uploaded at: ${new Date(r.CreatedAt).toLocaleDateString()}`,c.appendChild(u);let f=document.createElement("p");f.className="list-stats-item",f.innerText=`Word Count: ${r.WordCount}`,d.appendChild(f);let g=document.createElement("p");g.className="list-stats-item",g.innerText=`Practice Count: ${r.PracticeCount}`,d.appendChild(g),i.appendChild(c),i.appendChild(d),o.appendChild(i),r.Owning&&o.classList.add("owning-list-item"),o.addEventListener("click",()=>{k(`./list.html?listID=${r.ID}`)}),this.listsContainer.appendChild(o)})),this.pageCount=Math.ceil(e.TotalItems/this.pageSize),this.page=e.Page,this.pageInfo&&(this.pageInfo.innerText=`Page ${this.page} of ${this.pageCount}`)}catch(e){P.error("Error fetching lists: "+e)}}filterEventListenerFunction(){clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{let e=this.filterBelowWordCount.value&&this.filterBelowWordCount.value!==""?parseInt(this.filterBelowWordCount.value):void 0,r=this.filterAboveWordCount.value&&this.filterAboveWordCount.value!==""?parseInt(this.filterAboveWordCount.value):void 0,o=this.filterBelowPracticeCount.value&&this.filterBelowPracticeCount.value!==""?parseInt(this.filterBelowPracticeCount.value):void 0,n=this.filterAbovePracticeCount.value&&this.filterAbovePracticeCount.value!==""?parseInt(this.filterAbovePracticeCount.value):void 0;this.filters.BelowWordCount=e,this.filters.AboveWordCount=r,this.filters.BelowPracticeCount=o,this.filters.AbovePracticeCount=n,this.updateLists()},O.RequestStability)}AddEventListeners(){this.filterBelowWordCount.addEventListener("input",()=>this.filterEventListenerFunction()),this.filterAboveWordCount.addEventListener("input",()=>this.filterEventListenerFunction()),this.filterBelowPracticeCount.addEventListener("input",()=>this.filterEventListenerFunction()),this.filterAbovePracticeCount.addEventListener("input",()=>this.filterEventListenerFunction()),this.filterClearButton.addEventListener("click",()=>{clearTimeout(this.filterTimeout),this.filterBelowWordCount.value="",this.filterAboveWordCount.value="",this.filterBelowPracticeCount.value="",this.filterAbovePracticeCount.value="",this.filterTimeout=setTimeout(()=>{this.filters.Name=void 0,this.filters.BelowWordCount=void 0,this.filters.AboveWordCount=void 0,this.filters.BelowPracticeCount=void 0,this.filters.AbovePracticeCount=void 0,this.updateLists()},O.RequestStability)}),this.sortByDropdown.addEventListener("change",()=>{clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{let e=this.sortByDropdown.value,r;switch(e){case"name":r="Name";break;case"wordCount":r="WordCount";break;case"practiceCount":r="PracticeCount";break;case"creationDate":r="CreatedAt";break;case"lastUpdatedDate":r="UpdatedAt";break;default:r="Name"}this.sortField.field=r,this.updateLists()},O.RequestStability)}),this.sortByAscDesc.addEventListener("change",e=>{clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{let r=this.sortByAscDesc.value;this.sortField.ascending=r==="asc",this.updateLists()},O.RequestStability)}),this.nameSearchBar.addEventListener("input",e=>{clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{let r=this.nameSearchBar.value;this.filters.Name=r!==""?r:void 0,this.updateLists()},O.RequestStability)}),this.prevPageBtn.addEventListener("click",()=>{this.page>1&&this.pageCount&&(this.page--,this.updateLists())}),this.nextPageBtn.addEventListener("click",()=>{this.page<this.pageCount&&(this.page++,this.updateLists())})}},rr=at;var ct=class{constructor(){this.topBar=document.getElementById("top-bar");this.topBarLeft=document.getElementById("top-bar-left");this.topBarRight=document.getElementById("top-bar-right");this.topbar_MyLists=document.getElementById("topbar-MyLists");this.topbar_Logout=document.getElementById("topbar-Logout");this.topbar_Login=document.getElementById("topbar-Login");this.topbar_Register=document.getElementById("topbar-Register");this.topbar_Profile=document.getElementById("topbar-Profile");P.debug("TopBarModule scaffolded.")}async Init(e){this.addEventListeners(),!(e===void 0||await e!==!0)&&(this.topbar_MyLists.style.display="block",this.topbar_Profile.style.display="block",this.topbar_Logout.style.display="block",this.topbar_Login.style.display="none",this.topbar_Register.style.display="none")}async render(){}addEventListeners(){this.topbar_Logout.addEventListener("click",async()=>{confirm("Are you sure you want to log out?")&&(R.logout(),k("./index.html"))}),this.topbar_Login.addEventListener("click",async()=>{k("./login.html")}),this.topbar_Register.addEventListener("click",async()=>{k("./register.html")}),this.topbar_Profile.addEventListener("click",async()=>{k("./accountPage.html")}),this.topbar_MyLists.addEventListener("click",async()=>{k("./myLists.html")})}},or=ct;var le=class t{static async isLoggedIn(){if(!R.isLoggedIn())return!1;let e=R.getSessionId()||"",r=await Fe.Login.CheckSession(e);return r?(R.UserID=r.UserID,!0):!1}static async checkSession(){return await t.isLoggedIn()||k("./login.html"),!0}};var Ga=document.getElementById("logout-btn"),Co=new rr,To=new or;async function Ro(){let t=le.checkSession();To.Init(t),Co.Init(t),P.debug("Loading non-personal content..."),!(t===void 0||await t!==!0)&&P.debug("User is logged in, loading personal content...")}Ro();})();