-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
1 lines (1 loc) · 38.8 KB
/
Copy pathindex.js
File metadata and controls
1 lines (1 loc) · 38.8 KB
1
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("node:fs/promises"),require("node:path"),require("node:url"),require("path")):"function"==typeof define&&define.amd?define(["exports","node:fs/promises","node:path","node:url","path"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={},t.promises,t.path,t.node_url,t.path$1)}(this,function(t,n,e,r,o){"use strict";function i(t){return t.length=0,t}function s(t){return void 0===t}function c(t){return Boolean(t.length)}function u(t){return null===t}function a(t){return!s(t)&&!u(t)}function f(t){return t}function l(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i<o;i++)n.call(e,t[i],i,t,o,r);else for(let e=0;e<o;e++)n(t[e],e,t,o,r);return t}function h(t,n=f,e=[],r,o){return a(r)?l(t,(t,i,s,c)=>{const u=n.call(r,t,i,e,s,c,o);a(u)&&e.push(u)}):l(t,(t,i,s,c)=>{const u=n(t,i,e,s,c,r,o);a(u)&&e.push(u)}),e}async function p(t,n,e,r){if(!t)return;const o=t.length;if(a(e))for(let i=0;i<o;i++)await n.call(e,t[i],i,t,o,r);else for(let e=0;e<o;e++)await n(t[e],e,t,o,r);return t}async function g(t,n=f){const e=[];return await p(t,async(t,r,o)=>{const i=await n(t,r,e,o);a(i)&&e.push(i)}),e}const{sign:y}=Math;function d(t){return-1===y(t)}function m(t,n,e,r){let o=t;for(;o<n;)r.push(o),o+=e;return r}function w(t,n,e,r){let o=t;for(;o>n;)r.push(o),o-=e;return r}function b(t){return Boolean(t)}function A(t,n=b,e){if(!t)return;const r=t.length;if(r){for(let o=0;o<r;o++)if(!1===n(t[o],o,t,r,e))return!1;return!0}}function v(t){return function(n,...e){return e?.length?t(n)&&A(e,t):t(n)}}const x=v(Array.isArray);const C=Reflect.construct;function O(t,n=[],e){const r=x(n)?n:[n];return e?C(t,r,e):C(t,r)}function j(t){return x(t)&&t||a(t)&&[t]||[]}function T(t){return t.flat(1/0)}function F(t,n){return t.forEach(n),t}function M(...t){const n=O(Map),e=[];return l(t,(t,e)=>{l(t,(t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)})}),F(n,t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)}),e}function I(t,n=1,e=t.length){return t.splice(n,e)}function E(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function S(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}async function B(t,n,e){if(!t)return;const r=t.length;for(let o=0;o<r;o++)if(!1===await n(t[o],o,t,r,e))return!1;return!0}function N(t,n,e=[],r){return l(t,(t,o,i,s)=>{!0===n(t,o,e,i,s,r)&&e.push(t)}),e}async function R(t,n,e=[],r){return await p(t,async(t,o,i,s)=>{!0===await n(t,o,e,i,s,r)&&e.push(t)}),e}function P(t){return t?n=>n?.constructor===t||!1:()=>!1}const k=P(globalThis.Buffer),U=v(k);function $(t,...n){return globalThis.Buffer?Buffer.isBuffer?Buffer.isBuffer(t)&&(!n?.length||A(n,Buffer.isBuffer)):U(t,...n):Error("Buffer is not available in this environment")}const D=P(Date),L=v(D),q=t=>!!a(t)&&"Object("===t.constructor.toString().trim().slice(9,16),_=P(RegExp),z=v(_);function K(t){return t?.constructor}function V(t){return K(t)?.name}const Z=/Array/;function J(t){if(t){const n=V(t);if(Z.test(n)&&"Array"!==n)return!0}return!1}const W=Object.keys;function G(t){if(t)return W(t)}function H(t,n){if(t===n)return!0;if(null===t||null===n||void 0===t||void 0===n)return!1;if(typeof t!=typeof n)return!1;if($(t))return $(n)&&t.equals(n);if(L(t))return L(n)&&t.getTime()===n.getTime();if(z(t))return z(n)&&t.source===n.source&&t.flags===n.flags;if(x(t)||J(t))return t.length===n?.length&&A(t,(t,e)=>H(t,n[e]));if(q(t)){if(!q(n))return!1;const e=G(t);return e.length===G(n).length&&A(e,e=>H(t[e],n[e]))}return!1}const Q=Math.max;function X(t,n,e=[],r,o){return a(r)?l(t,(t,i,s,c)=>{e[i]=n.call(r,t,i,e,s,c,o)}):l(t,(t,r,i,s)=>{e[r]=n(t,r,e,i,s,o)}),e}async function Y(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let i=0;i<o;i++)r[i]=n.call(e,t[i],i,r,o);else for(let e=0;e<o;e++)r[e]=n(t[e],e,r,o);return Promise.all(r)}async function tt(t,n){const e=[];return await p(t,async(t,r,o)=>{e[r]=await n(t,r,e,o)}),e}function nt(t,n){return t-n}function et(t,n){return n-t}const{floor:rt,random:ot}=Math;function it(t,n=0){return rt(ot()*(t-n))+n}const st=Array.from;function ct(t,n,e){if(a(t))return st(t,n,e)}function ut(t,n=t.length){if(t.length<=1)return ct(t);const e=ct(t);let r,o,i=0;for(;i<n;)r=it(e.length-1,0),o=e[i],e[i]=e[r],e[r]=o,i++;return e}const at=Math.min;function ft(t,n,e){return e.indexOf(t)===n}function lt(t,n,e){return t!==e[n-1]}function ht(t,n){return n?t.filter(lt):t.filter(ft)}function pt(t){return($(t)||t?.fill)&&t.fill(0),t}const gt=t=>!!a(t)&&t instanceof Function,yt=P(Number),dt=v(yt);const mt=v(P(String));function wt(t,n){const e=K(t);return e&&e===n||!1}function bt(t){return n=>{const e=V(n);return e&&e===t||!1}}const At=Object.assign;function vt(t,n){if(q(n))At(t,n);else if(gt(n)){const e=n.name;e?t[e]=n:At(t,n)}else(mt(n)||dt(n))&&(t[n]=n);return t}function xt(t={},...n){const e=n.length;for(let r=0;r<e;r++)vt(t,n[r]);return t}function Ct(t,n){if(q(n))At(t.prototype,n);else if(gt(n)){const e=n.name;e&&(t.prototype[e]=n)}else if(wt(n)){const e=n.constructor?.name;e&&(t.prototype[e]=n)}else(mt(n)||dt(n))&&(t.prototype[n]=n);return t}function Ot(t,n,e,r,o){if(t[o]===r)return!0}function jt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?o<i?1:o>i?-1:0:1:-1}function Tt(t,n="id",e){return t.sort((t,r)=>jt(t,r,n,e))}function Ft(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?o<i?-1:o>i?1:0:-1:1}function Mt(t,n="id",e){return t.sort((t,r)=>Ft(t,r,n,e))}function It(t,n){if(t)return mt(n)?t[n]:X(n,n=>t[n])}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function St(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function Bt(t){return n=>!!a(n)&&t.test(n)}const Nt=Bt(/\.css$/),Rt=Bt(/\.html$/),Pt=Bt(/\.js$/),kt=Bt(/\.json$/);const Ut=async(t,n,e,r)=>{if(!t)return;const o=G(t);return a(e)?await p(o,(i,s,c,u)=>n.call(e,t[i],i,t,u,o,r)):await p(o,(e,i,s,c)=>n(t[e],e,t,c,o,r)),t};function $t(t,n,e,r){if(!t)return;const o=G(t);return a(e)?l(o,(o,i,s,c)=>{n.call(e,t[o],o,t,c,s,r)}):l(o,(e,o,i,s)=>{n(t[e],e,t,s,i,r)}),t}const Dt=P(Set),Lt=v(Dt);function qt(t,n){if(Lt(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const _t=bt("GeneratorFunction"),zt=v(_t);async function Kt(t,n,e){if(Lt(t)){for(const e of t)await n(e,t);return t}if(zt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const Vt=bt("AsyncFunction"),Zt=v(Vt);function Jt(t,n,e,r,o,i){return(s,c,u,f,l)=>{let h;const p=Zt(c);if(a(s)&&c)return h=x(s)?p?n:t:q(s)||gt(s)?p?r:e:o?p?i:o:zt(s)?i:p?r:e,h(s,c,u,f,l)}}const Wt=Jt(l,p,$t,Ut,qt,Kt);class Gt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Wt(t,(t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}})}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}class Ht{list=O(Map);remove(t){clearTimeout(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=this,r=setTimeout(()=>{t(),e.remove(r)},n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach(n=>{t.remove(n)})}}const Qt=O(Ht);function Xt(t,n){return Qt.set(t,n)}const Yt=Reflect.apply;function tn(t,n,e){if(gt(t))return Yt(t,n,e)}function nn(t,n=[]){const e=K(t);return e===Function&&"function"===e.name?function(){}:O(e,n)}function en(t,n=f,e){const r=e||nn(t);if(x(t)||Lt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=gt(r.set);for(const[e,i]of t){const s=n(i,e,r,t);o?r.set(e,s):r[e]=s}return r}async function rn(t,n=f,e,r){if(zt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||nn(t);if(x(t)||Lt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=gt(o.set);for await(const[e,r]of t){const s=await n(r,e,o,t);i?o.set(e,s):o[e]=s}return o}async function on(t,n,e={}){if(t)return await Ut(t,async(t,r,o,i,s)=>{e[r]=await n(t,r,e,o,i,s)}),e}function sn(t,n,e={},r,o){if(t)return a(r)?$t(t,(t,i,s,c,u)=>{e[i]=n.call(r,t,i,e,s,c,u,o)}):$t(t,(t,r,i,s,c)=>{e[r]=n(t,r,e,i,s,c,o)}),e}const cn=Jt(X,tt,sn,on,en,rn);async function un(t,n){if(!t)return;return B(G(t),(e,r,o,i)=>n(t[e],e,t,i,o))}function an(t,n){if(!t)return;return A(G(t),(e,r,o,i)=>n(t[e],e,t,i,o))}function fn(t,n=f){if(x(t)||Lt(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function ln(t,n=f,e){if(zt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(x(t)||Lt(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const hn=Jt(A,B,an,un,fn,ln);const pn=/\.|\[/,gn=/]/g;function yn(t){return t.replace(gn,"").split(pn)}function dn(t,n){if(!n)return!1;let e=n;return A(x(t)?t:yn(t),t=>(e=e[t],a(e))),e}const mn=Function.prototype;function wn(t){return mn.call.bind(t)}const bn=Object.getOwnPropertyNames,An=Object.getOwnPropertyDescriptor,vn=Object.defineProperty,xn=wn(Object.hasOwnProperty),Cn=Object.is;const{random:On}=Math;const{round:jn,floor:Tn,ceil:Fn}=Math;function Mn(t,n,e){if(!e)return t(n);const r=10**e;return t(n*r)/r}const{sign:In}=Math;function En(t){return 0===t}async function Sn(t,n=f,e={}){return await Ut(t,async(t,r,o,i,s)=>{const c=await n(t,r,e,o,i,s);a(c)&&(e[r]=c)}),e}function Bn(t,n=f,e={}){return $t(t,(t,r,o,i,s)=>{const c=n(t,r,e,o,i,s);a(c)&&(e[r]=c)}),e}const Nn=Object.assign;const Rn=Object.assign;function Pn(t,n,e={}){return $t(t,(t,r,o,i,s)=>{!0===n(t,r,e,o,i,s)&&(e[r]=t)}),e}async function kn(t,n,e={}){return await Ut(t,async(t,r,o,i,s)=>{!0===await n(t,r,e,o,i,s)&&(e[r]=t)}),e}const Un=Object.entries;const $n=Object.hasOwn;const Dn=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Ln(t){return t.replace(Dn,"\\$&")}function qn(t,n){return n?qn(X(t,Ln)):RegExp(t.join("|"))}function _n(t){if(!t)return;if(q(t))return G(t).length;const n=t.length;if(a(n))return n;const e=t.size;return a(n)?e:G(t).length}const zn=/[ _-]+/g;const Kn=/[ _-]+/g,Vn=/[ ]+/g;const Zn=/[ _-]+/g,Jn=/[ ]+/g;const Wn=/[ _-]+/g;const Gn=/[ _-]+/g;function Hn(t,n=1){return t.substring(n)}const Qn=/%(?![\da-f]{2})/gi,Xn=/&/g,Yn=/</g,te=/>/g,ne=/"/g;function ee(t){return decodeURIComponent(t.replace(Qn,()=>"%25"))}function re(t){return t.replace(Xn,"&").replace(Yn,"<").replace(te,">").replace(ne,""")}const oe=/[̀-ͯ]/g,ie=/[^a-z0-9]+/g,se=/^-+|-+$/g;const ce=/\S+/g,ue=/\w+/g;const ae=/\w+/g;function fe(t){return t[0].toUpperCase()}function le(t){return fe(t)+Hn(t)}function he(t){return fe(t)+Hn(t).toLowerCase()}const pe=P(Map),ge=v(pe);function ye(t){return!a(t)}function de(t,n){if(ye(t)||gt(t))return!1;if(x(t)||J(t))return!0;const e=t.length;if(ye(e)||!dt(e)||e<0)return!1;if(n){const n=G(t);return!!n&&hn(n,(t,n)=>n>=0&&dt(n))}return!0}const me=P(BigInt),we=v(me),be=P(Boolean),Ae=v(be),ve=P(ArrayBuffer),xe=v(ve);const Ce=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const Oe=P(Error),je=v(Oe);function Te(t){return!1===t}const Fe=P(Float32Array),Me=v(Fe),Ie=P(Float64Array),Ee=v(Ie),{isInteger:Se}=Number,Be=Se,Ne=P(Int16Array),Re=v(Ne),Pe=P(Int32Array),ke=v(Pe),Ue=P(Int8Array),$e=v(Ue);function De(t){return!!t&&t instanceof Promise}function Le(t){return!!t&&(De(t)||Zt(t)||zt(t))}const{isSafeInteger:qe}=Number,_e=qe;const ze=P(Uint16Array),Ke=v(ze),Ve=P(Uint32Array),Ze=v(Ve),Je=P(Uint8Array),We=v(Je),Ge=P(Uint8ClampedArray),He=v(Ge),Qe=P(WeakMap),Xe=v(Qe);const Ye=void 0!==globalThis.Deno,tr=void 0!==globalThis.process&&process.versions&&process.versions.node;function nr(t,n=!0){return Boolean(t)&&n}function er(t,n){return Te(H(t,n))}const rr=JSON,or=rr.parse;function ir(t,n){if(mt(t))return or(t,n)}const sr=rr.stringify;function cr(t,n,e){const r=globalThis.options||e;let o;return gt(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\t\tResult: ${sr(t)}\n\t\t\tExpected: ${sr(n)}`,r)}async function ur(t){return De(t)||Le(t)?await t:t}const ar=/^class[\s{]/;function fr(t){return gt(t)&&!function(t){return"function"==typeof t&&ar.test(Function.prototype.toString.call(t))}(t)}async function lr(t,n,e){const r=await ur(t);if(r===n)return!0;if(fr(n)){return!1!==await n(r,e)||cr(r,n,e)}const o=await ur(n);return!er(r,o)||cr(r,o,e)}const hr=globalThis.structuredClone;async function pr(t,n=f,e,r){if(zt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);a(r)&&e.push(r)}return e}const o=e||nn(t);if(x(t)||Lt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const i=await n(e,o,t);a(i)&&r(i)}return o}const i=gt(o.set);for await(const[e,r]of t){const s=await n(r,e,o,t);a(s)&&(i?o.set(e,s):o[e]=s)}return o}function gr(t,n=f,e){const r=e||nn(t);if(x(t)||Lt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const i=n(e,r,t);a(i)&&o(i)}return r}const o=gt(r.set);for(const[e,i]of t){const s=n(i,e,r,t);a(s)&&(o?r.set(e,s):r[e]=s)}return r}const yr=Jt(h,g,Bn,Sn,gr,pr);function dr(t,n){return new Promise(e=>{setTimeout(()=>e(n),t)})}const mr=globalThis.requestAnimationFrame;function wr(t,n=f,e){const r=e||nn(t);if(x(t)||Lt(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=gt(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function br(t,n=f,e,r){if(zt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||nn(t);if(x(t)||Lt(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=gt(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const Ar=Jt(N,R,Pn,kn,wr,br);function vr(t){return(...n)=>e=>{let r=e;return t(n,t=>{r=t(r)}),r}}const xr=vr(l),Cr=vr(E);function Or(t){return(...n)=>async e=>{let r=e;return await t(n,async t=>{r=await t(r)}),r}}const jr=Or(p),Tr=Or(S);const Fr=Bt(/\./);class Mr{list=O(Map);remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval(()=>{t()},n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach(n=>{t.remove(n)})}}const Ir=O(Mr);class Er{static models=new Map;constructor(t,n){a(n)?(xt(this,n),this.modelName=t,Er.models.set(t,n)):xt(this,t)}delete(t){Er.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Er.models.set(t||this.modelName,this)}has(t){return Er.models.has(t||this.modelName)}get(t){return Er.models.get(t||this.modelName)}}class Sr{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;$t(t,n=>{t[n]=new Sr(t[n])}),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new Sr(e),!0)})}}class Br{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return a(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const Nr=O(Br),Rr=globalThis.crypto,Pr="function"==typeof Rr?.randomUUID;class kr{constructor(t=new Map){this.items=t,this.isMap=t instanceof Map}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):a(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=nn(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Gt,t.Emitter=class{constructor(){this.listeners=new Map}on(t,n){const e=this.listeners.get(t);return e?e.push(n):this.listeners.set(t,[n]),this}once(t,n){const e=(...r)=>{this.off(t,e),n(...r)};return this.on(t,e)}off(t,n){const e=this.listeners.get(t);if(!e)return this;if(!n)return this.listeners.delete(t),this;const r=e.filter(t=>t!==n);return r.length?this.listeners.set(t,r):this.listeners.delete(t),this}emit(t,...n){const e=this.listeners.get(t);if(!e)return!1;for(const t of[...e])t(...n);return!0}clear(){this.listeners.clear()}},t.Intervals=Mr,t.LRUCache=class{constructor(t=100){this.capacity=t,this.store=new Map}get(t){if(!this.store.has(t))return;const n=this.store.get(t);return this.store.delete(t),this.store.set(t,n),n}set(t,n){if(this.store.has(t))this.store.delete(t);else if(this.store.size>=this.capacity){const t=this.store.keys().next().value;this.store.delete(t)}return this.store.set(t,n),this}has(t){return this.store.has(t)}delete(t){return this.store.delete(t)}clear(){this.store.clear()}get size(){return this.store.size}},t.Model=Er,t.Store=Sr,t.Timers=Ht,t.UniqID=Br,t.VirtualStorage=kr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=tn,t.arrayToRegex=qn,t.arraysToObject=function(t,n){const e={};return l(t,(t,r)=>{e[n[r]]=t}),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){if(Le(t)||Le(n)||De(t)||De(n))return lr(t,n,e);if(t===n)return!0;if(fr(n)){return!1!==n(t,e)||cr(t,n,e)}return!er(t,n)||cr(t,n,e)},t.assertAsync=lr,t.assign=xt,t.assignToClass=Ct,t.assignToObject=vt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=cn(t,t=>gt(t)?t.bind(n):t);return e?xt(e,r):r},t.cacheNativeMethod=wn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(zn," ").trim().split(" ").forEach((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()}),n},t.ceilTo=function(t,n=0){return Mn(Fn,t,n)},t.chain=function(t){return O(Gt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)}),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clamp=function(t,n,e){return t<n?n:t>e?e:t},t.clear=function(t){if(t){if($(t))return pt(t);if(x(t))return i(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=i,t.clearBuffer=pt,t.clearIntervals=function(){Ir.clear()},t.clearTimers=function(){Qt.clear()},t.clone=function(t){return hr(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=nn,t.compact=function(t){if(q(t)){const n=G(t),e=n.length,r={};for(let o=0;o<e;o++){const e=n[o],i=t[e];nr(i)&&(r[e]=i)}return r}return t.filter(t=>nr(t))},t.compactKeys=function(t){const n=[];return $t(t,(t,e)=>{a(t)&&n.push(e)}),n},t.compactMap=yr,t.compactMapArray=h,t.compactMapAsyncArray=g,t.compactMapAsyncObject=Sn,t.compactMapObject=Bn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i<r;i++){const r=t[i];o[i]=t[i].call(n,...e,i,o,r)}else for(let n=0;n<r;n++){const r=t[n];o[n]=t[n](...e,n,o,r)}return Promise.all(o)},t.concurrentEach=async function(t,n,e){if(t)return x(t)?Y(t,n,e):void 0},t.concurrentEachArray=Y,t.concurrentStatus=function(t,n,e){const r=t.length,o=[];for(let i=0;i<r;i++)o[i]=n(t[i],i,t,r,e);return Promise.allSettled(o)},t.cond=function(t){return function(...n){for(const[e,r]of t)if(e.apply(this,n))return r.apply(this,n)}},t.consolidate=function(...t){return Nn({},...t)},t.constant=function(t){return()=>t},t.construct=O,t.copy=function(t){if(t)return Rn({},t)},t.copyFolder=async function t(r,o){const i=await n.readdir(r);return await p(i,async i=>{const s=e.join(r,i);if((await n.stat(s)).isDirectory()){const c=e.join(o,i.replace(r,""));await n.mkdir(c,{recursive:!0}),await t(s,c)}else await async function(t,r,o){const i=e.join(t,o),s=e.join(r,o);await n.copyFile(i,s)}(r,o,i)}),!0},t.countBy=function(t,n){const e={};let r;return l(t,t=>{r=n(t),e[r]||(e[r]=0),e[r]++}),e},t.countKey=function(t,n){let e=0;return l(t,t=>{t[n]&&e++}),e},t.countWithoutKey=function(t,n){let e=0;return l(t,t=>{t[n]||e++}),e},t.currentFile=function(t){return globalThis.__filename?__filename:r.fileURLToPath(t.url)},t.currentPath=function(t,...n){if(globalThis.__dirname)return __dirname;const e=o.dirname(r.fileURLToPath(t.url));return n.length>0?o.join(e,...n):e},t.curry=function(t,n=t.length){const e=[],r=(...o)=>{if(e.push(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.curryRight=function(t,n=t.length){const e=[],r=(...o)=>{if(e.unshift(...o),e.length===n){const n=t(...e);return i(e),n}return r};return r},t.debounce=function(t,n){function e(...t){!1!==e.id&&Qt.remove(e.id),e.id=Xt(()=>{e.callable(...t),e.id=!1},n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(Qt.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=vn,t.defaults=function(t,...n){const e={...t},r=n.length;for(let t=0;t<r;t++){const r=n[t],o=Object.keys(r),i=o.length;for(let t=0;t<i;t++){const n=o[t];void 0===e[n]&&(e[n]=r[n])}}return e},t.delay=dr,t.difference=M,t.divide=function(t,n){return t/n},t.drop=I,t.dropRight=(t,n=1,e=t.length)=>I(t,0,e-n),t.each=Wt,t.eachArray=l,t.eachAsyncArray=p,t.eachAsyncObject=Ut,t.eachObject=$t,t.eachRight=E,t.eachRightAsync=S,t.ensureArray=j,t.ensureBuffer=function(t){return globalThis.Buffer?$(t)&&t||a(t)&&Buffer.from(t)||Buffer.alloc(0):Error("Buffer is not available in this environment")},t.env=function(t,n){const e=globalThis.process?.env?.[t];return void 0===e?n:e},t.equalsZero=En,t.escapeRegex=Ln,t.escapeRegexRegex=Dn,t.every=hn,t.everyArg=function(...t){return Zt(t[0])?async function(...n){return hn(t,async t=>hn(n,async n=>t(n)))}:function(...n){return hn(t,t=>hn(n,n=>t(n)))}},t.everyArray=A,t.everyAsyncArray=B,t.everyAsyncObject=un,t.everyObject=an,t.extendClass=function(t,...n){const e=n.length;for(let r=0;r<e;r++)Ct(t,n[r]);return t},t.filter=Ar,t.filterArray=N,t.filterAsyncArray=R,t.filterAsyncObject=kn,t.filterObject=Pn,t.findIndex=function(t,n,e="id"){const r=t.findIndex((t,r)=>Ot(t,0,0,n,e));return-1!==r&&r},t.findIndexCache=Ot,t.findItem=function(t,n,e="id"){const r=t.find((t,r)=>Ot(t,0,0,n,e));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;t<n;t++)e=e.reduce((t,n)=>t.concat(j(n)),[]);return e},t.flattenDeep=T,t.floorTo=function(t,n=0){return Mn(Tn,t,n)},t.flow=xr,t.flowAsync=jr,t.flowAsyncRight=Tr,t.flowRight=Cr,t.forCompactMap=function(t,n){const e=nn(t),r=e.push||e.add;if(r&>(r)){const o=r.bind(e);t.forEach(t=>{const r=n(t,e);a(r)&&o(r)})}else gt(e.set)?t.forEach((t,r)=>{const o=n(t,r,e);a(o)&&e.set(r,o)}):t.forEach((t,r)=>{const o=n(t,r,e);a(o)&&(e[r]=o)});return e},t.forEach=F,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach((t,n)=>{e[o]=t,r[o]=t,o++});for(let t=0;t<o;t++)await n(e[t],r[t]);return t},t.forMap=function(t,n){const e=nn(t),r=e.push||e.add;if(r&>(r)){const o=r.bind(e);t.forEach(t=>{const r=n(t,e);o(r)})}else gt(e.set)?t.forEach((t,r)=>{const o=n(t,r,e);e.set(r,o)}):t.forEach((t,r)=>{const o=n(t,r,e);e[r]=o});return e},t.forOf=qt,t.forOfAsync=Kt,t.forOfCompactMap=gr,t.forOfCompactMapAsync=pr,t.forOfEvery=fn,t.forOfEveryAsync=ln,t.forOfFilter=wr,t.forOfFilterAsync=br,t.forOfMap=en,t.forOfMapAsync=rn,t.generateLoop=Jt,t.get=dn,t.getChild=function(t){return null==t?null:t.constructor??null},t.getCollectionInsertIndex=function(t,n,e){let r=0;return A(t,(t,o)=>(r=o,n[e]>=t[e]&&(r=o+1,!0))),r},t.getConstructor=K,t.getConstructorName=V,t.getEntries=function(t){if(a(t))return Un(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return Mt(t,n)[0]},t.getLowest=function(t,n){return Tt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return A(t,(t,r)=>(e=r,n>=t&&(e=r+1,!0))),e},t.getParent=function(t){return null==t?null:Object.getPrototypeOf(t)},t.getPropDesc=An,t.getPropNames=bn,t.getType=K,t.getTypeName=V,t.groupBy=function(t,n){const e={};return l(t,t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)}),e},t.has=function t(n,e,r){if(ye(n)||ye(e))return!1;if(n===e)return!0;if(mt(n))return mt(e)?n.includes(e,r):z(e)?e.test(n):gt(e)?e(n):x(e)?A(e,e=>t(n,e)):hn(e,e=>t(n,e));if(x(n))return z(e)?n.some(t=>e.test(t)):gt(e)?n.some(e):x(e)?A(e,e=>t(n,e)):n.includes(e,r);if(q(n)){const t=Object.keys(n),r=t.length;if(z(e)){for(let o=0;o<r;o++)if(e.test(n[t[o]]))return!0;return!1}if(gt(e)){for(let o=0;o<r;o++){const r=t[o];if(e(n[r],r,n))return!0}return!1}if(q(e))return an(e,(t,e)=>n[e]===t);for(let o=0;o<r;o++)if(n[t[o]]===e)return!0;return!1}return!1},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find(n=>{const e=yn(n);if(1===e.length)return $n(t,n);{const n=e.pop(),r=dn(e,t);return!!r&&$n(r,n)}}))},t.hasDot=Fr,t.hasKeys=function(t,...n){if(t)return A(n,n=>{const e=yn(n);if(1===e.length)return $n(t,n);{const n=e.pop(),r=dn(e,t);return!!r&&$n(r,n)}})},t.hasLength=c,t.hasProp=xn,t.hasValue=a,t.htmlEntities=re,t.ifInvoke=function(t,n,...e){if(gt(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!a(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(a(t)){if(gt(n))return e?tn(n,e,r):n(...r);if(q(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i<r;i++){const r=t[i];o[i]=await t[i].call(n,...e,i,r)}else for(let n=0;n<r;n++){const r=t[n];o[n]=await t[n](...e,n,r)}return o},t.inSync=function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i<r;i++){const r=t[i];o[i]=r.call(n,...e,i,r)}else for(let n=0;n<r;n++){const r=t[n];o[n]=r(...e,n,r)}return o},t.increment=function(t){return t+1},t.indexBy=function(t,n="id"){const e={};return l(t,t=>{e[t[n]]=t}),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return h(t,t=>{if(A(n,n=>n.includes(t)))return t})},t.interval=function(t,n){return Ir.set(t,n)},t.intervals=Ir,t.invert=function(t,n={}){if(t)return $t(t,(t,e)=>{n[t]=e}),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(a(e))for(let o=0;o<r;o++)t[o].call(e,n);else for(let e=0;e<r;e++)t[e](n);return t},t.invokeCollection=function(t,n,e,r){return X(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return tt(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!a(t)&&"[object Arguments]"===t.toString()},t.isArray=x,t.isArrayBuffer=xe,t.isArrayBufferCall=ve,t.isArrayLike=de,t.isAsync=Zt,t.isAsyncCall=Vt,t.isBigInt=we,t.isBigIntCall=me,t.isBoolean=Ae,t.isBooleanCall=be,t.isBuffer=$,t.isBufferCall=k,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(a(t)){const n=t?.constructor?.name;return Ce.test(n)}return!1},t.isConstructor=wt,t.isConstructorFactory=P,t.isDate=L,t.isDateCall=D,t.isDeno=Ye,t.isDirectoryPath=async function(t){try{return(await n.stat(t)).isDirectory()}catch{return!1}},t.isEmpty=function(t){return mt(t)||x(t)?!c(t):q(t)?!_n(t):!a(t)},t.isEqual=H,t.isError=je,t.isErrorCall=Oe,t.isEven=function(t){return!(1&t)},t.isF32=Me,t.isF32Call=Fe,t.isF64=Ee,t.isF64Call=Ie,t.isFalse=Te,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=Nt,t.isFileHTML=Rt,t.isFileJS=Pt,t.isFileJSON=kt,t.isFilePath=async function(t){try{return(await n.stat(t)).isFile()}catch{return!1}},t.isFloat=Be,t.isFunction=gt,t.isGenerator=zt,t.isGeneratorCall=_t,t.isI16=Re,t.isI16Call=Ne,t.isI32=ke,t.isI32Call=Pe,t.isI8=$e,t.isI8Call=Ue,t.isIndexable=function(t){return x(t)||J(t)||mt(t)||de(t)},t.isIterable=function(t){return a(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Le,t.isMap=ge,t.isMapCall=pe,t.isMatchArray=function(t,n){return t.length===n.length&&A(t,(t,e)=>H(n[e],t))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=G(t),r=G(n);return e.length===r.length&&A(e,e=>t[e]===n[e])},t.isNegative=d,t.isNodejs=tr,t.isNotArray=function(t,...n){return!x(t,...n)},t.isNotNumber=function(t){return!dt(t)},t.isNotString=function(t){return!mt(t)},t.isNull=u,t.isNumber=dt,t.isNumberCall=yt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&t<e},t.isNumberNotInRange=function(t,n,e){return t<n||t>e},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=q,t.isPositive=function(t){return 1===In(t)},t.isPrimitive=function(t){const n=typeof t;return null==t||"object"!==n&&"function"!==n},t.isPromise=De,t.isRegex=z,t.isRegexCall=_,t.isRelated=function(t,n){return!ye(t)&&!ye(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=_e,t.isSame=Cn,t.isSameType=function(t,n){const e=K(t),r=K(n);return e===r&&e.name===r.name},t.isSet=Lt,t.isSetCall=Dt,t.isString=mt,t.isTrue=function(t){return!0===t},t.isTruthy=nr,t.isType=wt,t.isTypeFactory=v,t.isTypeNameFactory=bt,t.isTypedArray=J,t.isU16=Ke,t.isU16Call=ze,t.isU32=Ze,t.isU32Call=Ve,t.isU8=We,t.isU8C=He,t.isU8CCall=Ge,t.isU8Call=Je,t.isUndefined=s,t.isWeakMap=Xe,t.isWeakMapCall=Qe,t.isZero=En,t.jsonParse=ir,t.jsonParseNative=or,t.jsonParseTry=function(t,n){if(t)try{return ir(t,n)}catch(t){return}},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Kn," ").trim().toLowerCase().replace(Vn,"-")},t.keyBy=function(t,n){const e={},r="function"==typeof n;for(let o=0;o<t.length;o++){const i=t[o];e[r?n(i,o,t):i[n]]=i}return e},t.keys=G,t.largest=function(t){return Q(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Gn," ").trim().toLowerCase()},t.map=cn,t.mapArray=X,t.mapAsyncArray=tt,t.mapAsyncObject=on,t.mapKeys=function(t,n){const e={},r=Object.keys(t),o=r.length;for(let i=0;i<o;i++){const o=r[i],s=t[o];e[n(s,o,t)]=s}return e},t.mapObject=sn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let s=i-1;s>=0;s--)e[o]=n(t[s],s,t,i,r),o++;return e},t.mapValues=function(t,n){const e={},r=Object.keys(t),o=r.length;for(let i=0;i<o;i++){const o=r[i];e[o]=n(t[o],o,t)}return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i<o;i++){const s=t[i];if(!1===n(s,i,e,t,o,r))break;e[i]=s}return e},t.max=function(t){if(t?.length)return Math.max(...t)},t.mean=function(t){if(!t?.length)return;let n=0;for(let e=0;e<t.length;e++)n+=t[e];return n/t.length},t.median=function(t){if(!t?.length)return;const n=[...t].sort((t,n)=>t-n),e=n.length>>1;return n.length%2?n[e]:(n[e-1]+n[e])/2},t.memoize=function(t,n){const e=new Map;function r(...r){const o=n?n(...r):r[0];if(e.has(o))return e.get(o);const i=t.apply(this,r);return e.set(o,i),i}return r.cache=e,r},t.merge=function t(n,...e){return Wt(e,e=>{Wt(e,(e,r)=>{if(n[r]&&(q(e)||x(e)))return t(n[r],e);n[r]=e})}),n},t.min=function(t){if(t?.length)return Math.min(...t)},t.model=function(t,n){return a(n)?O(Er,[t,n]):Er.models.get(t)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.nextFrame=function(){return new Promise(mr?t=>mr(t):t=>setTimeout(t,0))},t.noValue=ye,t.noop=function(){},t.notEmpty=function(t){return mt(t)||x(t)?c(t):q(t)?_n(t)>0:a(t)},t.notEqual=er,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=At,t.objectEntries=Un,t.objectSize=_n,t.omit=function(t,n){if(!t)return{};if(x(n)){const e=qn(n);return Pn(t,(t,n)=>!e.test(n))}if(z(n))return Pn(t,(t,e)=>!n.test(e));if(mt(n))return Pn(t,(t,e)=>e!==n);if(dt(n)){const e=n.toString();return Pn(t,(t,n)=>n!==e)}return gt(n)?Pn(t,(t,e)=>!n(t,e)):At({},t)},t.once=t=>{let n;return(...e)=>(a(n)||(n=t(...e)),n)},t.onlyUnique=ft,t.over=function(t){return(...n)=>cn(t,t=>t(...n))},t.overArgs=function(t,n){const e=n.length;return function(...r){const o=new Array(r.length);for(let t=0;t<r.length;t++)o[t]=t<e?n[t](r[t]):r[t];return t.apply(this,o)}},t.overAsync=function(t){return async(...n)=>cn(t,async t=>t(...n))},t.overEvery=function(t){return n=>hn(t,t=>t(n))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[h(t,(t,r)=>{if(n(t,r))return t;e.push(t)}),e]},t.pathExists=async function(t){try{return await n.stat(t),!0}catch{return!1}},t.pick=(t,n,e={})=>{if(t)return l(n,n=>{e[n]=t[n]}),e},t.pluck=function(t,n){return X(t,t=>It(t,n))},t.pluckObject=It,t.promise=function(t){return new Promise(t)},t.property=function(t){return n=>dn(t,n)},t.propertyMatch=(t,n,e=G(t))=>A(e,e=>H(t[e],n[e])),t.propertyOf=function(t){return n=>dn(n,t)},t.randomFloat=function(t,n=0){return On()*(t-n)+n},t.randomInt=it,t.randomString=function(t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){const e=n.length;let r="";for(let o=0;o<t;o++)r+=n[Math.floor(Math.random()*e)];return r},t.range=function(t,n,e=1,r=[]){return d(e)?r:t<n?m(t,n,e,r):w(t,n,e,r)},t.rangeDown=w,t.rangeUp=m,t.rawURLDecode=ee,t.reArg=function(t,n){return(...e)=>t(...n.map(t=>e[t]))},t.readJSON=async function(t){return JSON.parse(await n.readFile(t,"utf8"))},t.readText=function(t){return n.readFile(t,"utf8")},t.regexTestFactory=Bt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;r<e;r++){const o=t[r];n.includes(o)&&(t.splice(r,1),r--,e--)}return t},t.removeBy=function(t,n){let e=t.length;for(let r=0;r<e;r++){n(t[r],r)&&(t.splice(r,1),r--,e--)}return t},t.replaceList=function(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)},t.rest=function(t){return t.slice(1,t.length)},t.restString=Hn,t.retry=async function(t,{attempts:n=3,wait:e=0,factor:r=1}={}){let o,i=e;for(let e=0;e<n;e++)try{return await t(e)}catch(t){o=t,e<n-1&&i>0&&(await dr(i),i*=r)}throw o},t.returnValue=f,t.right=function(t,n){return t[t.length-1-n]},t.rightString=function(t,n=1){return t[t.length-n]},t.roundTo=function(t,n=0){return Mn(jn,t,n)},t.sameClass=function(t,n){const e=K(t),r=K(n);return Boolean(e)&&e===r},t.sameType=function(t,n){return typeof t==typeof n},t.sample=function(t,n){if(!t)return!1;const e=t.length;if(e===n||n>e)return ut(t);if(1===n)return[t[it(e-1,0)]];const r=[],o={};let i,s=0;for(;s<n;)i=it(t.length-1,0),o[i]||(r.push(t[i]),o[i]=!0,s++);return r},t.sanitize=function(t){return re(ee(t))},t.set=function(t,n,e){if(!t)return t;const r=x(n)?n:yn(n),o=r.length-1;let i=t;for(let t=0;t<o;t++){const n=r[t];if(void 0===i[n]||null===i[n]){const e=r[t+1];i[n]=/^\d+$/.test(e)?[]:{}}i=i[n]}return i[r[o]]=e,t},t.setKey=function(t,n,e){return n&&q(t)||dt(n)&&x(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t},t.setValue=function(t,n,e){return dt(e)&&x(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t},t.shuffle=ut,t.slugify=function(t,n="-"){const e=t.normalize("NFKD").replace(oe,"").toLowerCase().replace(ie,n);if("-"===n)return e.replace(se,"");const r=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.replace(new RegExp(`^${r}+|${r}+$`,"g"),"")},t.smallest=function(t){return at(...t)},t.snakeCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Zn," ").trim().toLowerCase().replace(Jn,"_")},t.sortBy=function(t,n){const e="function"==typeof n;return[...t].sort((t,r)=>function(t,n){return t<n?-1:t>n?1:0}(e?n(t):t[n],e?n(r):r[n]))},t.sortCollectionAlphabetically=function(t,n="id",e){return t.sort((t,r)=>Et(t,r,n,e))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort((t,r)=>St(t,r,n,e))},t.sortCollectionAscending=Mt,t.sortCollectionAscendingFilter=Ft,t.sortCollectionDescending=Tt,t.sortCollectionDescendingFilter=jt,t.sortNumberAscending=function(t){return t.sort(nt)},t.sortNumberDescending=function(t){return t.sort(et)},t.sortObjectsAlphabetically=Et,t.sortObjectsAlphabeticallyReverse=St,t.sortUnique=lt,t.stringify=sr,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=nt,t.subtractAll=function(t){return t.reduce((t,n)=>t-n)},t.subtractReverse=et,t.sumAll=function(t){return t.reduce((t,n)=>t+n,0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Xt(()=>{e.shouldThrottle&&e.callable(...t),e.id=!1},n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{Qt.remove(e.id),e.id=!1},e},t.timer=Xt,t.timers=Qt,t.times=function(t,n,e){for(let r=0;r<t;r++)e&&n.call(e,r)||n(r)},t.timesAsync=async function(t,n,e){for(let r=0;r<t;r++)e&&await n.call(e,r)||await n(r)},t.timesMap=function(t,n,e=[]){for(let r=0;r<t;r++)e[r]=n(t);return e},t.timesMapAsync=async function(t,n,e=[]){for(let r=0;r<t;r++)e[r]=await n(t);return e},t.toArray=ct,t.toPath=yn,t.toggle=function(t,n=!0,e=!1){return H(n,t)?e:n},t.tokenize=function(t){return t.match(ce)||[]},t.truncate=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,s=e-n;for(;s<o&&s>=0&&(i=r[s]," "!==i);s--);return t.slice(0,s).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,s=n;for(;s<o&&s>0&&(i=r[s]," "!==i);s++);return t.substring(s,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map((n,e)=>t.map(t=>t[e]))},t.unZipObject=t=>{const n=[],e=[];return $t(t,(t,r)=>{n.push(r),e.push(t)}),[n,e]},t.union=function(...t){return ht(T(t))},t.uniqID=Nr,t.unique=ht,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;r<e;r++)if(!1===n(t[r],r))return!1;return!0},t.untilTrueArray=function(t,n){const e=t.length;for(let r=0;r<e;r++)if(!0===n(t[r],r))return!1;return!0},t.upperCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Wn," ").trim().toUpperCase()},t.upperFirst=le,t.upperFirstAll=function(t){return t.replace(ae,t=>le(t))},t.upperFirstLetter=fe,t.upperFirstOnly=he,t.upperFirstOnlyAll=function(t){return t.replace(ae,t=>he(t))},t.uuid=function(){return Pr?Rr.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)})},t.virtualStorage=function(t){return new kr(t)},t.walkDir=async function(t,{skip:r}={}){const o=[];return await async function t(i){const s=await n.readdir(i,{withFileTypes:!0});for(const n of s){const s=e.join(i,n.name);r?.(n.name,s)||(n.isDirectory()?await t(s):n.isFile()&&o.push(s))}}(t),o},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o<t.length;){const i=n(t[o],o,t,t.length,r);a(i)&&e.push(i),o++}return e},t.whileEachArray=function(t,n,e){let r=0;for(;r<t.length;)n(t[r],r,t,t.length,e),r++;return t},t.whileMapArray=function(t,n,e=[],r){let o=0;for(;o<t.length;)e.push(n(t[o],o,t,t.length,r)),o++;return t},t.withTimeout=function(t,n,e="Timed out"){const r="function"==typeof t?t():t;return new Promise((t,o)=>{const i=setTimeout(()=>o(new Error(e)),n);r.then(n=>{clearTimeout(i),t(n)},t=>{clearTimeout(i),o(t)})})},t.without=function(t,n){if(!n)return t;const e=O(Set,[n]);return t.filter(t=>!e.has(t))},t.words=function(t){return t.match(ue)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.writeJSON=function(t,e,r=2){return n.writeFile(t,JSON.stringify(e,null,r),"utf8")},t.writeText=function(t,e){return n.writeFile(t,e,"utf8")},t.xor=function(...t){const n=O(Map),e=[];return 2===t.length?M(t[0],t[1]):(l(t,(t,e)=>{l(t,(t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)})}),F(n,t=>{1===t.count&&e.push(t.child)}),e)},t.zip=function(...t){return t[0].map((n,e)=>t.map(t=>t[e]))},t.zipObject=(t,n)=>{const e={};return l(t,(t,r)=>{e[t]=n[r]}),e}});