@vinicunca/perkakas 0.0.11 → 0.2.1

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.
package/dist/index.min.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var tt={TAB:"Tab",ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ENTER:"Enter",ESC:"Escape",SPACE:"Space",SHIFT:"Shift",KEY_F:"KEY_F",CTRL:"Control",ALT:"Alt",META:"Meta",AT:"@",DELETE:"Delete",BACKSPACE:"Backspace",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function fn(n,...t){let e=n;const r=t.map(i=>{const{lazy:f,lazyArgs:c}=i;if(f){const s=f(...c||[]);return s.indexed=f.indexed,s.single=f.single,s.index=0,s.items=[],s}return null});let u=0;for(;u<t.length;){const i=t[u];if(!r[u]){e=i(e),u++;continue}const c=[];for(let l=u;l<t.length&&r[l];l++)if(c.push(r[l]),r[l].single)break;const s=[];for(const l of e)if(cn({item:l,acc:s,lazySeq:c}))break;c[c.length-1].single?e=s[0]:e=s,u+=c.length}return e}function cn({item:n,lazySeq:t,acc:e}){if(t.length===0)return e.push(n),!1;let r={done:!1,hasNext:!1},u=!1;for(let i=0;i<t.length;i++){const f=t[i],c=f.indexed,s=f.index,a=f.items;if(a.push(n),r=c?f(n,s,a):f(n),f.index++,r.hasNext)if(r.hasMany){const l=r.next;for(const N of l)if(cn({item:N,acc:e,lazySeq:t.slice(i+1)}))return!0;return!1}else n=r.next;if(!r.hasNext)break;r.done&&(u=!0)}return r.hasNext&&e.push(n),!!u}function et(...n){return t=>fn(t,...n)}function rt(n){return n}function ut(){}function it(n){let t=!1,e;return()=>(t||(e=n(),t=!0),e)}function o(n,t,e){const r=n.length-t.length,u=Array.from(t);if(r===0)return n(...u);if(r===1){const i=f=>n(f,...u);return(e||n.lazy)&&(i.lazy=e||n.lazy,i.lazyArgs=t),i}throw new Error("Wrong number of arguments")}function ot(n){return new Promise(t=>{setTimeout(t,n)})}function ft(...n){return o(ct,n)}function ct(n,t){return t.every(e=>e(n))}function st(...n){return o(lt,n)}function lt(n,t){return t.some(e=>e(n))}function at(...n){return o(dt,n)}function dt(n,t){const e=Array.from({length:Math.ceil(n.length/t)});for(let r=0;r<e.length;r+=1)e[r]=n.slice(r*t,(r+1)*t);return e}function sn(n){return Array.isArray(n)}function ht(n){return typeof n=="boolean"}function yt(n){return n instanceof Date}function b(n){return typeof n<"u"&&n!==null}(n=>{function t(e){return e!==void 0}n.strict=t})(b||(b={}));function xt(n){return Object.prototype.toString.call(n)}function y(n){return xt(n)==="[object Object]"}function W(n){return typeof n=="string"}function pt(n){if(sn(n)||W(n))return n.length===0;if(y(n)){for(const t in n)return!1;return!(n instanceof RegExp)}return!1}function zt(n){return n instanceof Error}function gt(n){return typeof n=="function"}function _t(n){return n==null}function At(n){return n!==null}function Nt(n){return t=>!n(t)}function mt(n){return typeof n=="number"&&!Number.isNaN(n)}function Et(n){return n instanceof Promise}function ln(n){return!!n}function Ot(n){return n.filter(ln)}function wt(...n){return o(It,n)}function It(n,t){return n.concat(t)}function an(n){return(t,e)=>t.reduce((r,u,i)=>{const f=n?e(u,i,t):e(u);return r+(f?1:0)},0)}function k(...n){return o(an(!1),n)}(n=>{function t(...e){return o(an(!0),e)}n.indexed=t})(k||(k={}));function d(n,t,e){const r=[];for(let u=0;u<n.length;u++){const i=n[u],f=e?t(i,u,n):t(i);f.hasMany===!0?r.push(...f.next):f.hasNext&&r.push(f.next)}return r}function m(...n){return o(Bt,n,m.lazy)}function Bt(n,t,e){const r=m.lazy(t,e);return d(n,r)}(n=>{function t(e,r){return u=>e.every(i=>!r(u,i))?{done:!1,hasNext:!0,next:u}:{done:!1,hasNext:!1}}n.lazy=t})(m||(m={}));function E(...n){return o(Pt,n,E.lazy)}function Pt(n,t){const e=E.lazy(t);return d(n,e)}(n=>{function t(e){const r=new Set(e);return u=>r.has(u)?{done:!1,hasNext:!1}:{done:!1,hasNext:!0,next:u}}n.lazy=t})(E||(E={}));function St(...n){return o(Mt,n)}function Mt(n,t){const e=[...n];return t>0&&e.splice(-t),e}function O(...n){return o(Lt,n,O.lazy)}function Lt(n,t){return d(n,O.lazy(t))}(n=>{function t(e){let r=e;return u=>r>0?(r--,{done:!1,hasNext:!1}):{done:!1,hasNext:!0,next:u}}n.lazy=t})(O||(O={}));function h(n){return n.indexed=!0,n}function x(...n){return o(dn(!1),n,x.lazy)}function dn(n){return(t,e)=>d(t,n?x.lazyIndexed(e):x.lazy(e),n)}function hn(n){return t=>(e,r,u)=>(n?t(e,r,u):t(e))?{done:!1,hasNext:!0,next:e}:{done:!1,hasNext:!1}}(n=>{function t(...e){return o(dn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=hn(!1),n.lazyIndexed=h(hn(!0))})(x||(x={}));function M(n){return n.single=!0,n}function L(...n){return o(yn(!1),n,L.lazy)}function yn(n){return(t,e)=>n?t.findIndex(e):t.findIndex(r=>e(r))}function xn(n){return t=>{let e=0;return(r,u,i)=>(n?t(r,u,i):t(r))?{done:!0,hasNext:!0,next:e}:(e++,{done:!1,hasNext:!1})}}(n=>{function t(...e){return o(yn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=M(xn(!1)),n.lazyIndexed=M(h(xn(!0)))})(L||(L={}));function U(...n){return o(pn(!1),n)}function pn(n){return(t,e)=>{for(let r=t.length-1;r>=0;r--)if(n?e(t[r],r,t):e(t[r]))return r;return-1}}(n=>{function t(...e){return o(pn(!0),e)}n.indexed=t})(U||(U={}));function v(...n){return o(zn(!1),n)}function zn(n){return(t,e)=>{for(let r=t.length-1;r>=0;r--)if(n?e(t[r],r,t):e(t[r]))return t[r]}}(n=>{function t(...e){return o(zn(!0),e)}n.indexed=t})(v||(v={}));function C(...n){return o(gn(!1),n,C.lazy)}function gn(n){return(t,e)=>n?t.find(e):t.find(r=>e(r))}function _n(n){return t=>(e,r,u)=>{const i=n?t(e,r,u):t(e);return{done:i,hasNext:i,next:e}}}(n=>{function t(...e){return o(gn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=M(_n(!1)),n.lazyIndexed=M(h(_n(!0)))})(C||(C={}));function T(...n){return o(Ct,n,T.lazy)}function Ct([n]){return n}(n=>{function t(){return e=>({done:!0,hasNext:!0,next:e})}n.lazy=t,(e=>{e.single=!0})(t=n.lazy||(n.lazy={}))})(T||(T={}));function q(...n){return o(An(!1),n)}function An(n){return(t,e)=>t.reduce((r,u,i)=>((n?e(u,i,t):e(u)).forEach(([c,s])=>{r[c]=s}),r),{})}(n=>{function t(...e){return o(An(!0),e)}n.indexed=t})(q||(q={}));function p(...n){return o(Tt,n,p.lazy)}function Tt(n){return d(n,p.lazy())}(n=>{function t(){return e=>Array.isArray(e)?{done:!1,hasNext:!0,hasMany:!0,next:e}:{done:!1,hasNext:!0,next:e}}n.lazy=t})(p||(p={}));function R(...n){return o(Rt,n,R.lazy)}function Rt(n,t){return p(n.map(e=>t(e)))}(n=>{function t(e){return r=>{const u=e(r);return Array.isArray(u)?{done:!1,hasNext:!0,hasMany:!0,next:u}:{done:!1,hasNext:!0,next:u}}}n.lazy=t})(R||(R={}));function z(...n){return o(jt,n,z.lazy)}function jt(n){return d(n,z.lazy())}function Dt(n){if(!Array.isArray(n))return n;const t=[];return n.forEach(e=>{Array.isArray(e)?t.push(...z(e)):t.push(e)}),t}(n=>{function t(){return e=>{const r=Dt(e);return Array.isArray(r)?{done:!1,hasNext:!0,hasMany:!0,next:r}:{done:!1,hasNext:!0,next:r}}}n.lazy=t})(z||(z={}));function g(...n){return o(Nn(!1),n,g.lazy)}function Nn(n){return(t,e)=>d(t,n?g.lazyIndexed(e):g.lazy(e),n)}function mn(n){return t=>(e,r,u)=>(n?t(e,r,u):t(e),{done:!1,hasNext:!0,next:e})}(n=>{function t(...e){return o(Nn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=mn(!1),n.lazyIndexed=h(mn(!0))})(g||(g={}));function F(...n){return o(En(!1),n)}function En(n){return(t,e)=>{const r={};return t.forEach((u,i)=>{const f=n?e(u,i,t):e(u);if(f!==void 0){const c=String(f);r[c]||(r[c]=[]),r[c].push(u)}}),r}}(n=>{function t(...e){return o(En(!0),e)}n.indexed=t,n.strict=n})(F||(F={}));function K(...n){return o(On(!1),n)}function On(n){return(t,e)=>t.reduce((r,u,i)=>{const f=n?e(u,i,t):e(u),c=String(f);return r[c]=u,r},{})}(n=>{function t(...e){return o(On(!0),e)}n.indexed=t})(K||(K={}));function w(...n){return o(bt,n,w.lazy)}function bt(n,t){const e=w.lazy(t);return d(n,e)}(n=>{function t(e){return r=>new Set(e).has(r)?{done:!1,hasNext:!0,next:r}:{done:!1,hasNext:!1}}n.lazy=t})(w||(w={}));function I(...n){return o(Wt,n,I.lazy)}function Wt(n,t,e){const r=I.lazy(t,e);return d(n,r)}(n=>{function t(e,r){return u=>e.some(i=>r(u,i))?{done:!1,hasNext:!0,next:u}:{done:!1,hasNext:!1}}n.lazy=t})(I||(I={}));function kt(...n){return o(Ut,n)}function Ut(n,t){return n.join(t)}function vt(...n){return o(qt,n)}function qt(n){return n[n.length-1]}function Ft(...n){return o(Kt,n)}function Kt(n){return"length"in n?n.length:Array.from(n).length}function _(...n){return o(wn(!1),n,_.lazy)}function wn(n){return(t,e)=>d(t,n?_.lazyIndexed(e):_.lazy(e),n)}function In(n){return t=>(e,r,u)=>({done:!1,hasNext:!0,next:n?t(e,r,u):t(e)})}(n=>{function t(...e){return o(wn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=In(!1),n.lazyIndexed=h(In(!0)),n.strict=n})(_||(_={}));function $(...n){return o(Bn(!1),n)}function Bn(n){return(t,e)=>t.reduce((r,u,i)=>{const[f,c]=n?e(u,i,t):e(u);return r[f]=c,r},{})}(n=>{function t(...e){return o(Bn(!0),e)}n.indexed=t})($||($={}));function Pn(n){return(t,e)=>{let r,u;return t.forEach((i,f)=>{const c=n?e(i,f,t):e(i);(u===void 0||c>u)&&(r=i,u=c)}),r}}function G(...n){return o(Pn(!1),n)}(n=>{function t(...e){return o(Pn(!0),e)}n.indexed=t})(G||(G={}));function Sn(n){return(t,e)=>{if(t.length===0)return Number.NaN;let r=0;return t.forEach((u,i)=>{r+=n?e(u,i,t):e(u)}),r/t.length}}function H(...n){return o(Sn(!1),n)}(n=>{function t(...e){return o(Sn(!0),e)}n.indexed=t})(H||(H={}));function $t(n){return n.reduce((t,e)=>({...t,...e}),{})}function Mn(n){return(t,e)=>{let r,u;return t.forEach((i,f)=>{const c=n?e(i,f,t):e(i);(u===void 0||c<u)&&(r=i,u=c)}),r}}function Y(...n){return o(Mn(!1),n)}(n=>{function t(...e){return o(Mn(!0),e)}n.indexed=t})(Y||(Y={}));function J(...n){return o(Ln(!1),n)}function Ln(n){return(t,e)=>{const r=[[],[]];return t.forEach((u,i)=>{const f=n?e(u,i,t):e(u);r[f?0:1].push(u)}),r}}(n=>{function t(...e){return o(Ln(!0),e)}n.indexed=t})(J||(J={}));function Cn(...n){return o(Gt,n)}function Gt(n,t){const e=[];for(let r=n;r<t;r++)e.push(r);return e}function Q(...n){return o(Tn(!1),n)}function Tn(n){return(t,e,r)=>t.reduce((u,i,f)=>n?e(u,i,f,t):e(u,i),r)}(n=>{function t(...e){return o(Tn(!0),e)}n.indexed=t})(Q||(Q={}));function A(...n){return o(Rn(!1),n,A.lazy)}function Rn(n){return(t,e)=>d(t,n?A.lazyIndexed(e):A.lazy(e),n)}function jn(n){return t=>(e,r,u)=>(n?t(e,r,u):t(e))?{done:!1,hasNext:!1}:{done:!1,hasNext:!0,next:e}}(n=>{function t(...e){return o(Rn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=jn(!1),n.lazyIndexed=h(jn(!0))})(A||(A={}));function Ht(...n){return o(Yt,n)}function Yt(n){return n.slice().reverse()}function Jt(...n){return o(Qt,n)}function Qt(n,t){if(t<0)throw new RangeError(`sampleSize must cannot be negative: ${t}`);if(!Number.isInteger(t))throw new TypeError(`sampleSize must be an integer: ${t}`);if(t>=n.length)return n;if(t===0)return[];const e=Math.min(t,n.length-t),r=new Set;for(;r.size<e;){const u=Math.floor(Math.random()*n.length);r.add(u)}return t===e?Array.from(r).sort((u,i)=>u-i).map(u=>n[u]):n.filter((u,i)=>!r.has(i))}function Vt(...n){return o(Xt,n)}function Xt(n){const t=n.slice();for(let e=0;e<n.length;e+=1){const r=e+Math.floor(Math.random()*(n.length-e)),u=t[r];t[r]=t[e],t[e]=u}return t}function V(...n){return o(Zt,n)}function Zt(n,t){const e=[...n];return e.sort(t),e}(n=>{n.strict=n})(V||(V={}));var ne=["asc","desc"],te={asc:(n,t)=>n>t,desc:(n,t)=>n<t};function X(n,...t){const e=ee(n)?[[n,...t]]:[n,t];return o(re,e)}function ee(n){if(typeof n=="function")return!0;const[t,e,...r]=n;return r.length>0?!1:typeof t=="function"&&ne.includes(e)}function re(n,t){return[...n].sort(Dn(...t))}function Dn(n,t,...e){const r=typeof n=="function"?n:n[0],u=typeof n=="function"?"asc":n[1],i=te[u],f=t===void 0?void 0:Dn(t,...e);return(c,s)=>{const a=r(c),l=r(s);return i(a,l)?1:i(l,a)?-1:f?.(c,s)??0}}(n=>{n.strict=n})(X||(X={}));function bn(...n){return o(ue,n)}function ue(n,t){const e=[...n],r=e.splice(t);return[e,r]}function ie(...n){return o(oe,n)}function oe(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return bn(n,e);return[n,[]]}function Wn(n){return(t,e)=>{let r=0;return t.forEach((u,i)=>{const f=n?e(u,i,t):e(u);r+=f}),r}}function Z(...n){return o(Wn(!1),n)}(n=>{function t(...e){return o(Wn(!0),e)}n.indexed=t})(Z||(Z={}));function fe(...n){return o(ce,n)}function ce(n,t,e){return typeof n=="string"?se(n,t,e):kn(n,t,e)}function kn(n,t,e){const r=n.slice();if(Number.isNaN(t)||Number.isNaN(e))return r;const u=t<0?n.length+t:t,i=e<0?n.length+e:e;return u<0||u>n.length||i<0||i>n.length||(r[u]=n[i],r[i]=n[u]),r}function se(n,t,e){return kn(n.split(""),t,e).join("")}function B(...n){return o(le,n,B.lazy)}function le(n,t){return d(n,B.lazy(t))}(n=>{function t(e){return r=>e===0?{done:!0,hasNext:!1}:(e--,e===0?{done:!0,hasNext:!0,next:r}:{done:!1,hasNext:!0,next:r})}n.lazy=t})(B||(B={}));function ae(...n){return o(de,n)}function de(n,t){const e=[];for(const r of n){if(!t(r))break;e.push(r)}return e}function P(...n){return o(he,n,P.lazy)}function he(n){return d(n,P.lazy())}(n=>{function t(){const e=new Set;return r=>e.has(r)?{done:!1,hasNext:!1}:(e.add(r),{done:!1,hasNext:!0,next:r})}n.lazy=t})(P||(P={}));function ye(...n){return o(xe,n,Un)}function xe(n,t){return d(n,Un(t))}function Un(n){const t=new Set;return e=>{const r=n(e);return t.has(r)?{done:!1,hasNext:!1}:(t.add(r),{done:!1,hasNext:!0,next:e})}}function S(...n){return o(pe,n,S.lazy)}function pe(n,t){const e=S.lazy(t);return d(n,e,!0)}function ze(n){return(t,e,r)=>r&&r.findIndex(u=>n(t,u))===e?{done:!1,hasNext:!0,next:t}:{done:!1,hasNext:!1}}(n=>{n.lazy=h(ze)})(S||(S={}));function ge(...n){return o(_e,n)}function _e(n,t){const e=n.length>t.length?t.length:n.length,r=[];for(let u=0;u<e;u++)r.push([n[u],t[u]]);return r}function Ae(...n){return o(Ne,n)}function Ne(n,t){const e=n.length>t.length?t.length:n.length,r={};for(let u=0;u<e;u++)r[n[u]]=t[u];return r}function me(...n){if(typeof n[0]=="function"&&n.length===1)return function(t,e){return nn(t,e,n[0])};if(typeof n[0]=="function"&&n.length===2)return function(t){return nn(t,n[1],n[0])};if(n.length===3)return nn(n[0],n[1],n[2])}function nn(n,t,e){const r=n.length>t.length?t.length:n.length,u=[];for(let i=0;i<r;i++)u.push(e(n[i],t[i]));return u}function Ee(...n){return o(Oe,n)}function Oe(n,t){return t.min!=null&&t.min>n?t.min:t.max!=null&&t.max<n?t.max:n}function we(...n){return o(Ie,n)}function Ie(n,t,e){return{...n,[t]:e}}function vn(n){return n===null?"Null":n===void 0?"Undefined":Object.prototype.toString.call(n).slice(8,-1)}function Be(n){return new RegExp(n.source,(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.sticky?"y":"")+(n.unicode?"u":""))}function qn(n,t,e,r){function u(i){const f=t.length;let c=0;for(;c<f;){if(n===t[c])return e[c];c+=1}t[c+1]=n,e[c+1]=i;for(const s in n)i[s]=r?qn(n[s],t,e,!0):n[s];return i}switch(vn(n)){case"Object":return u({});case"Array":return u([]);case"Date":return new Date(n.valueOf());case"RegExp":return Be(n);default:return n}}function Pe(n){return n!=null&&typeof n.clone=="function"?n.clone():qn(n,[],[],!0)}var Fn=Array.isArray,Kn=Object.keys;function tn(...n){return o(Se,n)}function Se(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){const e=Fn(n),r=Fn(t);let u,i,f;if(e&&r){if(i=n.length,i!==t.length)return!1;for(u=i;u--!==0;)if(!tn(n[u],t[u]))return!1;return!0}if(e!==r)return!1;const c=n instanceof Date,s=t instanceof Date;if(c!==s)return!1;if(c&&s)return n.getTime()===t.getTime();const a=n instanceof RegExp,l=t instanceof RegExp;if(a!==l)return!1;if(a&&l)return n.toString()===t.toString();const N=Kn(n);if(i=N.length,i!==Kn(t).length)return!1;for(u=i;u--!==0;)if(!Object.prototype.hasOwnProperty.call(t,N[u]))return!1;for(u=i;u--!==0;)if(f=N[u],!tn(n[f],t[f]))return!1;return!0}return n!==n&&t!==t}function en(...n){return o($n(!1),n)}function $n(n){return(t,e)=>{for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const u=t[r];n?e(u,r,t):e(u)}return t}}(n=>{function t(...e){return o($n(!0),e)}n.indexed=t})(en||(en={}));function j(n){const t={};for(const[e,r]of n)t[e]=r;return t}(n=>{n.strict=n})(j||(j={}));function Me(...n){return o(Le,n)}function Le(n){const t={};for(const e in n)t[n[e]]=e;return t}function rn(n){return Object.keys(n)}(n=>{n.strict=n})(rn||(rn={}));function Ce(n,t){return arguments.length===1?e=>Gn(e,n):Gn(n,t)}function Gn(n,t){return Object.keys(n).reduce((e,r)=>(e[t(r,n[r])]=n[r],e),{})}function Te(n,t){return arguments.length===1?e=>Hn(e,n):Hn(n,t)}function Hn(n,t){return Object.keys(n).reduce((e,r)=>(e[r]=t(n[r],r),e),{})}function Re(...n){return o(je,n)}function je(n,t){return Object.assign({},n,t)}function Yn({mergeArray:n=!1,original:t,patch:e}){const r=t,u=e;if(Array.isArray(u))return n&&Array.isArray(u)?[...r,...u]:[...u];const i={...r};return y(r)&&y(u)&&Object.keys(u).forEach(f=>{const c=y(r[f])&&y(u[f]),s=Array.isArray(r[f])&&Array.isArray(u[f]);c||s?i[f]=Yn({mergeArray:n,original:r[f],patch:u[f]}):Object.assign(i,{[f]:u[f]})}),i}function De(...n){return o(be,n)}function be(n,t){if(t.length===0)return{...n};if(t.length===1){const[r]=t,{[r]:u,...i}=n;return i}if(!t.some(r=>r in n))return{...n};const e=new Set(t);return j(Object.entries(n).filter(([r])=>!e.has(r)))}function We(...n){return o(ke,n)}function ke(n,t){return Object.keys(n).reduce((e,r)=>(t(n[r],r)||(e[r]=n[r]),e),{})}function Ue(...n){return o(ve,n)}function ve(n,t,e){let r=n;for(const u of t){if(r==null||r[u]==null)return e;r=r[u]}return r}function qe(...n){return o(Fe,n)}function Fe(n,t){return n==null?{}:t.reduce((e,r)=>(r in n&&(e[r]=n[r]),e),{})}function Ke(...n){return o($e,n)}function $e(n,t){return n==null?{}:Object.keys(n).reduce((e,r)=>(t(n[r],r)&&(e[r]=n[r]),e),{})}function Ge(n){return({[n]:t})=>t}function He(...n){return o(Ye,n)}function Ye(n,t,e){return{...n,[t]:e}}function Je(...n){return o(D,n)}function D(n,t,e){return t.length===0?e:Array.isArray(n)?n.map((r,u)=>u===t[0]?D(r,t.slice(1),e):r):{...n,[t[0]]:D(n[t[0]],t.slice(1),e)}}function Qe(...n){return o(Ve,n)}function Ve(n,t,e){const{[t]:r,[e]:u}=n;return{...n,[t]:u,[e]:r}}function un(n){return Object.entries(n)}(n=>{function t(e){return Object.entries(e)}n.strict=t})(un||(un={}));function Xe(n){return Object.values(n)}var Ze=/\d/,nr=["-","_","/","."];function Jn(n=""){if(!Ze.test(n))return n.toUpperCase()===n}function on(n,t){const e=t??nr,r=[];if(!n||!W(n))return r;let u="",i,f;for(const c of n){const s=e.includes(c);if(s===!0){r.push(u),u="",i=void 0;continue}const a=Jn(c);if(f===!1){if(i===!1&&a===!0){r.push(u),u=c,i=a;continue}if(i===!0&&a===!1&&u.length>1){const l=u[u.length-1];r.push(u.slice(0,Math.max(0,u.length-1))),u=l+c,i=a;continue}}u+=c,i=a,f=s}return r.push(u),r}function Qn(n){return n?n[0].toUpperCase()+n.slice(1):""}function Vn(n){return n?n[0].toLowerCase()+n.slice(1):""}function Xn(n){return n?(Array.isArray(n)?n:on(n)).map(t=>Qn(t)).join(""):""}function tr(n){return Vn(Xn(n||""))}function Zn(n,t){return n?(Array.isArray(n)?n:on(n)).map(e=>e.toLowerCase()).join(t??"-"):""}function er(n){return Zn(n||"","_")}function rr(n,t=1e3){if(n<t)return`${n} B`;const e=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(n)>=t&&r<e.length-1;)n/=t,++r;return`${n.toFixed(1)} ${e[r]}B`}function ur(n){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=()=>t[Math.floor(Math.random()*t.length)];return Cn(0,n).reduce(r=>r+e(),"")}function ir(n){return n.normalize("NFD").replace(/[\u0300-\u036F]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function or(n){return nt(n)}function nt(n){if(n.length===0)return[];const t=n.match(/^\[(.+?)\](.*)$/)??n.match(/^\.?([^.[\]]+)(.*)$/);if(t){const[,e,r]=t;return[e,...nt(r)]}return[n]}var fr=typeof window<"u";export{tt as KEY_CODES,D as _setPath,we as addProp,ft as allPass,st as anyPass,at as chunk,Ee as clamp,Pe as clone,Ot as compact,wt as concat,k as countBy,et as createPipe,E as difference,m as differenceWith,O as drop,St as dropLast,tn as equals,x as filter,C as find,L as findIndex,v as findLast,U as findLastIndex,T as first,R as flatMap,q as flatMapToObj,p as flatten,z as flattenDeep,g as forEach,en as forEachObj,j as fromPairs,F as groupBy,rr as humanReadableFileSize,rt as identity,K as indexBy,w as intersection,I as intersectionWith,Me as invert,sn as isArray,ht as isBoolean,fr as isBrowser,yt as isDate,b as isDefined,pt as isEmpty,zt as isError,gt as isFunction,_t as isNil,At as isNonNull,Nt as isNot,mt as isNumber,y as isObject,Et as isPromise,W as isString,ln as isTruthy,Jn as isUppercase,kt as join,rn as keys,vt as last,Ft as length,_ as map,Ce as mapKeys,$ as mapToObj,Te as mapValues,G as maxBy,H as meanBy,Re as merge,$t as mergeAll,Yn as mergeDeep,Y as minBy,ut as noop,De as omit,We as omitBy,it as once,J as partition,Ue as pathOr,qe as pick,Ke as pickBy,fn as pipe,Ge as prop,o as purry,ur as randomString,Cn as range,Q as reduce,A as reject,Ht as reverse,Jt as sample,He as set,Je as setPath,Vt as shuffle,ot as sleep,ir as slugify,V as sort,X as sortBy,bn as splitAt,on as splitByCase,ie as splitWhen,or as stringToPath,Z as sumBy,fe as swapIndices,Qe as swapProps,B as take,ae as takeWhile,tr as toCamelCase,Zn as toKebabCase,Vn as toLowerFirst,un as toPairs,Xn as toPascalCase,er as toSnakeCase,Qn as toUpperFirst,vn as type,P as uniq,ye as uniqBy,S as uniqWith,Xe as values,ge as zip,Ae as zipObj,me as zipWith};
1
+ "use strict";var gt={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",AT:"@",BACKSPACE:"Backspace",CTRL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESC:"Escape",HOME:"Home",KEY_F:"KEY_F",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:"Space",TAB:"Tab"};function i(n,t,e){const r=n.length-t.length,u=Array.from(t);if(r===0)return n(...u);if(r===1){const o=f=>n(f,...u);return(e||n.lazy)&&(o.lazy=e||n.lazy,o.lazyArgs=t),o}throw new Error("Wrong number of arguments")}function zt(...n){return i(_t,n)}function _t(n,t){return t.every(e=>e(n))}function mt(...n){return i(At,n)}function At(n,t){return t.some(e=>e(n))}function It(...n){return i(Nt,n)}function Nt(n,t){const e=Array.from({length:Math.ceil(n.length/t)});for(let r=0;r<e.length;r+=1)e[r]=n.slice(r*t,(r+1)*t);return e}function gn(n){return!!n}function wt(n){return n.filter(gn)}function Et(...n){return i(vt,n)}function vt(n,t){return n.concat(t)}function zn(n){return(t,e)=>t.reduce((r,u,o)=>{const f=n?e(u,o,t):e(u);return r+(f?1:0)},0)}function q(...n){return i(zn(!1),n)}(n=>{function t(...e){return i(zn(!0),e)}n.indexed=t})(q||(q={}));function h(n,t,e){const r=[];for(let u=0;u<n.length;u++){const o=n[u],f=e?t(o,u,n):t(o);f.hasMany===!0?r.push(...f.next):f.hasNext&&r.push(f.next)}return r}function A(...n){return i(Ot,n,A.lazy)}function Ot(n,t,e){const r=A.lazy(t,e);return h(n,r)}(n=>{function t(e,r){return u=>e.every(o=>!r(u,o))?{done:!1,hasNext:!0,next:u}:{done:!1,hasNext:!1}}n.lazy=t})(A||(A={}));function I(...n){return i(Bt,n,I.lazy)}function Bt(n,t){const e=I.lazy(t);return h(n,e)}(n=>{function t(e){const r=new Set(e);return u=>r.has(u)?{done:!1,hasNext:!1}:{done:!1,hasNext:!0,next:u}}n.lazy=t})(I||(I={}));function Ct(...n){return i(Pt,n)}function Pt(n,t){const e=[...n];return t>0&&e.splice(-t),e}function N(...n){return i(bt,n,N.lazy)}function bt(n,t){return h(n,N.lazy(t))}(n=>{function t(e){let r=e;return u=>r>0?(r--,{done:!1,hasNext:!1}):{done:!1,hasNext:!0,next:u}}n.lazy=t})(N||(N={}));function w(...n){return i(Tt,n)}function Tt(n,t){return n.length>=t}function K(n,t,e){[n[t],n[e]]=[n[e],n[t]]}function _n(n,t){for(let e=Math.floor(n.length/2)-1;e>=0;e--)An(n,e,t)}function mn(n,t,e){if(!w(n,1))return;const r=n[0];if(!(t(e,r)>=0))return n[0]=e,An(n,0,t),r}function An(n,t,e){let r=t;for(;r*2+1<n.length;){const u=r*2+1;let o=e(n[r],n[u])<0?u:r;const f=u+1;if(f<n.length&&e(n[o],n[f])<0&&(o=f),o===r)return;K(n,r,o),r=o}}var In={asc:(n,t)=>n>t,desc:(n,t)=>n<t};function Nn(n,t){const[e,...r]=Array.isArray(t)?t:Array.from(t);if(!wn(e)){const o=H(...r);return n(e,o)}const u=H(e,...r);return o=>n(o,u)}function S(n,t){const[e,r,...u]=Array.from(t);let o,f;return wn(r)?(o=e,f=[r,...u]):(o=r,f=[e,...u]),Nn((...c)=>n(...c,o),f)}function H(n,t,...e){const r=typeof n=="function"?n:n[0],u=typeof n=="function"?"asc":n[1],o=In[u],f=t===void 0?void 0:H(t,...e);return(c,s)=>{const d=r(c),l=r(s);return o(d,l)?1:o(l,d)?-1:f?.(c,s)??0}}function wn(n){if(En(n))return!0;if(typeof n!="object"||!Array.isArray(n))return!1;const[t,e,...r]=n;return En(t)&&e in In&&r.length===0}function En(n){return typeof n=="function"&&n.length===1}function kt(...n){return S(St,n)}function St(n,t,e){if(e>=n.length)return[];if(e<=0)return[...n];const r=n.slice(0,e);_n(r,t);const u=[],o=n.slice(e);for(const f of o){const c=mn(r,t,f);u.push(c??f)}return u}function Lt(...n){return i(Dt,n)}function Dt(n,t){for(let e=n.length-1;e>=0;e--)if(!t(n[e]))return n.slice(0,e+1);return[]}function Mt(...n){return i(Rt,n)}function Rt(n,t){for(let e=0;e<n.length;e++)if(!t(n[e]))return n.slice(e);return[]}function y(n){return Object.assign(n,{indexed:!0})}function p(...n){return i(vn(!1),n,p.lazy)}function vn(n){return(t,e)=>h(t,n?p.lazyIndexed(e):p.lazy(e),n)}function On(n){return t=>(e,r,u)=>(n?t(e,r,u):t(e))?{done:!1,hasNext:!0,next:e}:{done:!1,hasNext:!1}}(n=>{function t(...e){return i(vn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=On(!1),n.lazyIndexed=y(On(!0))})(p||(p={}));function L(n){return n.single=!0,n}function D(...n){return i(Bn(!1),n,D.lazy)}function Bn(n){return(t,e)=>n?t.findIndex(e):t.findIndex(r=>e(r))}function Cn(n){return t=>{let e=0;return(r,u,o)=>(n?t(r,u,o):t(r))?{done:!0,hasNext:!0,next:e}:(e++,{done:!1,hasNext:!1})}}(n=>{function t(...e){return i(Bn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=L(Cn(!1)),n.lazyIndexed=L(y(Cn(!0)))})(D||(D={}));function G(...n){return i(Pn(!1),n)}function Pn(n){return(t,e)=>{for(let r=t.length-1;r>=0;r--)if(n?e(t[r],r,t):e(t[r]))return r;return-1}}(n=>{function t(...e){return i(Pn(!0),e)}n.indexed=t})(G||(G={}));function V(...n){return i(bn(!1),n)}function bn(n){return(t,e)=>{for(let r=t.length-1;r>=0;r--)if(n?e(t[r],r,t):e(t[r]))return t[r]}}(n=>{function t(...e){return i(bn(!0),e)}n.indexed=t})(V||(V={}));function M(...n){return i(Tn(!1),n,M.lazy)}function Tn(n){return(t,e)=>n?t.find(e):t.find(r=>e(r))}function kn(n){return t=>(e,r,u)=>{const o=n?t(e,r,u):t(e);return{done:o,hasNext:o,next:e}}}(n=>{function t(...e){return i(Tn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=L(kn(!1)),n.lazyIndexed=L(y(kn(!0)))})(M||(M={}));function R(...n){return i(jt,n,R.lazy)}function jt([n]){return n}(n=>{function t(){return e=>({done:!0,hasNext:!0,next:e})}n.lazy=t,(e=>{e.single=!0})(t=n.lazy||(n.lazy={}))})(R||(R={}));function Wt(...n){return Nn(Ft,n)}function Ft(n,t){if(!w(n,2))return n[0];let[e]=n;const[,...r]=n;for(const u of r)t(u,e)<0&&(e=u);return e}function Y(...n){return i(Sn(!1),n)}function Sn(n){return(t,e)=>t.reduce((r,u,o)=>((n?e(u,o,t):e(u)).forEach(([c,s])=>{r[c]=s}),r),{})}(n=>{function t(...e){return i(Sn(!0),e)}n.indexed=t})(Y||(Y={}));function x(...n){return i(Ut,n,x.lazy)}function Ut(n){return h(n,x.lazy())}(n=>{function t(){return e=>Array.isArray(e)?{done:!1,hasMany:!0,hasNext:!0,next:e}:{done:!1,hasNext:!0,next:e}}n.lazy=t})(x||(x={}));function j(...n){return i($t,n,j.lazy)}function $t(n,t){return x(n.map(e=>t(e)))}(n=>{function t(e){return r=>{const u=e(r);return Array.isArray(u)?{done:!1,hasMany:!0,hasNext:!0,next:u}:{done:!1,hasNext:!0,next:u}}}n.lazy=t})(j||(j={}));function g(...n){return i(qt,n,g.lazy)}function qt(n){return h(n,g.lazy())}function Kt(n){if(!Array.isArray(n))return n;const t=[];return n.forEach(e=>{Array.isArray(e)?t.push(...g(e)):t.push(e)}),t}(n=>{function t(){return e=>{const r=Kt(e);return Array.isArray(r)?{done:!1,hasMany:!0,hasNext:!0,next:r}:{done:!1,hasNext:!0,next:r}}}n.lazy=t})(g||(g={}));function z(...n){return i(Ln(!1),n,z.lazy)}function Ln(n){return(t,e)=>h(t,n?z.lazyIndexed(e):z.lazy(e),n)}function Dn(n){return t=>(e,r,u)=>(n?t(e,r,u):t(e),{done:!1,hasNext:!0,next:e})}(n=>{function t(...e){return i(Ln(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=Dn(!1),n.lazyIndexed=y(Dn(!0))})(z||(z={}));function X(...n){return i(Mn(!1),n)}function Mn(n){return(t,e)=>{const r={};return t.forEach((u,o)=>{const f=n?e(u,o,t):e(u);if(f!==void 0){const c=String(f);let s=r[c];s===void 0&&(s=[],r[c]=s),s.push(u)}}),r}}(n=>{function t(...e){return i(Mn(!0),e)}n.indexed=t,n.strict=n})(X||(X={}));function J(...n){return i(Rn(!1),n)}function Rn(n){return(t,e)=>t.reduce((r,u,o)=>{const f=n?e(u,o,t):e(u),c=String(f);return r[c]=u,r},{})}(n=>{function t(...e){return i(Rn(!0),e)}n.indexed=t})(J||(J={}));function E(...n){return i(Ht,n,E.lazy)}function Ht(n,t){const e=E.lazy(t);return h(n,e)}(n=>{function t(e){return r=>new Set(e).has(r)?{done:!1,hasNext:!0,next:r}:{done:!1,hasNext:!1}}n.lazy=t})(E||(E={}));function v(...n){return i(Gt,n,v.lazy)}function Gt(n,t,e){const r=v.lazy(t,e);return h(n,r)}(n=>{function t(e,r){return u=>e.some(o=>r(u,o))?{done:!1,hasNext:!0,next:u}:{done:!1,hasNext:!1}}n.lazy=t})(v||(v={}));function Vt(...n){return i(Yt,n)}function Yt(n,t){return n.join(t)}function Xt(...n){return i(Jt,n)}function Jt(n){return n[n.length-1]}function Qt(...n){return i(Zt,n)}function Zt(n){return"length"in n?n.length:Array.from(n).length}function _(...n){return i(jn(!1),n,_.lazy)}function jn(n){return(t,e)=>h(t,n?_.lazyIndexed(e):_.lazy(e),n)}function Wn(n){return t=>(e,r,u)=>({done:!1,hasNext:!0,next:n?t(e,r,u):t(e)})}(n=>{function t(...e){return i(jn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=Wn(!1),n.lazyIndexed=y(Wn(!0)),n.strict=n})(_||(_={}));function Q(...n){return i(Fn(!1),n)}function Fn(n){return(t,e)=>t.reduce((r,u,o)=>{const[f,c]=n?e(u,o,t):e(u);return r[f]=c,r},{})}(n=>{function t(...e){return i(Fn(!0),e)}n.indexed=t})(Q||(Q={}));function Un(n){return(t,e)=>{let r,u;return t.forEach((o,f)=>{const c=n?e(o,f,t):e(o);(u===void 0||c>u)&&(r=o,u=c)}),r}}function Z(...n){return i(Un(!1),n)}(n=>{function t(...e){return i(Un(!0),e)}n.indexed=t})(Z||(Z={}));function $n(n){return(t,e)=>{if(t.length===0)return Number.NaN;let r=0;return t.forEach((u,o)=>{r+=n?e(u,o,t):e(u)}),r/t.length}}function nn(...n){return i($n(!1),n)}(n=>{function t(...e){return i($n(!0),e)}n.indexed=t})(nn||(nn={}));function ne(n){return n.reduce((t,e)=>({...t,...e}),{})}function qn(n){return(t,e)=>{let r,u;return t.forEach((o,f)=>{const c=n?e(o,f,t):e(o);(u===void 0||c<u)&&(r=o,u=c)}),r}}function tn(...n){return i(qn(!1),n)}(n=>{function t(...e){return i(qn(!0),e)}n.indexed=t})(tn||(tn={}));function te(n,t,e){return t<0||t>=n.length?void 0:Kn([...n],0,n.length-1,t,e)}function Kn(n,t,e,r,u){if(t===e)return n[t];const o=ee(n,t,e,u);return r===o?n[r]:Kn(n,r<o?t:o+1,r<o?o-1:e,r,u)}function ee(n,t,e,r){const u=n[e];let o=t;for(let f=t;f<e;f++)r(n[f],u)<0&&(K(n,o,f),o++);return K(n,o,e),o}function re(...n){return S(ue,n)}function ue(n,t,e){return te(n,e>=0?e:n.length+e,t)}function oe(...n){return i(ie,n)}function ie(n){if(n.length===1)return n[0]}function en(...n){return i(Hn(!1),n)}function Hn(n){return(t,e)=>{const r=[[],[]];return t.forEach((u,o)=>{const f=n?e(u,o,t):e(u);r[f?0:1].push(u)}),r}}(n=>{function t(...e){return i(Hn(!0),e)}n.indexed=t})(en||(en={}));function Gn(...n){return i(fe,n)}function fe(n,t){const e=[];for(let r=n;r<t;r++)e.push(r);return e}function ce(...n){return S(se,n)}function se(n,t,e){let r=0;for(const u of n)t(e,u)>0&&r++;return r}function rn(...n){return i(Vn(!1),n)}function Vn(n){return(t,e,r)=>t.reduce((u,o,f)=>n?e(u,o,f,t):e(u,o),r)}(n=>{function t(...e){return i(Vn(!0),e)}n.indexed=t})(rn||(rn={}));function m(...n){return i(Yn(!1),n,m.lazy)}function Yn(n){return(t,e)=>h(t,n?m.lazyIndexed(e):m.lazy(e),n)}function Xn(n){return t=>(e,r,u)=>(n?t(e,r,u):t(e))?{done:!1,hasNext:!1}:{done:!1,hasNext:!0,next:e}}(n=>{function t(...e){return i(Yn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=Xn(!1),n.lazyIndexed=y(Xn(!0))})(m||(m={}));function le(...n){return i(ae,n)}function ae(n){return n.slice().reverse()}function de(...n){return i(he,n)}function he(n,t){if(t<0)throw new RangeError(`sampleSize must cannot be negative: ${t}`);if(!Number.isInteger(t))throw new TypeError(`sampleSize must be an integer: ${t}`);if(t>=n.length)return n;if(t===0)return[];const e=Math.min(t,n.length-t),r=new Set;for(;r.size<e;){const u=Math.floor(Math.random()*n.length);r.add(u)}return t===e?Array.from(r).sort((u,o)=>u-o).map(u=>n[u]):n.filter((u,o)=>!r.has(o))}function ye(...n){return i(pe,n)}function pe(n){const t=n.slice();for(let e=0;e<n.length;e+=1){const r=e+Math.floor(Math.random()*(n.length-e)),u=t[r];t[r]=t[e],t[e]=u}return t}function un(...n){return i(xe,n)}function xe(n,t){const e=[...n];return e.sort(t),e}(n=>{n.strict=n})(un||(un={}));var ge=["asc","desc"],ze={asc:(n,t)=>n>t,desc:(n,t)=>n<t};function on(n,...t){const e=_e(n)?[[n,...t]]:[n,t];return i(me,e)}function _e(n){if(typeof n=="function")return!0;const[t,e,...r]=n;return r.length>0?!1:typeof t=="function"&&ge.includes(e)}function me(n,t){return[...n].sort(Jn(...t))}function Jn(n,t,...e){const r=typeof n=="function"?n:n[0],u=typeof n=="function"?"asc":n[1],o=ze[u],f=t===void 0?void 0:Jn(t,...e);return(c,s)=>{const d=r(c),l=r(s);return o(d,l)?1:o(l,d)?-1:f?.(c,s)??0}}(n=>{n.strict=n})(on||(on={}));function Ae(...n){return i(Ie,n)}function Ie(n,t,e,r){const u=[...n];return u.splice(t,e,...r),u}function Qn(...n){return i(Ne,n)}function Ne(n,t){const e=[...n],r=e.splice(t);return[e,r]}function we(...n){return i(Ee,n)}function Ee(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return Qn(n,e);return[n,[]]}function Zn(n){return(t,e)=>{let r=0;return t.forEach((u,o)=>{const f=n?e(u,o,t):e(u);r+=f}),r}}function fn(...n){return i(Zn(!1),n)}(n=>{function t(...e){return i(Zn(!0),e)}n.indexed=t})(fn||(fn={}));function ve(...n){return i(Oe,n)}function Oe(n,t,e){return typeof n=="string"?Be(n,t,e):nt(n,t,e)}function nt(n,t,e){const r=n.slice();if(Number.isNaN(t)||Number.isNaN(e))return r;const u=t<0?n.length+t:t,o=e<0?n.length+e:e;return u<0||u>n.length||o<0||o>n.length||(r[u]=n[o],r[o]=n[u]),r}function Be(n,t,e){return nt(n.split(""),t,e).join("")}function O(...n){return i(Ce,n,O.lazy)}function Ce(n,t){return h(n,O.lazy(t))}(n=>{function t(e){return r=>e===0?{done:!0,hasNext:!1}:(e--,e===0?{done:!0,hasNext:!0,next:r}:{done:!1,hasNext:!0,next:r})}n.lazy=t})(O||(O={}));function Pe(...n){return S(be,n)}function be(n,t,e){if(e<=0)return[];if(e>=n.length)return[...n];const r=n.slice(0,e);_n(r,t);const u=n.slice(e);for(const o of u)mn(r,t,o);return r}function Te(...n){return i(ke,n)}function ke(n,t){const e=[];for(const r of n){if(!t(r))break;e.push(r)}return e}function B(...n){return i(Se,n,B.lazy)}function Se(n){return h(n,B.lazy())}(n=>{function t(){const e=new Set;return r=>e.has(r)?{done:!1,hasNext:!1}:(e.add(r),{done:!1,hasNext:!0,next:r})}n.lazy=t})(B||(B={}));function Le(...n){return i(De,n,tt)}function De(n,t){return h(n,tt(t))}function tt(n){const t=new Set;return e=>{const r=n(e);return t.has(r)?{done:!1,hasNext:!1}:(t.add(r),{done:!1,hasNext:!0,next:e})}}function C(...n){return i(Me,n,C.lazy)}function Me(n,t){const e=C.lazy(t);return h(n,e,!0)}function Re(n){return(t,e,r)=>r&&r.findIndex(u=>n(t,u))===e?{done:!1,hasNext:!0,next:t}:{done:!1,hasNext:!1}}(n=>{n.lazy=y(Re)})(C||(C={}));function cn(...n){return i(je,n)}function je(n,t){const e=n.length>t.length?t.length:n.length,r=[];for(let u=0;u<e;u++)r.push([n[u],t[u]]);return r}(n=>{n.strict=n})(cn||(cn={}));function We(...n){return i(Fe,n)}function Fe(n,t){const e=n.length>t.length?t.length:n.length,r={};for(let u=0;u<e;u++)r[n[u]]=t[u];return r}function Ue(n,t,e){if(typeof n=="function")return t===void 0?(r,u)=>sn(r,u,n):r=>sn(r,t,n);if(t===void 0||e===void 0)throw new Error("zipWith: Missing arguments in dataFirst function call");return sn(n,t,e)}function sn(n,t,e){const r=n.length>t.length?t.length:n.length,u=[];for(let o=0;o<r;o++)u.push(e(n[o],t[o]));return u}function $e(n,t,e){const r=Array.from(e);return n(e[0])?u=>t(u,...r):t(...r)}function ln(...n){return $e(Ke,qe,n)}function qe(n,...t){for(const[e,r]of t)if(e(n))return r(n);throw new Error("conditional: data failed for all cases")}function Ke(n){if(!Array.isArray(n))return!1;const[t,e,...r]=n;return typeof t=="function"&&t.length<=1&&typeof e=="function"&&e.length<=1&&r.length===0}var He=()=>{};(n=>{function t(e=He){return[()=>!0,e]}n.defaultCase=t})(ln||(ln={}));function et(n,...t){let e=n;const r=t.map(o=>"lazy"in o?Ge(o):void 0);let u=0;for(;u<t.length;){if(r[u]===void 0||!Ve(e)){const l=t[u];e=l(e),u++;continue}const f=[];for(let l=u;l<t.length;l++){const a=r[l];if(a===void 0||(f.push(a),a.isSingle))break}const c=[],s=e[Symbol.iterator]();for(;;){const l=s.next();if((l.done??!1)||rt(l.value,c,f))break}const{isSingle:d}=f[f.length-1];d?e=c[0]:e=c,u+=f.length}return e}function rt(n,t,e){if(e.length===0)return t.push(n),!1;let r={done:!1,hasNext:!1},u=!1;for(let o=0;o<e.length;o++){const f=e[o],{index:c,isIndexed:s,items:d}=f;if(d.push(n),r=s?f(n,c,d):f(n),f.index++,r.hasNext)if(r.hasMany){const l=r.next;for(const a of l)if(rt(a,t,e.slice(o+1)))return!0;return!1}else n=r.next;if(!r.hasNext)break;r.done&&(u=!0)}return r.hasNext&&t.push(n),u}function Ge(n){const{lazy:t,lazyArgs:e}=n,r=t(...e??[]);return Object.assign(r,{index:0,isIndexed:t.indexed,isSingle:t.single,items:[]})}function Ve(n){return typeof n=="string"||typeof n=="object"&&n!==null&&Symbol.iterator in n}function Ye(...n){return t=>et(t,...n)}function Xe(n){return n}function Je(){}function Qe(n){let t=!1,e;return()=>(t||(e=n(),t=!0),e)}function Ze(n,{maxWaitMs:t,timing:e="trailing",waitMs:r}){if(t!==void 0&&r!==void 0&&t<r)throw new Error(`debounce: maxWaitMs (${t}) cannot be less than waitMs (${r})`);let u,o,f,c;function s(a){f=a,t!==void 0&&o===void 0&&(o=setTimeout(d,t))}function d(){if(f===void 0)return;if(o!==void 0){const k=o;o=void 0,clearTimeout(k)}const a=f;f=void 0,c=n(...a)}function l(){if(u===void 0)return;const a=u;u=void 0,clearTimeout(a),f!==void 0&&d()}return{get cachedValue(){return c},call:(...a)=>{if(u===void 0)e==="trailing"?s(a):c=n(...a);else{e!=="leading"&&s(a);const k=u;u=void 0,clearTimeout(k)}return u=setTimeout(l,r??t??0),c},cancel:()=>{if(u!==void 0){const a=u;u=void 0,clearTimeout(a)}if(o!==void 0){const a=o;o=void 0,clearTimeout(a)}f=void 0},flush:()=>(l(),c),get isPending(){return u!==void 0}}}function nr(n){return new Promise(t=>{setTimeout(t,n)})}function ut(n){return Array.isArray(n)}function tr(n){return typeof n=="boolean"}function er(n){return n instanceof Date}function an(n){return typeof n<"u"&&n!==null}(n=>{function t(e){return e!==void 0}n.strict=t})(an||(an={}));function ot(n){if(typeof n!="object"||n===null)return!1;const t=Object.getPrototypeOf(n);return t===null||t===Object.prototype}function dn(n){return typeof n=="string"}function rr(n){if(ut(n)||dn(n))return n.length===0;if(ot(n)){for(const t in n)return!1;return!(n instanceof RegExp)}return!1}function ur(n){return n instanceof Error}function or(n){return typeof n=="function"}function ir(n){return n==null}function fr(n){return n!==null}function cr(n){return t=>!n(t)}function sr(n){return typeof n=="number"&&!Number.isNaN(n)}function lr(n){return n instanceof Promise}function ar(n){return typeof n=="symbol"}function dr(...n){return i(hr,n)}function hr(n,t){return n+t}var W=15;function hn(n){return(t,e)=>{if(e===0)return n(t);if(!Number.isInteger(e))throw new TypeError(`precision must be an integer: ${e}`);if(e>W||e<-W)throw new RangeError(`precision must be between ${-W} and ${W}`);if(Number.isNaN(t)||!Number.isFinite(t))return n(t);const r=10**e;return n(t*r)/r}}function yr(...n){return i(hn(Math.ceil),n)}function pr(...n){return i(xr,n)}function xr(n,t){return t.min!=null&&t.min>n?t.min:t.max!=null&&t.max<n?t.max:n}function gr(...n){return i(zr,n)}function zr(n,t){return n/t}function _r(...n){return i(hn(Math.floor),n)}function mr(...n){return i(Ar,n)}function Ar(n,t){return n*t}function Ir(...n){return i(hn(Math.round),n)}function Nr(...n){return i(wr,n)}function wr(n,t){return n-t}function Er(...n){return i(vr,n)}function vr(n,t,e){return{...n,[t]:e}}function it(n){return n===null?"Null":n===void 0?"Undefined":Object.prototype.toString.call(n).slice(8,-1)}function Or(n){return new RegExp(n.source,(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.sticky?"y":"")+(n.unicode?"u":""))}function ft(n,t,e,r){function u(o){const f=t.length;let c=0;for(;c<f;){if(n===t[c])return e[c];c+=1}t[c+1]=n,e[c+1]=o;for(const s in n)o[s]=r?ft(n[s],t,e,!0):n[s];return o}switch(it(n)){case"Object":return u({});case"Array":return u([]);case"Date":return new Date(n.valueOf());case"RegExp":return Or(n);default:return n}}function Br(n){return n!=null&&typeof n.clone=="function"?n.clone():ft(n,[],[],!0)}var ct=Array.isArray,st=Object.keys;function yn(...n){return i(Cr,n)}function Cr(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){const e=ct(n),r=ct(t);let u,o,f;if(e&&r){if(o=n.length,o!==t.length)return!1;for(u=o;u--!==0;)if(!yn(n[u],t[u]))return!1;return!0}if(e!==r)return!1;const c=n instanceof Date,s=t instanceof Date;if(c!==s)return!1;if(c&&s)return n.getTime()===t.getTime();const d=n instanceof RegExp,l=t instanceof RegExp;if(d!==l)return!1;if(d&&l)return n.toString()===t.toString();const a=st(n);if(o=a.length,o!==st(t).length)return!1;for(u=o;u--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[u]))return!1;for(u=o;u--!==0;)if(f=a[u],!yn(n[f],t[f]))return!1;return!0}return n!==n&&t!==t}function pn(...n){return i(lt(!1),n)}function lt(n){return(t,e)=>{for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const u=t[r];n?e(u,r,t):e(u)}return t}}(n=>{function t(...e){return i(lt(!0),e)}n.indexed=t})(pn||(pn={}));function F(n){const t={};for(const[e,r]of n)t[e]=r;return t}(n=>{n.strict=n})(F||(F={}));function Pr(...n){return i(br,n)}function br(n){const t={};for(const e in n)t[n[e]]=e;return t}function P(n){return Object.keys(n)}(n=>{n.strict=n})(P||(P={}));function b(...n){return i(Object.entries,n)}(n=>{n.strict=n})(b||(b={}));function Tr(...n){return i(kr,n)}function kr(n,t){const e={};for(const[r,u]of b.strict(n))e[t(r,u)]=u;return e}function Sr(...n){return i(Lr,n)}function Lr(n,t){const e={};for(const[r,u]of b.strict(n))e[r]=t(u,r);return e}function Dr(...n){return i(Mr,n)}function Mr(n,t){return Object.assign({},n,t)}function Rr(...n){return i(at,n)}function at(n,t){const e={...n,...t};for(const r in t){if(!(r in n))continue;const u=n[r];if(!dt(u))continue;const o=t[r];dt(o)&&(e[r]=at(u,o))}return e}function dt(n){return typeof n=="object"&&n!==null&&Object.getPrototypeOf(n)===Object.prototype}function jr(...n){return i(Wr,n)}function Wr(n,t){if(!w(t,1))return{...n};if(!w(t,2)){const[r]=t,{[r]:u,...o}=n;return o}if(!t.some(r=>r in n))return{...n};const e=new Set(t);return F(Object.entries(n).filter(([r])=>!e.has(r)))}function Fr(...n){return i(Ur,n)}function Ur(n,t){return n==null?n:P.strict(n).reduce((e,r)=>(t(n[r],r)||(e[r]=n[r]),e),{})}function $r(...n){return i(qr,n)}function qr(n,t,e){let r=n;for(const u of t){if(r==null||r[u]==null)return e;r=r[u]}return r}function Kr(...n){return i(Hr,n)}function Hr(n,t){return n==null?{}:t.reduce((e,r)=>(r in n&&(e[r]=n[r]),e),{})}function Gr(...n){return i(Vr,n)}function Vr(n,t){return n==null?{}:P.strict(n).reduce((e,r)=>(t(n[r],r)&&(e[r]=n[r]),e),{})}function Yr(n){return({[n]:t})=>t}function Xr(...n){return i(Jr,n)}function Jr(n,t,e){return{...n,[t]:e}}function Qr(...n){return i(U,n)}function U(n,t,e){return t.length===0?e:Array.isArray(n)?n.map((r,u)=>u===t[0]?U(r,t.slice(1),e):r):{...n,[t[0]]:U(n[t[0]],t.slice(1),e)}}function Zr(...n){return i(nu,n)}function nu(n,t,e){const{[t]:r,[e]:u}=n;return{...n,[t]:u,[e]:r}}function tu(n){return Object.values(n)}var eu=/\d/,ru=["-","_","/","."];function ht(n=""){if(!eu.test(n))return n!==n.toLowerCase()}function T(n,t){const e=t??ru,r=[];if(!n||!dn(n))return r;let u="",o,f;for(const c of n){const s=e.includes(c);if(s===!0){r.push(u),u="",o=void 0;continue}const d=ht(c);if(f===!1){if(o===!1&&d===!0){r.push(u),u=c,o=d;continue}if(o===!0&&d===!1&&u.length>1){const l=u.at(-1);r.push(u.slice(0,Math.max(0,u.length-1))),u=l+c,o=d;continue}}u+=c,o=d,f=s}return r.push(u),r}function $(n){return n?n[0].toUpperCase()+n.slice(1):""}function yt(n){return n?n[0].toLowerCase()+n.slice(1):""}function pt(n,t){return n?(Array.isArray(n)?n:T(n)).map(e=>$(t?.normalize?e.toLowerCase():e)).join(""):""}function uu(n,t){return yt(pt(n||"",t))}function xn(n,t){return n?(Array.isArray(n)?n:T(n)).map(e=>e.toLowerCase()).join(t??"-"):""}function ou(n){return xn(n||"","_")}function iu(n){return xn(n||"","")}function fu(n,t){return(Array.isArray(n)?n:T(n)).filter(Boolean).map(e=>$(t?.normalize?e.toLowerCase():e)).join("-")}var cu=/^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;function su(n,t){return(Array.isArray(n)?n:T(n)).filter(Boolean).map(e=>cu.test(e)?e.toLowerCase():$(t?.normalize?e.toLowerCase():e)).join(" ")}function lu(n,t=1e3){if(n<t)return`${n} B`;const e=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(n)>=t&&r<e.length-1;)n/=t,++r;return`${n.toFixed(1)} ${e[r]}B`}function au(n){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=()=>t[Math.floor(Math.random()*t.length)];return Gn(0,n).reduce(r=>r+e(),"")}function du(n){return n.normalize("NFD").replace(/[\u0300-\u036F]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function hu(n){return xt(n)}function xt(n){if(n.length===0)return[];const t=n.match(/^\[(.+?)\](.*)$/)??n.match(/^\.?([^.[\]]+)(.*)$/);if(t){const[,e,r]=t;return[e,...xt(r)]}return[n]}var yu=typeof window<"u";export{gt as KEY_CODES,U as _setPath,dr as add,Er as addProp,zt as allPass,mt as anyPass,yr as ceil,It as chunk,pr as clamp,Br as clone,wt as compact,Et as concat,ln as conditional,q as countBy,Ye as createPipe,Ze as debounce,I as difference,A as differenceWith,gr as divide,N as drop,kt as dropFirstBy,Ct as dropLast,Lt as dropLastWhile,Mt as dropWhile,yn as equals,p as filter,M as find,D as findIndex,V as findLast,G as findLastIndex,R as first,Wt as firstBy,j as flatMap,Y as flatMapToObj,x as flatten,g as flattenDeep,_r as floor,z as forEach,pn as forEachObj,F as fromPairs,X as groupBy,w as hasAtLeast,lu as humanReadableFileSize,Xe as identity,J as indexBy,E as intersection,v as intersectionWith,Pr as invert,ut as isArray,tr as isBoolean,yu as isBrowser,er as isDate,an as isDefined,rr as isEmpty,ur as isError,or as isFunction,ir as isNil,fr as isNonNull,cr as isNot,sr as isNumber,ot as isObject,lr as isPromise,dn as isString,ar as isSymbol,gn as isTruthy,ht as isUppercase,Vt as join,P as keys,Xt as last,Qt as length,_ as map,Tr as mapKeys,Q as mapToObj,Sr as mapValues,Z as maxBy,nn as meanBy,Dr as merge,ne as mergeAll,Rr as mergeDeep,tn as minBy,mr as multiply,Je as noop,re as nthBy,jr as omit,Fr as omitBy,Qe as once,oe as only,en as partition,$r as pathOr,Kr as pick,Gr as pickBy,et as pipe,Yr as prop,i as purry,au as randomString,Gn as range,ce as rankBy,rn as reduce,m as reject,le as reverse,Ir as round,de as sample,Xr as set,Qr as setPath,ye as shuffle,nr as sleep,du as slugify,un as sort,on as sortBy,Ae as splice,Qn as splitAt,T as splitByCase,we as splitWhen,hu as stringToPath,Nr as subtract,fn as sumBy,ve as swapIndices,Zr as swapProps,O as take,Pe as takeFirstBy,Te as takeWhile,su as titleCase,uu as toCamelCase,iu as toFlatCase,xn as toKebabCase,yt as toLowerFirst,b as toPairs,pt as toPascalCase,ou as toSnakeCase,fu as toTrainCase,$ as toUpperFirst,it as type,B as uniq,Le as uniqBy,C as uniqWith,tu as values,cn as zip,We as zipObj,Ue as zipWith};
2
2
  //# sourceMappingURL=index.min.js.map