@sulzanoks/vue-datatable 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,97 +1,9 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t(require("vue")):typeof define==`function`&&define.amd?define([`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,e.DatatableCard=t(e.Vue))})(this,function(e){var t=Object.defineProperty,n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};function i(e,t){return function(){return e.apply(t,arguments)}}var a=n((()=>{}));function o(e){return e!==null&&!w(e)&&e.constructor!==null&&!w(e.constructor)&&E(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}function s(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ee(e.buffer),t}function c(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}function l(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),C(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(o(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function u(e,t){if(o(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}function d(...e){let{caseless:t,skipUndefined:n}=xe(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&u(r,i)||i,o=_(r,a)?r[a]:void 0;D(o)&&D(e)?r[a]=d(o,e):D(e)?r[a]=d({},e):C(e)?r[a]=e.slice():(!n||!w(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||o(n)||(l(n,i),typeof n!=`object`||C(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];Ne.call(n,t)&&i(n[t],t)}}return r}function f(e){return!!(e&&E(e.append)&&e[g]===`FormData`&&e[h])}var p,m,h,g,_,v,y,b,x,S,C,w,ee,T,E,te,ne,re,D,ie,ae,oe,se,ce,le,ue,de,fe,O,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,k,A=n((()=>{a(),{toString:p}=Object.prototype,{getPrototypeOf:m}=Object,{iterator:h,toStringTag:g}=Symbol,_=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),v=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),_(n,t))return!0;n=m(n)}return!1},y=(e,t)=>e!=null&&v(e,t)?e[t]:void 0,b=(e=>t=>{let n=p.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),x=e=>(e=e.toLowerCase(),t=>b(t)===e),S=e=>t=>typeof t===e,{isArray:C}=Array,w=S(`undefined`),ee=x(`ArrayBuffer`),T=S(`string`),E=S(`function`),te=S(`number`),ne=e=>typeof e==`object`&&!!e,re=e=>e===!0||e===!1,D=e=>{if(!ne(e))return!1;let t=m(e);return(t===null||t===Object.prototype||m(t)===null)&&!v(e,g)&&!v(e,h)},ie=e=>{if(!ne(e)||o(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ae=x(`Date`),oe=x(`File`),se=e=>!!(e&&e.uri!==void 0),ce=e=>e&&e.getParts!==void 0,le=x(`Blob`),ue=x(`FileList`),de=e=>ne(e)&&E(e.pipe),fe=c(),O=fe.FormData===void 0?void 0:fe.FormData,pe=e=>{if(!e)return!1;if(O&&e instanceof O)return!0;let t=m(e);if(!t||t===Object.prototype||!E(e.append))return!1;let n=b(e);return n===`formdata`||n===`object`&&E(e.toString)&&e.toString()===`[object FormData]`},me=x(`URLSearchParams`),[he,ge,_e,ve]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(x),ye=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``),be=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,xe=e=>!w(e)&&e!==be,Se=(e,t,n,{allOwnKeys:r}={})=>(l(t,(t,r)=>{n&&E(t)?Object.defineProperty(e,r,{__proto__:null,value:i(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),Ce=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),we=(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)},Te=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&m(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ee=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},De=e=>{if(!e)return null;if(C(e))return e;let t=e.length;if(!te(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},Oe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&m(Uint8Array)),ke=(e,t)=>{let n=(e&&e[h]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Ae=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},je=x(`HTMLFormElement`),Me=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:Ne}=Object.prototype,Pe=x(`RegExp`),Fe=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};l(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Ie=e=>{Fe(e,(t,n)=>{if(E(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(E(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Le=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return C(e)?r(e):r(String(e).split(t)),n},Re=()=>{},ze=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Be=e=>{let t=new WeakSet,n=e=>{if(ne(e)){if(t.has(e))return;if(o(e))return e;if(!(`toJSON`in e)){t.add(e);let r=C(e)?[]:{};return l(e,(e,t)=>{let i=n(e);!w(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},Ve=x(`AsyncFunction`),He=e=>e&&(ne(e)||E(e))&&E(e.then)&&E(e.catch),Ue=((e,t)=>e?setImmediate:t?((e,t)=>(be.addEventListener(`message`,({source:n,data:r})=>{n===be&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),be.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,E(be.postMessage)),We=typeof queueMicrotask<`u`?queueMicrotask.bind(be):typeof process<`u`&&process.nextTick||Ue,Ge=e=>e!=null&&E(e[h]),Ke=e=>e!=null&&v(e,h)&&Ge(e),k={isArray:C,isArrayBuffer:ee,isBuffer:o,isFormData:pe,isArrayBufferView:s,isString:T,isNumber:te,isBoolean:re,isObject:ne,isPlainObject:D,isEmptyObject:ie,isReadableStream:he,isRequest:ge,isResponse:_e,isHeaders:ve,isUndefined:w,isDate:ae,isFile:oe,isReactNativeBlob:se,isReactNative:ce,isBlob:le,isRegExp:Pe,isFunction:E,isStream:de,isURLSearchParams:me,isTypedArray:Oe,isFileList:ue,forEach:l,merge:d,extend:Se,trim:ye,stripBOM:Ce,inherits:we,toFlatObject:Te,kindOf:b,kindOfTest:x,endsWith:Ee,toArray:De,forEachEntry:ke,matchAll:Ae,isHTMLForm:je,hasOwnProperty:_,hasOwnProp:_,hasOwnInPrototypeChain:v,getSafeProp:y,reduceDescriptors:Fe,freezeMethods:Ie,toObjectSet:Le,toCamelCase:Me,noop:Re,toFiniteNumber:ze,findKey:u,global:be,isContextDefined:xe,isSpecCompliantForm:f,toJSONObject:Be,isAsyncFn:Ve,isThenable:He,setImmediate:Ue,asap:We,isIterable:Ge,isSafeIterable:Ke}})),qe,Je,Ye=n((()=>{A(),qe=k.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`]),Je=e=>{let t={},n,r,i;return e&&e.split(`
2
- `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&qe[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t}}));function Xe(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function Ze(e,t){return k.isArray(e)?e.map(e=>Ze(e,t)):Xe(String(e).replace(t,``))}function Qe(e){let t=Object.create(null);return k.forEach(e.toJSON(),(e,n)=>{t[n]=nt(e)}),t}var $e,et,tt,nt,rt=n((()=>{A(),$e=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),et=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`),tt=e=>Ze(e,$e),nt=e=>Ze(e,et)}));function it(e){return e&&String(e).trim().toLowerCase()}function at(e){return e===!1||e==null?e:k.isArray(e)?e.map(at):tt(String(e))}function ot(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function st(e,t,n,r,i){if(k.isFunction(r))return r.call(this,t,n);if(i&&(t=n),k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function ct(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function lt(e,t){let n=k.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var ut,dt,j,ft=n((()=>{A(),Ye(),rt(),ut=Symbol(`internals`),dt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),j=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=it(t);if(!i)return;let a=k.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=at(e))}let a=(e,t)=>k.forEach(e,(e,n)=>i(e,n,t));if(k.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(k.isString(e)&&(e=e.trim())&&!dt(e))a(Je(e),t);else if(k.isObject(e)&&k.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!k.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],k.hasOwnProp(n,i)?(r=n[i],n[i]=k.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=it(e),e){let n=k.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return ot(e);if(k.isFunction(t))return t.call(this,e,n);if(k.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=it(e),e){let n=k.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||st(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=it(e),e){let i=k.findKey(n,e);i&&(!t||st(n,n[i],i,t))&&(delete n[i],r=!0)}}return k.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||st(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return k.forEach(this,(r,i)=>{let a=k.findKey(n,i);if(a){t[a]=at(r),delete t[i];return}let o=e?ct(i):String(i).trim();o!==i&&delete t[i],t[o]=at(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return k.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&k.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(`
3
- `)}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,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[ut]=this[ut]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=it(e);t[r]||(lt(n,e),t[r]=!0)}return k.isArray(e)?e.forEach(r):r(e),this}},j.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),k.reduceDescriptors(j.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),k.freezeMethods(j)}));function pt(e){if(k.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(k.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function mt(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||k.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof j&&(e=e.toJSON()),r.push(e);let t;if(k.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);k.isUndefined(r)||(t[n]=r)});else{if(!k.isPlainObject(e)&&pt(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?ht:i(a);k.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var ht,M,N=n((()=>{A(),ft(),ht=`[REDACTED ****]`,M=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){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),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&k.hasOwnProp(e,`redact`)?e.redact:void 0,n=k.isArray(t)&&t.length>0?mt(e,t):k.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}}},M.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,M.ERR_BAD_OPTION=`ERR_BAD_OPTION`,M.ECONNABORTED=`ECONNABORTED`,M.ETIMEDOUT=`ETIMEDOUT`,M.ECONNREFUSED=`ECONNREFUSED`,M.ERR_NETWORK=`ERR_NETWORK`,M.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,M.ERR_DEPRECATED=`ERR_DEPRECATED`,M.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,M.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,M.ERR_CANCELED=`ERR_CANCELED`,M.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,M.ERR_INVALID_URL=`ERR_INVALID_URL`,M.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`})),gt=n((()=>{}));function _t(e){return k.isPlainObject(e)||k.isArray(e)}function vt(e){return k.endsWith(e,`[]`)?e.slice(0,-2):e}function yt(e,t,n){return e?e.concat(t).map(function(e,t){return e=vt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function bt(e){return k.isArray(e)&&!e.some(_t)}function xt(e,t,n){if(!k.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!k.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&k.isSpecCompliantForm(t),u=[];if(!k.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(k.isDate(e))return e.toISOString();if(k.isBoolean(e))return e.toString();if(!l&&k.isBlob(e))throw new M(`Blob is not supported. Use a Buffer instead.`);if(k.isArrayBuffer(e)||k.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);if(typeof Buffer<`u`)return Buffer.from(e);throw new M(`Blob is not supported. Use a Buffer instead.`,M.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new M(`Object is too deeply nested (`+e+` levels). Max depth: `+c,M.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!k.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(k.isReactNative(t)&&k.isReactNativeBlob(e))return t.append(yt(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(k.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(k.isArray(e)&&bt(e)||(k.isFileList(e)||k.endsWith(n,`[]`))&&(s=k.toArray(e)))return n=vt(n),s.forEach(function(e,r){!(k.isUndefined(e)||e===null)&&t.append(o===!0?yt([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return _t(e)?!0:(t.append(yt(i,n,a),d(e)),!1)}let h=Object.assign(St,{defaultVisitor:m,convertValue:d,isVisitable:_t});function g(e,n,r=0){if(!k.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),k.forEach(e,function(e,a){(!(k.isUndefined(e)||e===null)&&i.call(t,e,k.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!k.isObject(e))throw TypeError(`data must be an object`);return g(e),t}var St,Ct=n((()=>{A(),N(),gt(),St=k.toFlatObject(k,{},null,function(e){return/^is[A-Z]/.test(e)})}));function wt(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Tt(e,t){this._pairs=[],e&&xt(e,this,t)}var Et,Dt=n((()=>{Ct(),Et=Tt.prototype,Et.append=function(e,t){this._pairs.push([e,t])},Et.toString=function(e){let t=e?t=>e.call(this,t,wt):wt;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)}}));function Ot(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function kt(e,t,n){if(!t)return e;e||=``;let r=k.isFunction(n)?{serialize:n}:n,i=k.getSafeProp(r,`encode`)||Ot,a=k.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):k.isURLSearchParams(t)?t.toString():new Tt(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var At=n((()=>{A(),Dt()})),jt,Mt=n((()=>{A(),jt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){k.forEach(this.handlers,function(t){t!==null&&e(t)})}}})),Nt,Pt=n((()=>{Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0}})),Ft,It=n((()=>{Dt(),Ft=typeof URLSearchParams<`u`?URLSearchParams:Tt})),Lt,Rt=n((()=>{Lt=typeof FormData<`u`?FormData:null})),zt,Bt=n((()=>{zt=typeof Blob<`u`?Blob:null})),Vt,Ht=n((()=>{It(),Rt(),Bt(),Vt={isBrowser:!0,classes:{URLSearchParams:Ft,FormData:Lt,Blob:zt},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]}})),Ut=r({hasBrowserEnv:()=>Wt,hasStandardBrowserEnv:()=>Kt,hasStandardBrowserWebWorkerEnv:()=>qt,navigator:()=>Gt,origin:()=>Jt}),Wt,Gt,Kt,qt,Jt,Yt=n((()=>{Wt=typeof window<`u`&&typeof document<`u`,Gt=typeof navigator==`object`&&navigator||void 0,Kt=Wt&&(!Gt||[`ReactNative`,`NativeScript`,`NS`].indexOf(Gt.product)<0),qt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Jt=Wt&&window.location.href||`http://localhost`})),P,Xt=n((()=>{Ht(),Yt(),P={...Ut,...Vt}}));function Zt(e,t){return xt(e,new P.classes.URLSearchParams,{visitor:function(e,t,n,r){return P.isNode&&k.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var Qt=n((()=>{A(),Ct(),Xt()}));function $t(e){if(e>rn)throw new M(`FormData field is too deeply nested (`+e+` levels). Max depth: `+rn,M.ERR_FORM_DATA_DEPTH_EXCEEDED)}function en(e){let t=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(e))!==null;)$t(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function tn(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function nn(e){function t(e,n,r,i){$t(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&k.isArray(r)?r.length:a,s?(k.hasOwnProp(r,a)?r[a]=k.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!k.hasOwnProp(r,a)||!k.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&k.isArray(r[a])&&(r[a]=tn(r[a])),!o)}if(k.isFormData(e)&&k.isFunction(e.entries)){let n={};return k.forEachEntry(e,(e,r)=>{t(en(e),r,n,0)}),n}return null}var rn,an=n((()=>{A(),N(),Ct(),rn=100}));function on(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var sn,cn,ln=n((()=>{A(),N(),Pt(),Ct(),Qt(),Xt(),an(),sn=(e,t)=>e!=null&&k.hasOwnProp(e,t)?e[t]:void 0,cn={transitional:Nt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=k.isObject(e);if(i&&k.isHTMLForm(e)&&(e=new FormData(e)),k.isFormData(e))return r?JSON.stringify(nn(e)):e;if(k.isArrayBuffer(e)||k.isBuffer(e)||k.isStream(e)||k.isFile(e)||k.isBlob(e)||k.isReadableStream(e))return e;if(k.isArrayBufferView(e))return e.buffer;if(k.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=sn(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Zt(e,t).toString();if((a=k.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=sn(this,`env`),r=n&&n.FormData;return xt(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),on(e)):e}],transformResponse:[function(e){let t=sn(this,`transitional`)||cn.transitional,n=t&&t.forcedJSONParsing,r=sn(this,`responseType`),i=r===`json`;if(k.isResponse(e)||k.isReadableStream(e))return e;if(e&&k.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,sn(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?M.from(e,M.ERR_BAD_RESPONSE,this,null,sn(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:P.classes.FormData,Blob:P.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}},k.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{cn.headers[e]={}})}));function un(e,t){let n=this||cn,r=t||n,i=j.from(r.headers),a=r.data;return k.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}var dn=n((()=>{A(),ln(),ft()}));function fn(e){return!!(e&&e.__CANCEL__)}var pn=n((()=>{})),mn,hn=n((()=>{N(),mn=class extends M{constructor(e,t,n){super(e??`canceled`,M.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}}}));function gn(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new M(`Request failed with status code `+n.status,n.status>=400&&n.status<500?M.ERR_BAD_REQUEST:M.ERR_BAD_RESPONSE,n.config,n.request,n))}var _n=n((()=>{N()}));function vn(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}var yn=n((()=>{}));function bn(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}var xn=n((()=>{}));function Sn(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var Cn=n((()=>{})),wn,Tn,En,Dn=n((()=>{xn(),Cn(),A(),wn=(e,t,n=3)=>{let r=0,i=bn(50,250);return Sn(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Tn=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},En=e=>(...t)=>k.asap(()=>e(...t))})),On,kn=n((()=>{Xt(),On=P.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,P.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(P.origin),P.navigator&&/(msie|trident)/i.test(P.navigator.userAgent)):()=>!0})),An,jn=n((()=>{A(),Xt(),An=P.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];k.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),k.isString(r)&&s.push(`path=${r}`),k.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),k.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}}}));function Mn(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}var Nn=n((()=>{}));function Pn(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}var Fn=n((()=>{}));function In(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Ln(e){return In(e).replace(Vn,``)}function Rn(e,t){if(typeof e==`string`&&Bn.test(Ln(e)))throw new M(`Invalid URL: missing "//" after protocol`,M.ERR_INVALID_URL,t)}function zn(e,t,n,r){Rn(t,r);let i=!Mn(t);return e&&(i||n===!1)?(Rn(e,r),Pn(e,t)):t}var Bn,Vn,Hn=n((()=>{N(),Nn(),Fn(),Bn=/^https?:(?!\/\/)/i,Vn=/[\t\n\r]/g}));function Un(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return k.isPlainObject(e)&&k.isPlainObject(t)?k.merge.call({caseless:r},e,t):k.isPlainObject(t)?k.merge({},t):k.isArray(t)?t.slice():t}function i(e,t,n,i){if(!k.isUndefined(t))return r(e,t,n,i);if(!k.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!k.isUndefined(t))return r(void 0,t)}function o(e,t){if(!k.isUndefined(t))return r(void 0,t);if(!k.isUndefined(e))return r(void 0,e)}function s(n){let r=k.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!k.isUndefined(r))if(k.isPlainObject(r)){if(k.hasOwnProp(r,n))return r[n]}else return;let i=k.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(k.isPlainObject(i)&&k.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(k.hasOwnProp(t,a))return r(n,i);if(k.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(Wn(e),Wn(t),n,!0)};return k.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=k.hasOwnProp(l,r)?l[r]:i,o=a(k.hasOwnProp(e,r)?e[r]:void 0,k.hasOwnProp(t,r)?t[r]:void 0,r);k.isUndefined(o)&&a!==c||(n[r]=o)}),k.hasOwnProp(t,`validateStatus`)&&k.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(k.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var Wn,Gn=n((()=>{A(),ft(),Wn=e=>e instanceof j?{...e}:e}));function Kn(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{Jn.includes(t.toLowerCase())&&e.set(t,n)})}function qn(e){let t=Un({},e),n=e=>k.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=j.from(s),t.url=kt(zn(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=k.getSafeProp(c,`username`)||``,n=k.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?Yn(n):``)))}catch(t){throw M.from(t,M.ERR_BAD_OPTION_VALUE,e)}}if(k.isFormData(r)&&(P.hasStandardBrowserEnv||P.hasStandardBrowserWebWorkerEnv||k.isReactNative(r)?s.setContentType(void 0):k.isFunction(r.getHeaders)&&Kn(s,r.getHeaders(),n(`formDataHeaderPolicy`))),P.hasStandardBrowserEnv&&(k.isFunction(i)&&(i=i(t)),i===!0||i==null&&On(t.url))){let e=a&&o&&An.read(o);e&&s.set(a,e)}return t}var Jn,Yn,Xn=n((()=>{Xt(),A(),N(),kn(),jn(),Hn(),Gn(),ft(),At(),Jn=[`content-type`,`content-length`],Yn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))})),Zn,Qn,$n=n((()=>{A(),_n(),Pt(),N(),hn(),yn(),Xt(),ft(),Dn(),Xn(),rt(),Zn=typeof XMLHttpRequest<`u`,Qn=Zn&&function(e){return new Promise(function(t,n){let r=qn(e),i=r.data,a=j.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=j.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());gn(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new M(`Request aborted`,M.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new M(t&&t.message?t.message:`Network Error`,M.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||Nt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new M(t,i.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&k.forEach(Qe(a),function(e,t){h.setRequestHeader(t,e)}),k.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=wn(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=wn(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new mn(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=vn(r.url);if(_&&!P.protocols.includes(_)){n(new M(`Unsupported protocol `+_+`:`,M.ERR_BAD_REQUEST,e)),m();return}h.send(i||null)})}})),er,tr=n((()=>{hn(),N(),A(),er=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof M?t:new mn(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new M(`timeout of ${t}ms exceeded`,M.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i,{once:!0}));let{signal:s}=n;return s.unsubscribe=()=>k.asap(o),s}})),nr,rr,ir,ar,or=n((()=>{nr=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},rr=async function*(e,t){for await(let n of ir(e))yield*nr(n,t)},ir=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ar=(e,t,n,r)=>{let i=rr(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})}}));function sr(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);cr(t)&&cr(i)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n===37&&lr(r,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){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var cr,lr,ur=n((()=>{cr=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,lr=(e,t,n)=>t+2<n&&cr(e.charCodeAt(t+1))&&cr(e.charCodeAt(t+2))})),dr,fr=n((()=>{dr=`1.18.1`})),pr,mr,hr,gr,_r,vr,yr,br,xr,Sr=n((()=>{Xt(),A(),N(),tr(),or(),ft(),Dn(),Xn(),_n(),ur(),fr(),rt(),pr=64*1024,{isFunction:mr}=k,hr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),gr=e=>{if(!k.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},_r=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vr=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},yr=e=>{let t=k.global!==void 0&&k.global!==null?k.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=k.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?mr(i):typeof fetch==`function`,c=mr(a),l=mr(o);if(!s)return!1;let u=s&&mr(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&_r(()=>{let e=!1,t=new a(P.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&_r(()=>k.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new M(`Response type '${e}' is not supported`,M.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(k.isBlob(e))return e.size;if(k.isSpecCompliantForm(e))return(await new a(P.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(k.isArrayBufferView(e)||k.isArrayBuffer(e))return e.byteLength;if(k.isURLSearchParams(e)&&(e+=``),k.isString(e))return(await d(e)).byteLength},g=async(e,t)=>k.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:ee}=qn(e),T=k.isNumber(w)&&w>-1,E=k.isNumber(ee)&&ee>-1,te=t=>k.hasOwnProp(e,t)?e[t]:void 0,ne=i||fetch;b=b?(b+``).toLowerCase():`text`;let re=er([l,d&&d.toAbortSignal()],_),D=null,ie=re&&re.unsubscribe&&(()=>{re.unsubscribe()}),ae,oe=null,se=()=>new M(`Request body larger than maxBodyLength limit`,M.ERR_BAD_REQUEST,e,D);try{let i,l=te(`auth`);if(l&&(i={username:k.getSafeProp(l,`username`)||``,password:k.getSafeProp(l,`password`)||``}),vr(t)){let e=new URL(t,P.origin);!i&&(e.username||e.password)&&(i={username:gr(e.username),password:gr(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(hr((i.username||``)+`:`+(i.password||``))))),T&&typeof t==`string`&&t.startsWith(`data:`)&&sr(t)>w)throw new M(`maxContentLength size of `+w+` exceeded`,M.ERR_BAD_RESPONSE,e,D);if(E&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(ae=e,e>ee))throw se()}let d=E&&(k.isReadableStream(s)||k.isStream(s)),_=(e,t,n)=>ar(e,pr,e=>{if(E&&e>ee)throw oe=se();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(ae??=await g(x,s),ae!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(k.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&Tn(ae,wn(En(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new M(`Stream request bodies are not supported by the current fetch implementation`,M.ERR_NOT_SUPPORT,e,D);k.isString(S)||(S=S?`include`:`omit`);let ce=c&&`credentials`in a.prototype;if(k.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+dr,!1);let le={...C,signal:re,method:n.toUpperCase(),headers:Qe(x.normalize()),body:s,duplex:`half`,credentials:ce?S:void 0};D=c&&new a(t,le);let ue=await(c?ne(D,C):ne(t,le)),de=j.from(ue.headers);if(T){let t=k.toFiniteNumber(de.getContentLength());if(t!=null&&t>w)throw new M(`maxContentLength size of `+w+` exceeded`,M.ERR_BAD_RESPONSE,e,D)}let fe=p&&(b===`stream`||b===`response`);if(p&&ue.body&&(v||T||fe&&ie)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=ue[e]});let n=k.toFiniteNumber(de.getContentLength()),[r,i]=v&&Tn(n,wn(En(v),!0))||[],a=0;ue=new o(ar(ue.body,pr,t=>{if(T&&(a=t,a>w))throw new M(`maxContentLength size of `+w+` exceeded`,M.ERR_BAD_RESPONSE,e,D);r&&r(t)},()=>{i&&i(),ie&&ie()}),t)}b||=`text`;let O=await m[k.findKey(m,b)||`text`](ue,e);if(T&&!p&&!fe){let t;if(O!=null&&(typeof O.byteLength==`number`?t=O.byteLength:typeof O.size==`number`?t=O.size:typeof O==`string`&&(t=typeof r==`function`?new r().encode(O).byteLength:O.length)),typeof t==`number`&&t>w)throw new M(`maxContentLength size of `+w+` exceeded`,M.ERR_BAD_RESPONSE,e,D)}return!fe&&ie&&ie(),await new Promise((t,n)=>{gn(t,n,{data:O,headers:j.from(ue.headers),status:ue.status,statusText:ue.statusText,config:e,request:D})})}catch(t){if(ie&&ie(),re&&re.aborted&&re.reason instanceof M){let n=re.reason;throw n.config=e,D&&(n.request=D),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(oe)throw D&&!oe.request&&(oe.request=D),oe;if(t instanceof M)throw D&&!t.request&&(t.request=D),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new M(`Network Error`,M.ERR_NETWORK,e,D,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw M.from(t,t&&t.code,e,D,t&&t.response)}}},br=new Map,xr=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=br;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:yr(t)),l=c;return c},xr()}));function Cr(e,t){e=k.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Er(r)&&(i=wr[(n=String(r)).toLowerCase()],i===void 0))throw new M(`Unknown adapter '${n}'`);if(i&&(k.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new M(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
4
- `+e.map(Tr).join(`
5
- `):` `+Tr(e[0]):`as no adapter specified`),M.ERR_NOT_SUPPORT)}return i}var wr,Tr,Er,Dr,Or=n((()=>{A(),gt(),$n(),Sr(),N(),wr={http:null,xhr:Qn,fetch:{get:xr}},k.forEach(wr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}}),Tr=e=>`- ${e}`,Er=e=>k.isFunction(e)||e===null||e===!1,Dr={getAdapter:Cr,adapters:wr}}));function kr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new mn(null,e)}function Ar(e){return kr(e),e.headers=j.from(e.headers),e.data=un.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Dr.getAdapter(e.adapter||cn.adapter,e)(e).then(function(t){kr(e),e.response=t;try{t.data=un.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=j.from(t.headers),t},function(t){if(!fn(t)&&(kr(e),t&&t.response)){e.response=t.response;try{t.response.data=un.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=j.from(t.response.headers)}return Promise.reject(t)})}var jr=n((()=>{dn(),pn(),ln(),hn(),ft(),Or()}));function Mr(e,t,n){if(typeof e!=`object`||!e)throw new M(`options must be an object`,M.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new M(`option `+a+` must be `+n,M.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new M(`Unknown option `+a,M.ERR_BAD_OPTION)}}var Nr,Pr,Fr,Ir=n((()=>{fr(),N(),Nr={},[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Nr[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}}),Pr={},Nr.transitional=function(e,t,n){function r(e,t){return`[Axios v`+dr+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new M(r(i,` has been removed`+(t?` in `+t:``)),M.ERR_DEPRECATED);return t&&!Pr[i]&&(Pr[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},Nr.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},Fr={assertOptions:Mr,validators:Nr}})),F,Lr,Rr=n((()=>{A(),At(),Mt(),jr(),Gn(),Hn(),Ir(),ft(),Pt(),F=Fr.validators,Lr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new jt,response:new jt}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t(require("@inertiajs/vue3"),require("vue")):typeof define==`function`&&define.amd?define([`@inertiajs/vue3`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,e.DatatableCard=t(e.InertiaVue3,e.Vue))})(this,function(e,t){var n=Object.defineProperty,r=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r};function i(e,t){return function(){return e.apply(t,arguments)}}var{toString:a}=Object.prototype,{getPrototypeOf:o}=Object,{iterator:s,toStringTag:c}=Symbol,l=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),u=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),l(n,t))return!0;n=o(n)}return!1},d=(e,t)=>e!=null&&u(e,t)?e[t]:void 0,f=(e=>t=>{let n=a.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),p=e=>(e=e.toLowerCase(),t=>f(t)===e),m=e=>t=>typeof t===e,{isArray:h}=Array,g=m(`undefined`);function _(e){return e!==null&&!g(e)&&e.constructor!==null&&!g(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var v=p(`ArrayBuffer`);function ee(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&v(e.buffer),t}var y=m(`string`),b=m(`function`),x=m(`number`),S=e=>typeof e==`object`&&!!e,C=e=>e===!0||e===!1,w=e=>{if(!S(e))return!1;let t=o(e);return(t===null||t===Object.prototype||o(t)===null)&&!u(e,c)&&!u(e,s)},T=e=>{if(!S(e)||_(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},E=p(`Date`),te=p(`File`),ne=e=>!!(e&&e.uri!==void 0),D=e=>e&&e.getParts!==void 0,O=p(`Blob`),k=p(`FileList`),A=e=>S(e)&&b(e.pipe);function j(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var M=j(),re=M.FormData===void 0?void 0:M.FormData,ie=e=>{if(!e)return!1;if(re&&e instanceof re)return!0;let t=o(e);if(!t||t===Object.prototype||!b(e.append))return!1;let n=f(e);return n===`formdata`||n===`object`&&b(e.toString)&&e.toString()===`[object FormData]`},N=p(`URLSearchParams`),[ae,P,F,oe]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(p),se=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function I(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),h(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(_(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function ce(e,t){if(_(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var L=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,le=e=>!g(e)&&e!==L;function ue(...e){let{caseless:t,skipUndefined:n}=le(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&ce(r,i)||i,o=l(r,a)?r[a]:void 0;w(o)&&w(e)?r[a]=ue(o,e):w(e)?r[a]=ue({},e):h(e)?r[a]=e.slice():(!n||!g(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||_(n)||(I(n,i),typeof n!=`object`||h(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];Se.call(n,t)&&i(n[t],t)}}return r}var de=(e,t,n,{allOwnKeys:r}={})=>(I(t,(t,r)=>{n&&b(t)?Object.defineProperty(e,r,{__proto__:null,value:i(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),fe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pe=(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)},me=(e,t,n,r)=>{let i,a,s,c={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)s=i[a],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},he=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},ge=e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!x(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},_e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&o(Uint8Array)),ve=(e,t)=>{let n=(e&&e[s]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},ye=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},be=p(`HTMLFormElement`),xe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:Se}=Object.prototype,Ce=p(`RegExp`),we=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};I(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Te=e=>{we(e,(t,n)=>{if(b(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(b(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Ee=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return h(e)?r(e):r(String(e).split(t)),n},De=()=>{},Oe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ke(e){return!!(e&&b(e.append)&&e[c]===`FormData`&&e[s])}var Ae=e=>{let t=new WeakSet,n=e=>{if(S(e)){if(t.has(e))return;if(_(e))return e;if(!(`toJSON`in e)){t.add(e);let r=h(e)?[]:{};return I(e,(e,t)=>{let i=n(e);!g(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},je=p(`AsyncFunction`),Me=e=>e&&(S(e)||b(e))&&b(e.then)&&b(e.catch),Ne=((e,t)=>e?setImmediate:t?((e,t)=>(L.addEventListener(`message`,({source:n,data:r})=>{n===L&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),L.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,b(L.postMessage)),Pe=typeof queueMicrotask<`u`?queueMicrotask.bind(L):typeof process<`u`&&process.nextTick||Ne,Fe=e=>e!=null&&b(e[s]),R={isArray:h,isArrayBuffer:v,isBuffer:_,isFormData:ie,isArrayBufferView:ee,isString:y,isNumber:x,isBoolean:C,isObject:S,isPlainObject:w,isEmptyObject:T,isReadableStream:ae,isRequest:P,isResponse:F,isHeaders:oe,isUndefined:g,isDate:E,isFile:te,isReactNativeBlob:ne,isReactNative:D,isBlob:O,isRegExp:Ce,isFunction:b,isStream:A,isURLSearchParams:N,isTypedArray:_e,isFileList:k,forEach:I,merge:ue,extend:de,trim:se,stripBOM:fe,inherits:pe,toFlatObject:me,kindOf:f,kindOfTest:p,endsWith:he,toArray:ge,forEachEntry:ve,matchAll:ye,isHTMLForm:be,hasOwnProperty:l,hasOwnProp:l,hasOwnInPrototypeChain:u,getSafeProp:d,reduceDescriptors:we,freezeMethods:Te,toObjectSet:Ee,toCamelCase:xe,noop:De,toFiniteNumber:Oe,findKey:ce,global:L,isContextDefined:le,isSpecCompliantForm:ke,toJSONObject:Ae,isAsyncFn:je,isThenable:Me,setImmediate:Ne,asap:Pe,isIterable:Fe,isSafeIterable:e=>e!=null&&u(e,s)&&Fe(e)},Ie=R.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`]),Le=e=>{let t={},n,r,i;return e&&e.split(`
2
+ `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Ie[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function Re(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var ze=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Be=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Ve(e,t){return R.isArray(e)?e.map(e=>Ve(e,t)):Re(String(e).replace(t,``))}var He=e=>Ve(e,ze),Ue=e=>Ve(e,Be);function We(e){let t=Object.create(null);return R.forEach(e.toJSON(),(e,n)=>{t[n]=Ue(e)}),t}var Ge=Symbol(`internals`);function z(e){return e&&String(e).trim().toLowerCase()}function B(e){return e===!1||e==null?e:R.isArray(e)?e.map(B):He(String(e))}function Ke(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var qe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Je(e,t,n,r,i){if(R.isFunction(r))return r.call(this,t,n);if(i&&(t=n),R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function Ye(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Xe(e,t){let n=R.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var V=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=z(t);if(!i)return;let a=R.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=B(e))}let a=(e,t)=>R.forEach(e,(e,n)=>i(e,n,t));if(R.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(R.isString(e)&&(e=e.trim())&&!qe(e))a(Le(e),t);else if(R.isObject(e)&&R.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!R.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],R.hasOwnProp(n,i)?(r=n[i],n[i]=R.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=z(e),e){let n=R.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Ke(e);if(R.isFunction(t))return t.call(this,e,n);if(R.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=z(e),e){let n=R.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Je(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=z(e),e){let i=R.findKey(n,e);i&&(!t||Je(n,n[i],i,t))&&(delete n[i],r=!0)}}return R.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||Je(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return R.forEach(this,(r,i)=>{let a=R.findKey(n,i);if(a){t[a]=B(r),delete t[i];return}let o=e?Ye(i):String(i).trim();o!==i&&delete t[i],t[o]=B(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return R.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&R.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(`
3
+ `)}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,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Ge]=this[Ge]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=z(e);t[r]||(Xe(n,e),t[r]=!0)}return R.isArray(e)?e.forEach(r):r(e),this}};V.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),R.reduceDescriptors(V.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),R.freezeMethods(V);var Ze=`[REDACTED ****]`;function Qe(e){if(R.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(R.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function $e(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||R.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof V&&(e=e.toJSON()),r.push(e);let t;if(R.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);R.isUndefined(r)||(t[n]=r)});else{if(!R.isPlainObject(e)&&Qe(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?Ze:i(a);R.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var H=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){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),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&R.hasOwnProp(e,`redact`)?e.redact:void 0,n=R.isArray(t)&&t.length>0?$e(e,t):R.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}}};H.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,H.ERR_BAD_OPTION=`ERR_BAD_OPTION`,H.ECONNABORTED=`ECONNABORTED`,H.ETIMEDOUT=`ETIMEDOUT`,H.ECONNREFUSED=`ECONNREFUSED`,H.ERR_NETWORK=`ERR_NETWORK`,H.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,H.ERR_DEPRECATED=`ERR_DEPRECATED`,H.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,H.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,H.ERR_CANCELED=`ERR_CANCELED`,H.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,H.ERR_INVALID_URL=`ERR_INVALID_URL`,H.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function et(e){return R.isPlainObject(e)||R.isArray(e)}function tt(e){return R.endsWith(e,`[]`)?e.slice(0,-2):e}function nt(e,t,n){return e?e.concat(t).map(function(e,t){return e=tt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function rt(e){return R.isArray(e)&&!e.some(et)}var it=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});function U(e,t,n){if(!R.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!R.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&R.isSpecCompliantForm(t),u=[];if(!R.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(R.isDate(e))return e.toISOString();if(R.isBoolean(e))return e.toString();if(!l&&R.isBlob(e))throw new H(`Blob is not supported. Use a Buffer instead.`);if(R.isArrayBuffer(e)||R.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);if(typeof Buffer<`u`)return Buffer.from(e);throw new H(`Blob is not supported. Use a Buffer instead.`,H.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new H(`Object is too deeply nested (`+e+` levels). Max depth: `+c,H.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!R.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(R.isReactNative(t)&&R.isReactNativeBlob(e))return t.append(nt(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(R.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(R.isArray(e)&&rt(e)||(R.isFileList(e)||R.endsWith(n,`[]`))&&(s=R.toArray(e)))return n=tt(n),s.forEach(function(e,r){!(R.isUndefined(e)||e===null)&&t.append(o===!0?nt([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return et(e)?!0:(t.append(nt(i,n,a),d(e)),!1)}let h=Object.assign(it,{defaultVisitor:m,convertValue:d,isVisitable:et});function g(e,n,r=0){if(!R.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),R.forEach(e,function(e,a){(!(R.isUndefined(e)||e===null)&&i.call(t,e,R.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!R.isObject(e))throw TypeError(`data must be an object`);return g(e),t}function at(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function ot(e,t){this._pairs=[],e&&U(e,this,t)}var st=ot.prototype;st.append=function(e,t){this._pairs.push([e,t])},st.toString=function(e){let t=e?t=>e.call(this,t,at):at;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function ct(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function lt(e,t,n){if(!t)return e;e||=``;let r=R.isFunction(n)?{serialize:n}:n,i=R.getSafeProp(r,`encode`)||ct,a=R.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):R.isURLSearchParams(t)?t.toString():new ot(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var ut=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){R.forEach(this.handlers,function(t){t!==null&&e(t)})}},dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},ft={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:ot,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},pt=r({hasBrowserEnv:()=>mt,hasStandardBrowserEnv:()=>gt,hasStandardBrowserWebWorkerEnv:()=>_t,navigator:()=>ht,origin:()=>vt}),mt=typeof window<`u`&&typeof document<`u`,ht=typeof navigator==`object`&&navigator||void 0,gt=mt&&(!ht||[`ReactNative`,`NativeScript`,`NS`].indexOf(ht.product)<0),_t=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,vt=mt&&window.location.href||`http://localhost`,W={...pt,...ft};function yt(e,t){return U(e,new W.classes.URLSearchParams,{visitor:function(e,t,n,r){return W.isNode&&R.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var bt=100;function xt(e){if(e>bt)throw new H(`FormData field is too deeply nested (`+e+` levels). Max depth: `+bt,H.ERR_FORM_DATA_DEPTH_EXCEEDED)}function St(e){let t=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(e))!==null;)xt(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Ct(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function wt(e){function t(e,n,r,i){xt(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&R.isArray(r)?r.length:a,s?(R.hasOwnProp(r,a)?r[a]=R.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!R.hasOwnProp(r,a)||!R.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&R.isArray(r[a])&&(r[a]=Ct(r[a])),!o)}if(R.isFormData(e)&&R.isFunction(e.entries)){let n={};return R.forEachEntry(e,(e,r)=>{t(St(e),r,n,0)}),n}return null}var G=(e,t)=>e!=null&&R.hasOwnProp(e,t)?e[t]:void 0;function Tt(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var K={transitional:dt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return r?JSON.stringify(wt(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e)||R.isReadableStream(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=G(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return yt(e,t).toString();if((a=R.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=G(this,`env`),r=n&&n.FormData;return U(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Tt(e)):e}],transformResponse:[function(e){let t=G(this,`transitional`)||K.transitional,n=t&&t.forcedJSONParsing,r=G(this,`responseType`),i=r===`json`;if(R.isResponse(e)||R.isReadableStream(e))return e;if(e&&R.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,G(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?H.from(e,H.ERR_BAD_RESPONSE,this,null,G(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{K.headers[e]={}});function Et(e,t){let n=this||K,r=t||n,i=V.from(r.headers),a=r.data;return R.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Dt(e){return!!(e&&e.__CANCEL__)}var q=class extends H{constructor(e,t,n){super(e??`canceled`,H.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Ot(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new H(`Request failed with status code `+n.status,n.status>=400&&n.status<500?H.ERR_BAD_REQUEST:H.ERR_BAD_RESPONSE,n.config,n.request,n))}function kt(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function At(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function jt(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var J=(e,t,n=3)=>{let r=0,i=At(50,250);return jt(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Mt=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Nt=e=>(...t)=>R.asap(()=>e(...t)),Pt=W.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,W.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(W.origin),W.navigator&&/(msie|trident)/i.test(W.navigator.userAgent)):()=>!0,Ft=W.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];R.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),R.isString(r)&&s.push(`path=${r}`),R.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),R.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function It(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Lt(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}var Rt=/^https?:(?!\/\/)/i,zt=/[\t\n\r]/g;function Bt(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Vt(e){return Bt(e).replace(zt,``)}function Ht(e,t){if(typeof e==`string`&&Rt.test(Vt(e)))throw new H(`Invalid URL: missing "//" after protocol`,H.ERR_INVALID_URL,t)}function Ut(e,t,n,r){Ht(t,r);let i=!It(t);return e&&(i||n===!1)?(Ht(e,r),Lt(e,t)):t}var Wt=e=>e instanceof V?{...e}:e;function Y(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return R.isPlainObject(e)&&R.isPlainObject(t)?R.merge.call({caseless:r},e,t):R.isPlainObject(t)?R.merge({},t):R.isArray(t)?t.slice():t}function i(e,t,n,i){if(!R.isUndefined(t))return r(e,t,n,i);if(!R.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!R.isUndefined(t))return r(void 0,t)}function o(e,t){if(!R.isUndefined(t))return r(void 0,t);if(!R.isUndefined(e))return r(void 0,e)}function s(n){let r=R.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!R.isUndefined(r))if(R.isPlainObject(r)){if(R.hasOwnProp(r,n))return r[n]}else return;let i=R.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(R.isPlainObject(i)&&R.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(R.hasOwnProp(t,a))return r(n,i);if(R.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(Wt(e),Wt(t),n,!0)};return R.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=R.hasOwnProp(l,r)?l[r]:i,o=a(R.hasOwnProp(e,r)?e[r]:void 0,R.hasOwnProp(t,r)?t[r]:void 0,r);R.isUndefined(o)&&a!==c||(n[r]=o)}),R.hasOwnProp(t,`validateStatus`)&&R.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(R.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var Gt=[`content-type`,`content-length`];function Kt(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{Gt.includes(t.toLowerCase())&&e.set(t,n)})}var qt=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function Jt(e){let t=Y({},e),n=e=>R.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=V.from(s),t.url=lt(Ut(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=R.getSafeProp(c,`username`)||``,n=R.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?qt(n):``)))}catch(t){throw H.from(t,H.ERR_BAD_OPTION_VALUE,e)}}if(R.isFormData(r)&&(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv||R.isReactNative(r)?s.setContentType(void 0):R.isFunction(r.getHeaders)&&Kt(s,r.getHeaders(),n(`formDataHeaderPolicy`))),W.hasStandardBrowserEnv&&(R.isFunction(i)&&(i=i(t)),i===!0||i==null&&Pt(t.url))){let e=a&&o&&Ft.read(o);e&&s.set(a,e)}return t}var Yt=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Jt(e),i=r.data,a=V.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=V.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Ot(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new H(`Request aborted`,H.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new H(t&&t.message?t.message:`Network Error`,H.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||dt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new H(t,i.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&R.forEach(We(a),function(e,t){h.setRequestHeader(t,e)}),R.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=J(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=J(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new q(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=kt(r.url);if(_&&!W.protocols.includes(_)){n(new H(`Unsupported protocol `+_+`:`,H.ERR_BAD_REQUEST,e)),m();return}h.send(i||null)})},Xt=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof H?t:new q(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new H(`timeout of ${t}ms exceeded`,H.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i,{once:!0}));let{signal:s}=n;return s.unsubscribe=()=>R.asap(o),s},Zt=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Qt=async function*(e,t){for await(let n of $t(e))yield*Zt(n,t)},$t=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},en=(e,t,n,r)=>{let i=Qt(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},X=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,tn=(e,t,n)=>t+2<n&&X(e.charCodeAt(t+1))&&X(e.charCodeAt(t+2));function nn(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);X(t)&&X(i)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n===37&&tn(r,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){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var rn=`1.18.1`,an=64*1024,{isFunction:on}=R,sn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),cn=e=>{if(!R.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},ln=(e,...t)=>{try{return!!e(...t)}catch{return!1}},un=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},dn=e=>{let t=R.global!==void 0&&R.global!==null?R.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=R.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?on(i):typeof fetch==`function`,c=on(a),l=on(o);if(!s)return!1;let u=s&&on(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&ln(()=>{let e=!1,t=new a(W.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&ln(()=>R.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new H(`Response type '${e}' is not supported`,H.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new a(W.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e+=``),R.isString(e))return(await d(e)).byteLength},g=async(e,t)=>R.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:ee,responseType:y,headers:b,withCredentials:x=`same-origin`,fetchOptions:S,maxContentLength:C,maxBodyLength:w}=Jt(e),T=R.isNumber(C)&&C>-1,E=R.isNumber(w)&&w>-1,te=t=>R.hasOwnProp(e,t)?e[t]:void 0,ne=i||fetch;y=y?(y+``).toLowerCase():`text`;let D=Xt([l,d&&d.toAbortSignal()],_),O=null,k=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),A,j=null,M=()=>new H(`Request body larger than maxBodyLength limit`,H.ERR_BAD_REQUEST,e,O);try{let i,l=te(`auth`);if(l&&(i={username:R.getSafeProp(l,`username`)||``,password:R.getSafeProp(l,`password`)||``}),un(t)){let e=new URL(t,W.origin);!i&&(e.username||e.password)&&(i={username:cn(e.username),password:cn(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(b.delete(`authorization`),b.set(`Authorization`,`Basic `+btoa(sn((i.username||``)+`:`+(i.password||``))))),T&&typeof t==`string`&&t.startsWith(`data:`)&&nn(t)>C)throw new H(`maxContentLength size of `+C+` exceeded`,H.ERR_BAD_RESPONSE,e,O);if(E&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(A=e,e>w))throw M()}let d=E&&(R.isReadableStream(s)||R.isStream(s)),_=(e,t,n)=>en(e,an,e=>{if(E&&e>w)throw j=M();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(ee||d)){if(A??=await g(b,s),A!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(R.isFormData(s)&&(n=e.headers.get(`content-type`))&&b.setContentType(n),e.body){let[t,n]=ee&&Mt(A,J(Nt(ee)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new H(`Stream request bodies are not supported by the current fetch implementation`,H.ERR_NOT_SUPPORT,e,O);R.isString(x)||(x=x?`include`:`omit`);let re=c&&`credentials`in a.prototype;if(R.isFormData(s)){let e=b.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&b.delete(`content-type`)}b.set(`User-Agent`,`axios/`+rn,!1);let ie={...S,signal:D,method:n.toUpperCase(),headers:We(b.normalize()),body:s,duplex:`half`,credentials:re?x:void 0};O=c&&new a(t,ie);let N=await(c?ne(O,S):ne(t,ie)),ae=V.from(N.headers);if(T){let t=R.toFiniteNumber(ae.getContentLength());if(t!=null&&t>C)throw new H(`maxContentLength size of `+C+` exceeded`,H.ERR_BAD_RESPONSE,e,O)}let P=p&&(y===`stream`||y===`response`);if(p&&N.body&&(v||T||P&&k)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=N[e]});let n=R.toFiniteNumber(ae.getContentLength()),[r,i]=v&&Mt(n,J(Nt(v),!0))||[],a=0;N=new o(en(N.body,an,t=>{if(T&&(a=t,a>C))throw new H(`maxContentLength size of `+C+` exceeded`,H.ERR_BAD_RESPONSE,e,O);r&&r(t)},()=>{i&&i(),k&&k()}),t)}y||=`text`;let F=await m[R.findKey(m,y)||`text`](N,e);if(T&&!p&&!P){let t;if(F!=null&&(typeof F.byteLength==`number`?t=F.byteLength:typeof F.size==`number`?t=F.size:typeof F==`string`&&(t=typeof r==`function`?new r().encode(F).byteLength:F.length)),typeof t==`number`&&t>C)throw new H(`maxContentLength size of `+C+` exceeded`,H.ERR_BAD_RESPONSE,e,O)}return!P&&k&&k(),await new Promise((t,n)=>{Ot(t,n,{data:F,headers:V.from(N.headers),status:N.status,statusText:N.statusText,config:e,request:O})})}catch(t){if(k&&k(),D&&D.aborted&&D.reason instanceof H){let n=D.reason;throw n.config=e,O&&(n.request=O),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(j)throw O&&!j.request&&(j.request=O),j;if(t instanceof H)throw O&&!t.request&&(t.request=O),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new H(`Network Error`,H.ERR_NETWORK,e,O,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw H.from(t,t&&t.code,e,O,t&&t.response)}}},fn=new Map,pn=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=fn;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:dn(t)),l=c;return c};pn();var mn={http:null,xhr:Yt,fetch:{get:pn}};R.forEach(mn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var hn=e=>`- ${e}`,gn=e=>R.isFunction(e)||e===null||e===!1;function _n(e,t){e=R.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!gn(r)&&(i=mn[(n=String(r)).toLowerCase()],i===void 0))throw new H(`Unknown adapter '${n}'`);if(i&&(R.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new H(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
4
+ `+e.map(hn).join(`
5
+ `):` `+hn(e[0]):`as no adapter specified`),H.ERR_NOT_SUPPORT)}return i}var vn={getAdapter:_n,adapters:mn};function yn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function bn(e){return yn(e),e.headers=V.from(e.headers),e.data=Et.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),vn.getAdapter(e.adapter||K.adapter,e)(e).then(function(t){yn(e),e.response=t;try{t.data=Et.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=V.from(t.headers),t},function(t){if(!Dt(t)&&(yn(e),t&&t.response)){e.response=t.response;try{t.response.data=Et.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=V.from(t.response.headers)}return Promise.reject(t)})}var xn={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{xn[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Sn={};xn.transitional=function(e,t,n){function r(e,t){return`[Axios v`+rn+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new H(r(i,` has been removed`+(t?` in `+t:``)),H.ERR_DEPRECATED);return t&&!Sn[i]&&(Sn[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},xn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Cn(e,t,n){if(typeof e!=`object`||!e)throw new H(`options must be an object`,H.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new H(`option `+a+` must be `+n,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H(`Unknown option `+a,H.ERR_BAD_OPTION)}}var wn={assertOptions:Cn,validators:xn},Z=wn.validators,Q=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ut,response:new ut}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
6
6
  `);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
7
7
  `),r=t===-1?-1:n.indexOf(`
8
8
  `,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
9
- `+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=Un(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Fr.assertOptions(n,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean),legacyInterceptorReqResOrdering:F.transitional(F.boolean),advertiseZstdAcceptEncoding:F.transitional(F.boolean),validateStatusUndefinedResolves:F.transitional(F.boolean)},!1),r!=null&&(k.isFunction(r)?t.paramsSerializer={serialize:r}:Fr.assertOptions(r,{encode:F.function,serialize:F.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Fr.assertOptions(t,{baseUrl:F.spelling(`baseURL`),withXsrfToken:F.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&k.merge(i.common,i[t.method]);i&&k.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=j.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Nt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Ar.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Ar.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=Un(this.defaults,e),kt(zn(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}},k.forEach([`delete`,`get`,`head`,`options`],function(e){Lr.prototype[e]=function(t,n){return this.request(Un(n||{},{method:e,url:t,data:n&&k.hasOwnProp(n,`data`)?n.data:void 0}))}}),k.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(Un(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Lr.prototype[e]=t(),e!==`query`&&(Lr.prototype[e+`Form`]=t(!0))})})),zr,Br=n((()=>{hn(),zr=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let 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,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new mn(e,r,i),t(n.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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}}}));function Vr(e){return function(t){return e.apply(null,t)}}var Hr=n((()=>{}));function Ur(e){return k.isObject(e)&&e.isAxiosError===!0}var Wr=n((()=>{A()})),Gr,Kr=n((()=>{Gr={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526},Object.entries(Gr).forEach(([e,t])=>{Gr[t]=e})}));function qr(e){let t=new Lr(e),n=i(Lr.prototype.request,t);return k.extend(n,Lr.prototype,t,{allOwnKeys:!0}),k.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return qr(Un(e,t))},n}var I,Jr=n((()=>{A(),a(),Rr(),Gn(),ln(),an(),hn(),Br(),pn(),fr(),Ct(),N(),Hr(),Wr(),ft(),Or(),Kr(),I=qr(cn),I.Axios=Lr,I.CanceledError=mn,I.CancelToken=zr,I.isCancel=fn,I.VERSION=dr,I.toFormData=xt,I.AxiosError=M,I.Cancel=I.CanceledError,I.all=function(e){return Promise.all(e)},I.spread=Vr,I.isAxiosError=Ur,I.mergeConfig=Un,I.AxiosHeaders=j,I.formToJSON=e=>nn(k.isHTMLForm(e)?new FormData(e):e),I.getAdapter=Dr.getAdapter,I.HttpStatusCode=Gr,I.default=I})),Yr=n((()=>{Jr()})),Xr=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Zr(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Qr(){}function $r(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function ei(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ti(e){if($r(e))return e;if(Array.isArray(e)||ei(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function ni(e){return Xr.Buffer!==void 0&&Xr.Buffer.isBuffer(e)}function ri(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function ii(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var ai=`[object RegExp]`,oi=`[object String]`,si=`[object Number]`,ci=`[object Boolean]`,li=`[object Arguments]`,ui=`[object Symbol]`,di=`[object Date]`,fi=`[object Map]`,pi=`[object Set]`,mi=`[object Array]`,hi=`[object Function]`,gi=`[object ArrayBuffer]`,_i=`[object Object]`,vi=`[object Error]`,yi=`[object DataView]`,bi=`[object Uint8Array]`,xi=`[object Uint8ClampedArray]`,Si=`[object Uint16Array]`,Ci=`[object Uint32Array]`,wi=`[object BigUint64Array]`,Ti=`[object Int8Array]`,Ei=`[object Int16Array]`,Di=`[object Int32Array]`,Oi=`[object BigInt64Array]`,ki=`[object Float32Array]`,Ai=`[object Float64Array]`;function ji(e,t){return Mi(e,void 0,e,new Map,t)}function Mi(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if($r(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Mi(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Mi(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Mi(a,void 0,n,r,i));return t}if(ni(e))return e.subarray();if(ei(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Mi(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Ni(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Ni(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Ni(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Ni(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Ni(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Ni(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Ni(t,e,n,r,i),t}if(typeof e==`object`&&Pi(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Ni(t,e,n,r,i),t}return e}function Ni(e,t,n=e,r,i){let a=[...Object.keys(t),...ri(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Mi(t[s],s,n,r,i))}}function Pi(e){switch(ii(e)){case li:case mi:case gi:case yi:case ci:case di:case ki:case Ai:case Ti:case Ei:case Di:case fi:case si:case _i:case ai:case pi:case oi:case ui:case bi:case xi:case Si:case Ci:return!0;default:return!1}}function L(e){return Mi(e,void 0,e,new Map,void 0)}function Fi(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function Ii(e){return e===`__proto__`}function Li(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ri(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function zi(e,t,n){return Bi(e,t,void 0,void 0,void 0,void 0,n)}function Bi(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return Vi(e,t,a,o)}return Vi(e,t,a,o)}function Vi(e,t,n,r){if(Object.is(e,t))return!0;let i=ii(e),a=ii(t);if(i===`[object Arguments]`&&(i=_i),a===`[object Arguments]`&&(a=_i),i!==a)return!1;switch(i){case oi:return e.toString()===t.toString();case si:return Ri(e.valueOf(),t.valueOf());case ci:case di:case ui:return Object.is(e.valueOf(),t.valueOf());case ai:return e.source===t.source&&e.flags===t.flags;case hi:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case fi:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!Bi(a,t.get(i),i,e,t,n,r))return!1;return!0;case pi:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>Bi(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case mi:case bi:case xi:case Si:case Ci:case wi:case Ti:case Ei:case Di:case Oi:case ki:case Ai:if(ni(e)!==ni(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Bi(e[i],t[i],i,e,t,n,r))return!1;return!0;case gi:return e.byteLength===t.byteLength&&Vi(new Uint8Array(e),new Uint8Array(t),n,r);case yi:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Vi(new Uint8Array(e),new Uint8Array(t),n,r);case vi:return e.name===t.name&&e.message===t.message;case _i:{if(!(Vi(e.constructor,t.constructor,n,r)||Fi(e)&&Fi(t)))return!1;let i=[...Object.keys(e),...ri(e)],a=[...Object.keys(t),...ri(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!Bi(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Hi(e,t){return zi(e,t,Qr)}function Ui(e){return Number.isSafeInteger(e)&&e>=0}var Wi={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Gi(e){return e.replace(/[&<>"']/g,e=>Wi[e])}function Ki(e){return e!=null&&typeof e!=`function`&&Ui(e.length)}function qi(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(qi).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Ji(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Yi(e){if(Array.isArray(e))return e.map(Ji);if(typeof e==`symbol`)return[e];e=qi(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function Xi(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function R(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(Ii(t))return n;let r=e[t];return r===void 0?Xi(t)&&!Object.hasOwn(e,t)?R(e,Yi(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Ji(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Zi(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),Ii(t))return n;let r=e[t];return r===void 0?n:r}}}function Zi(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||Ii(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function Qi(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function $i(e,t){return ji(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(ii(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Ni(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case si:case oi:case ci:{let t=new e.constructor(e?.valueOf());return Ni(t,e),t}case li:{let t={};return Ni(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ea(e){return $i(e)}function ta(e){return typeof e==`object`&&!!e&&ii(e)===`[object Arguments]`}var na=/^(?:0|[1-9]\d*)$/;function ra(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return na.test(e)}}function ia(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Xi(t)&&e?.[t]==null?Yi(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||ta(r))&&ra(t)&&t<r.length))return!1;r=r[t]}return!0}function aa(e){return typeof e==`object`&&!!e}function oa(e){return aa(e)&&Ki(e)}function sa(e){return typeof e==`symbol`||e instanceof Symbol}var ca=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,la=/^\w*$/;function ua(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||sa(e)?!0:typeof e==`string`&&(la.test(e)||!ca.test(e))||t!=null&&Object.hasOwn(t,e)}var da=(e,t,n)=>{let r=e[t];(!(Object.hasOwn(e,t)&&Ri(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function fa(e,t,n,r){if(e==null&&!Qi(e))return e;let i;i=ua(t,e)?[t]:Array.isArray(t)?t:Yi(t);let a=n(R(e,i)),o=e;for(let t=0;t<i.length&&o!=null;t++){let n=Ji(i[t]);if(Ii(n))continue;let s;if(t===i.length-1)s=a;else{let a=o[n],c=r?.(a,n,e);s=c===void 0?Qi(a)?a:ra(i[t+1])?[]:{}:c}da(o,n,s),o=o[n]}return e}function z(e,t,n){return fa(e,t,()=>n,()=>void 0)}function pa(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Zr(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function ma(e){return ei(e)}function ha(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=ga(i,t,r,new Map)}return i}function ga(e,t,n,r){if($r(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return ti(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...ri(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Ii(o))continue;let s=t[o],c=e[o];if(ta(s)&&(s={...s}),ta(c)&&(c={...c}),ni(s)&&(s=ea(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(oa(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||aa(c)&&aa(s)&&(Li(c)||Li(s)||ma(c)||ma(s))?e[o]=ga(c,s,n,r):c==null&&Li(s)?e[o]=ga({},s,n,r):c==null&&ma(s)?e[o]=ea(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function _a(e,...t){return ha(e,...t,Qr)}function va(e){return Gi(qi(e))}Yr();var ya=e=>typeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0,ba=e=>e instanceof FormData||ya(e)||typeof e==`object`&&!!e&&Object.values(e).some(e=>ba(e)),xa=class extends Error{response;constructor(e){super(`HTTP error ${e.status}`),this.name=`HttpResponseError`,this.response=e}},Sa=class extends Error{constructor(e=`Request was cancelled`){super(e),this.name=`HttpCancelledError`}},Ca=class extends Error{constructor(e=`Network error`){super(e),this.name=`HttpNetworkError`}};function wa(e){let t=new URLSearchParams;return Object.entries(e).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(n=>t.append(`${e}[]`,String(n))):typeof n==`object`?t.append(e,JSON.stringify(n)):t.append(e,String(n)))}),t.toString()}function Ta(e,t,n){if(t&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=t.replace(/\/$/,``)+`/`+e.replace(/^\//,``)),n&&Object.keys(n).length>0){let t=wa(n);t&&(e+=(e.includes(`?`)?`&`:`?`)+t)}return e}function Ea(){return typeof window>`u`?null:window.axios?.defaults?.headers?.common?.[`X-Requested-With`]??null}function Da(e,t=new FormData,n=null){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&Oa(t,n?`${n}[${r}]`:r,e[r]);return t}function Oa(e,t,n){if(Array.isArray(n))return n.forEach((n,r)=>Oa(e,`${t}[${r}]`,n));if(n instanceof Date)return e.append(t,n.toISOString());if(typeof File<`u`&&n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);Da(n,e,t)}function ka(e,t){if(e!=null)return e instanceof FormData?e:typeof e==`object`&&ba(e)?Da(e):typeof e==`object`||t[`Content-Type`]?.includes(`application/json`)?JSON.stringify(e):String(e)}function Aa(e){let t={};return e.forEach((e,n)=>{t[n.toLowerCase()]=e}),t}function ja(e={}){let t=e.xsrfCookieName??`XSRF-TOKEN`,n=e.xsrfHeaderName??`X-XSRF-TOKEN`;function r(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(^|;\\s*)`+t+`=([^;]*)`));return e?decodeURIComponent(e[2]):null}return{setXsrfCookieName(e){t=e},setXsrfHeaderName(e){n=e},async request(e){let t=Ta(e.url,e.baseURL,e.params),i=e.method.toUpperCase(),a={},o=Ea();o&&(a[`X-Requested-With`]=o),e.data!==void 0&&![`GET`,`DELETE`].includes(i)&&!(e.data instanceof FormData)&&!ba(e.data)&&(a[`Content-Type`]=`application/json`),e.headers&&Object.entries(e.headers).forEach(([e,t])=>{t!==void 0&&(a[e]=String(t))});let s=r();s&&![`GET`,`HEAD`,`OPTIONS`].includes(i)&&(a[n]=s);let c=e.signal,l,u=e.timeout??3e4;if(u>0&&!c){let e=new AbortController;c=e.signal,l=setTimeout(()=>e.abort(),u)}let d=[`GET`,`DELETE`].includes(i)?void 0:ka(e.data,a);d instanceof FormData&&delete a[`Content-Type`];try{let n=await fetch(t,{method:i,headers:a,body:d,signal:c,credentials:e.credentials??`same-origin`});l&&clearTimeout(l);let r;r=n.headers.get(`content-type`)?.includes(`application/json`)?await n.json():await n.text();let o={status:n.status,data:r,headers:Aa(n.headers)};if(!n.ok)throw new xa(o);return o}catch(e){throw l&&clearTimeout(l),e instanceof xa?e:e instanceof DOMException&&e.name===`AbortError`?new Sa:e instanceof TypeError?new Ca(e.message):e}}}}var Ma=ja(),Na=Ma,Pa=void 0,Fa=void 0,Ia=`same-origin`,La=e=>`${e.method}:${e.baseURL??Pa??``}${e.url}`,Ra=e=>e.status===204&&e.headers[`precognition-success`]===`true`,za={},B={get:(e,t={},n={})=>Va(Ba(`get`,e,t,n)),post:(e,t={},n={})=>Va(Ba(`post`,e,t,n)),patch:(e,t={},n={})=>Va(Ba(`patch`,e,t,n)),put:(e,t={},n={})=>Va(Ba(`put`,e,t,n)),delete:(e,t={},n={})=>Va(Ba(`delete`,e,t,n)),useHttpClient(e){return Na=e,B},withBaseURL(e){return Pa=e,B},withTimeout(e){return Fa=e,B},withCredentials(e){return Ia=typeof e==`string`?e:e?`include`:`omit`,B},fingerprintRequestsUsing(e){return La=e===null?()=>null:e,B},determineSuccessUsing(e){return Ra=e,B},withXsrfCookieName(e){return Ma.setXsrfCookieName(e),B},withXsrfHeaderName(e){return Ma.setXsrfHeaderName(e),B}},Ba=(e,t,n,r)=>({url:t,method:e,...r,...[`get`,`delete`].includes(e)?{params:_a({},n,r?.params)}:{data:_a({},n,r?.data)}}),Va=(e={})=>{let t=[Ha,Wa,Ga].reduce((e,t)=>t(e),e);return(t.onBefore??(()=>!0))()===!1?Promise.resolve(null):((t.onStart??(()=>null))(),Na.request({method:t.method,url:t.url,baseURL:t.baseURL??Pa,data:t.data,params:t.params,headers:t.headers,signal:t.signal,timeout:t.timeout,credentials:Ia}).then(async e=>{t.precognitive&&Ka(e);let n=e.status,r=e;return t.precognitive&&t.onPrecognitionSuccess&&Ra(e)&&(r=await Promise.resolve(t.onPrecognitionSuccess(e)??r)),t.onSuccess&&Ua(n)&&(r=await Promise.resolve(t.onSuccess(r)??r)),(Ja(t,n)??(e=>e))(r)??r},e=>{if(qa(e))return Promise.reject(e);let n=e;return t.precognitive&&Ka(n.response),(Ja(t,n.response.status)??((e,t)=>Promise.reject(t)))(n.response,n)}).finally(t.onFinish??(()=>null)))},Ha=e=>{let t=e.only??e.validate;return{...e,timeout:e.timeout??Fa,precognitive:e.precognitive!==!1,fingerprint:e.fingerprint===void 0?La(e,Na):e.fingerprint,headers:{...e.headers,Accept:`application/json`,"Content-Type":Ya(e),...e.precognitive===!1?{}:{Precognition:!0},...t?{"Precognition-Validate-Only":Array.from(t).join()}:{}}}},Ua=e=>e>=200&&e<300,Wa=e=>typeof e.fingerprint==`string`?(za[e.fingerprint]?.abort(),delete za[e.fingerprint],e):e,Ga=e=>typeof e.fingerprint!=`string`||e.signal||!e.precognitive?e:(za[e.fingerprint]=new AbortController,{...e,signal:za[e.fingerprint].signal}),Ka=e=>{if(e.headers?.precognition!==`true`)throw Error(`Did not receive a Precognition response. Ensure you have the Precognition middleware in place for the route.`)},qa=e=>!(e instanceof xa)||typeof e.response?.status!=`number`,Ja=(e,t)=>({401:e.onUnauthorized,403:e.onForbidden,404:e.onNotFound,409:e.onConflict,422:e.onValidationError,423:e.onLocked})[t],Ya=e=>e.headers?.[`Content-Type`]??e.headers?.[`Content-type`]??e.headers?.[`content-type`]??(ba(e.data)?`multipart/form-data`:`application/json`),Xa=(e,t)=>{if(!e.includes(`*`))return[e];let n=e.split(`.`),r=[``];for(let e of n)if(e===`*`){let e=[];for(let n of r){let r=n?R(t,n):t;if(Array.isArray(r))for(let t=0;t<r.length;t++)e.push(n?`${n}.${t}`:String(t));else if(typeof r==`object`&&r)for(let t of Object.keys(r))e.push(n?`${n}.${t}`:t)}r=e}else r=r.map(t=>t?`${t}.${e}`:e);return r},Za=(e,t)=>t.includes(`*`)?RegExp(`^`+t.replace(/\./g,`\\.`).replace(/\*/g,`[^.]+`)+`$`).test(e):e===t,Qa=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.some(t=>Za(e,t)))),$a=(e,t={})=>{let n={errorsChanged:[],touchedChanged:[],validatingChanged:[],validatedChanged:[]},r=!1,i=!1,a=e=>e===i?[]:(i=e,n.validatingChanged),o=[],s=e=>{let t=[...new Set(e)];return o.length!==t.length||!t.every(e=>o.includes(e))?(o=t,n.validatedChanged):[]},c=()=>o.filter(e=>d[e]===void 0),l=[],u=e=>{let t=[...new Set(e)];return l.length!==t.length||!t.every(e=>l.includes(e))?(l=t,n.touchedChanged):[]},d={},f=e=>{let t=to(e);return Hi(d,t)?[]:(d=t,n.errorsChanged)},p=e=>{let t={...d};return delete t[no(e)],f(t)},m=()=>Object.keys(d).length>0,h=1500,g=e=>{h=e,S.cancel(),S=x()},_=t,v=null,y=[],b=null,x=()=>pa(t=>{e({get:(e,n={},r={})=>B.get(e,ee(n),C(r,t,n)),post:(e,n={},r={})=>B.post(e,ee(n),C(r,t,n)),patch:(e,n={},r={})=>B.patch(e,ee(n),C(r,t,n)),put:(e,n={},r={})=>B.put(e,ee(n),C(r,t,n)),delete:(e,n={},r={})=>B.delete(e,ee(n),C(r,t,n))}).catch(e=>e instanceof Sa||e instanceof xa&&e.response?.status===422?null:Promise.reject(e))},h,{leading:!0,trailing:!0}),S=x(),C=(e,t,n={})=>{let r={...e,...t},i=Array.from(r.only??r.validate??l);return{...t,..._a({},e,t),only:i,timeout:r.timeout??5e3,onValidationError:(e,t)=>([...s([...o,...i]),...f(_a(Qa({...d},i),e.data.errors))].forEach(e=>e()),r.onValidationError?r.onValidationError(e,t):Promise.reject(t)),onSuccess:e=>(s([...o,...i]).forEach(e=>e()),r.onSuccess?r.onSuccess(e):e),onPrecognitionSuccess:e=>([...s([...o,...i]),...f(Qa({...d},i))].forEach(e=>e()),r.onPrecognitionSuccess?r.onPrecognitionSuccess(e):e),onBefore:()=>{let e=l.some(e=>e.includes(`*`)),t=e?[...new Set(l.flatMap(e=>Xa(e,n)))]:l;return r.onBeforeValidation&&r.onBeforeValidation({data:n,touched:t},{data:_,touched:y})===!1||(r.onBefore||(()=>!0))()===!1?!1:(e&&u(t).forEach(e=>e()),b=l,v=n,!0)},onStart:()=>{a(!0).forEach(e=>e()),(r.onStart??(()=>null))()},onFinish:()=>{a(!1).forEach(e=>e()),y=b,_=v,b=v=null,(r.onFinish??(()=>null))()}}},w=(e,t,n)=>{if(e===void 0){let e=Array.from(n?.only??n?.validate??[]);u([...l,...e]).forEach(e=>e()),S(n??{});return}if(ya(t)&&!r){console.warn(`Precognition file validation is not active. Call the "validateFiles" function on your form to enable it.`);return}e=no(e),(e.includes(`*`)||R(_,e)!==t)&&(u([e,...l]).forEach(e=>e()),S(n??{}))},ee=e=>r===!1?ro(e):e,T={touched:()=>l,validate(e,t,n){return typeof e==`object`&&!(`target`in e)&&(n=e,e=t=void 0),w(e,t,n),T},touch(e){let t=Array.isArray(e)?e:[no(e)];return u([...l,...t]).forEach(e=>e()),T},validating:()=>i,valid:c,errors:()=>d,hasErrors:m,setErrors(e){return f(e).forEach(e=>e()),T},forgetError(e){return p(e).forEach(e=>e()),T},defaults(e){return t=e,_=e,T},reset(...e){if(e.length===0)u([]).forEach(e=>e());else{let n=[...l];e.forEach(e=>{n.includes(e)&&n.splice(n.indexOf(e),1),z(_,e,R(t,e))}),u(n).forEach(e=>e())}return T},setTimeout(e){return g(e),T},on(e,t){return n[e].push(t),T},validateFiles(){return r=!0,T},withoutFileValidation(){return r=!1,T}};return T},eo=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:Array.isArray(e[n])?e[n][0]:e[n]}),{}),to=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:typeof e[n]==`string`?[e[n]]:e[n]}),{}),no=e=>typeof e==`string`?e:e.target.name,ro=e=>{let t={...e};return Object.keys(t).forEach(e=>{let n=t[e];if(n!==null){if(ya(n)){delete t[e];return}if(Array.isArray(n)){t[e]=Object.values(ro({...n}));return}if(typeof n==`object`){t[e]=ro(t[e]);return}}}),t},io=new class{config={};defaults;constructor(e){this.defaults=e}extend(e){return e&&(this.defaults={...this.defaults,...e}),this}replace(e){this.config=e}get(e){return ia(this.config,e)?R(this.config,e):R(this.defaults,e)}set(e,t){typeof e==`string`?z(this.config,e,t):Object.entries(e).forEach(([e,t])=>{z(this.config,e,t)})}}({form:{recentlySuccessfulDuration:2e3,forceIndicesArrayFormatInFormData:!0,withAllErrors:!1},prefetch:{cacheFor:3e4,hoverDelay:75}});function ao(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function V(e,t){return document.dispatchEvent(new CustomEvent(`inertia:${e}`,t))}var oo=e=>V(`before`,{cancelable:!0,detail:{visit:e}}),so=(e,{page:t,visitId:n}={})=>V(`error`,{detail:{errors:e,page:t,visitId:n}}),co=e=>V(`networkError`,{cancelable:!0,detail:{error:e}}),lo=e=>V(`finish`,{detail:{visit:e}}),uo=e=>V(`httpException`,{cancelable:!0,detail:{response:e}}),fo=e=>V(`beforeUpdate`,{detail:{page:e}}),po=(e,{cached:t=!1,visitId:n}={})=>V(`navigate`,{detail:{page:e,cached:t,visitId:n}}),mo=(e,{replace:t,visitId:n})=>V(`clientVisit`,{detail:{page:e,replace:t,visitId:n}}),ho=e=>V(`progress`,{detail:{progress:e}}),go=e=>V(`start`,{detail:{visit:e}}),_o=(e,{visitId:t}={})=>V(`success`,{detail:{page:e,visitId:t}}),vo=(e,t)=>V(`prefetched`,{detail:{fetchedAt:Date.now(),response:e,visit:t}}),yo=e=>V(`prefetching`,{detail:{visit:e}}),bo=e=>V(`flash`,{detail:{flash:e}}),xo=(e,t)=>V(`location`,{cancelable:!0,detail:{url:e,versionChange:t}}),H=class{static locationVisitKey=`inertiaLocationVisit`;static set(e,t){typeof window<`u`&&window.sessionStorage.setItem(e,JSON.stringify(t))}static get(e){if(typeof window<`u`)return JSON.parse(window.sessionStorage.getItem(e)||`null`)}static merge(e,t){let n=this.get(e);n===null?this.set(e,t):this.set(e,{...n,...t})}static remove(e){typeof window<`u`&&window.sessionStorage.removeItem(e)}static removeNested(e,t){let n=this.get(e);n!==null&&(delete n[t],this.set(e,n))}static exists(e){try{return this.get(e)!==null}catch{return!1}}static clear(){typeof window<`u`&&window.sessionStorage.clear()}},So=async e=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);let t=Do(),n=await Ao(await jo());if(!n)throw Error(`Unable to encrypt history`);return await To(t,n,e)},Co={key:`historyKey`,iv:`historyIv`},wo=async e=>{let t=Do(),n=await jo();if(!n)throw Error(`Unable to decrypt history`);return await Eo(t,n,e)},To=async(e,t,n)=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=new TextEncoder,i=JSON.stringify(n),a=new Uint8Array(i.length*3),o=r.encodeInto(i,a);return window.crypto.subtle.encrypt({name:`AES-GCM`,iv:e},t,a.subarray(0,o.written))},Eo=async(e,t,n)=>{if(window.crypto.subtle===void 0)return console.warn(`Decryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=await window.crypto.subtle.decrypt({name:`AES-GCM`,iv:e},t,n);return JSON.parse(new TextDecoder().decode(r))},Do=()=>{let e=H.get(Co.iv);if(e)return new Uint8Array(e);let t=window.crypto.getRandomValues(new Uint8Array(12));return H.set(Co.iv,Array.from(t)),t},Oo=async()=>window.crypto.subtle===void 0?(console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(null)):window.crypto.subtle.generateKey({name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]),ko=async e=>{if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve();let t=await window.crypto.subtle.exportKey(`raw`,e);H.set(Co.key,Array.from(new Uint8Array(t)))},Ao=async e=>{if(e)return e;let t=await Oo();return t?(await ko(t),t):null},jo=async()=>{let e=H.get(Co.key);return e?await window.crypto.subtle.importKey(`raw`,new Uint8Array(e),{name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]):null},Mo=e=>{let t={};for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t},No=(e,t,n)=>{if(e===t)return!0;for(let r in e)if(!n.includes(r)&&e[r]!==t[r]&&!Po(e[r],t[r]))return!1;for(let r in t)if(!n.includes(r)&&!(r in e))return!1;return!0},Po=(e,t)=>{switch(typeof e){case`object`:return No(e,t,[]);case`function`:return e.toString()===t.toString();default:return e===t}},Fo={ms:1,s:1e3,m:1e3*60,h:1e3*60*60,d:1e3*60*60*24},Io=e=>{if(typeof e==`number`)return e;for(let[t,n]of Object.entries(Fo))if(e.endsWith(t))return parseFloat(e)*n;return parseInt(e)},Lo=new class{cached=[];inFlightRequests=[];removalTimers=[];currentUseId=null;add(e,t,{cacheFor:n,cacheTags:r}){if(this.findInFlight(e))return Promise.resolve();let i=this.findCached(e);if(!e.fresh&&i&&i.staleTimestamp>Date.now())return Promise.resolve();let[a,o]=this.extractStaleValues(n),s=new Promise((n,r)=>{t({...e,onCancel:()=>{this.remove(e),e.onCancel(),r()},onError:t=>{this.remove(e),e.onError(t),r()},onPrefetching(t){e.onPrefetching(t)},onPrefetched(t,n){e.onPrefetched(t,n)},onPrefetchResponse(e){n(e)},onPrefetchError(t){Lo.removeFromInFlight(e),r(t)}})}).then(t=>{this.remove(e);let n=t.getPageResponse();G.mergeOncePropsIntoResponse(n),this.cached.push({params:{...e},staleTimestamp:Date.now()+a,expiresAt:Date.now()+o,response:s,singleUse:o===0,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(r)?r:[r]});let i=this.getShortestOncePropTtl(n);return this.scheduleForRemoval(e,i?Math.min(o,i):o),this.removeFromInFlight(e),t.handlePrefetch(),t});return this.inFlightRequests.push({params:{...e},response:s,staleTimestamp:null,inFlight:!0}),s}removeAll(){this.cached=[],this.removalTimers.forEach(e=>{clearTimeout(e.timer)}),this.removalTimers=[]}removeByTags(e){this.cached=this.cached.filter(t=>!t.tags.some(t=>e.includes(t)))}remove(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)),this.clearTimer(e)}removeFromInFlight(e){this.inFlightRequests=this.inFlightRequests.filter(t=>!this.paramsAreEqual(t.params,e))}extractStaleValues(e){let[t,n]=this.cacheForToStaleAndExpires(e);return[Io(t),Io(n)]}cacheForToStaleAndExpires(e){if(!Array.isArray(e))return[e,e];switch(e.length){case 0:return[0,0];case 1:return[e[0],e[0]];default:return[e[0],e[1]]}}clearTimer(e){let t=this.removalTimers.find(t=>this.paramsAreEqual(t.params,e));t&&(clearTimeout(t.timer),this.removalTimers=this.removalTimers.filter(e=>e!==t))}scheduleForRemoval(e,t){if(!(typeof window>`u`)&&(this.clearTimer(e),t>0)){let n=window.setTimeout(()=>this.remove(e),t);this.removalTimers.push({params:e,timer:n})}}get(e){return this.findCached(e)||this.findInFlight(e)}use(e,t){let n=`${t.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;this.currentUseId=n;let r={...t,cached:!0};return e.response.then(e=>{if(this.currentUseId===n)return e.mergeParams({...r,onPrefetched:()=>{}}),this.removeSingleUseItems(t),e.handle()})}removeSingleUseItems(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)||!t.singleUse)}findCached(e){return this.cached.find(t=>this.paramsAreEqual(t.params,e))||null}findInFlight(e){return this.inFlightRequests.find(t=>this.paramsAreEqual(t.params,e))||null}withoutPurposePrefetchHeader(e){let t=L(e);return t.headers.Purpose===`prefetch`&&delete t.headers.Purpose,t}paramsAreEqual(e,t){return No(this.withoutPurposePrefetchHeader(e),this.withoutPurposePrefetchHeader(t),[`id`,`showProgress`,`replace`,`prefetch`,`preserveScroll`,`preserveState`,`onBefore`,`onBeforeUpdate`,`onStart`,`onProgress`,`onFinish`,`onCancel`,`onSuccess`,`onError`,`onFlash`,`onPrefetched`,`onCancelToken`,`onPrefetching`,`async`,`viewTransition`,`optimistic`,`component`,`pageProps`,`cached`])}updateCachedOncePropsFromCurrentPage(){this.cached.forEach(e=>{e.response.then(t=>{let n=t.getPageResponse();G.mergeOncePropsIntoResponse(n,{force:!0});for(let[e,t]of Object.entries(n.deferredProps??{})){let r=t.filter(e=>R(n.props,e)===void 0);r.length>0?n.deferredProps[e]=r:delete n.deferredProps[e]}let r=this.getShortestOncePropTtl(n);if(r===null)return;let i=e.expiresAt-Date.now(),a=Math.min(i,r);a>0?this.scheduleForRemoval(e.params,a):this.remove(e.params)})})}getShortestOncePropTtl(e){let t=Object.values(e.onceProps??{}).map(e=>e.expiresAt).filter(e=>!!e);return t.length===0?null:Math.min(...t)-Date.now()}},Ro=e=>{if(e.offsetParent===null)return!1;let t=e.getBoundingClientRect(),n=t.top<window.innerHeight&&t.bottom>=0,r=t.left<window.innerWidth&&t.right>=0;return n&&r},zo=e=>{let t=e=>{let t=window.getComputedStyle(e);return t.overflowY===`scroll`?!0:t.overflowY===`auto`?[`visible`,`clip`].includes(t.overflowX)?!0:r(t.maxHeight,e.style.height)||i(e,`height`):!1},n=e=>{let t=window.getComputedStyle(e);return t.overflowX===`scroll`?!0:t.overflowX===`auto`?[`visible`,`clip`].includes(t.overflowY)?!0:r(t.maxWidth,e.style.width)||i(e,`width`):!1},r=(e,t)=>!!(e&&e!==`none`&&e!==`0px`||t&&t!==`auto`&&t!==`0`),i=(e,t)=>{let n=e.parentElement;if(!n)return!1;let r=window.getComputedStyle(n);if([`flex`,`inline-flex`].includes(r.display)){let e=[`column`,`column-reverse`].includes(r.flexDirection);return t===`height`?e:!e}return[`grid`,`inline-grid`].includes(r.display)},a=e?.parentElement;for(;a;){let e=t(a)||n(a);if(window.getComputedStyle(a).display!==`contents`&&e)return a;a=a.parentElement}return null},Bo=(e,t)=>{if(!t)return e.filter(e=>Ro(e));let n=e.indexOf(t),r=[],i=[];for(let t=n;t>=0;t--){let n=e[t];if(Ro(n))r.push(n);else break}for(let t=n+1;t<e.length;t++){let n=e[t];if(Ro(n))i.push(n);else break}return[...r.reverse(),...i]},Vo=(e,t=1)=>{window.requestAnimationFrame(()=>{t>1?Vo(e,t-1):e()})},Ho=typeof window>`u`,Uo=!Ho&&/Firefox/i.test(window.navigator.userAgent),U=class{static save(){K.saveScrollPositions(this.getScrollRegions())}static getScrollRegions(){return Array.from(this.regions()).map(e=>({top:e.scrollTop,left:e.scrollLeft}))}static regions(){return document.querySelectorAll(`[scroll-region]`)}static scrollToTop(){if(Uo&&getComputedStyle(document.documentElement).scrollBehavior===`smooth`)return Vo(()=>window.scrollTo(0,0),2);window.scrollTo(0,0)}static reset(){!Ho&&window.location.hash||this.scrollToTop(),this.regions().forEach(e=>{typeof e.scrollTo==`function`?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.save(),this.scrollToAnchor()}static scrollToAnchor(){let e=Ho?null:window.location.hash;e&&setTimeout(()=>{let t=document.getElementById(e.slice(1));t?t.scrollIntoView():this.scrollToTop()})}static restore(e){Ho||window.requestAnimationFrame(()=>{this.restoreDocument(),this.restoreScrollRegions(e)})}static restoreScrollRegions(e){Ho||this.regions().forEach((t,n)=>{let r=e[n];r&&(typeof t.scrollTo==`function`?t.scrollTo(r.left,r.top):(t.scrollTop=r.top,t.scrollLeft=r.left))})}static restoreDocument(){let e=K.getDocumentScrollPosition();window.scrollTo(e.left,e.top)}static onScroll(e){let t=e.target;typeof t.hasAttribute==`function`&&t.hasAttribute(`scroll-region`)&&this.save()}static onWindowScroll(){K.saveDocumentScrollPosition({top:window.scrollY,left:window.scrollX})}},Wo=e=>typeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0;function Go(e){return Wo(e)||e instanceof FormData&&Array.from(e.values()).some(e=>Go(e))||typeof e==`object`&&!!e&&Object.values(e).some(e=>Go(e))}var Ko=e=>e instanceof FormData;function qo(e,t=new FormData,n=null,r=`brackets`){e||={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&Yo(t,Jo(n,i,`indices`),e[i],r);return t}function Jo(e,t,n){return e?n===`brackets`?`${e}[]`:`${e}[${t}]`:t}function Yo(e,t,n,r){if(Array.isArray(n))return Array.from(n.keys()).forEach(i=>Yo(e,Jo(t,i.toString(),r),n[i],r));if(n instanceof Date)return e.append(t,n.toISOString());if(n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);qo(n,e,t,r)}function Xo(e){return/\[\d+\]/.test(decodeURIComponent(e.search))}function Zo(e){if(!e||e===`?`)return{};let t={};return e.replace(/^\?/,``).split(`&`).filter(Boolean).forEach(e=>{let[n,r]=$o(e);ts(t,es(n),es(r))}),t}function Qo(e,t){let n=[];return rs(e,``,n,t),n.length?`?`+n.join(`&`):``}function $o(e){let t=e.indexOf(`=`);return t===-1?[e,``]:[e.substring(0,t),e.substring(t+1)]}function es(e){return decodeURIComponent(e.replace(/\+/g,` `))}function ts(e,t,n){let r=ns(t);if(r.some(e=>e===`__proto__`))return;let i=e;for(;r.length>1;){let e=r.shift(),t=r[0]===``;(typeof i[e]!=`object`||i[e]===null)&&(i[e]=t?[]:{}),i=i[e]}let a=r.shift();a===``&&Array.isArray(i)?i.push(n):i[a]=n}function ns(e){let t=[],n=e.split(`[`)[0];n&&t.push(n);let r,i=/\[([^\]]*)\]/g;for(;(r=i.exec(e))!==null;)t.push(r[1]);return t}function rs(e,t,n,r){if(e!==void 0){if(e===null){n.push(`${t}=`);return}if(Array.isArray(e)){e.forEach((e,i)=>{rs(e,r===`indices`?`${t}[${i}]`:`${t}[]`,n,r)});return}if(typeof e==`object`){Object.keys(e).forEach(i=>{rs(e[i],t?`${t}[${i}]`:i,n,r)});return}n.push(`${t}=${encodeURIComponent(String(e))}`)}}function W(e){return new URL(e.toString(),typeof window>`u`?void 0:window.location.toString())}var is=(e,t,n,r,i)=>{let a=typeof e==`string`?W(e):e;if((Go(t)||r)&&!Ko(t)&&(io.get(`form.forceIndicesArrayFormatInFormData`)&&(i=`indices`),t=qo(t,new FormData,null,i)),Ko(t))return[a,t];let[o,s]=as(n,a,t,i);return[W(o),s]};function as(e,t,n,r=`brackets`){let i=e===`get`&&!Ko(n)&&Object.keys(n).length>0,a=fs(t.toString()),o=a||t.toString().startsWith(`/`)||t.toString()===``,s=!o&&!t.toString().startsWith(`#`)&&!t.toString().startsWith(`?`),c=/^[.]{1,2}([/]|$)/.test(t.toString()),l=t.toString().includes(`?`)||i,u=t.toString().includes(`#`),d=new URL(t.toString(),typeof window>`u`?`http://localhost`:window.location.toString());if(i){let e=Xo(d)?`indices`:r;d.search=Qo({...Zo(d.search),...n},e)}return[[a?`${d.protocol}//${d.host}`:``,o?d.pathname:``,s?d.pathname.substring(+!c):``,l?d.search:``,u?d.hash:``].join(``),i?{}:n]}function os(e){return e=new URL(e.href),e.hash=``,e}var ss=(e,t)=>{e.hash&&!t.hash&&os(e).href===t.href&&(t.hash=e.hash)},cs=(e,t)=>os(e).href===os(t).href,ls=(e,t)=>e.origin===t.origin&&e.pathname===t.pathname;function us(e){return typeof e==`object`&&!!e&&e!==void 0&&`url`in e&&`method`in e}function ds(e){return e.component?typeof e.component==`string`?e.component:(console.error(`The "component" property on the URL method pair received multiple components (${Object.keys(e.component).join(`, `)}), but only a single component string is supported for instant visits. Use the withComponent() method to specify which component to use.`),null):null}function fs(e){return/^([a-z][a-z0-9+.-]*:)?\/\/[^/]/i.test(e)}function ps(e,t){let n=typeof e==`string`?W(e):e;return t?`${n.protocol}//${n.host}${n.pathname}${n.search}${n.hash}`:`${n.pathname}${n.search}${n.hash}`}var G=new class{page;swapComponent;resolveComponent;onFlashCallback;componentId={};listeners=[];isFirstPageLoad=!0;cleared=!1;pendingDeferredProps=null;historyQuotaExceeded=!1;optimisticBaseline={};pendingOptimistics=[];optimisticCounter=0;init({initialPage:e,swapComponent:t,resolveComponent:n,onFlash:r}){return this.page={...e,flash:e.flash??{},rescuedProps:e.rescuedProps??[]},this.swapComponent=t,this.resolveComponent=n,this.onFlashCallback=r,ys.on(`historyQuotaExceeded`,()=>{this.historyQuotaExceeded=!0}),this}set(e,{replace:t=!1,preserveScroll:n=!1,preserveState:r=!1,viewTransition:i=!1,cached:a=!1,visitId:o}={}){Object.keys(e.deferredProps||{}).length&&(this.pendingDeferredProps={deferredProps:e.deferredProps,component:e.component,url:e.url},e.initialDeferredProps===void 0&&(e.initialDeferredProps=e.deferredProps)),this.componentId={};let s=this.componentId;return e.clearHistory&&K.clear(),this.resolve(e.component,e).then(c=>{if(s!==this.componentId)return;e.rememberedState??={};let l=typeof window>`u`,u=l?new URL(e.url):window.location,d=!l&&n?U.getScrollRegions():[];t||=cs(W(e.url),u);let f={...e,flash:{}};return new Promise(e=>t?K.replaceState(f,e):K.pushState(f,e)).then(()=>{let s=!this.isTheSame(e);if(!s&&Object.keys(e.props.errors||{}).length>0&&(i=!1),this.page=e,this.cleared=!1,this.hasOnceProps()&&Lo.updateCachedOncePropsFromCurrentPage(),s&&this.fireEventsFor(`newComponent`),this.isFirstPageLoad&&this.fireEventsFor(`firstLoad`),this.isFirstPageLoad=!1,this.historyQuotaExceeded){this.historyQuotaExceeded=!1;return}return this.swap({component:c,page:e,preserveState:r,viewTransition:i}).then(()=>{n?window.requestAnimationFrame(()=>U.restoreScrollRegions(d)):U.reset(),this.pendingDeferredProps&&this.pendingDeferredProps.component===e.component&&this.pendingDeferredProps.url===e.url&&ys.fireInternalEvent(`loadDeferredProps`,this.pendingDeferredProps.deferredProps),this.pendingDeferredProps=null,t||po(e,{cached:a,visitId:o})})})})}setQuietly(e,{preserveState:t=!1}={}){return this.resolve(e.component,e).then(n=>(this.page=e,this.cleared=!1,K.setCurrent(e),this.swap({component:n,page:e,preserveState:t,viewTransition:!1})))}clear(){this.cleared=!0}isCleared(){return this.cleared}get(){return this.page}getWithoutFlashData(){return{...this.page,flash:{}}}hasOnceProps(){return Object.keys(this.page.onceProps??{}).length>0}merge(e){this.page={...this.page,...e}}setPropsQuietly(e){return this.page={...this.page,props:e},this.resolve(this.page.component,this.page).then(e=>this.swap({component:e,page:this.page,preserveState:!0,viewTransition:!1}))}setFlash(e){this.page={...this.page,flash:e},this.onFlashCallback?.(e)}setUrlHash(e){this.page.url.includes(e)||(this.page.url+=e)}remember(e){this.page.rememberedState=e}swap({component:e,page:t,preserveState:n,viewTransition:r}){let i=()=>this.swapComponent({component:e,page:t,preserveState:n});if(!r||!document?.startViewTransition||document.visibilityState===`hidden`)return i();let a=typeof r==`boolean`?()=>null:r;return new Promise(e=>{let t=document.startViewTransition(()=>i().then(e));t.ready.catch(()=>{}),a(t)})}resolve(e,t){return Promise.resolve(this.resolveComponent(e,t))}nextOptimisticId(){return++this.optimisticCounter}setBaseline(e,t){e in this.optimisticBaseline||(this.optimisticBaseline[e]=t)}updateBaseline(e,t){e in this.optimisticBaseline&&(this.optimisticBaseline[e]=t)}hasBaseline(e){return e in this.optimisticBaseline}registerOptimistic(e,t){this.pendingOptimistics.push({id:e,callback:t})}unregisterOptimistic(e){this.pendingOptimistics=this.pendingOptimistics.filter(t=>t.id!==e)}replayOptimistics(){let e=Object.keys(this.optimisticBaseline);if(e.length===0)return{};let t=L(this.page.props);for(let n of e)t[n]=L(this.optimisticBaseline[n]);for(let{callback:e}of this.pendingOptimistics){let n=e(L(t));n&&Object.assign(t,n)}let n={};for(let r of e)n[r]=t[r];return n}pendingOptimisticCount(){return this.pendingOptimistics.length}clearOptimisticState(){this.optimisticBaseline={},this.pendingOptimistics=[]}isTheSame(e){return this.page.component===e.component}on(e,t){return this.listeners.push({event:e,callback:t}),()=>{this.listeners=this.listeners.filter(n=>n.event!==e&&n.callback!==t)}}fireEventsFor(e){this.listeners.filter(t=>t.event===e).forEach(e=>e.callback())}mergeOncePropsIntoResponse(e,{force:t=!1}={}){Object.entries(e.onceProps??{}).forEach(([n,r])=>{let i=this.page.onceProps?.[n];i!==void 0&&(t||R(e.props,r.prop)===void 0)&&(z(e.props,r.prop,R(this.page.props,i.prop)),e.onceProps[n].expiresAt=i.expiresAt)})}},ms=class{items=[];processingPromise=null;add(e){return this.items.push(e),this.process()}process(){return this.processingPromise??=this.processNext().finally(()=>{this.processingPromise=null}),this.processingPromise}processNext(){let e=this.items.shift();return e?Promise.resolve(e()).then(()=>this.processNext()):Promise.resolve()}},hs=typeof window>`u`,gs=new ms,_s=!hs&&/CriOS/.test(window.navigator.userAgent),vs=class{rememberedState=`rememberedState`;scrollRegions=`scrollRegions`;preserveUrl=!1;current={};initialState=null;remember(e,t){this.replaceState({...G.getWithoutFlashData(),rememberedState:{...G.get()?.rememberedState??{},[t]:e}})}restore(e){if(!hs)return this.current[this.rememberedState]?.[e]===void 0?this.initialState?.[this.rememberedState]?.[e]:this.current[this.rememberedState]?.[e]}pushState(e,t=null){if(!hs){if(this.preserveUrl){t&&t();return}this.current=e,gs.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doPushState({page:n},e.url).then(()=>t?.());return _s?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}clonePageProps(e){try{return structuredClone(e.props),e}catch{return{...e,props:L(e.props)}}}getPageData(e){let t=this.clonePageProps(e);return new Promise(n=>e.encryptHistory?So(t).then(n):n(t))}processQueue(){return gs.process()}decrypt(e=null){if(hs)return Promise.resolve(e??G.get());let t=e??window.history.state?.page;return this.decryptPageData(t).then(e=>{if(!e)throw Error(`Unable to decrypt history`);return this.initialState===null?this.initialState=e??void 0:this.current=e??{},e})}decryptPageData(e){return e instanceof ArrayBuffer?wo(e):Promise.resolve(e)}saveScrollPositions(e){gs.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!Hi(this.getScrollRegions(),e))return this.doReplaceState({page:window.history.state.page,scrollRegions:e})}))}saveDocumentScrollPosition(e){gs.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!Hi(this.getDocumentScrollPosition(),e))return this.doReplaceState({page:window.history.state.page,documentScrollPosition:e})}))}getScrollRegions(){return window.history.state?.scrollRegions||[]}getDocumentScrollPosition(){return window.history.state?.documentScrollPosition||{top:0,left:0}}replaceState(e,t=null){if(Hi(this.current,e)){t&&t();return}let{flash:n,...r}=e;if(G.merge(r),!hs){if(this.preserveUrl){t&&t();return}this.current=e,gs.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doReplaceState({page:n},e.url).then(()=>t?.());return _s?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}isHistoryThrottleError(e){return e instanceof Error&&e.name===`SecurityError`&&(e.message.includes(`history.pushState`)||e.message.includes(`history.replaceState`))}isQuotaExceededError(e){return e instanceof Error&&e.name===`QuotaExceededError`}withThrottleProtection(e){return Promise.resolve().then(()=>{try{return e()}catch(e){if(!this.isHistoryThrottleError(e))throw e;console.error(e.message)}})}doReplaceState(e,t){return this.withThrottleProtection(()=>{window.history.replaceState({...e,scrollRegions:e.scrollRegions??window.history.state?.scrollRegions,documentScrollPosition:e.documentScrollPosition??window.history.state?.documentScrollPosition},``,t)})}doPushState(e,t){return this.withThrottleProtection(()=>{try{window.history.pushState(e,``,t)}catch(e){if(!this.isQuotaExceededError(e))throw e;ys.fireInternalEvent(`historyQuotaExceeded`,t)}})}getState(e,t){return this.current?.[e]??t}deleteState(e){this.current[e]!==void 0&&(delete this.current[e],this.replaceState(this.current))}clearInitialState(e){this.initialState&&this.initialState[e]!==void 0&&delete this.initialState[e]}browserHasHistoryEntry(){return!hs&&!!window.history.state?.page}clear(){H.remove(Co.key),H.remove(Co.iv)}setCurrent(e){this.current=e}isValidState(e){return!!e.page}getAllState(){return this.current}};typeof window<`u`&&window.history.scrollRestoration&&(window.history.scrollRestoration=`manual`);var K=new vs,ys=new class{internalListeners=[];init(){typeof window<`u`&&(window.addEventListener(`popstate`,this.handlePopstateEvent.bind(this)),window.addEventListener(`pageshow`,this.handlePageshowEvent.bind(this)),window.addEventListener(`scroll`,ao(U.onWindowScroll.bind(U),100),!0)),typeof document<`u`&&document.addEventListener(`scroll`,ao(U.onScroll.bind(U),100),!0)}onGlobalEvent(e,t){return this.registerListener(`inertia:${e}`,(e=>{let n=t(e);e.cancelable&&!e.defaultPrevented&&n===!1&&e.preventDefault()}))}on(e,t){return this.internalListeners.push({event:e,listener:t}),()=>{this.internalListeners=this.internalListeners.filter(e=>e.listener!==t)}}onMissingHistoryItem(){G.clear(),this.fireInternalEvent(`missingHistoryItem`)}fireInternalEvent(e,...t){this.internalListeners.filter(t=>t.event===e).forEach(e=>e.listener(...t))}registerListener(e,t){return document.addEventListener(e,t),()=>document.removeEventListener(e,t)}handlePageshowEvent(e){e.persisted&&K.decrypt().catch(()=>this.onMissingHistoryItem())}handlePopstateEvent(e){let t=e.state||null;if(t===null){let e=W(G.get().url);e.hash=window.location.hash,K.replaceState({...G.getWithoutFlashData(),url:e.href}),U.reset();return}if(!K.isValidState(t))return this.onMissingHistoryItem();K.decrypt(t.page).then(e=>{if(G.get().version!==e.version){this.onMissingHistoryItem();return}Q.cancelAll({prefetch:!1}),G.setQuietly(e,{preserveState:!1}).then(()=>{U.restore(K.getScrollRegions()),po(G.get());let t={},n=G.get().props;for(let[r,i]of Object.entries(e.initialDeferredProps??e.deferredProps??{})){let e=i.filter(e=>R(n,e)===void 0);e.length>0&&(t[r]=e)}Object.keys(t).length>0&&this.fireInternalEvent(`loadDeferredProps`,t)})}).catch(()=>{this.onMissingHistoryItem()})}},bs=new class{type;constructor(){this.type=this.resolveType()}resolveType(){return typeof window>`u`?`navigate`:window.performance?.getEntriesByType(`navigation`)[0]?.type??`navigate`}get(){return this.type}isBackForward(){return this.type===`back_forward`}isReload(){return this.type===`reload`}};function xs(){let e=typeof window<`u`?window.crypto:void 0;if(e?.randomUUID)return e.randomUUID();let t=()=>e?.getRandomValues?e.getRandomValues(new Uint8Array(1))[0]:Math.floor(Math.random()*256);return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^t()&15>>e/4).toString(16))}var Ss=class{static handle(){this.clearRememberedStateOnReload(),[this.handleBackForward,this.handleLocation,this.handleDefault].find(e=>e.bind(this)())}static clearRememberedStateOnReload(){bs.isReload()&&(K.deleteState(K.rememberedState),K.clearInitialState(K.rememberedState))}static handleBackForward(){if(!bs.isBackForward()||!K.browserHasHistoryEntry())return!1;let e=K.getScrollRegions();return K.decrypt().then(t=>{let n=xs();G.set(t,{preserveScroll:!0,preserveState:!0,visitId:n}).then(()=>{U.restore(e),po(G.get(),{visitId:n})})}).catch(()=>{ys.onMissingHistoryItem()}),!0}static handleLocation(){if(!H.exists(H.locationVisitKey))return!1;let e=H.get(H.locationVisitKey)||{};return H.remove(H.locationVisitKey),typeof window<`u`&&G.setUrlHash(window.location.hash),K.decrypt(G.get()).then(()=>{let t=xs(),n=K.getState(K.rememberedState,{}),r=K.getScrollRegions();G.remember(n),G.set(G.get(),{preserveScroll:e.preserveScroll,preserveState:!0,visitId:t}).then(()=>{e.preserveScroll&&U.restore(r),this.fireInitialEvents(t)})}).catch(()=>{ys.onMissingHistoryItem()}),!0}static handleDefault(){typeof window<`u`&&G.setUrlHash(window.location.hash);let e=xs();G.set(G.get(),{preserveScroll:!0,preserveState:!0,visitId:e}).then(()=>{bs.isReload()?U.restore(K.getScrollRegions()):U.scrollToAnchor(),this.fireInitialEvents(e)})}static fireInitialEvents(e){let t=G.get();po(t,{visitId:e}),Object.keys(t.flash).length>0&&queueMicrotask(()=>bo(t.flash))}},Cs=class{intervalId=null;timeoutId=null;throttle=!1;keepAlive=!1;cb;interval;cbCount=0;mode;inFlight=!1;currentCancel=null;stopped=!0;instanceId=0;constructor(e,t,n){this.keepAlive=n.keepAlive??!1,this.mode=n.mode??`overlap`,this.cb=t,this.interval=e,(n.autoStart??!0)&&this.start()}stop(){this.stopped=!0,this.instanceId++,this.inFlight=!1,this.currentCancel=null,this.intervalId&&=(clearInterval(this.intervalId),null),this.timeoutId&&=(clearTimeout(this.timeoutId),null)}start(){if(!(typeof window>`u`)){if(this.stop(),this.stopped=!1,this.mode===`rest`){this.scheduleNext();return}this.intervalId=window.setInterval(()=>this.tick(),this.interval)}}isInBackground(e){this.throttle=!this.keepAlive&&e,this.throttle&&(this.cbCount=0)}scheduleNext(){this.stopped||(this.timeoutId=window.setTimeout(()=>{this.timeoutId=null,this.tick()},this.interval))}tick(){!this.throttle||this.cbCount%10==0?this.fire():this.mode===`rest`&&this.scheduleNext(),this.throttle&&this.cbCount++}fire(){this.inFlight&&this.mode===`cancel`&&this.currentCancel?.();let e=this.instanceId;this.cb({onStart:t=>{e===this.instanceId&&(this.inFlight=!0,this.currentCancel=t)},onFinish:()=>{e===this.instanceId&&(this.inFlight=!1,this.currentCancel=null,this.mode===`rest`&&this.scheduleNext())}})}},ws=new class{polls=[];constructor(){this.setupVisibilityListener()}get count(){return this.polls.length}add(e,t,n){let r=new Cs(e,t,n);return this.polls.push(r),{stop:()=>r.stop(),start:()=>r.start(),destroy:()=>{r.stop(),this.polls=this.polls.filter(e=>e!==r)}}}clear(){this.polls.forEach(e=>e.stop()),this.polls=[]}setupVisibilityListener(){typeof document>`u`||document.addEventListener(`visibilitychange`,()=>{this.polls.forEach(e=>e.isInBackground(document.hidden))},!1)}},q=new class{requestHandlers=[];responseHandlers=[];errorHandlers=[];onRequest(e){return this.requestHandlers.push(e),()=>{this.requestHandlers=this.requestHandlers.filter(t=>t!==e)}}onResponse(e){return this.responseHandlers.push(e),()=>{this.responseHandlers=this.responseHandlers.filter(t=>t!==e)}}onError(e){return this.errorHandlers.push(e),()=>{this.errorHandlers=this.errorHandlers.filter(t=>t!==e)}}async processRequest(e){let t=e;for(let e of this.requestHandlers)t=await e(t);return t}async processResponse(e){let t=e;for(let e of this.responseHandlers)t=await e(t);return t}async processError(e){for(let t of this.errorHandlers)await t(e)}},Ts=class extends Error{code;url;constructor(e,t,n){super(n?`${e} (${n})`:e),this.name=`HttpError`,this.code=t,this.url=n}},Es=class extends Ts{response;constructor(e,t,n){super(e,`ERR_HTTP_RESPONSE`,n),this.name=`HttpResponseError`,this.response=t}},Ds=class extends Ts{constructor(e=`Request was cancelled`,t){super(e,`ERR_CANCELLED`,t),this.name=`HttpCancelledError`}},Os=class extends Ts{cause;constructor(e,t,n){super(e,`ERR_NETWORK`,t),this.name=`HttpNetworkError`,this.cause=n}};function ks(e){let t=document.cookie.match(RegExp(`(^|;\\s*)(`+e+`)=([^;]*)`));return t?decodeURIComponent(t[3]):null}function As(e){let t={};return e.getAllResponseHeaders().split(`\r
10
- `).forEach(e=>{let n=e.indexOf(`:`);n>0&&(t[e.slice(0,n).toLowerCase().trim()]=e.slice(n+1).trim())}),t}function js(e){return typeof FormData<`u`&&e instanceof FormData}function Ms(e){return typeof e==`string`||js(e)||typeof Blob<`u`&&e instanceof Blob||typeof ArrayBuffer<`u`&&e instanceof ArrayBuffer||typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)||typeof URLSearchParams<`u`&&e instanceof URLSearchParams}function Ns(e,t){if(!t.headers)return;let n=js(t.data);Object.entries(t.headers).forEach(([t,r])=>{(t.toLowerCase()!==`content-type`||!n)&&e.setRequestHeader(t,String(r))})}function Ps(e,t){if(!t||Object.keys(t).length===0)return e;let[n]=as(`get`,e,t);return n}var Fs=class{xsrfCookieName;xsrfHeaderName;constructor(e={}){this.xsrfCookieName=e.xsrfCookieName??`XSRF-TOKEN`,this.xsrfHeaderName=e.xsrfHeaderName??`X-XSRF-TOKEN`}async request(e){let t=await q.processRequest(e);try{let e=await this.doRequest(t);return await q.processResponse(e)}catch(e){throw(e instanceof Es||e instanceof Os||e instanceof Ds)&&await q.processError(e),e}}doRequest(e){return new Promise((t,n)=>{let r=new XMLHttpRequest,i=Ps(e.url,e.params);r.open(e.method.toUpperCase(),i,!0);let a=ks(this.xsrfCookieName);a&&r.setRequestHeader(this.xsrfHeaderName,a),Object.keys(e.headers??{}).some(e=>e.toLowerCase()===`x-requested-with`)||r.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`);let o=null;e.data!==null&&e.data!==void 0&&(Ms(e.data)?o=e.data:typeof e.data==`object`?(o=JSON.stringify(e.data),!e.headers?.[`Content-Type`]&&!e.headers?.[`content-type`]&&r.setRequestHeader(`Content-Type`,`application/json`)):o=String(e.data)),Ns(r,e),e.onUploadProgress&&(r.upload.onprogress=t=>{let n=t.lengthComputable?t.loaded/t.total:void 0;e.onUploadProgress({progress:n,percentage:n?Math.round(n*100):0,loaded:t.loaded,total:t.lengthComputable?t.total:void 0})}),e.signal&&e.signal.addEventListener(`abort`,()=>r.abort()),r.onabort=()=>n(new Ds(`Request was cancelled`,e.url)),r.onerror=()=>n(new Os(`Network error`,e.url)),r.onload=()=>{let i={status:r.status,data:r.responseText,headers:As(r)};r.status>=400?n(new Es(`Request failed with status ${r.status}`,i,e.url)):t(i)},r.send(o)})}},Is=new Fs;function Ls(e){return!(`request`in e)}var Rs={getClient(){return Is},setClient(e){if(!Ls(e)){Is=e;return}Is=new Fs(e),e.xsrfCookieName&&B.withXsrfCookieName(e.xsrfCookieName),e.xsrfHeaderName&&B.withXsrfHeaderName(e.xsrfHeaderName)},onRequest:q.onRequest.bind(q),onResponse:q.onResponse.bind(q),onError:q.onError.bind(q),processRequest:q.processRequest.bind(q),processResponse:q.processResponse.bind(q),processError:q.processError.bind(q)},zs=new class{requestHandlers=[];responseHandlers=[];onVisitRequest(e){return this.requestHandlers.push(e),()=>{this.requestHandlers=this.requestHandlers.filter(t=>t!==e)}}onVisitResponse(e){return this.responseHandlers.push(e),()=>{this.responseHandlers=this.responseHandlers.filter(t=>t!==e)}}async processRequest(e,t){let n=t;for(let t of this.requestHandlers)n=await t(e,n);return n}async processResponse(e,t){let n=t;for(let t of this.responseHandlers)n=await t(e,n);return n}},Bs=class e{callbacks=[];params;constructor(e){if(!e.prefetch)this.params=e;else{let t={onBefore:this.wrapCallback(e,`onBefore`),onBeforeUpdate:this.wrapCallback(e,`onBeforeUpdate`),onStart:this.wrapCallback(e,`onStart`),onProgress:this.wrapCallback(e,`onProgress`),onFinish:this.wrapCallback(e,`onFinish`),onCancel:this.wrapCallback(e,`onCancel`),onSuccess:this.wrapCallback(e,`onSuccess`),onError:this.wrapCallback(e,`onError`),onHttpException:this.wrapCallback(e,`onHttpException`),onNetworkError:this.wrapCallback(e,`onNetworkError`),onFlash:this.wrapCallback(e,`onFlash`),onCancelToken:this.wrapCallback(e,`onCancelToken`),onPrefetched:this.wrapCallback(e,`onPrefetched`),onPrefetching:this.wrapCallback(e,`onPrefetching`)};this.params={...e,...t,onPrefetchResponse:e.onPrefetchResponse||(()=>{}),onPrefetchError:e.onPrefetchError||(()=>{})}}}static create(t){return new e(t)}data(){return this.params.method===`get`?null:this.params.data}queryParams(){return this.params.method===`get`?this.params.data:{}}isPartial(){return this.params.only.length>0||this.params.except.length>0||this.params.reset.length>0}isPrefetch(){return this.params.prefetch===!0}isDeferredPropsRequest(){return this.params.deferredProps===!0}isPollRequest(){return this.params.poll===!0}onCancelToken(e){this.params.onCancelToken({cancel:e})}markAsFinished(){this.params.completed=!0,this.params.cancelled=!1,this.params.interrupted=!1}markAsCancelled({cancelled:e=!0,interrupted:t=!1}){this.params.onCancel(),this.params.completed=!1,this.params.cancelled=e,this.params.interrupted=t}wasCancelledAtAll(){return this.params.cancelled||this.params.interrupted}onFinish(){this.params.onFinish(this.params)}onStart(){this.params.onStart(this.params)}onPrefetching(){this.params.onPrefetching(this.params)}onPrefetchResponse(e){this.params.onPrefetchResponse&&this.params.onPrefetchResponse(e)}onPrefetchError(e){this.params.onPrefetchError&&this.params.onPrefetchError(e)}all(){return this.params}headers(){let e={...this.params.headers};this.isPartial()&&(e[`X-Inertia-Partial-Component`]=G.get().component);let t=this.params.only.concat(this.params.reset);return t.length>0&&(e[`X-Inertia-Partial-Data`]=t.join(`,`)),this.params.except.length>0&&(e[`X-Inertia-Partial-Except`]=this.params.except.join(`,`)),this.params.reset.length>0&&(e[`X-Inertia-Reset`]=this.params.reset.join(`,`)),this.params.errorBag&&this.params.errorBag.length>0&&(e[`X-Inertia-Error-Bag`]=this.params.errorBag),e}setPreserveOptions(t){this.params.preserveScroll=e.resolvePreserveOption(this.params.preserveScroll,t),this.params.preserveState=e.resolvePreserveOption(this.params.preserveState,t)}runCallbacks(){this.callbacks.forEach(({name:e,args:t})=>{this.params[e](...t)})}merge(e){this.params={...this.params,...e}}wrapCallback(e,t){return(...n)=>{this.recordCallback(t,n),e[t](...n)}}recordCallback(e,t){this.callbacks.push({name:e,args:t})}static resolvePreserveOption(e,t){return typeof e==`function`?e(t):e===`errors`?Object.keys(t.props.errors||{}).length>0:e}},Vs={createIframeAndPage(e){typeof e==`object`&&(e=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.<hr>${JSON.stringify(e)}`);let t=document.createElement(`html`);t.innerHTML=e,t.querySelectorAll(`a`).forEach(e=>e.setAttribute(`target`,`_top`));let n=document.createElement(`iframe`);return n.style.backgroundColor=`white`,n.style.borderRadius=`5px`,n.style.width=`100%`,n.style.height=`100%`,n.setAttribute(`sandbox`,`allow-scripts`),{iframe:n,page:t}},show(e){let{iframe:t,page:n}=this.createIframeAndPage(e);t.style.boxSizing=`border-box`,t.style.display=`block`;let r=document.createElement(`dialog`);r.id=`inertia-error-dialog`,Object.assign(r.style,{width:`calc(100vw - 100px)`,height:`calc(100vh - 100px)`,padding:`0`,margin:`auto`,border:`none`,backgroundColor:`transparent`});let i=document.createElement(`style`);i.textContent=`
11
- dialog#inertia-error-dialog::backdrop {
12
- background-color: rgba(0, 0, 0, 0.6);
13
- }
14
-
15
- dialog#inertia-error-dialog:focus {
16
- outline: none;
17
- }
18
- `;let a=io.get(`nonce`);a&&(i.nonce=a),document.head.appendChild(i),r.addEventListener(`click`,e=>{e.target===r&&r.close()}),r.addEventListener(`close`,()=>{i.remove(),r.remove()}),r.appendChild(t),document.body.prepend(r),r.showModal(),r.focus(),t.srcdoc=n.outerHTML}},Hs=(e,t)=>e===t||e.startsWith(`${t}.`),Us=(e,t)=>{let{only:n,except:r}=e;return!(n.length===0&&r.length===0||n.length>0&&!n.some(e=>Hs(t,e))||r.length>0&&r.some(e=>Hs(t,e)))},Ws=(e,t)=>t.some(t=>Us(e,t)),Gs=new ms,Ks=class e{constructor(e,t,n){this.requestParams=e,this.response=t,this.originatingPage=n}requestParams;response;originatingPage;wasPrefetched=!1;processed=!1;static create(t,n,r){return new e(t,n,r)}isProcessed(){return this.processed}async handlePrefetch(){cs(this.requestParams.all().url,window.location)&&this.handle()}async handle(){return Gs.add(()=>this.process())}async process(){if(this.requestParams.all().prefetch)return this.wasPrefetched=!0,this.requestParams.all().prefetch=!1,this.requestParams.all().onPrefetched(this.response,this.requestParams.all()),vo(this.response,this.requestParams.all()),Promise.resolve();if(this.requestParams.runCallbacks(),this.processed=!0,!this.isInertiaResponse())return this.handleNonInertiaResponse();if(this.isHttpException()){let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(this.requestParams.all().onHttpException(e)===!1||!uo(e))return}await K.processQueue(),K.preserveUrl=this.requestParams.all().preserveUrl,await this.setPage();let{flash:e}=G.get();Object.keys(e).length>0&&!this.requestParams.isDeferredPropsRequest()&&(bo(e),this.requestParams.all().onFlash(e));let t=G.get().props.errors||{};if(Object.keys(t).length>0){let e=this.getScopedErrors(t);return so(e,{page:G.get(),visitId:this.requestParams.all().id}),this.requestParams.all().onError(e)}Q.flushByCacheTags(this.requestParams.all().invalidateCacheTags||[]),this.wasPrefetched||Q.flush(G.get().url),_o(G.get(),{visitId:this.requestParams.all().id}),await this.requestParams.all().onSuccess(G.get()),K.preserveUrl=!1}mergeParams(e){this.requestParams.merge(e)}getPageResponse(){let e=this.getDataFromResponse(this.response.data);return typeof e==`object`?this.response.data={...e,flash:e.flash??{},rescuedProps:e.rescuedProps??[]}:this.response.data=e}async handleNonInertiaResponse(){if(this.isInertiaRedirect()){Q.visit(this.getHeader(`x-inertia-redirect`),{...this.requestParams.all(),method:`get`,data:{}});return}if(this.isLocationVisit()){let e=W(this.getHeader(`x-inertia-location`));return ss(this.requestParams.all().url,e),this.locationVisit(e)}let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(this.requestParams.all().onHttpException(e)!==!1&&uo(e))return Vs.show(e.data)}isInertiaResponse(){return this.hasHeader(`x-inertia`)}isHttpException(){return this.response.status>=400}hasStatus(e){return this.response.status===e}getHeader(e){return this.response.headers[e]}hasHeader(e){return this.getHeader(e)!==void 0}isInertiaRedirect(){return this.hasStatus(409)&&this.hasHeader(`x-inertia-redirect`)}isLocationVisit(){return this.hasStatus(409)&&this.hasHeader(`x-inertia-location`)}locationVisit(e){try{if(typeof window>`u`)return;let t=this.getHeader(`x-inertia-version`),n=!!t&&t!==G.get().version;if(!xo(e,n)||n&&this.requestParams.all().async)return;H.set(H.locationVisitKey,{preserveScroll:this.requestParams.all().preserveScroll===!0}),cs(window.location,e)?window.location.reload():window.location.href=e.href}catch{return!1}}async setPage(){let e=this.getPageResponse();return this.shouldSetPage(e)?(this.response=await zs.processResponse(this.requestParams.all(),this.response),this.mergeProps(e),G.mergeOncePropsIntoResponse(e),this.preserveOptimisticProps(e),this.preserveEqualProps(e),await this.setRememberedState(e),this.requestParams.setPreserveOptions(e),e.url=K.preserveUrl?G.get().url:this.pageUrl(e),this.requestParams.all().onBeforeUpdate(e),fo(e),G.set(e,{replace:this.requestParams.all().replace,preserveScroll:this.requestParams.all().preserveScroll,preserveState:this.requestParams.all().preserveState,viewTransition:this.requestParams.all().viewTransition,cached:this.requestParams.all().cached,visitId:this.requestParams.all().id})):Promise.resolve()}getDataFromResponse(e){if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}}shouldSetPage(e){if(!this.requestParams.all().async||this.originatingPage.component!==e.component)return!0;if(this.originatingPage.component!==G.get().component)return!1;let t=W(this.originatingPage.url),n=W(G.get().url);return t.origin===n.origin&&t.pathname===n.pathname}pageUrl(e){let t=W(e.url);return e.preserveFragment?t.hash=this.requestParams.all().url.hash:ss(this.requestParams.all().url,t),t.pathname+t.search+t.hash}preserveOptimisticProps(e){if(Q.hasPendingOptimistic())for(let t of Object.keys(e.props))G.hasBaseline(t)&&(G.updateBaseline(t,e.props[t]),e.props[t]=G.get().props[t])}preserveEqualProps(e){if(e.component!==G.get().component)return;let t=G.get().props;Object.entries(e.props).forEach(([n,r])=>{Hi(r,t[n])&&(e.props[n]=t[n])})}mergeProps(e){if(!this.requestParams.isPartial()||e.component!==G.get().component)return;let t=e.mergeProps||[],n=e.prependProps||[],r=e.deepMergeProps||[],i=e.matchPropsOn||[],a=(t,n)=>{let r=R(G.get().props,t),a=R(e.props,t);if(Array.isArray(a)){let o=this.mergeOrMatchItems(r||[],a,t,i,n);z(e.props,t,o)}else if(typeof a==`object`&&a){let n={...r||{},...a};z(e.props,t,n)}};t.forEach(e=>a(e,!0)),n.forEach(e=>a(e,!1)),r.forEach(t=>{let n=R(G.get().props,t),r=R(e.props,t),a=(e,t,n)=>Array.isArray(t)?this.mergeOrMatchItems(e,t,n,i):typeof t==`object`&&t?Object.keys(t).reduce((r,i)=>(r[i]=a(e?e[i]:void 0,t[i],`${n}.${i}`),r),{...e}):t;z(e.props,t,a(n,r,t))});let o=new Set([...this.requestParams.all().only,...this.requestParams.all().except].filter(e=>e.includes(`.`)).map(e=>e.split(`.`)[0]));for(let t of o){let n=G.get().props[t];this.isObject(n)&&this.isObject(e.props[t])&&(e.props[t]=this.deepMergeObjects(n,e.props[t]))}e.props={...G.get().props,...e.props},this.shouldPreserveErrors(e)&&(e.props.errors=G.get().props.errors),G.get().scrollProps&&(e.scrollProps={...G.get().scrollProps||{},...e.scrollProps||{}}),G.hasOnceProps()&&(e.onceProps={...G.get().onceProps||{},...e.onceProps||{}}),this.requestParams.isDeferredPropsRequest()&&(e.flash={...G.get().flash});let s=G.get().initialDeferredProps;s&&Object.keys(s).length>0&&(e.initialDeferredProps=s),e.rescuedProps=this.mergeRescuedProps(e)}mergeRescuedProps(e){let t=G.get().rescuedProps??[],n=e.rescuedProps??[],r=new Set(t.filter(e=>!Us(this.requestParams.all(),e)));return n.forEach(e=>r.add(e)),Array.from(r)}shouldPreserveErrors(e){if(!this.requestParams.all().preserveErrors)return!1;let t=G.get().props.errors;if(!t||Object.keys(t).length===0)return!1;let n=e.props.errors;return!(n&&Object.keys(n).length>0)}isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}deepMergeObjects(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];this.isObject(i)&&this.isObject(a)?n[r]=this.deepMergeObjects(i,a):n[r]=a}return n}mergeOrMatchItems(e,t,n,r,i=!0){let a=Array.isArray(e)?e:[],o=r.find(e=>e.split(`.`).slice(0,-1).join(`.`)===n);if(!o)return i?[...a,...t]:[...t,...a];let s=o.split(`.`).pop()||``,c=new Map;return t.forEach(e=>{this.hasUniqueProperty(e,s)&&c.set(e[s],e)}),i?this.appendWithMatching(a,t,c,s):this.prependWithMatching(a,t,c,s)}appendWithMatching(e,t,n,r){let i=e.map(e=>this.hasUniqueProperty(e,r)&&n.has(e[r])?n.get(e[r]):e),a=t.filter(t=>!this.hasUniqueProperty(t,r)||!e.some(e=>this.hasUniqueProperty(e,r)&&e[r]===t[r]));return[...i,...a]}prependWithMatching(e,t,n,r){let i=e.filter(e=>!this.hasUniqueProperty(e,r)||!n.has(e[r]));return[...t,...i]}hasUniqueProperty(e,t){return e&&typeof e==`object`&&t in e}async setRememberedState(e){let t=await K.getState(K.rememberedState,{});this.requestParams.all().preserveState&&t&&e.component===G.get().component&&(e.rememberedState=t)}getScopedErrors(e){return this.requestParams.all().errorBag?e[this.requestParams.all().errorBag||``]||{}:e}},qs=class e{constructor(e,t,{optimistic:n=!1}={}){this.page=t,this.requestParams=Bs.create(e),this.cancelToken=new AbortController,this.optimistic=n}page;response;cancelToken;requestParams;requestHasFinished=!1;optimistic;static create(t,n,r){return new e(t,n,r)}isPrefetch(){return this.requestParams.isPrefetch()}isOptimistic(){return this.optimistic}isPendingOptimistic(){return this.isOptimistic()&&(!this.response||!this.response.isProcessed())}async send(){this.requestParams.onCancelToken(()=>this.cancel({cancelled:!0})),go(this.requestParams.all()),this.requestParams.onStart(),this.requestParams.all().prefetch&&(this.requestParams.onPrefetching(),yo(this.requestParams.all()));let e=this.requestParams.all().prefetch,t={method:this.requestParams.all().method,url:os(this.requestParams.all().url).href,data:this.requestParams.data(),signal:this.cancelToken.signal,headers:this.getHeaders(),onUploadProgress:this.onProgress.bind(this)},n=await zs.processRequest(this.requestParams.all(),t);return Rs.getClient().request(n).then(e=>(this.response=Ks.create(this.requestParams,e,this.page),this.response.handle())).catch(e=>e instanceof Es?(this.response=Ks.create(this.requestParams,e.response,this.page),this.response.handle()):Promise.reject(e)).catch(t=>{if(!(t instanceof Ds)&&this.requestParams.all().onNetworkError(t)!==!1&&co(t))return e&&this.requestParams.onPrefetchError(t),Promise.reject(t)}).finally(()=>{this.finish(),e&&this.response&&this.requestParams.onPrefetchResponse(this.response)})}finish(){this.requestParams.wasCancelledAtAll()||(this.requestParams.markAsFinished(),this.fireFinishEvents())}fireFinishEvents(){this.requestHasFinished||(this.requestHasFinished=!0,lo(this.requestParams.all()),this.requestParams.onFinish())}cancel({cancelled:e=!1,interrupted:t=!1}){this.requestHasFinished||(this.cancelToken.abort(),this.requestParams.markAsCancelled({cancelled:e,interrupted:t}),this.fireFinishEvents())}onProgress(e){this.requestParams.data()instanceof FormData&&(ho(e),this.requestParams.all().onProgress(e))}getHeaders(){let e={...this.requestParams.headers(),Accept:`text/html, application/xhtml+xml`,"X-Requested-With":`XMLHttpRequest`,"X-Inertia":!0},t=G.get();t.version&&(e[`X-Inertia-Version`]=t.version);let n=Object.entries(t.onceProps||{}).filter(([,e])=>R(t.props,e.prop)===void 0?!1:!e.expiresAt||e.expiresAt>Date.now()).map(([e])=>e);return n.length>0&&(e[`X-Inertia-Except-Once-Props`]=n.join(`,`)),e}},Js=class{requests=[];maxConcurrent;interruptible;constructor({maxConcurrent:e,interruptible:t}){this.maxConcurrent=e,this.interruptible=t}send(e){this.requests.push(e),e.send().finally(()=>{this.requests=this.requests.filter(t=>t!==e)})}interruptInFlight(){this.cancel({interrupted:!0},!1)}cancelInFlight({prefetch:e=!0,optimistic:t=!0}={}){this.requests.filter(t=>e||!t.isPrefetch()).filter(e=>t||!e.isOptimistic()).forEach(e=>e.cancel({cancelled:!0}))}cancel({cancelled:e=!1,interrupted:t=!1}={},n=!1){!n&&!this.shouldCancel()||this.requests.shift()?.cancel({cancelled:e,interrupted:t})}shouldCancel(){return this.interruptible&&this.requests.length>=this.maxConcurrent}hasPendingOptimistic(){return this.requests.some(e=>e.isPendingOptimistic())}},J=()=>{},Ys=class{syncRequestStream=new Js({maxConcurrent:1,interruptible:!0});asyncRequestStream=new Js({maxConcurrent:1/0,interruptible:!1});clientVisitQueue=new ms;pendingOptimisticCallback=void 0;init({initialPage:e,resolveComponent:t,swapComponent:n,onFlash:r}){G.init({initialPage:e,resolveComponent:t,swapComponent:n,onFlash:r}),Ss.handle(),ys.init(),ys.on(`missingHistoryItem`,()=>{typeof window<`u`&&this.visit(window.location.href,{preserveState:!0,preserveScroll:!0,replace:!0})}),ys.on(`loadDeferredProps`,e=>{this.loadDeferredProps(e)}),ys.on(`historyQuotaExceeded`,e=>{window.location.href=e})}optimistic(e){return this.pendingOptimisticCallback=e,this}get(e,t={},n={}){return this.visit(e,{...n,method:`get`,data:t})}post(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`post`,data:t})}put(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`put`,data:t})}patch(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`patch`,data:t})}delete(e,t={}){return this.visit(e,{preserveState:!0,...t,method:`delete`})}reload(e={}){return this.doReload(e)}doReload(e={}){if(!(typeof window>`u`))return this.visit(window.location.href,{...e,preserveScroll:!0,preserveState:!0,async:!0,headers:{...e.headers||{},"Cache-Control":`no-cache`}})}remember(e,t=`default`){K.remember(e,t)}restore(e=`default`){return K.restore(e)}on(e,t){return typeof window>`u`?()=>{}:ys.onGlobalEvent(e,t)}once(e,t){if(typeof window>`u`)return()=>{};let n=this.on(e,e=>(n(),t(e)));return n}hasPendingOptimistic(){return this.asyncRequestStream.hasPendingOptimistic()}get activePolls(){return ws.count}cancelAll({async:e=!0,prefetch:t=!0,sync:n=!0}={}){e&&this.asyncRequestStream.cancelInFlight({prefetch:t}),n&&this.syncRequestStream.cancelInFlight()}poll(e,t={},n={}){return ws.add(e,({onStart:e,onFinish:n})=>{let r=typeof t==`function`?t():t;this.doReload({poll:!0,preserveErrors:!0,...r,onCancelToken:t=>{e(t.cancel),r.onCancelToken?.(t)},onFinish:e=>{n(),r.onFinish?.(e)}})},{autoStart:n.autoStart??!0,keepAlive:n.keepAlive??!1,mode:n.mode})}visit(e,t={}){t.optimistic=t.optimistic??this.pendingOptimisticCallback,this.pendingOptimisticCallback=void 0,t.optimistic&&(t.async=t.async??!0);let n=this.getPendingVisit(e,{...t,showProgress:t.showProgress??(!t.async||!!t.optimistic)}),r=this.getVisitEvents(t);if(r.onBefore(n)===!1||!oo(n))return;let i=W(G.get().url);(n.only.length>0||n.except.length>0||n.reset.length>0?ls(n.url,i):cs(n.url,i))||this.asyncRequestStream.cancelInFlight({prefetch:!1,optimistic:!1}),n.async||this.syncRequestStream.interruptInFlight(),t.optimistic&&this.applyOptimisticUpdate(t.optimistic,r),!G.isCleared()&&!n.preserveUrl&&U.save();let a={...n,...r},o=()=>{let e=Lo.get(a);e?($c.reveal(e.inFlight),Lo.use(e,a)):($c.reveal(!0),(n.async?this.asyncRequestStream:this.syncRequestStream).send(qs.create(a,G.get(),{optimistic:!!t.optimistic})))};Array.isArray(n.component)&&(console.error(`The "component" prop received an array of components (${n.component.join(`, `)}), but only a single component string is supported for instant visits. Pass an explicit component name instead.`),n.component=null),n.component?K.processQueue().then(()=>{this.performInstantSwap(n).then(()=>{a.preserveScroll=!0,a.preserveState=!0,a.replace=!0,a.viewTransition=!1,o()})}):o()}getCached(e,t={}){return Lo.findCached(this.getPrefetchParams(e,t))}flush(e,t={}){Lo.remove(this.getPrefetchParams(e,t))}flushAll(){Lo.removeAll()}flushByCacheTags(e){Lo.removeByTags(Array.isArray(e)?e:[e])}getPrefetching(e,t={}){return Lo.findInFlight(this.getPrefetchParams(e,t))}prefetch(e,t={},n={}){if((t.method??(us(e)?e.method:`get`))!==`get`)throw Error(`Prefetch requests must use the GET method`);let r=this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1});if(r.url.origin+r.url.pathname+r.url.search===window.location.origin+window.location.pathname+window.location.search)return;let i=this.getVisitEvents(t);if(i.onBefore(r)===!1||!oo(r))return;$c.hide(),this.asyncRequestStream.interruptInFlight();let a={...r,...i};new Promise(e=>{let t=()=>{G.get()?e():setTimeout(t,50)};t()}).then(()=>{Lo.add(a,e=>{this.asyncRequestStream.send(qs.create(e,G.get()))},{cacheFor:io.get(`prefetch.cacheFor`),cacheTags:[],...n})})}clearHistory(){K.clear()}decryptHistory(){return K.decrypt()}resolveComponent(e,t){return G.resolve(e,t)}replace(e){this.clientVisit(e,{replace:!0})}replaceProp(e,t,n){this.replace({preserveScroll:!0,preserveState:!0,props(n){let r=typeof t==`function`?t(R(n,e),n):t;return z(L(n),e,r)},...n||{}})}appendToProp(e,t,n){this.replaceProp(e,(e,n)=>{let r=typeof t==`function`?t(e,n):t;return Array.isArray(e)||(e=e===void 0?[]:[e]),[...e,r]},n)}prependToProp(e,t,n){this.replaceProp(e,(e,n)=>{let r=typeof t==`function`?t(e,n):t;return Array.isArray(e)||(e=e===void 0?[]:[e]),[r,...e]},n)}push(e){this.clientVisit(e)}flash(e,t){let n=G.get().flash,r;if(typeof e==`function`)r=e(n);else if(typeof e==`string`)r={...n,[e]:t};else if(e&&Object.keys(e).length)r={...n,...e};else return;G.setFlash(r),Object.keys(r).length&&bo(r)}clientVisit(e,{replace:t=!1}={}){this.clientVisitQueue.add(()=>this.performClientVisit(e,{replace:t}))}performClientVisit(e,{replace:t=!1}={}){let n=G.get(),r=typeof e.props==`function`?Object.fromEntries(Object.values(n.onceProps??{}).map(e=>[e.prop,R(n.props,e.prop)])):{},i=typeof e.props==`function`?e.props(n.props,r):e.props??n.props,a=typeof e.flash==`function`?e.flash(n.flash):e.flash,{viewTransition:o,onError:s,onFinish:c,onFlash:l,onSuccess:u,...d}=e,f={...n,...d,flash:a??{},props:i},p=Bs.resolvePreserveOption(e.preserveScroll??!1,f),m=Bs.resolvePreserveOption(e.preserveState??!1,f),h=this.createVisitId();return G.set(f,{replace:t,preserveScroll:p,preserveState:m,viewTransition:o,visitId:h}).then(()=>{mo(G.get(),{replace:t,visitId:h});let n=G.get().flash;Object.keys(n).length>0&&(bo(n),l?.(n));let r=G.get().props.errors||{};if(Object.keys(r).length===0){u?.(G.get());return}let i=e.errorBag?r[e.errorBag||``]||{}:r;s?.(i)}).finally(()=>c?.(e))}performInstantSwap(e){let t=G.get(),n=Object.fromEntries((t.sharedProps??[]).filter(e=>e in t.props).map(e=>[e,t.props[e]])),r=typeof e.pageProps==`function`?e.pageProps(L(t.props),L(n)):e.pageProps,i=r===null?{...n}:{...r},a={component:e.component,url:e.url.pathname+e.url.search+e.url.hash,version:t.version,props:{...i,errors:{}},flash:{},rescuedProps:[],clearHistory:!1,encryptHistory:t.encryptHistory,sharedProps:t.sharedProps,rememberedState:{}};return G.set(a,{replace:e.replace,preserveScroll:Bs.resolvePreserveOption(e.preserveScroll,a),preserveState:!1,viewTransition:e.viewTransition,visitId:e.id})}getPrefetchParams(e,t){return{...this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1}),...this.getVisitEvents(t)}}createVisitId(){return xs()}getPendingVisit(e,t){if(us(e)){let n=e;e=n.url,t.method=t.method??n.method}let n=io.get(`visitOptions`),r=n&&n(e.toString(),L(t))||{},i={method:`get`,data:{},replace:!1,preserveScroll:!1,preserveState:!1,only:[],except:[],headers:{},errorBag:``,forceFormData:!1,queryStringArrayFormat:`brackets`,async:!1,showProgress:!0,fresh:!1,reset:[],preserveUrl:!1,preserveErrors:!1,prefetch:!1,invalidateCacheTags:[],viewTransition:!1,component:null,pageProps:null,cached:!1,...Mo(t),...Mo(r)},[a,o]=is(e,i.data,i.method,i.forceFormData,i.queryStringArrayFormat),s={id:this.createVisitId(),cancelled:!1,completed:!1,interrupted:!1,...i,url:a,data:o};return s.prefetch&&(s.headers.Purpose=`prefetch`),s}getVisitEvents(e){return{onCancelToken:e.onCancelToken||J,onBefore:e.onBefore||J,onBeforeUpdate:e.onBeforeUpdate||J,onStart:e.onStart||J,onProgress:e.onProgress||J,onFinish:e.onFinish||J,onCancel:e.onCancel||J,onSuccess:e.onSuccess||J,onError:e.onError||J,onHttpException:e.onHttpException||J,onNetworkError:e.onNetworkError||J,onFlash:e.onFlash||J,onPrefetched:e.onPrefetched||J,onPrefetching:e.onPrefetching||J}}applyOptimisticUpdate(e,t){let n=G.get().props,r=e(L(n));if(!r)return;let i=[];for(let e of Object.keys(r))Hi(n[e],r[e])||i.push(e);if(i.length===0)return;let a=G.nextOptimisticId(),o=G.get().component;for(let e of i)G.setBaseline(e,L(n[e]));G.registerOptimistic(a,e),G.setPropsQuietly({...n,...r});let s=!0,c=t.onSuccess;t.onSuccess=e=>(s=!1,c(e));let l=t.onFinish;t.onFinish=e=>{if(G.unregisterOptimistic(a),s&&G.get().component===o){let e=G.replayOptimistics();Object.keys(e).length>0&&G.setPropsQuietly({...G.get().props,...e})}return G.pendingOptimisticCount()===0&&G.clearOptimisticState(),l(e)}}loadDeferredProps(e){e&&Object.values(e).forEach(e=>{this.doReload({only:e,deferredProps:!0,preserveErrors:!0})})}},Xs=class{static createWayfinderCallback(...e){return()=>e.length===1?us(e[0])?e[0]:e[0]():{method:typeof e[0]==`function`?e[0]():e[0],url:typeof e[1]==`function`?e[1]():e[1]}}static parseUseFormArguments(...e){return e.length===0?{rememberKey:null,data:{},precognitionEndpoint:null}:e.length===1?{rememberKey:null,data:e[0],precognitionEndpoint:null}:e.length===2?typeof e[0]==`string`?{rememberKey:e[0],data:e[1],precognitionEndpoint:null}:{rememberKey:null,data:e[1],precognitionEndpoint:this.createWayfinderCallback(e[0])}:{rememberKey:null,data:e[2],precognitionEndpoint:this.createWayfinderCallback(e[0],e[1])}}static parseSubmitArguments(e,t){return e.length===3||e.length===2&&typeof e[0]==`string`?{method:e[0],url:e[1],options:e[2]??{}}:us(e[0])?{...e[0],options:e[1]??{}}:{...t(),options:e[0]??{}}}static mergeHeadersForValidation(e,t,n){let r=e=>(e.headers={...n??{},...e.headers??{}},e);return e&&typeof e==`object`&&!(`target`in e)?e=r(e):t&&typeof t==`object`?t=r(t):typeof e==`string`?t=r(t??{}):e=r(e??{}),[e,t]}};function Zs(e){return e.includes(`.`)?e.replace(/\\\./g,`__ESCAPED_DOT__`).split(/(\[[^\]]*\])/).filter(Boolean).map(e=>e.startsWith(`[`)&&e.endsWith(`]`)?e:e.split(`.`).reduce((e,t,n)=>n===0?t:`${e}[${t}]`)).join(``).replace(/__ESCAPED_DOT__/g,`.`):e}function Qs(e){let t=[],n=/([^\[\]]+)|\[(\d*)\]/g,r;for(;(r=n.exec(e))!==null;)r[1]===void 0?r[2]!==void 0&&t.push(r[2]===``?``:Number(r[2])):t.push(r[1]);return t}function $s(e,t,n){let r=e;for(let e=0;e<t.length-1;e++)t[e]in r||(r[t[e]]={}),r=r[t[e]];r[t[t.length-1]]=n}function ec(e){let t=Object.keys(e),n=t.filter(e=>/^\d+$/.test(e)).map(Number).sort((e,t)=>e-t);return t.length===n.length&&n.length>0&&n[0]===0&&n.every((e,t)=>e===t)}function tc(e){if(Array.isArray(e))return e.map(tc);if(typeof e!=`object`||!e||Wo(e))return e;if(ec(e)){let t=[];for(let n=0;n<Object.keys(e).length;n++)t[n]=tc(e[n]);return t}let t={};for(let n in e)t[n]=tc(e[n]);return t}function nc(e){let t={};for(let[n,r]of e.entries()){if(r instanceof File&&r.size===0&&r.name===``)continue;let e=Qs(Zs(n));if(e[e.length-1]===``){let n=e.slice(0,-1),i=R(t,n);if(Array.isArray(i))i.push(r);else if(i&&typeof i==`object`&&!Wo(i)){let e=Object.keys(i).filter(e=>/^\d+$/.test(e)).map(Number).sort((e,t)=>e-t);z(t,n,e.length>0?[...e.map(e=>i[e]),r]:[r])}else z(t,n,[r]);continue}$s(t,e.map(String),r)}return tc(t)}var rc=`server`;function ic(e,t){return e.match(/\sdata-inertia(=|\s|>)/)?e:e.replace(/^<([a-zA-Z][^\s/>]*)/,`<$1 data-inertia="server-head-${t}"`)}function ac(e,t){if(!t)return[];let n=typeof t==`function`?t(e):e.props[t===!0?`head`:t];return Array.isArray(n)?n.map(e=>typeof e==`string`?e.trim():e).filter(e=>typeof e==`string`&&e.length>0).map(ic):[]}var oc={buildDOMElement(e){let t=document.createElement(`template`);t.innerHTML=e;let n=t.content.firstChild;if(!e.startsWith(`<script `))return n;let r=document.createElement(`script`);return r.innerHTML=n.innerHTML,n.getAttributeNames().forEach(e=>{r.setAttribute(e,n.getAttribute(e)||``)}),r},isInertiaManagedElement(e){return e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`data-inertia`)!==null},findMatchingElementIndex(e,t){let n=e.getAttribute(`data-inertia`);return n===null?-1:t.findIndex(e=>e.getAttribute(`data-inertia`)===n)},update:ao(function(e){let t=e.map(e=>this.buildDOMElement(e)),n=Array.from(document.head.childNodes).filter(e=>this.isInertiaManagedElement(e));t.some(e=>e instanceof HTMLTitleElement)&&document.head.querySelectorAll(`title:not([data-inertia])`).forEach(e=>e.remove()),n.forEach(e=>{let n=this.findMatchingElementIndex(e,t);if(n===-1){e.remove();return}let r=t.splice(n,1)[0];r&&!e.isEqualNode(r)&&e.replaceWith(r)}),t.forEach(e=>{document.head.appendChild(e)})},1)};function sc(e,t,n,r=[]){let i=r.length?{[rc]:r}:{},a=0;function o(){let e=a+=1;return i[e]=[],e.toString()}function s(e){e===null||Object.keys(i).indexOf(e)===-1||(delete i[e],f())}function c(e){Object.keys(i).indexOf(e)===-1&&(i[e]=[])}function l(e,t=[]){e!==null&&Object.keys(i).indexOf(e)>-1&&(i[e]=t),f()}function u(e=[]){e.length?i[rc]=e:delete i[rc],f()}function d(){let e=t(``),n=i[rc]||[],r=Object.keys(i).filter(e=>e!==rc).flatMap(e=>i[e]),a={...e?{title:`<title data-inertia="">${e}</title>`}:{}},o=n.concat(r).reduce((e,n)=>{if(n.indexOf(`<`)===-1)return e;if(n.indexOf(`<title `)===0){let r=n.match(/(<title [^>]+>)(.*?)(<\/title>)/s);return e.title=r?`${r[1]}${t(r[2])}${r[3]}`:n,e}let r=n.match(/ data-inertia=(["'])[^"']+\1/);return r?e[r[0]]=n:e[Object.keys(e).length]=n,e},a);return Object.values(o)}function f(){e?n(d()):oc.update(d())}return f(),{forceUpdate:f,updateServerHead:u,createProvider:function(){let e=o();return{reconnect:()=>c(e),update:t=>l(e,t),disconnect:()=>s(e)}}}}var cc=`X-Inertia-Infinite-Scroll-Merge-Intent`,lc=e=>{let t=()=>{let t=G.get().scrollProps?.[e.getPropName()];if(t)return t;throw Error(`The page object does not contain a scroll prop named "${e.getPropName()}".`)},n={component:null,loading:!1,previousPage:null,nextPage:null,lastLoadedPage:null,requestCount:0},r=()=>{let e=t();n.component=G.get().component,n.loading=!1,n.previousPage=e.previousPage,n.nextPage=e.nextPage,n.lastLoadedPage=e.currentPage,n.requestCount=0},i=()=>`inertia:infinite-scroll-data:${e.getPropName()}`;if(typeof window<`u`){r();let e=Q.restore(i());e&&typeof e==`object`&&e.lastLoadedPage===t().currentPage&&(n.previousPage=e.previousPage,n.nextPage=e.nextPage,n.lastLoadedPage=e.lastLoadedPage,n.requestCount=e.requestCount||0)}let a=Q.on(`success`,i=>{n.component===i.detail.page.component&&t().reset&&(r(),e.onReset?.())}),o=e=>e===`next`?`nextPage`:`previousPage`,s=e=>{let t=o(e);return n[t]},c=e=>{let r=t(),a=o(e);n.lastLoadedPage=r.currentPage,n[a]=r[a],n.requestCount+=1,Q.remember({previousPage:n.previousPage,nextPage:n.nextPage,lastLoadedPage:n.lastLoadedPage,requestCount:n.requestCount},i())},l=()=>t().pageName,u=()=>n.requestCount,d=(t,r={})=>{let i=s(t);n.loading||i===null||(n.loading=!0,Q.reload({preserveErrors:!0,...r,data:{...r.data||{},[l()]:i},only:[...r.only||[],e.getPropName()],preserveUrl:!0,headers:{[cc]:t===`previous`?`prepend`:`append`,...r.headers},onBefore:n=>{t===`next`?e.onBeforeNextRequest():e.onBeforePreviousRequest(),r.onBefore?.(n)},onBeforeUpdate:t=>{e.onBeforeUpdate(),r.onBeforeUpdate?.(t)},onSuccess:e=>{c(t),r.onSuccess?.(e)},onFinish:i=>{n.loading=!1;let a=i.completed,o=a?n.lastLoadedPage:null;t===`next`?e.onCompleteNextRequest(o,{page:o,completed:a}):e.onCompletePreviousRequest(o,{page:o,completed:a}),r.onFinish?.(i)}}))};return{getLastLoadedPage:()=>n.lastLoadedPage,getPageName:l,getRequestCount:u,hasPrevious:()=>!!n.previousPage,hasNext:()=>!!n.nextPage,fetchNext:e=>d(`next`,e),fetchPrevious:e=>d(`previous`,e),removeEventListener:a}},uc=()=>{let e=[];return{new:(t,n={})=>{let r=new IntersectionObserver(e=>{for(let n of e)n.isIntersecting&&t(n)},n);return e.push(r),r},flushAll:()=>{e.forEach(e=>e.disconnect()),e.length=0}}},dc=`infiniteScrollPage`,fc=`infiniteScrollIgnore`,pc=e=>e.dataset[dc],mc=e=>{let t=uc(),n,r,i,a,o=!1,s=()=>{a=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&f.add(e)})}),b()}),a.observe(e.getItemsElement(),{childList:!0}),n=t.new(t=>e.onItemIntersected(t.target));let o={root:e.getScrollableParent(),rootMargin:`${Math.max(1,e.getTriggerMargin())}px`};r=t.new(e.onPreviousTriggered,o),i=t.new(e.onNextTriggered,o)},c=()=>{o&&l();let t=e.getStartElement(),n=e.getEndElement();t&&e.shouldFetchPrevious()&&r.observe(t),n&&e.shouldFetchNext()&&i.observe(n),o=!0},l=()=>{o&&=(r.disconnect(),i.disconnect(),!1)},u=()=>{o&&c()},d=()=>{l(),t.flushAll(),a?.disconnect()},f=new Set,p=e=>!(dc in e.dataset)&&!(fc in e.dataset),m=()=>{Array.from(f).forEach(e=>{p(e)&&(e.dataset[fc]=`true`),n.observe(e)}),f.clear()},h=e=>Array.from(e.querySelectorAll(`:scope > *:not([data-infinite-scroll-page]):not([data-infinite-scroll-ignore])`)),g=!1,_=t=>{!g&&(g=!0,x())||(h(e.getItemsElement()).forEach(e=>{p(e)&&(e.dataset[dc]=t?.toString()||`1`),n.observe(e)}),y())},v=()=>`inertia:infinite-scroll-elements:${e.getPropName()}`,y=()=>{let t={},n=e.getItemsElement().childNodes;for(let e=0;e<n.length;e++){let r=n[e];if(r.nodeType!==Node.ELEMENT_NODE)continue;let i=pc(r);i!==void 0&&(i in t?t[i].to=e:t[i]={from:e,to:e})}Q.remember(t,v())},b=ao(y,250),x=()=>{let t=Q.restore(v());if(!t||typeof t!=`object`)return!1;let r=e.getItemsElement().childNodes;for(let e=0;e<r.length;e++){let i=r[e];if(i.nodeType!==Node.ELEMENT_NODE)continue;let a=i,o;for(let[n,r]of Object.entries(t))if(e>=r.from&&e<=r.to){o=n;break}if(o)a.dataset[dc]=o;else if(p(a))a.dataset[fc]=`true`;else continue;n.observe(a)}return!0};return{setupObservers:s,enableTriggers:c,disableTriggers:l,refreshTriggers:u,flushAll:d,processManuallyAddedElements:m,processServerLoadedElements:_}},hc=new ms,gc,_c,vc=null,yc=e=>{let t=!0,n=n=>{hc.add(()=>new Promise(r=>{if(!t)return gc=_c=null,r();if(!gc||!_c){let e=G.get().url;gc=W(e),_c=W(e),vc=fs(e)}let i=e.getPageName(),a=_c.searchParams;n===`1`?a.delete(i):a.set(i,n),setTimeout(()=>r())})).finally(()=>{t&&gc&&_c&&gc.href!==_c.href&&vc!==null&&Q.replace({url:ps(_c,vc),preserveScroll:!0,preserveState:!0}),gc=_c=vc=null})};return{onItemIntersected:ao(r=>{let i=e.getItemsElement();if(!t||e.shouldPreserveUrl()||!r||!i)return;let a=new Map;Bo([...i.children],r).forEach(e=>{let t=pc(e)??`1`;a.has(t)?a.set(t,a.get(t)+1):a.set(t,1)});let o=Array.from(a.entries()).sort((e,t)=>t[1]-e[1])[0]?.[0];o!==void 0&&n(o)},250),cancel:()=>t=!1}},bc=e=>({createCallbacks:()=>{let t,n=null,r=0;return{captureScrollPosition:()=>{let i=e.getScrollableParent(),a=e.getItemsElement();t=i?.scrollTop||window.scrollY;let o=Bo([...a.children]);if(o.length>0){n=o[0];let e=i?.getBoundingClientRect()||{top:0},t=i?e.top:0;r=n.getBoundingClientRect().top-t}},restoreScrollPosition:()=>{if(!n)return;let i=0,a=!1,o=()=>{if(i++,a||i>10)return!1;let s=e.getScrollableParent(),c=s?.getBoundingClientRect()||{top:0},l=s?c.top:0,u=n.getBoundingClientRect().top-l-r;if(u===0){window.requestAnimationFrame(o);return}s?s.scrollTo({top:t+u}):window.scrollTo(0,window.scrollY+u),a=!0};window.requestAnimationFrame(o)}}}});function xc(e){let t=yc({...e,getPageName:()=>i.getPageName()}),n=bc(e),r=mc({...e,onItemIntersected:t.onItemIntersected,onPreviousTriggered:()=>i.fetchPrevious(),onNextTriggered:()=>i.fetchNext()}),i=lc({...e,onBeforeUpdate:r.processManuallyAddedElements,onCompletePreviousRequest:(t,n)=>{e.onCompletePreviousRequest(n),n.completed&&Vo(()=>r.processServerLoadedElements(n.page),2)},onCompleteNextRequest:(t,n)=>{e.onCompleteNextRequest(n),n.completed&&Vo(()=>r.processServerLoadedElements(n.page),2)},onReset:e.onDataReset}),a=e=>{let{captureScrollPosition:t,restoreScrollPosition:r}=n.createCallbacks(),i=e.onBeforeUpdate||(()=>{}),a=e.onSuccess||(()=>{});return e.onBeforeUpdate=e=>{i(e),t()},e.onSuccess=e=>{a(e),r()},e},o=i.fetchNext;i.fetchNext=(t={})=>{t={...e.getReloadOptions?.(),...t},e.inReverseMode()&&(t=a(t)),o(t)};let s=i.fetchPrevious;i.fetchPrevious=(t={})=>{t={...e.getReloadOptions?.(),...t},e.inReverseMode()||(t=a(t)),s(t)};let c=Q.on(`success`,()=>Vo(r.refreshTriggers,2));return{dataManager:i,elementManager:r,flush:()=>{c(),i.removeEventListener(),r.flushAll(),t.cancel()}}}function Sc(){let e={},t={},n={shared:e,named:t},r=new Set,i=!1,a=()=>{n={shared:e,named:t}},o=()=>{i||(i=!0,queueMicrotask(()=>{i=!1,r.forEach(e=>e())}))};return{set(t){let n={...e,...t};Hi(e,n)||(e=n,a(),o())},setFor(e,n){let r=t[e]||{},i={...r,...n};Hi(r,i)||(t={...t,[e]:i},a(),o())},reset(){e={},t={},a(),o()},subscribe(e){return r.add(e),()=>r.delete(e)},get:()=>n}}function Cc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function wc(e){return Cc(e)&&`component`in e}function Tc(e,t){return`component`in e&&t(e.component)}function Ec(e,t){return!Cc(e)||t(e)||Tc(e,t)?!1:Object.values(e).every(e=>t(e)||Array.isArray(e)&&t(e[0])||wc(e)&&t(e.component))}function Dc(e,t){return Cc(e)&&!t(e)&&!Tc(e,t)&&!Ec(e,t)}function Oc(e,t){if(Dc(e,t))return!0;if(!Cc(e)||t(e)||Tc(e,t))return!1;let n=Object.values(e);return n.length>0&&n.every(e=>typeof e==`function`)}function kc(e,t){return Array.isArray(e)&&e.length===2&&t(e[0])&&Cc(e[1])&&!t(e[1])}function Ac(e,t){if(Array.isArray(e)&&t(e[0]))return{component:e[0],props:e[1]??{}};if(wc(e)&&t(e.component))return{component:e.component,props:e.props??{}};if(t(e))return{component:e,props:{}};throw Error(`Invalid layout definition: received ${typeof e}`)}function jc(e,t,n){return!e||n&&n(e)?[]:Ec(e,t)?Object.entries(e).map(([e,n])=>({...Ac(n,t),name:e})):kc(e,t)?[{component:e[0],props:e[1]??{}}]:Array.isArray(e)?e.map(e=>Ac(e,t)):wc(e)&&t(e.component)?[{component:e.component,props:e.props??{}}]:t(e)?[{component:e,props:{}}]:[]}function Mc(e){return e.target instanceof HTMLElement&&e.target.isContentEditable||e.defaultPrevented}function Nc(e){let t=e.currentTarget.tagName.toLowerCase()===`a`,n=t?e.currentTarget.target:``;return!(Mc(e)||t&&e.altKey||t&&e.ctrlKey||t&&e.metaKey||t&&e.shiftKey||t&&n!==``&&n!==`_self`||t&&`button`in e&&e.button!==0)}function Pc(e){let t=e.currentTarget.tagName.toLowerCase()===`button`;return!Mc(e)&&(e.key===`Enter`||t&&e.key===` `)}var Y=`nprogress`,Fc,X,Z={minimum:.08,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:`.bar, [role="bar"]`,spinnerSelector:`.spinner, [role="spinner"]`,parent:`body`,color:`#29d`,includeCSS:!0,popover:null,template:[`<div class="bar">`,`<div class="peg"></div>`,`</div>`,`<div class="spinner">`,`<div class="spinner-icon"></div>`,`</div>`].join(``)},Ic=null,Lc=!1,Rc=e=>{Object.assign(Z,e),Fc=Z.popover??`popover`in HTMLElement.prototype,Z.includeCSS&&Zc(Z.color),X=document.createElement(`div`),X.id=Y,X.setAttribute(`aria-hidden`,`true`),X.innerHTML=Z.template,Fc&&(X.popover=`manual`)},zc=e=>{let t=Bc();e=Jc(e,Z.minimum,1),Ic=e===1?null:e;let n=Wc(!t),r=n.querySelector(Z.barSelector),i=Z.speed,a=Z.easing;n.offsetWidth,Xc(t=>{let o={transition:`all ${i}ms ${a}`,transform:`translate3d(${Yc(e)}%,0,0)`};for(let e in o)r.style[e]=o[e];if(e!==1)return setTimeout(t,i);n.style.transition=`none`,n.style.opacity=`1`,n.offsetWidth,setTimeout(()=>{n.style.transition=`all ${i}ms linear`,n.style.opacity=`0`,setTimeout(()=>{Kc(),n.style.transition=``,n.style.opacity=``,t()},i)},i)})},Bc=()=>typeof Ic==`number`,Vc=()=>{Ic||zc(0);let e=function(){setTimeout(function(){Ic&&(Uc(),e())},Z.trickleSpeed)};Z.trickle&&e()},Hc=e=>{!e&&!Ic||(Uc(.3+.5*Math.random()),zc(1))},Uc=e=>{let t=Ic;if(t===null)return Vc();if(!(t>1))return e=typeof e==`number`?e:(()=>{let e={.1:[0,.2],.04:[.2,.5],.02:[.5,.8],.005:[.8,.99]};for(let n in e)if(t>=e[n][0]&&t<e[n][1])return parseFloat(n);return 0})(),zc(Jc(t+e,0,.994))},Wc=e=>{if(qc())return document.getElementById(Y);document.documentElement.classList.add(`${Y}-busy`);let t=X.querySelector(Z.barSelector),n=e?`-100`:Yc(Ic||0);if(t.style.transition=`all 0 linear`,t.style.transform=`translate3d(${n}%,0,0)`,Z.showSpinner||X.querySelector(Z.spinnerSelector)?.remove(),Fc)document.body.appendChild(X),Lc||X.showPopover();else{let e=Gc();e!==document.body&&e.classList.add(`${Y}-custom-parent`),e.appendChild(X),Lc&&(X.style.display=`none`)}return X},Gc=()=>document.querySelector(Z.parent),Kc=()=>{if(document.documentElement.classList.remove(`${Y}-busy`),Fc&&X?.isConnected)try{X.hidePopover()}catch{}Fc||Gc().classList.remove(`${Y}-custom-parent`),X?.remove()},qc=()=>document.getElementById(Y)!==null;function Jc(e,t,n){return e<t?t:e>n?n:e}var Yc=e=>(-1+e)*100,Xc=(()=>{let e=[],t=()=>{let n=e.shift();n&&n(t)};return n=>{e.push(n),e.length===1&&t()}})(),Zc=e=>{let t=document.createElement(`style`),n=io.get(`nonce`);n&&(t.nonce=n),t.textContent=`
19
- #${Y} {
20
- pointer-events: none;
21
- background: none;
22
- border: none;
23
- margin: 0;
24
- padding: 0;
25
- overflow: visible;
26
- inset: unset;
27
- width: 100%;
28
- height: 0;
29
- position: fixed;
30
- top: 0;
31
- left: 0;
32
- }
33
-
34
- #${Y}::backdrop {
35
- display: none;
36
- }
37
-
38
- #${Y} .bar {
39
- background: ${e};
40
-
41
- position: fixed;
42
- z-index: 1031;
43
- top: 0;
44
- left: 0;
45
-
46
- width: 100%;
47
- height: 2px;
48
- }
49
-
50
- #${Y} .peg {
51
- display: block;
52
- position: absolute;
53
- right: 0px;
54
- width: 100px;
55
- height: 100%;
56
- box-shadow: 0 0 10px ${e}, 0 0 5px ${e};
57
- opacity: 1.0;
58
-
59
- transform: rotate(3deg) translate(0px, -4px);
60
- }
61
-
62
- #${Y} .spinner {
63
- display: block;
64
- position: fixed;
65
- z-index: 1031;
66
- top: 15px;
67
- right: 15px;
68
- }
69
-
70
- #${Y} .spinner-icon {
71
- width: 18px;
72
- height: 18px;
73
- box-sizing: border-box;
74
-
75
- border: solid 2px transparent;
76
- border-top-color: ${e};
77
- border-left-color: ${e};
78
- border-radius: 50%;
79
-
80
- animation: ${Y}-spinner 400ms linear infinite;
81
- }
82
-
83
- .${Y}-custom-parent {
84
- overflow: hidden;
85
- position: relative;
86
- }
87
-
88
- .${Y}-custom-parent #${Y} .spinner,
89
- .${Y}-custom-parent #${Y} .bar {
90
- position: absolute;
91
- }
92
-
93
- @keyframes ${Y}-spinner {
94
- 0% { transform: rotate(0deg); }
95
- 100% { transform: rotate(360deg); }
96
- }
97
- `,document.head.appendChild(t)},Qc={configure:Rc,isStarted:Bc,done:Hc,set:zc,remove:Kc,start:Vc,status:Ic,show:()=>{if(Lc=!1,X?.isConnected)if(Fc)try{X.showPopover()}catch{}else X.style.display=``},hide:()=>{if(Lc=!0,X?.isConnected)if(Fc)try{X.hidePopover()}catch{}else X.style.display=`none`}},$c=new class{hideCount=0;start(){Qc.start()}reveal(e=!1){this.hideCount=Math.max(0,this.hideCount-1),(e||this.hideCount===0)&&Qc.show()}hide(){this.hideCount++,Qc.hide()}set(e){Qc.set(Math.max(0,Math.min(1,e)))}finish(){Qc.done()}reset(){Qc.set(0)}remove(){Qc.done(),Qc.remove()}isStarted(){return Qc.isStarted()}getStatus(){return Qc.status}},el=Symbol(`FormComponentReset`);function tl(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement}function nl(e,t){let n=e.value,r=e.checked;switch(e.type.toLowerCase()){case`checkbox`:e.checked=t.includes(e.value);break;case`radio`:e.checked=t[0]===e.value;break;case`file`:e.value=``;break;case`button`:case`submit`:case`reset`:case`image`:break;default:e.value=t[0]!==null&&t[0]!==void 0?String(t[0]):``}return e.value!==n||e.checked!==r}function rl(e,t){let n=e.value,r=Array.from(e.selectedOptions).map(e=>e.value);if(e.multiple){let n=t.map(e=>String(e));Array.from(e.options).forEach(e=>{e.selected=n.includes(e.value)})}else e.value=t[0]===void 0?``:String(t[0]);let i=Array.from(e.selectedOptions).map(e=>e.value);return e.multiple?JSON.stringify(r.sort())!==JSON.stringify(i.sort()):e.value!==n}function il(e,t){if(e.disabled){if(e instanceof HTMLInputElement){let t=e.value,n=e.checked;switch(e.type.toLowerCase()){case`checkbox`:case`radio`:return e.checked=e.defaultChecked,e.checked!==n;case`file`:return e.value=``,t!==``;case`button`:case`submit`:case`reset`:case`image`:return!1;default:return e.value=e.defaultValue,e.value!==t}}else if(e instanceof HTMLSelectElement){let t=Array.from(e.selectedOptions).map(e=>e.value);Array.from(e.options).forEach(e=>{e.selected=e.defaultSelected});let n=Array.from(e.selectedOptions).map(e=>e.value);return JSON.stringify(t.sort())!==JSON.stringify(n.sort())}else if(e instanceof HTMLTextAreaElement){let t=e.value;return e.value=e.defaultValue,e.value!==t}return!1}if(e instanceof HTMLInputElement)return nl(e,t);if(e instanceof HTMLSelectElement)return rl(e,t);if(e instanceof HTMLTextAreaElement){let n=e.value;return e.value=t[0]===void 0?``:String(t[0]),e.value!==n}return!1}function al(e,t){let n=!1;return e instanceof RadioNodeList||e instanceof HTMLCollection?Array.from(e).forEach((e,r)=>{e instanceof Element&&tl(e)&&(e instanceof HTMLInputElement&&[`checkbox`,`radio`].includes(e.type.toLowerCase())?il(e,t)&&(n=!0):il(e,t[r]===void 0?[t[0]??null].filter(Boolean):[t[r]])&&(n=!0))}):tl(e)&&(n=il(e,t)),n}function ol(e,t,n){if(!e)return;let r=!n||n.length===0;if(r){let r=new FormData(e),i=Array.from(e.elements).map(e=>tl(e)?e.name:``).filter(Boolean);n=[...new Set([...t.keys(),...r.keys(),...i])]}let i=!1;n.forEach(n=>{let r=e.elements.namedItem(n);r&&al(r,t.getAll(n))&&(i=!0)}),i&&r&&e.dispatchEvent(new CustomEvent(`reset`,{bubbles:!0,cancelable:!0,detail:{[el]:!0}}))}var Q=new Ys,sl=Sc(),cl=(0,e.ref)(sl.get());sl.subscribe(()=>{cl.value=sl.get()});function ll(){sl.reset(),cl.value=sl.get()}function ul(t){let{data:n,rememberKey:r}=t,{precognitionEndpoint:i}=t,a=typeof n==`function`,o=()=>a?n():n,s=r?Q.restore(r):null,c=L(s?.data??L(o())),l=e=>e,u=null,d=null,f=()=>d??Bl.get(`form.withAllErrors`),p,m=!1,h=[],g=(0,e.reactive)({...L(c),isDirty:!1,errors:{},hasErrors:!1,processing:!1,progress:null,wasSuccessful:!1,recentlySuccessful:!1,withPrecognition(...e){i=Xs.createWayfinderCallback(...e);let t=this,n=$a(e=>{let{method:t,url:n}=i(),r=L(l(this.data()));return e[t](n,r)},L(c));u=n,n.on(`validatingChanged`,()=>{t.validating=n.validating()}).on(`validatedChanged`,()=>{t.__valid=n.valid()}).on(`touchedChanged`,()=>{t.__touched=n.touched()}).on(`errorsChanged`,()=>{let e=f()?n.errors():eo(n.errors());this.errors={},this.setError(e),t.__valid=n.valid()});let r=(e,t)=>(t(e),e);return Object.assign(t,{__touched:[],__valid:[],validating:!1,validator:()=>n,withAllErrors:()=>r(t,()=>d=!0),valid:e=>t.__valid.includes(e),invalid:e=>e in this.errors,setValidationTimeout:e=>r(t,()=>n.setTimeout(e)),validateFiles:()=>r(t,()=>n.validateFiles()),withoutFileValidation:()=>r(t,()=>n.withoutFileValidation()),touch:(e,...r)=>(Array.isArray(e)?n.touch(e):typeof e==`string`?n.touch([e,...r]):n.touch(e),t),touched:e=>typeof e==`string`?t.__touched.includes(e):t.__touched.length>0,validate:(e,r)=>{if(typeof e==`object`&&!(`target`in e)&&(r=e,e=void 0),e===void 0)n.validate(r);else{let t=no(e),i=l(this.data());n.validate(t,R(i,t),r)}return t},setErrors:e=>r(t,()=>this.setError(e)),forgetError:e=>r(t,()=>this.clearErrors(no(e)))}),t},data(){return Object.keys(c).reduce((e,t)=>z(e,t,R(this,t)),{})},transform(e){return l=e,this},defaults(e,t){if(a)throw Error("You cannot call `defaults()` when using a function to define your form data.");return m=!0,e===void 0?(c=L(this.data()),this.isDirty=!1):c=typeof e==`string`?z(L(c),e,t):Object.assign({},L(c),e),u?.defaults(c),this},reset(...e){let t=L(a?L(o()):c);return e.length===0?(a&&(c=t),Object.assign(this,t)):e.filter(e=>ia(t,e)).forEach(e=>{a&&z(c,e,R(t,e)),z(this,e,R(t,e))}),u?.reset(...e),this},setError(e,t){let n=typeof e==`string`?{[e]:t}:e;return Object.assign(this.errors,n),this.hasErrors=Object.keys(this.errors).length>0,u?.setErrors(n),this},clearErrors(...e){return this.errors=Object.keys(this.errors).reduce((t,n)=>({...t,...e.length>0&&!e.includes(n)?{[n]:this.errors[n]}:{}}),{}),this.hasErrors=Object.keys(this.errors).length>0,u&&(e.length===0?u.setErrors({}):e.forEach(u.forgetError)),this},resetAndClearErrors(...e){return this.reset(...e),this.clearErrors(...e),this},__rememberable:r===null,__remember(){let e=this.data();if(h.length>0){let t={...e};return h.forEach(e=>delete t[e]),{data:t,errors:this.errors}}return{data:e,errors:this.errors}},__restore(e){Object.assign(this,e.data),this.setError(e.errors)}});return s?.errors&&g.setError(s.errors),(0,e.watch)(g,()=>{g.isDirty=!Hi(g.data(),c)},{immediate:!0,deep:!0}),(0,e.watch)(g,e=>{if(!r)return;let t=Q.restore(r),n=L(e.__remember());Hi(t,n)||Q.remember(n,r)},{immediate:!0,deep:!0}),i&&g.withPrecognition(i),{form:g,setDefaults:e=>{c=e},getTransform:()=>l,getPrecognitionEndpoint:()=>i??null,markAsSuccessful:()=>{g.clearErrors(),g.wasSuccessful=!0,g.recentlySuccessful=!0,p=setTimeout(()=>g.recentlySuccessful=!1,Bl.get(`form.recentlySuccessfulDuration`))},wasDefaultsCalledInOnSuccess:()=>m,resetDefaultsCalledInOnSuccess:()=>{m=!1},setRememberExcludeKeys:e=>{h=e},resetBeforeSubmit:()=>{g.wasSuccessful=!1,g.recentlySuccessful=!1,clearTimeout(p)},finishProcessing:()=>{g.processing=!1,g.progress=null},withAllErrors:{enabled:f,enable:()=>{d=!0}}}}var dl=null,fl=!1;function pl(e){if(fl)return;dl===null&&(fl=!0,dl=new Set(Object.keys(ml({}))),fl=!1);let t=Object.keys(e).filter(e=>dl.has(e));t.length>0&&console.error(`[Inertia] useForm() data contains field(s) that conflict with form properties: ${t.map(e=>`"${e}"`).join(`, `)}. These fields will be overwritten by form methods/properties. Please rename these fields.`)}function ml(...e){let{rememberKey:t,data:n,precognitionEndpoint:r}=Xs.parseUseFormArguments(...e);pl(L(typeof n==`function`?n():n));let i=null,a=null,{form:o,setDefaults:s,getTransform:c,getPrecognitionEndpoint:l,markAsSuccessful:u,wasDefaultsCalledInOnSuccess:d,resetDefaultsCalledInOnSuccess:f,setRememberExcludeKeys:p,resetBeforeSubmit:m,finishProcessing:h}=ul({data:n,rememberKey:t,precognitionEndpoint:r}),g=o,_=e=>(t,n={})=>{g.submit(e,t,n)};return Object.assign(g,{submit(...e){let{method:t,url:n,options:r}=Xs.parseSubmitArguments(e,l());f();let o={...r,onCancelToken:e=>(i=e,r.onCancelToken?.(e)),onBefore:e=>(m(),r.onBefore?.(e)),onStart:e=>(g.processing=!0,r.onStart?.(e)),onProgress:e=>(g.progress=e??null,r.onProgress?.(e)),onSuccess:async e=>{u();let t=r.onSuccess?await r.onSuccess(e):null;return d()||(s(L(g.data())),g.isDirty=!1),t},onError:e=>(g.clearErrors().setError(e),r.onError?.(e)),onCancel:()=>r.onCancel?.(),onFinish:e=>(h(),i=null,r.onFinish?.(e))};o.optimistic=o.optimistic??a??void 0,a=null;let p=c()(g.data());t===`delete`?Q.delete(n,{...o,data:p}):Q[t](n,p,o)},get:_(`get`),post:_(`post`),put:_(`put`),patch:_(`patch`),delete:_(`delete`),cancel(){i&&i.cancel()},dontRemember(...e){return p(e),g},optimistic(e){return a=e,g}}),l(),g}function hl(e){if(!e)return!1;if(typeof e==`function`)return!0;if(typeof e==`object`){let t=e;return typeof t.render==`function`||typeof t.setup==`function`||typeof t.template==`string`||`__file`in t||`__name`in t}return!1}function gl(e){if(typeof e!=`function`)return!1;let t=e;return t.length===2&&t.prototype===void 0}var _l=(0,e.ref)(void 0),$=(0,e.ref)(),vl=null,yl=(0,e.shallowRef)(null),bl=(0,e.ref)(void 0),xl;(0,e.defineComponent)({name:`Inertia`,props:{initialPage:{type:Object,required:!0},initialComponent:{type:Object,required:!1},resolveComponent:{type:Function,required:!1},titleCallback:{type:Function,required:!1,default:e=>e},onHeadUpdate:{type:Function,required:!1,default:()=>()=>{}},defaultLayout:{type:Function,required:!1},serverHead:{type:[Boolean,String,Function],required:!1}},setup({initialPage:t,initialComponent:n,resolveComponent:r,titleCallback:i,onHeadUpdate:a,defaultLayout:o,serverHead:s}){_l.value=n?(0,e.markRaw)(n):void 0,$.value={...t,flash:t.flash??{}},bl.value=void 0;let c=typeof window>`u`;if(xl=sc(c,e=>i?i(e,$.value):e,a||(()=>{}),ac(t,s)),!c){Q.init({initialPage:t,resolveComponent:r,swapComponent:async t=>{t.preserveState||ll(),_l.value=(0,e.markRaw)(t.component),$.value=t.page,bl.value=t.preserveState?bl.value:Date.now()},onFlash:e=>{$.value={...$.value,flash:e}}});let n=e=>{xl.updateServerHead(ac(e.detail.page,s))};Q.on(`navigate`,n),Q.on(`clientVisit`,n)}return()=>{if(_l.value){_l.value.inheritAttrs=!!_l.value.inheritAttrs;let t=(0,e.h)(_l.value,{...$.value.props,key:bl.value});if(yl.value&&=(_l.value.layout=yl.value,null),_l.value.layout&&gl(_l.value.layout))return _l.value.layout(e.h,t);let n,r=null,i=_l.value.layout;if(typeof i==`function`&&i.length<=1&&i.prototype===void 0){let e=i($.value.props);Oc(e,hl)?(n=o?.($.value.component,$.value),r=e):n=e}else Dc(i,hl)?(n=o?.($.value.component,$.value),r=i):n=i??o?.($.value.component,$.value);if(n){let i=jc(n,hl,_l.value.layout&&!r?gl:void 0);if(r&&(i=i.map(e=>({...e,props:{...e.props,...r}}))),i.length>0){let n=c?{shared:{},named:{}}:cl.value;return i.reduceRight((t,r)=>{let i=r.component;return i.inheritAttrs=!!i.inheritAttrs,(0,e.h)(i,{...$.value.props,...r.props,...n.shared,...r.name&&n.named[r.name]||{}},()=>t)},t)}}return t}}}});function Sl(){return vl||=(0,e.reactive)({props:(0,e.computed)(()=>$.value?.props),url:(0,e.computed)(()=>$.value?.url),component:(0,e.computed)(()=>$.value?.component),version:(0,e.computed)(()=>$.value?.version),clearHistory:(0,e.computed)(()=>$.value?.clearHistory),deferredProps:(0,e.computed)(()=>$.value?.deferredProps),rescuedProps:(0,e.computed)(()=>$.value?.rescuedProps),mergeProps:(0,e.computed)(()=>$.value?.mergeProps),prependProps:(0,e.computed)(()=>$.value?.prependProps),deepMergeProps:(0,e.computed)(()=>$.value?.deepMergeProps),matchPropsOn:(0,e.computed)(()=>$.value?.matchPropsOn),rememberedState:(0,e.computed)(()=>$.value?.rememberedState),encryptHistory:(0,e.computed)(()=>$.value?.encryptHistory),scrollProps:(0,e.computed)(()=>$.value?.scrollProps),flash:(0,e.computed)(()=>$.value?.flash)}),vl}(0,e.defineComponent)({name:`Deferred`,props:{data:{type:[String,Array],required:!0}},slots:Object,setup(t,{slots:n}){let r=(0,e.ref)(!1),i=new Set,a=Sl(),o=(0,e.computed)(()=>Array.isArray(t.data)?t.data:[t.data]),s=(0,e.computed)(()=>new Set(a.rescuedProps)),c=null,l=null;return(0,e.onMounted)(()=>{c=Q.on(`start`,e=>{let t=e.detail.visit;t.preserveState===!0&&ls(t.url,window.location)&&Ws(t,o.value)&&(i.add(t),r.value=!0)}),l=Q.on(`finish`,e=>{let t=e.detail.visit;i.has(t)&&(i.delete(t),r.value=i.size>0)})}),(0,e.onUnmounted)(()=>{c?.(),l?.(),i.clear()}),()=>{if(!n.fallback)throw Error("`<Deferred>` requires a `<template #fallback>` slot");let t=o.value.every(e=>R(a.props,e)!==void 0),i=o.value.some(e=>s.value.has(e)),c={reloading:r.value};return t&&!i?(0,e.h)(e.Fragment,{key:`default`},n.default?.(c)??[]):i&&n.rescue?(0,e.h)(e.Fragment,{key:`rescue`},n.rescue(c)):(0,e.h)(e.Fragment,{key:`fallback`},n.fallback({}))}}});var Cl=()=>void 0,wl=Symbol(`InertiaFormContext`);(0,e.defineComponent)({name:`Form`,slots:Object,props:{action:{type:[String,Object],default:``},method:{type:String,default:`get`},headers:{type:Object,default:()=>({})},queryStringArrayFormat:{type:String,default:`brackets`},errorBag:{type:[String,null],default:null},showProgress:{type:Boolean,default:!0},transform:{type:Function,default:e=>e},options:{type:Object,default:()=>({})},resetOnError:{type:[Boolean,Array],default:!1},resetOnSuccess:{type:[Boolean,Array],default:!1},setDefaultsOnSuccess:{type:Boolean,default:!1},onCancelToken:{type:Function,default:Cl},onBefore:{type:Function,default:Cl},onStart:{type:Function,default:Cl},onProgress:{type:Function,default:Cl},onFinish:{type:Function,default:Cl},onCancel:{type:Function,default:Cl},onSuccess:{type:Function,default:Cl},onError:{type:Function,default:Cl},onSubmitComplete:{type:Function,default:Cl},disableWhileProcessing:{type:Boolean,default:!1},invalidateCacheTags:{type:[String,Array],default:()=>[]},validateFiles:{type:Boolean,default:!1},validationTimeout:{type:Number,default:1500},optimistic:{type:Function,default:void 0},withAllErrors:{type:Boolean,default:null},component:{type:String,default:null},instant:{type:Boolean,default:!1}},setup(t,{slots:n,attrs:r,expose:i}){let a=()=>{let[e,n]=g();return t.transform(n)},o=ml({}).withPrecognition(()=>c.value,()=>g()[0]).transform(a).setValidationTimeout(t.validationTimeout);t.validateFiles&&o.validateFiles(),(t.withAllErrors??io.get(`form.withAllErrors`))&&o.withAllErrors();let s=(0,e.ref)(),c=(0,e.computed)(()=>us(t.action)?t.action.method:t.method.toLowerCase()),l=(0,e.computed)(()=>t.component?t.component:t.instant&&us(t.action)?ds(t.action):null),u=(0,e.ref)(!1),d=(0,e.ref)(new FormData),f=e=>{e.type===`reset`&&e.detail?.[el]&&e.preventDefault(),u.value=e.type!==`reset`&&!Hi(h(),nc(d.value))},p=[`input`,`change`,`reset`];(0,e.onMounted)(()=>{d.value=m(),o.defaults(h()),p.forEach(e=>s.value.addEventListener(e,f))}),(0,e.watch)(()=>t.validateFiles,e=>e?o.validateFiles():o.withoutFileValidation()),(0,e.watch)(()=>t.validationTimeout,e=>o.setValidationTimeout(e)),(0,e.onBeforeUnmount)(()=>p.forEach(e=>s.value?.removeEventListener(e,f)));let m=e=>new FormData(s.value,e),h=e=>nc(m(e)),g=e=>as(c.value,us(t.action)?t.action.url:t.action,h(e),t.queryStringArrayFormat),_=e=>{let[n,r]=g(e);if(e?.getAttribute(`formtarget`)===`_blank`&&c.value===`get`){window.open(n,`_blank`);return}let i=e=>{e&&(e===!0?v():e.length>0&&v(...e))},s={headers:t.headers,queryStringArrayFormat:t.queryStringArrayFormat,errorBag:t.errorBag,showProgress:t.showProgress,invalidateCacheTags:t.invalidateCacheTags,component:l.value,optimistic:t.optimistic?e=>t.optimistic(e,r):void 0,onCancelToken:t.onCancelToken,onBefore:t.onBefore,onStart:t.onStart,onProgress:t.onProgress,onFinish:t.onFinish,onCancel:t.onCancel,onSuccess:async(...e)=>{let n=await t.onSuccess?.(...e);return t.onSubmitComplete?.(S),i(t.resetOnSuccess),t.setDefaultsOnSuccess===!0&&x(),n},onError:(...e)=>{t.onError?.(...e),i(t.resetOnError)},...t.options};o.transform(()=>t.transform(r)).submit(c.value,n,s),o.transform(a)},v=(...e)=>{ol(s.value,d.value,e),o.reset(...e)},y=(...e)=>{o.clearErrors(...e)},b=(...e)=>{y(...e),v(...e)},x=()=>{d.value=m(),u.value=!1},S={get errors(){return o.errors},get hasErrors(){return o.hasErrors},get processing(){return o.processing},get progress(){return o.progress},get wasSuccessful(){return o.wasSuccessful},get recentlySuccessful(){return o.recentlySuccessful},get validating(){return o.validating},clearErrors:y,resetAndClearErrors:b,setError:(e,t)=>o.setError(typeof e==`string`?{[e]:t}:e),get isDirty(){return u.value},reset:v,submit:_,defaults:x,getData:h,getFormData:m,touch:o.touch,valid:o.valid,invalid:o.invalid,touched:o.touched,validate:(e,n)=>o.validate(...Xs.mergeHeadersForValidation(e,n,t.headers)),validator:()=>o.validator()};return i(S),(0,e.provide)(wl,S),()=>(0,e.h)(`form`,{...r,ref:s,action:us(t.action)?t.action.url:t.action,method:c.value,onSubmit:e=>{e.preventDefault(),_(e.submitter)},inert:t.disableWhileProcessing&&o.processing},n.default?n.default(S):[])}});function Tl(e){return typeof e.type==`string`&&[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`].indexOf(e.type)>-1}function El(e){e.props=e.props||{},e.props[`data-inertia`]=e.props[`head-key`]===void 0?``:e.props[`head-key`];let t=Object.keys(e.props).reduce((t,n)=>{let r=String(e.props[n]);return[`key`,`head-key`].includes(n)?t:r===``?t+` ${n}`:t+` ${n}="${va(r)}"`},``);return`<${String(e.type)}${t}>`}function Dl(e){let{children:t}=e;return typeof t==`string`?t:Array.isArray(t)?t.reduce((e,t)=>e+Nl(t),``):``}function Ol(e){return typeof e.type==`function`}function kl(e){return typeof e.type==`object`}function Al(e){return/(comment|cmt)/i.test(e.type.toString())}function jl(e){return/(fragment|fgt|symbol\(\))/i.test(e.type.toString())}function Ml(e){return/(text|txt)/i.test(e.type.toString())}function Nl(e){if(Ml(e))return String(e.children);if(jl(e)||Al(e))return``;let t=El(e);return e.children&&(t+=Dl(e)),Tl(e)||(t+=`</${String(e.type)}>`),t}function Pl(e,t){return t&&!e.find(e=>e.startsWith(`<title`))&&e.push(`<title data-inertia="">${va(t)}</title>`),e}function Fl(e,t){return Pl(e.flatMap(e=>Il(e)).map(e=>Nl(e)).filter(e=>e),t)}function Il(e){return Ol(e)?Il(e.type()):kl(e)?(console.warn(`Using components in the <Head> component is not supported.`),[]):Ml(e)&&e.children?e:jl(e)&&e.children?e.children.flatMap(e=>Il(e)):Al(e)?[]:e}(0,e.defineComponent)({props:{title:{type:String,required:!1}},setup(t,{slots:n}){let r=xl.createProvider();return(0,e.onBeforeUnmount)(()=>{r.disconnect()}),()=>{r.update(Fl(n.default?n.default():[],t.title))}}});var Ll=(e,t)=>e?typeof e==`string`?document.querySelector(e):typeof e==`function`?e()||null:t:t;(0,e.defineComponent)({name:`InfiniteScroll`,slots:Object,props:{data:{type:String,required:!0},buffer:{type:Number,default:0},onlyNext:{type:Boolean,default:!1},onlyPrevious:{type:Boolean,default:!1},as:{type:String,default:`div`},manual:{type:Boolean,default:!1},manualAfter:{type:Number,default:0},preserveUrl:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},autoScroll:{type:Boolean,default:void 0},itemsElement:{type:[String,Function,Object],default:null},startElement:{type:[String,Function,Object],default:null},endElement:{type:[String,Function,Object],default:null},params:{type:Object,default:()=>({})}},inheritAttrs:!1,setup(t,{slots:n,attrs:r,expose:i}){let a=(0,e.ref)(null),o=(0,e.ref)(null),s=(0,e.ref)(null),c=(0,e.computed)(()=>Ll(t.itemsElement,a.value)),l=(0,e.computed)(()=>zo(c.value)),u=(0,e.computed)(()=>Ll(t.startElement,o.value)),d=(0,e.computed)(()=>Ll(t.endElement,s.value)),f=(0,e.ref)(!1),p=(0,e.ref)(!1),m=(0,e.ref)(0),h=(0,e.ref)(!1),g=(0,e.ref)(!1),_=()=>{m.value=v.getRequestCount(),h.value=v.hasPrevious(),g.value=v.hasNext()},{dataManager:v,elementManager:y,flush:b}=xc({getPropName:()=>t.data,inReverseMode:()=>t.reverse,shouldFetchNext:()=>!t.onlyPrevious,shouldFetchPrevious:()=>!t.onlyNext,shouldPreserveUrl:()=>t.preserveUrl,getReloadOptions:()=>t.params,getTriggerMargin:()=>t.buffer,getStartElement:()=>u.value,getEndElement:()=>d.value,getItemsElement:()=>c.value,getScrollableParent:()=>l.value,onBeforePreviousRequest:()=>f.value=!0,onBeforeNextRequest:()=>p.value=!0,onCompletePreviousRequest:({completed:e})=>{f.value=!1,e&&_()},onCompleteNextRequest:({completed:e})=>{p.value=!1,e&&_()},onDataReset:_});if(_(),typeof window>`u`){let e=Sl().scrollProps?.[t.data];e&&(h.value=!!e.previousPage,g.value=!!e.nextPage)}let x=(0,e.computed)(()=>!S.value),S=(0,e.computed)(()=>t.manual||t.manualAfter>0&&m.value>=t.manualAfter),C=()=>{l.value?l.value.scrollTo({top:l.value.scrollHeight,behavior:`instant`}):window.scrollTo({top:document.body.scrollHeight,behavior:`instant`})};return(0,e.onMounted)(()=>{y.setupObservers(),y.processServerLoadedElements(v.getLastLoadedPage()),(t.autoScroll===void 0?t.reverse:t.autoScroll)&&C(),x.value&&y.enableTriggers()}),(0,e.onUnmounted)(b),(0,e.watch)(()=>[x.value,t.onlyNext,t.onlyPrevious],([e])=>{e?y.enableTriggers():y.disableTriggers()}),i({fetchNext:v.fetchNext,fetchPrevious:v.fetchPrevious,hasPrevious:v.hasPrevious,hasNext:v.hasNext}),()=>{let i=[],c={loadingPrevious:f.value,loadingNext:p.value,hasPrevious:h.value,hasNext:g.value};if(!t.startElement){let r=x.value&&!t.onlyNext,a={loading:f.value,fetch:v.fetchPrevious,autoMode:r,manualMode:!r,hasMore:h.value,...c};i.push((0,e.h)(`div`,{ref:o},n.previous?n.previous(a):f.value?n.loading?.(a):void 0))}if(i.push((0,e.h)(t.as,{...r,ref:a},n.default?.({loading:f.value||p.value,loadingPrevious:f.value,loadingNext:p.value}))),!t.endElement){let r=x.value&&!t.onlyPrevious,a={loading:p.value,fetch:v.fetchNext,autoMode:r,manualMode:!r,hasMore:g.value,...c};i.push((0,e.h)(`div`,{ref:s},n.next?n.next(a):p.value?n.loading?.(a):void 0))}return(0,e.h)(e.Fragment,{},t.reverse?[...i].reverse():i)}}});var Rl=()=>{},zl=(0,e.defineComponent)({name:`Link`,props:{as:{type:[String,Object],default:`a`},data:{type:Object,default:()=>({})},href:{type:[String,Object],default:``},method:{type:String,default:`get`},replace:{type:Boolean,default:!1},preserveScroll:{type:[Boolean,String,Function],default:!1},preserveState:{type:[Boolean,String,Function],default:null},preserveUrl:{type:Boolean,default:!1},only:{type:Array,default:()=>[]},except:{type:Array,default:()=>[]},headers:{type:Object,default:()=>({})},queryStringArrayFormat:{type:String,default:`brackets`},async:{type:Boolean,default:!1},prefetch:{type:[Boolean,String,Array],default:!1},cacheFor:{type:[Number,String,Array],default:0},onStart:{type:Function,default:Rl},onProgress:{type:Function,default:Rl},onFinish:{type:Function,default:Rl},onBefore:{type:Function,default:Rl},onCancel:{type:Function,default:Rl},onSuccess:{type:Function,default:Rl},onError:{type:Function,default:Rl},onCancelToken:{type:Function,default:Rl},onPrefetching:{type:Function,default:Rl},onPrefetched:{type:Function,default:Rl},cacheTags:{type:[String,Array],default:()=>[]},viewTransition:{type:[Boolean,Object],default:!1},component:{type:String,default:null},instant:{type:Boolean,default:!1},pageProps:{type:[Object,Function],default:null}},setup(t,{slots:n,attrs:r}){let i=(0,e.ref)(0),a=(0,e.ref)(),o=(0,e.computed)(()=>t.prefetch===!0?[`hover`]:t.prefetch===!1?[]:Array.isArray(t.prefetch)?t.prefetch:[t.prefetch]),s=(0,e.computed)(()=>t.cacheFor===0?o.value.length===1&&o.value[0]===`click`?0:Bl.get(`prefetch.cacheFor`):t.cacheFor);(0,e.onMounted)(()=>{o.value.includes(`mount`)&&_()}),(0,e.onUnmounted)(()=>{clearTimeout(a.value)});let c=(0,e.computed)(()=>us(t.href)?t.href.method:(t.method??`get`).toLowerCase()),l=(0,e.computed)(()=>typeof t.as!=`string`||t.as.toLowerCase()!==`a`?t.as:c.value===`get`?t.as.toLowerCase():`button`),u=(0,e.computed)(()=>as(c.value,us(t.href)?t.href.url:t.href,t.data||{},t.queryStringArrayFormat)),d=(0,e.computed)(()=>u.value[0]),f=(0,e.computed)(()=>u.value[1]),p=(0,e.computed)(()=>t.component?t.component:t.instant&&us(t.href)?ds(t.href):null),m=(0,e.computed)(()=>l.value===`button`?{type:`button`}:l.value===`a`||typeof l.value!=`string`?{href:d.value}:{}),h=(0,e.computed)(()=>({data:f.value,method:c.value,replace:t.replace,preserveScroll:t.preserveScroll,preserveState:t.preserveState??c.value!==`get`,preserveUrl:t.preserveUrl,only:t.only,except:t.except,headers:t.headers,async:t.async,component:p.value,pageProps:t.pageProps})),g=(0,e.computed)(()=>({...h.value,viewTransition:t.viewTransition,onCancelToken:t.onCancelToken,onBefore:t.onBefore,onStart:e=>{i.value++,t.onStart?.(e)},onProgress:t.onProgress,onFinish:e=>{i.value--,t.onFinish?.(e)},onCancel:t.onCancel,onSuccess:t.onSuccess,onError:t.onError})),_=()=>{Q.prefetch(d.value,{...h.value,onPrefetching:t.onPrefetching,onPrefetched:t.onPrefetched},{cacheFor:s.value,cacheTags:t.cacheTags})},v={onClick:e=>{Nc(e)&&(e.preventDefault(),Q.visit(d.value,g.value))}},y={onMouseenter:()=>{a.value=setTimeout(()=>{_()},Bl.get(`prefetch.hoverDelay`))},onMouseleave:()=>{clearTimeout(a.value)},onClick:v.onClick},b={onMousedown:e=>{Nc(e)&&(e.preventDefault(),_())},onKeydown:e=>{Pc(e)&&(e.preventDefault(),_())},onMouseup:e=>{Nc(e)&&(e.preventDefault(),Q.visit(d.value,g.value))},onKeyup:e=>{Pc(e)&&(e.preventDefault(),Q.visit(d.value,g.value))},onClick:e=>{Nc(e)&&e.preventDefault()}};return()=>(0,e.h)(l.value,{...r,...m.value,"data-loading":i.value>0?``:void 0,...o.value.includes(`hover`)?y:o.value.includes(`click`)?b:v},n)}});(0,e.defineComponent)({name:`WhenVisible`,slots:Object,props:{data:{type:[String,Array]},params:{type:Object},buffer:{type:Number,default:0},as:{type:String,default:`div`},always:{type:Boolean,default:!1}},setup(t,{slots:n}){let r=(0,e.ref)(!1),i=(0,e.ref)(!1),a=(0,e.ref)(null),o=(0,e.ref)(null),s=Sl(),c=(0,e.computed)(()=>t.data?Array.isArray(t.data)?t.data:[t.data]:[]);function l(){let e={preserveErrors:!0,...t.params};return t.data&&(e.only=Array.isArray(t.data)?t.data:[t.data]),e}function u(){typeof window>`u`||(a.value?.disconnect(),a.value=new IntersectionObserver(e=>{if(!e[0].isIntersecting||i.value||!t.always&&r.value)return;i.value=!0;let n=l();Q.reload({...n,onStart:e=>{i.value=!0,n.onStart?.(e)},onFinish:e=>{r.value=!0,i.value=!1,n.onFinish?.(e),t.always||a.value?.disconnect()}})},{rootMargin:`${t.buffer}px`}),o.value&&a.value.observe(o.value))}return(0,e.watch)(()=>c.value.map(e=>R(s.props,e)),()=>{let n=c.value.length>0&&c.value.every(e=>R(s.props,e)!==void 0);r.value=n,!(n&&!t.always)&&(!a.value||!n)&&(0,e.nextTick)(u)},{immediate:!0}),(0,e.onUnmounted)(()=>{a.value?.disconnect()}),()=>{let a=[];return(t.always||!r.value)&&a.push((0,e.h)(t.as,{ref:o})),r.value?n.default&&a.push(n.default({fetching:i.value})):a.push(n.fallback?n.fallback({}):null),a}}});var Bl=io.extend({}),Vl={en:{search:`Search`,close:`Close`,createNew:`Create new`,showEntries:`Show entries`,actions:`Actions`,first:`First`,previous:`Previous`,next:`Next`,last:`Last`,showingRecords:`Showing {first} to {last} of {filtered} records`,totalRecords:`{total} records in total`,loadingError:`Error loading data. See console for details.`},lv:{search:`Meklēt`,close:`Aizvērt`,createNew:`Izveidot jaunu`,showEntries:`Rādīt ierakstus`,actions:`Darbības`,first:`Pirmā`,previous:`Iepriekšējā`,next:`Nākamā`,last:`Pēdējā`,showingRecords:`Rāda {first}. līdz {last}. no {filtered} ierakstiem`,totalRecords:`kopā {total} ieraksti`,loadingError:`Kļūda, ielādējot datus. Sīkāku informāciju par kļūdu skaties konsolē.`},ru:{search:`Поиск`,close:`Закрыть`,createNew:`Создать`,showEntries:`Показать записи`,actions:`Действия`,first:`Первая`,previous:`Предыдущая`,next:`Следующая`,last:`Последняя`,showingRecords:`Показаны записи с {first} по {last} из {filtered}`,totalRecords:`всего {total} записей`,loadingError:`Ошибка загрузки данных. См. консоль для подробностей.`}},Hl=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Ul={name:`DatatableCard`,components:{Link:zl},props:{locale:{type:String,required:!1,default:`en`},vocabulary:{type:Object,required:!1,default:()=>({})},cardTitle:{type:String,required:!1,default:null},cardIconStyle:{type:String,required:!1,default:`card-header-primary`},cardIcon:{type:String,required:!1,default:null},cardClasses:{type:String,required:!1,default:null},createLink:{type:String,required:!1,default:null},columns:{type:Array,required:!0},url:{type:String,required:!0},selectableRows:{type:Boolean,required:!1,default:!1},order:{type:Array,required:!1,default:()=>[{column:0,dir:`asc`}]},advancedSearch:{type:Boolean,required:!1,default:!1},loadDataOnInit:{type:Boolean,required:!1,default:!0},requestQueryParams:{type:Object,required:!1,default:()=>({})},actions:{type:Array,required:!1},clickableRows:{type:Boolean,required:!1,default:!1},hyperlinkStyle:{type:String,required:!1,default:`Link`},pageLength:{type:Number,required:!1,default:10},showHeader:{type:Boolean,required:!1,default:!0}},emits:[`row-click`],data(){return{searchBarOpen:!1,rows:[],columnSettings:{},searchTerm:``,recordsTotal:0,recordsFiltered:0,selectedRows:[],cardError:null,searchTimer:null}},watch:{selectedRows:function(e,t){this.selectableRows&&(e.length===this.rows.length&&e.length>0?(this.$refs.selectAllRows.indeterminate=!1,this.$refs.selectAllRows.checked=!0):e.length===0?(this.$refs.selectAllRows.indeterminate=!1,this.$refs.selectAllRows.checked=!1):this.$refs.selectAllRows.indeterminate=!0)}},computed:{firstRecord(){return this.recordsFiltered===0?0:this.columnSettings.start+1},lastRecord(){return this.columnSettings.start+this.rows.length},currentPage(){return Math.ceil(this.columnSettings.start/this.columnSettings.length)+1},pageCount(){return Math.ceil(this.recordsFiltered/this.columnSettings.length)},lastPageStart(){return(this.pageCount-1)*this.columnSettings.length},columnSortingClasses(){let e=[];if(!this.columnSettings.order)return e;for(let t=0;t<this.columns.length;t++){let n=``;for(let e=0;e<this.columnSettings.order.length;e++)this.columnSettings.order[e].column==t&&(n=this.columnSettings.order[e].dir==`asc`?`sorting_asc`:`sorting_desc`);e.push(n)}return e},pages(){let e=[],t=this.currentPage-2,n=this.currentPage+2;t<1&&(t=1,n=5),n>this.pageCount&&(t=this.pageCount-4,n=this.pageCount),t<1&&(t=1);for(let r=t;r<=n;r++)e.push(r);return e}},methods:{getCellClasses(e,t){let n=[];if(!e.classes)return n;if(typeof e.classes==`string`)return n.push(e.classes),n;if(Array.isArray(e.classes)){let r=t[e.data];e.classes.forEach(e=>{if(!e||!e.class)return;let i=e.valueKey?t[e.valueKey]:r;if(typeof i==`string`&&(i=parseFloat(i.replace(`%`,``).trim())),typeof i!=`number`||isNaN(i))return;let a=e.min===void 0?-1/0:e.min,o=e.max===void 0?1/0:e.max;i>=a&&i<=o&&n.push(e.class)})}return n},handleEmit(e,t){this.$emit(e,t)},refresh(){this.initColumnSettings(),this.searchBarOpen=!1,this.loadDataOnInit?this.loadData():this.rows=[],this.selectedRows=[],this.advancedSearch||(this.$el.querySelector(`.filter-input`).value=``),this.$el.querySelectorAll(`.advanced-filter-input`).forEach(e=>{e.value=``})},toggleSearch(){this.advancedSearch||(this.searchBarOpen=!0),this.advancedSearch&&(this.searchBarOpen=!this.searchBarOpen)},clearSearch(){clearTimeout(this.searchTimer),this.searchBarOpen=!1;let e=this.$el.querySelector(`.filter-input`);e&&(e.value=``),this.columnSettings.search.value=``,this.columnSettings.start=0,this.loadData()},setAdvancedSearchFilters(){this.columnSettings.start=0,this.columnSettings.columns.forEach(e=>{if(!e.searchable)return;let t=this.$el.querySelector(`input[name="${CSS.escape(e.name)}"]`);e.search.value=t?.value??``}),this.loadData()},loadData(){this.columnSettings.draw++,this.clearSelectedRows();let e={...this.requestQueryParams,...this.columnSettings};I.get(this.url,{params:e}).then(e=>{if(e.data.error){this.cardError=this.t(`loadingError`),console.error(e.data.error);return}this.cardError=null,this.rows=e.data.data,this.recordsTotal=e.data.recordsTotal,this.recordsFiltered=e.data.recordsFiltered}).catch(e=>{this.cardError=e.response?.data?.message??this.t(`loadingError`),console.error(e)})},initColumnSettings(){this.columnSettings={draw:0,columns:this.columns.map((e,t)=>({data:e.data,name:e.name,searchable:e.searchable===void 0||e.searchable,sortable:e.sortable===void 0||e.sortable,visible:e.visible===void 0||e.visible,search:{value:``,regex:!1}})),order:this.order.map(e=>({...e})),start:0,length:this.pageLength,search:{value:``,regex:!1}}},setPageLength(e){this.columnSettings.length=e,this.columnSettings.start=0,this.loadData()},setPage(e){e<1||e>this.pageCount||(this.columnSettings.start=(e-1)*this.columnSettings.length,this.loadData())},setSearchTerm(){clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{let e=this.$el.querySelector(`.filter-input`);this.columnSettings.search.value=e?.value??``,this.columnSettings.start=0,this.loadData()},500)},setSorting(e){this.columnSettings.columns[e].sortable&&(this.columnSettings.order[0].column==e?this.columnSettings.order[0].dir=this.columnSettings.order[0].dir==`asc`?`desc`:`asc`:this.columnSettings.order=[{column:e,dir:`asc`}],this.loadData())},selectAllRows(){this.selectedRows.length==this.rows.length?this.selectedRows=[]:this.selectedRows=this.rows.map(e=>e.id)},clearSelectedRows(){this.selectedRows=[]},filterColumns(e){this.columnSettings.columns.forEach((t,n)=>{t.searchable&&(t.search.value=``,e.forEach(e=>{e.name==t.name&&(t.search.value=e.value)}))}),this.columnSettings.start=0,this.loadData()},getSelectedRows(){return this.selectedRows},t(e,t={}){let n=Vl[this.locale]??Vl.en,r=(this.vocabulary[this.locale]??this.vocabulary.en)?.[e]??n?.[e]??Vl.en[e]??e;return Object.entries(t).forEach(([e,t])=>{r=r.replaceAll(`{${e}}`,String(t))}),r}},created(){this.initColumnSettings()},mounted(){this.loadDataOnInit&&this.loadData()}},Wl={key:0,class:`card-icon`},Gl={key:0,class:`material-icons`},Kl={key:1,class:`material-icons`},ql={key:1,class:`card-title`},Jl={key:2,class:`card-title text-danger`},Yl={class:`form-group label-floating is-empty`},Xl=[`placeholder`],Zl=[`data-tippy-content`],Ql={class:`card-actions icons right-top`},$l={key:0},eu=[`data-tippy-content`],tu=[`data-tippy-content`],nu={class:`dropdown-menu dropdown-menu-right`},ru={class:`card-body`},iu={key:0,class:`bmd-form-group`},au=[`name`,`placeholder`],ou={type:`submit`,class:`btn btn-primary`},su={class:`table-responsive`},cu={class:`dataTables_wrapper no-footer`},lu={key:0},uu=[`onClick`],du={key:1,class:`w-25`},fu=[`onClick`],pu={key:0},mu=[`value`],hu=[`innerHTML`],gu=[`href`],_u={key:3},vu={key:1},yu=[`onClick`],bu={key:0,class:`material-icons`},xu={class:`d-flex justify-content-between align-items-center mt-3`},Su={class:`dataTables_info`},Cu={key:0},wu={class:`dataTables_paginate paging_simple_numbers user-select-none`,id:`document-index-table_paginate`},Tu=[`onClick`];function Eu(t,n,r,i,a,o){let s=(0,e.resolveComponent)(`Link`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`card`,r.cardClasses])},[r.showHeader||t.$slots.header?((0,e.openBlock)(),(0,e.createElementBlock)(`header`,{key:0,class:(0,e.normalizeClass)([`card-header`,[{"card-header-danger":a.cardError&&r.cardIcon,"card-header-icon":r.cardIcon},!a.cardError&&r.cardIcon?r.cardIconStyle:null]])},[(0,e.renderSlot)(t.$slots,`header`,{},void 0,!0),r.showHeader?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[r.cardIcon?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Wl,[a.cardError?((0,e.openBlock)(),(0,e.createElementBlock)(`i`,Kl,`dangerous`)):((0,e.openBlock)(),(0,e.createElementBlock)(`i`,Gl,(0,e.toDisplayString)(r.cardIcon),1))])):(0,e.createCommentVNode)(``,!0),r.cardTitle&&!a.cardError?((0,e.openBlock)(),(0,e.createElementBlock)(`h4`,ql,(0,e.toDisplayString)(r.cardTitle),1)):(0,e.createCommentVNode)(``,!0),a.cardError?((0,e.openBlock)(),(0,e.createElementBlock)(`h4`,Jl,(0,e.toDisplayString)(a.cardError),1)):(0,e.createCommentVNode)(``,!0),r.advancedSearch?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:3,class:(0,e.normalizeClass)([`card-search`,{open:a.searchBarOpen}])},[(0,e.createElementVNode)(`div`,Yl,[n[18]||=(0,e.createElementVNode)(`i`,{class:`material-icons search-icon-left`},`search`,-1),(0,e.createElementVNode)(`input`,{type:`text`,class:`form-control filter-input`,placeholder:o.t(`search`),autocomplete:`off`,onKeyup:n[0]||=(...e)=>o.setSearchTerm&&o.setSearchTerm(...e)},null,40,Xl),(0,e.createElementVNode)(`a`,{href:`javascript:void(0)`,class:`close-search`,onClick:n[1]||=(...e)=>o.clearSearch&&o.clearSearch(...e),"data-tippy-content":o.t(`close`)},[...n[17]||=[(0,e.createElementVNode)(`i`,{class:`material-icons`},`close`,-1)]],8,Zl)])],2)),(0,e.createElementVNode)(`ul`,Ql,[(0,e.renderSlot)(t.$slots,`actions`,{},void 0,!0),r.createLink?((0,e.openBlock)(),(0,e.createElementBlock)(`li`,$l,[(0,e.createVNode)(s,{href:r.createLink,"data-tippy-content":o.t(`createNew`)},{default:(0,e.withCtx)(()=>[...n[19]||=[(0,e.createElementVNode)(`i`,{class:`material-icons`},`add`,-1)]]),_:1},8,[`href`,`data-tippy-content`])])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`li`,null,[(0,e.createElementVNode)(`a`,{href:`javascript:void(0)`,"data-tippy-content":o.t(`search`),onClick:n[2]||=(...e)=>o.toggleSearch&&o.toggleSearch(...e)},[...n[20]||=[(0,e.createElementVNode)(`i`,{class:`material-icons`},`search`,-1)]],8,eu)]),(0,e.createElementVNode)(`li`,{class:`dropdown`,"data-tippy-content":o.t(`showEntries`)},[n[25]||=(0,e.createElementVNode)(`a`,{href:`javascript:void(0)`,"data-bs-toggle":`dropdown`},[(0,e.createElementVNode)(`i`,{class:`material-icons`},`more_vert`)],-1),(0,e.createElementVNode)(`ul`,nu,[(0,e.createElementVNode)(`li`,{onClick:n[3]||=e=>o.setPageLength(10)},[...n[21]||=[(0,e.createElementVNode)(`a`,{href:`javascript:void(0)`},`10`,-1)]]),(0,e.createElementVNode)(`li`,{onClick:n[4]||=e=>o.setPageLength(25)},[...n[22]||=[(0,e.createElementVNode)(`a`,{href:`javascript:void(0)`},`25`,-1)]]),(0,e.createElementVNode)(`li`,{onClick:n[5]||=e=>o.setPageLength(50)},[...n[23]||=[(0,e.createElementVNode)(`a`,{href:`javascript:void(0)`},`50`,-1)]]),(0,e.createElementVNode)(`li`,{onClick:n[6]||=e=>o.setPageLength(100)},[...n[24]||=[(0,e.createElementVNode)(`a`,{href:`javascript:void(0)`},`100`,-1)]])])],8,tu)])],64)):(0,e.createCommentVNode)(``,!0)],2)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,ru,[(0,e.renderSlot)(t.$slots,`default`,{},void 0,!0),r.advancedSearch?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:(0,e.normalizeClass)([`toolbar`,{open:a.searchBarOpen}])},[(0,e.createElementVNode)(`form`,{onSubmit:n[7]||=(0,e.withModifiers)((...e)=>o.setAdvancedSearchFilters&&o.setAdvancedSearchFilters(...e),[`prevent`])},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.columns,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:n},[t.searchable===!1?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,iu,[(0,e.createElementVNode)(`input`,{name:t.name,class:`form-control advanced-filter-input`,placeholder:t.displayName,autocomplete:`off`},null,8,au)]))],64))),128)),(0,e.createElementVNode)(`button`,ou,(0,e.toDisplayString)(o.t(`search`)),1)],32)],2)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,su,[(0,e.createElementVNode)(`div`,cu,[(0,e.createElementVNode)(`table`,{class:(0,e.normalizeClass)([`table data-table dataTable no-footer`,{"table-hover":r.clickableRows}])},[(0,e.createElementVNode)(`thead`,null,[(0,e.createElementVNode)(`tr`,null,[r.selectableRows?((0,e.openBlock)(),(0,e.createElementBlock)(`th`,lu,[(0,e.createElementVNode)(`input`,{type:`checkbox`,onClick:n[8]||=(...e)=>o.selectAllRows&&o.selectAllRows(...e),ref:`selectAllRows`},null,512)])):(0,e.createCommentVNode)(``,!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.columns,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:n},[t.visible===!1?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`th`,{key:0,class:(0,e.normalizeClass)([o.columnSortingClasses[n],t.sortable===!1?``:`sorting`]),onClick:e=>o.setSorting(n),style:(0,e.normalizeStyle)(t.width?{width:t.width}:{})},(0,e.toDisplayString)(t.displayName),15,uu))],64))),128)),r.actions?.length?((0,e.openBlock)(),(0,e.createElementBlock)(`th`,du,(0,e.toDisplayString)(o.t(`actions`)),1)):(0,e.createCommentVNode)(``,!0)])]),(0,e.createElementVNode)(`tbody`,null,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(a.rows,(i,c)=>((0,e.openBlock)(),(0,e.createElementBlock)(`tr`,{key:c,onClick:e=>r.clickableRows?t.$emit(`row-click`,i):null},[r.selectableRows?((0,e.openBlock)(),(0,e.createElementBlock)(`td`,pu,[(0,e.withDirectives)((0,e.createElementVNode)(`input`,{type:`checkbox`,value:i.id,"onUpdate:modelValue":n[9]||=e=>a.selectedRows=e,onClick:n[10]||=(0,e.withModifiers)(()=>{},[`stop`])},null,8,mu),[[e.vModelCheckbox,a.selectedRows]])])):(0,e.createCommentVNode)(``,!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.columns,(t,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:a},[t.visible===!1?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`td`,{key:0,class:(0,e.normalizeClass)(o.getCellClasses(t,i))},[t.render?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:0,innerHTML:t.render(i)},null,8,hu)):t.link&&r.hyperlinkStyle===`Link`?((0,e.openBlock)(),(0,e.createBlock)(s,{key:1,href:t.link(i),onClick:n[11]||=(0,e.withModifiers)(()=>{},[`stop`])},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(i[t.data]),1)]),_:2},1032,[`href`])):t.link&&r.hyperlinkStyle===`a`?((0,e.openBlock)(),(0,e.createElementBlock)(`a`,{key:2,href:t.link(i),onClick:n[12]||=(0,e.withModifiers)(()=>{},[`stop`])},(0,e.toDisplayString)(i[t.data]),9,gu)):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,_u,(0,e.toDisplayString)(i[t.data]),1))],2))],64))),128)),r.actions?.length?((0,e.openBlock)(),(0,e.createElementBlock)(`td`,vu,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.actions,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:n,class:(0,e.normalizeClass)([`btn btn-sm`,t.class]),onClick:(0,e.withModifiers)(e=>o.handleEmit(t.emit,i),[`stop`])},[t.icon?((0,e.openBlock)(),(0,e.createElementBlock)(`i`,bu,(0,e.toDisplayString)(t.icon),1)):(0,e.createCommentVNode)(``,!0),(0,e.createTextVNode)(` `+(0,e.toDisplayString)(t.label),1)],10,yu))),128))])):(0,e.createCommentVNode)(``,!0)],8,fu))),128))])],2),(0,e.createElementVNode)(`div`,xu,[(0,e.createElementVNode)(`div`,Su,[(0,e.createTextVNode)((0,e.toDisplayString)(o.t(`showingRecords`,{first:o.firstRecord,last:o.lastRecord,filtered:a.recordsFiltered}))+` `,1),a.recordsFiltered==a.recordsTotal?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Cu,` (`+(0,e.toDisplayString)(o.t(`totalRecords`,{total:a.recordsTotal}))+`) `,1))]),(0,e.createElementVNode)(`div`,wu,[(0,e.createElementVNode)(`a`,{class:(0,e.normalizeClass)([`paginate_button first user-select-none`,{disabled:a.columnSettings.start==0}]),onClick:n[13]||=e=>o.setPage(1)},(0,e.toDisplayString)(o.t(`first`)),3),(0,e.createElementVNode)(`a`,{class:(0,e.normalizeClass)([`paginate_button previous`,{disabled:a.columnSettings.start==0}]),onClick:n[14]||=e=>o.setPage(o.currentPage-1)},(0,e.toDisplayString)(o.t(`previous`)),3),(0,e.createElementVNode)(`span`,null,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(o.pages,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`a`,{key:n,class:(0,e.normalizeClass)([`paginate_button`,{current:t==o.currentPage}]),onClick:e=>o.setPage(t)},(0,e.toDisplayString)(t),11,Tu))),128))]),(0,e.createElementVNode)(`a`,{class:(0,e.normalizeClass)([`paginate_button next`,{disabled:a.columnSettings.start>=o.lastPageStart}]),onClick:n[15]||=e=>o.setPage(o.currentPage+1)},(0,e.toDisplayString)(o.t(`next`)),3),(0,e.createElementVNode)(`a`,{class:(0,e.normalizeClass)([`paginate_button last`,{disabled:a.columnSettings.start>=o.lastPageStart}]),onClick:n[16]||=e=>o.setPage(o.pageCount)},(0,e.toDisplayString)(o.t(`last`)),3)])])])])])],2)}return Hl(Ul,[[`render`,Eu],[`__scopeId`,`data-v-2e0fd0c6`]])});
9
+ `+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=Y(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&wn.assertOptions(n,{silentJSONParsing:Z.transitional(Z.boolean),forcedJSONParsing:Z.transitional(Z.boolean),clarifyTimeoutError:Z.transitional(Z.boolean),legacyInterceptorReqResOrdering:Z.transitional(Z.boolean),advertiseZstdAcceptEncoding:Z.transitional(Z.boolean),validateStatusUndefinedResolves:Z.transitional(Z.boolean)},!1),r!=null&&(R.isFunction(r)?t.paramsSerializer={serialize:r}:wn.assertOptions(r,{encode:Z.function,serialize:Z.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),wn.assertOptions(t,{baseUrl:Z.spelling(`baseURL`),withXsrfToken:Z.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&R.merge(i.common,i[t.method]);i&&R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=V.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||dt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[bn.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=bn.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=Y(this.defaults,e),lt(Ut(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};R.forEach([`delete`,`get`,`head`,`options`],function(e){Q.prototype[e]=function(t,n){return this.request(Y(n||{},{method:e,url:t,data:n&&R.hasOwnProp(n,`data`)?n.data:void 0}))}}),R.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(Y(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Q.prototype[e]=t(),e!==`query`&&(Q.prototype[e+`Form`]=t(!0))});var Tn=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let 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,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new q(e,r,i),t(n.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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function En(e){return function(t){return e.apply(null,t)}}function Dn(e){return R.isObject(e)&&e.isAxiosError===!0}var 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,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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(On).forEach(([e,t])=>{On[t]=e});function kn(e){let t=new Q(e),n=i(Q.prototype.request,t);return R.extend(n,Q.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return kn(Y(e,t))},n}var $=kn(K);$.Axios=Q,$.CanceledError=q,$.CancelToken=Tn,$.isCancel=Dt,$.VERSION=rn,$.toFormData=U,$.AxiosError=H,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=En,$.isAxiosError=Dn,$.mergeConfig=Y,$.AxiosHeaders=V,$.formToJSON=e=>wt(R.isHTMLForm(e)?new FormData(e):e),$.getAdapter=vn.getAdapter,$.HttpStatusCode=On,$.default=$;var An={en:{search:`Search`,close:`Close`,createNew:`Create new`,showEntries:`Show entries`,actions:`Actions`,first:`First`,previous:`Previous`,next:`Next`,last:`Last`,showingRecords:`Showing {first} to {last} of {filtered} records`,totalRecords:`{total} records in total`,loadingError:`Error loading data. See console for details.`},lv:{search:`Meklēt`,close:`Aizvērt`,createNew:`Izveidot jaunu`,showEntries:`Rādīt ierakstus`,actions:`Darbības`,first:`Pirmā`,previous:`Iepriekšējā`,next:`Nākamā`,last:`Pēdējā`,showingRecords:`Rāda {first}. līdz {last}. no {filtered} ierakstiem`,totalRecords:`kopā {total} ieraksti`,loadingError:`Kļūda, ielādējot datus. Sīkāku informāciju par kļūdu skaties konsolē.`},ru:{search:`Поиск`,close:`Закрыть`,createNew:`Создать`,showEntries:`Показать записи`,actions:`Действия`,first:`Первая`,previous:`Предыдущая`,next:`Следующая`,last:`Последняя`,showingRecords:`Показаны записи с {first} по {last} из {filtered}`,totalRecords:`всего {total} записей`,loadingError:`Ошибка загрузки данных. См. консоль для подробностей.`}},jn=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Mn={name:`DatatableCard`,components:{Link:e.Link},props:{locale:{type:String,required:!1,default:`en`},vocabulary:{type:Object,required:!1,default:()=>({})},cardTitle:{type:String,required:!1,default:null},cardIconStyle:{type:String,required:!1,default:`card-header-primary`},cardIcon:{type:String,required:!1,default:null},cardClasses:{type:String,required:!1,default:null},createLink:{type:String,required:!1,default:null},columns:{type:Array,required:!0},url:{type:String,required:!0},selectableRows:{type:Boolean,required:!1,default:!1},order:{type:Array,required:!1,default:()=>[{column:0,dir:`asc`}]},advancedSearch:{type:Boolean,required:!1,default:!1},loadDataOnInit:{type:Boolean,required:!1,default:!0},requestQueryParams:{type:Object,required:!1,default:()=>({})},actions:{type:Array,required:!1},clickableRows:{type:Boolean,required:!1,default:!1},hyperlinkStyle:{type:String,required:!1,default:`Link`},pageLength:{type:Number,required:!1,default:10},showHeader:{type:Boolean,required:!1,default:!0}},emits:[`row-click`],data(){return{searchBarOpen:!1,rows:[],columnSettings:{},searchTerm:``,recordsTotal:0,recordsFiltered:0,selectedRows:[],cardError:null,searchTimer:null}},watch:{selectedRows:function(e,t){this.selectableRows&&(e.length===this.rows.length&&e.length>0?(this.$refs.selectAllRows.indeterminate=!1,this.$refs.selectAllRows.checked=!0):e.length===0?(this.$refs.selectAllRows.indeterminate=!1,this.$refs.selectAllRows.checked=!1):this.$refs.selectAllRows.indeterminate=!0)}},computed:{firstRecord(){return this.recordsFiltered===0?0:this.columnSettings.start+1},lastRecord(){return this.columnSettings.start+this.rows.length},currentPage(){return Math.ceil(this.columnSettings.start/this.columnSettings.length)+1},pageCount(){return Math.ceil(this.recordsFiltered/this.columnSettings.length)},lastPageStart(){return(this.pageCount-1)*this.columnSettings.length},columnSortingClasses(){let e=[];if(!this.columnSettings.order)return e;for(let t=0;t<this.columns.length;t++){let n=``;for(let e=0;e<this.columnSettings.order.length;e++)this.columnSettings.order[e].column==t&&(n=this.columnSettings.order[e].dir==`asc`?`sorting_asc`:`sorting_desc`);e.push(n)}return e},pages(){let e=[],t=this.currentPage-2,n=this.currentPage+2;t<1&&(t=1,n=5),n>this.pageCount&&(t=this.pageCount-4,n=this.pageCount),t<1&&(t=1);for(let r=t;r<=n;r++)e.push(r);return e}},methods:{getCellClasses(e,t){let n=[];if(!e.classes)return n;if(typeof e.classes==`string`)return n.push(e.classes),n;if(Array.isArray(e.classes)){let r=t[e.data];e.classes.forEach(e=>{if(!e||!e.class)return;let i=e.valueKey?t[e.valueKey]:r;if(typeof i==`string`&&(i=parseFloat(i.replace(`%`,``).trim())),typeof i!=`number`||isNaN(i))return;let a=e.min===void 0?-1/0:e.min,o=e.max===void 0?1/0:e.max;i>=a&&i<=o&&n.push(e.class)})}return n},handleEmit(e,t){this.$emit(e,t)},refresh(){this.initColumnSettings(),this.searchBarOpen=!1,this.loadDataOnInit?this.loadData():this.rows=[],this.selectedRows=[],this.advancedSearch||(this.$el.querySelector(`.filter-input`).value=``),this.$el.querySelectorAll(`.advanced-filter-input`).forEach(e=>{e.value=``})},toggleSearch(){this.advancedSearch||(this.searchBarOpen=!0),this.advancedSearch&&(this.searchBarOpen=!this.searchBarOpen)},clearSearch(){clearTimeout(this.searchTimer),this.searchBarOpen=!1;let e=this.$el.querySelector(`.filter-input`);e&&(e.value=``),this.columnSettings.search.value=``,this.columnSettings.start=0,this.loadData()},setAdvancedSearchFilters(){this.columnSettings.start=0,this.columnSettings.columns.forEach(e=>{if(!e.searchable)return;let t=this.$el.querySelector(`input[name="${CSS.escape(e.name)}"]`);e.search.value=t?.value??``}),this.loadData()},loadData(){this.columnSettings.draw++,this.clearSelectedRows();let e={...this.requestQueryParams,...this.columnSettings};$.get(this.url,{params:e}).then(e=>{if(e.data.error){this.cardError=this.t(`loadingError`),console.error(e.data.error);return}this.cardError=null,this.rows=e.data.data,this.recordsTotal=e.data.recordsTotal,this.recordsFiltered=e.data.recordsFiltered}).catch(e=>{this.cardError=e.response?.data?.message??this.t(`loadingError`),console.error(e)})},initColumnSettings(){this.columnSettings={draw:0,columns:this.columns.map((e,t)=>({data:e.data,name:e.name,searchable:e.searchable===void 0||e.searchable,sortable:e.sortable===void 0||e.sortable,visible:e.visible===void 0||e.visible,search:{value:``,regex:!1}})),order:this.order.map(e=>({...e})),start:0,length:this.pageLength,search:{value:``,regex:!1}}},setPageLength(e){this.columnSettings.length=e,this.columnSettings.start=0,this.loadData()},setPage(e){e<1||e>this.pageCount||(this.columnSettings.start=(e-1)*this.columnSettings.length,this.loadData())},setSearchTerm(){clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{let e=this.$el.querySelector(`.filter-input`);this.columnSettings.search.value=e?.value??``,this.columnSettings.start=0,this.loadData()},500)},setSorting(e){this.columnSettings.columns[e].sortable&&(this.columnSettings.order[0].column==e?this.columnSettings.order[0].dir=this.columnSettings.order[0].dir==`asc`?`desc`:`asc`:this.columnSettings.order=[{column:e,dir:`asc`}],this.loadData())},selectAllRows(){this.selectedRows.length==this.rows.length?this.selectedRows=[]:this.selectedRows=this.rows.map(e=>e.id)},clearSelectedRows(){this.selectedRows=[]},filterColumns(e){this.columnSettings.columns.forEach((t,n)=>{t.searchable&&(t.search.value=``,e.forEach(e=>{e.name==t.name&&(t.search.value=e.value)}))}),this.columnSettings.start=0,this.loadData()},getSelectedRows(){return this.selectedRows},t(e,t={}){let n=An[this.locale]??An.en,r=(this.vocabulary[this.locale]??this.vocabulary.en)?.[e]??n?.[e]??An.en[e]??e;return Object.entries(t).forEach(([e,t])=>{r=r.replaceAll(`{${e}}`,String(t))}),r}},created(){this.initColumnSettings()},mounted(){this.loadDataOnInit&&this.loadData()}},Nn={key:0,class:`card-icon`},Pn={key:0,class:`material-icons`},Fn={key:1,class:`material-icons`},In={key:1,class:`card-title`},Ln={key:2,class:`card-title text-danger`},Rn={class:`form-group label-floating is-empty`},zn=[`placeholder`],Bn=[`data-tippy-content`],Vn={class:`card-actions icons right-top`},Hn={key:0},Un=[`data-tippy-content`],Wn=[`data-tippy-content`],Gn={class:`dropdown-menu dropdown-menu-right`},Kn={class:`card-body`},qn={key:0,class:`bmd-form-group`},Jn=[`name`,`placeholder`],Yn={type:`submit`,class:`btn btn-primary`},Xn={class:`table-responsive`},Zn={class:`dataTables_wrapper no-footer`},Qn={key:0},$n=[`onClick`],er={key:1,class:`w-25`},tr=[`onClick`],nr={key:0},rr=[`value`],ir=[`innerHTML`],ar=[`href`],or={key:3},sr={key:1},cr=[`onClick`],lr={key:0,class:`material-icons`},ur={class:`d-flex justify-content-between align-items-center mt-3`},dr={class:`dataTables_info`},fr={key:0},pr={class:`dataTables_paginate paging_simple_numbers user-select-none`,id:`document-index-table_paginate`},mr=[`onClick`];function hr(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`Link`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`card`,r.cardClasses])},[r.showHeader||e.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,{key:0,class:(0,t.normalizeClass)([`card-header`,[{"card-header-danger":a.cardError&&r.cardIcon,"card-header-icon":r.cardIcon},!a.cardError&&r.cardIcon?r.cardIconStyle:null]])},[(0,t.renderSlot)(e.$slots,`header`,{},void 0,!0),r.showHeader?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[r.cardIcon?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Nn,[a.cardError?((0,t.openBlock)(),(0,t.createElementBlock)(`i`,Fn,`dangerous`)):((0,t.openBlock)(),(0,t.createElementBlock)(`i`,Pn,(0,t.toDisplayString)(r.cardIcon),1))])):(0,t.createCommentVNode)(``,!0),r.cardTitle&&!a.cardError?((0,t.openBlock)(),(0,t.createElementBlock)(`h4`,In,(0,t.toDisplayString)(r.cardTitle),1)):(0,t.createCommentVNode)(``,!0),a.cardError?((0,t.openBlock)(),(0,t.createElementBlock)(`h4`,Ln,(0,t.toDisplayString)(a.cardError),1)):(0,t.createCommentVNode)(``,!0),r.advancedSearch?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:3,class:(0,t.normalizeClass)([`card-search`,{open:a.searchBarOpen}])},[(0,t.createElementVNode)(`div`,Rn,[n[18]||=(0,t.createElementVNode)(`i`,{class:`material-icons search-icon-left`},`search`,-1),(0,t.createElementVNode)(`input`,{type:`text`,class:`form-control filter-input`,placeholder:o.t(`search`),autocomplete:`off`,onKeyup:n[0]||=(...e)=>o.setSearchTerm&&o.setSearchTerm(...e)},null,40,zn),(0,t.createElementVNode)(`a`,{href:`javascript:void(0)`,class:`close-search`,onClick:n[1]||=(...e)=>o.clearSearch&&o.clearSearch(...e),"data-tippy-content":o.t(`close`)},[...n[17]||=[(0,t.createElementVNode)(`i`,{class:`material-icons`},`close`,-1)]],8,Bn)])],2)),(0,t.createElementVNode)(`ul`,Vn,[(0,t.renderSlot)(e.$slots,`actions`,{},void 0,!0),r.createLink?((0,t.openBlock)(),(0,t.createElementBlock)(`li`,Hn,[(0,t.createVNode)(s,{href:r.createLink,"data-tippy-content":o.t(`createNew`)},{default:(0,t.withCtx)(()=>[...n[19]||=[(0,t.createElementVNode)(`i`,{class:`material-icons`},`add`,-1)]]),_:1},8,[`href`,`data-tippy-content`])])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`li`,null,[(0,t.createElementVNode)(`a`,{href:`javascript:void(0)`,"data-tippy-content":o.t(`search`),onClick:n[2]||=(...e)=>o.toggleSearch&&o.toggleSearch(...e)},[...n[20]||=[(0,t.createElementVNode)(`i`,{class:`material-icons`},`search`,-1)]],8,Un)]),(0,t.createElementVNode)(`li`,{class:`dropdown`,"data-tippy-content":o.t(`showEntries`)},[n[25]||=(0,t.createElementVNode)(`a`,{href:`javascript:void(0)`,"data-bs-toggle":`dropdown`},[(0,t.createElementVNode)(`i`,{class:`material-icons`},`more_vert`)],-1),(0,t.createElementVNode)(`ul`,Gn,[(0,t.createElementVNode)(`li`,{onClick:n[3]||=e=>o.setPageLength(10)},[...n[21]||=[(0,t.createElementVNode)(`a`,{href:`javascript:void(0)`},`10`,-1)]]),(0,t.createElementVNode)(`li`,{onClick:n[4]||=e=>o.setPageLength(25)},[...n[22]||=[(0,t.createElementVNode)(`a`,{href:`javascript:void(0)`},`25`,-1)]]),(0,t.createElementVNode)(`li`,{onClick:n[5]||=e=>o.setPageLength(50)},[...n[23]||=[(0,t.createElementVNode)(`a`,{href:`javascript:void(0)`},`50`,-1)]]),(0,t.createElementVNode)(`li`,{onClick:n[6]||=e=>o.setPageLength(100)},[...n[24]||=[(0,t.createElementVNode)(`a`,{href:`javascript:void(0)`},`100`,-1)]])])],8,Wn)])],64)):(0,t.createCommentVNode)(``,!0)],2)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Kn,[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0),r.advancedSearch?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`toolbar`,{open:a.searchBarOpen}])},[(0,t.createElementVNode)(`form`,{onSubmit:n[7]||=(0,t.withModifiers)((...e)=>o.setAdvancedSearchFilters&&o.setAdvancedSearchFilters(...e),[`prevent`])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.columns,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:n},[e.searchable===!1?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,qn,[(0,t.createElementVNode)(`input`,{name:e.name,class:`form-control advanced-filter-input`,placeholder:e.displayName,autocomplete:`off`},null,8,Jn)]))],64))),128)),(0,t.createElementVNode)(`button`,Yn,(0,t.toDisplayString)(o.t(`search`)),1)],32)],2)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Xn,[(0,t.createElementVNode)(`div`,Zn,[(0,t.createElementVNode)(`table`,{class:(0,t.normalizeClass)([`table data-table dataTable no-footer`,{"table-hover":r.clickableRows}])},[(0,t.createElementVNode)(`thead`,null,[(0,t.createElementVNode)(`tr`,null,[r.selectableRows?((0,t.openBlock)(),(0,t.createElementBlock)(`th`,Qn,[(0,t.createElementVNode)(`input`,{type:`checkbox`,onClick:n[8]||=(...e)=>o.selectAllRows&&o.selectAllRows(...e),ref:`selectAllRows`},null,512)])):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.columns,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:n},[e.visible===!1?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`th`,{key:0,class:(0,t.normalizeClass)([o.columnSortingClasses[n],e.sortable===!1?``:`sorting`]),onClick:e=>o.setSorting(n),style:(0,t.normalizeStyle)(e.width?{width:e.width}:{})},(0,t.toDisplayString)(e.displayName),15,$n))],64))),128)),r.actions?.length?((0,t.openBlock)(),(0,t.createElementBlock)(`th`,er,(0,t.toDisplayString)(o.t(`actions`)),1)):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`tbody`,null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.rows,(i,c)=>((0,t.openBlock)(),(0,t.createElementBlock)(`tr`,{key:c,onClick:t=>r.clickableRows?e.$emit(`row-click`,i):null},[r.selectableRows?((0,t.openBlock)(),(0,t.createElementBlock)(`td`,nr,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{type:`checkbox`,value:i.id,"onUpdate:modelValue":n[9]||=e=>a.selectedRows=e,onClick:n[10]||=(0,t.withModifiers)(()=>{},[`stop`])},null,8,rr),[[t.vModelCheckbox,a.selectedRows]])])):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.columns,(e,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:a},[e.visible===!1?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`td`,{key:0,class:(0,t.normalizeClass)(o.getCellClasses(e,i))},[e.render?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,innerHTML:e.render(i)},null,8,ir)):e.link&&r.hyperlinkStyle===`Link`?((0,t.openBlock)(),(0,t.createBlock)(s,{key:1,href:e.link(i),onClick:n[11]||=(0,t.withModifiers)(()=>{},[`stop`])},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(i[e.data]),1)]),_:2},1032,[`href`])):e.link&&r.hyperlinkStyle===`a`?((0,t.openBlock)(),(0,t.createElementBlock)(`a`,{key:2,href:e.link(i),onClick:n[12]||=(0,t.withModifiers)(()=>{},[`stop`])},(0,t.toDisplayString)(i[e.data]),9,ar)):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,or,(0,t.toDisplayString)(i[e.data]),1))],2))],64))),128)),r.actions?.length?((0,t.openBlock)(),(0,t.createElementBlock)(`td`,sr,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.actions,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:n,class:(0,t.normalizeClass)([`btn btn-sm`,e.class]),onClick:(0,t.withModifiers)(t=>o.handleEmit(e.emit,i),[`stop`])},[e.icon?((0,t.openBlock)(),(0,t.createElementBlock)(`i`,lr,(0,t.toDisplayString)(e.icon),1)):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.label),1)],10,cr))),128))])):(0,t.createCommentVNode)(``,!0)],8,tr))),128))])],2),(0,t.createElementVNode)(`div`,ur,[(0,t.createElementVNode)(`div`,dr,[(0,t.createTextVNode)((0,t.toDisplayString)(o.t(`showingRecords`,{first:o.firstRecord,last:o.lastRecord,filtered:a.recordsFiltered}))+` `,1),a.recordsFiltered==a.recordsTotal?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,fr,` (`+(0,t.toDisplayString)(o.t(`totalRecords`,{total:a.recordsTotal}))+`) `,1))]),(0,t.createElementVNode)(`div`,pr,[(0,t.createElementVNode)(`a`,{class:(0,t.normalizeClass)([`paginate_button first user-select-none`,{disabled:a.columnSettings.start==0}]),onClick:n[13]||=e=>o.setPage(1)},(0,t.toDisplayString)(o.t(`first`)),3),(0,t.createElementVNode)(`a`,{class:(0,t.normalizeClass)([`paginate_button previous`,{disabled:a.columnSettings.start==0}]),onClick:n[14]||=e=>o.setPage(o.currentPage-1)},(0,t.toDisplayString)(o.t(`previous`)),3),(0,t.createElementVNode)(`span`,null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.pages,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`a`,{key:n,class:(0,t.normalizeClass)([`paginate_button`,{current:e==o.currentPage}]),onClick:t=>o.setPage(e)},(0,t.toDisplayString)(e),11,mr))),128))]),(0,t.createElementVNode)(`a`,{class:(0,t.normalizeClass)([`paginate_button next`,{disabled:a.columnSettings.start>=o.lastPageStart}]),onClick:n[15]||=e=>o.setPage(o.currentPage+1)},(0,t.toDisplayString)(o.t(`next`)),3),(0,t.createElementVNode)(`a`,{class:(0,t.normalizeClass)([`paginate_button last`,{disabled:a.columnSettings.start>=o.lastPageStart}]),onClick:n[16]||=e=>o.setPage(o.pageCount)},(0,t.toDisplayString)(o.t(`last`)),3)])])])])])],2)}return jn(Mn,[[`render`,hr],[`__scopeId`,`data-v-9321e21f`]])});