@vinicunca/perkakas 0.1.0 → 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 ut={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 cn(n,...t){let e=n;const r=t.map(o=>{const{lazy:f,lazyArgs:c}=o;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 o=t[u];if(!r[u]){e=o(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(sn({acc:s,item:l,lazySeq:c}))break;c[c.length-1].single?e=s[0]:e=s,u+=c.length}return e}function sn({acc:n,item:t,lazySeq:e}){if(e.length===0)return n.push(t),!1;let r={done:!1,hasNext:!1},u=!1;for(let o=0;o<e.length;o++){const f=e[o],c=f.indexed,s=f.index,d=f.items;if(d.push(t),r=c?f(t,s,d):f(t),f.index++,r.hasNext)if(r.hasMany){const l=r.next;for(const a of l)if(sn({acc:n,item:a,lazySeq:e.slice(o+1)}))return!0;return!1}else t=r.next;if(!r.hasNext)break;r.done&&(u=!0)}return r.hasNext&&n.push(t),!!u}function ot(...n){return t=>cn(t,...n)}function it(n){return n}function ft(){}function ct(n){let t=!1,e;return()=>(t||(e=n(),t=!0),e)}function st(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 P=o;o=void 0,clearTimeout(P)}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 P=u;u=void 0,clearTimeout(P)}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 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 lt(n){return new Promise(t=>{setTimeout(t,n)})}function at(...n){return i(dt,n)}function dt(n,t){return t.every(e=>e(n))}function ht(...n){return i(yt,n)}function yt(n,t){return t.some(e=>e(n))}function pt(...n){return i(xt,n)}function xt(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 ln(n){return Array.isArray(n)}function gt(n){return typeof n=="boolean"}function zt(n){return n instanceof Date}function M(n){return typeof n<"u"&&n!==null}(n=>{function t(e){return e!==void 0}n.strict=t})(M||(M={}));function _t(n){return Object.prototype.toString.call(n)}function an(n){return _t(n)==="[object Object]"}function b(n){return typeof n=="string"}function mt(n){if(ln(n)||b(n))return n.length===0;if(an(n)){for(const t in n)return!1;return!(n instanceof RegExp)}return!1}function At(n){return n instanceof Error}function Nt(n){return typeof n=="function"}function Et(n){return n==null}function It(n){return n!==null}function Ot(n){return t=>!n(t)}function wt(n){return typeof n=="number"&&!Number.isNaN(n)}function Bt(n){return n instanceof Promise}function dn(n){return!!n}function Tt(n){return n.filter(dn)}function Pt(...n){return i(vt,n)}function vt(n,t){return n.concat(t)}function hn(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 j(...n){return i(hn(!1),n)}(n=>{function t(...e){return i(hn(!0),e)}n.indexed=t})(j||(j={}));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(St,n,A.lazy)}function St(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 N(...n){return i(Ct,n,N.lazy)}function Ct(n,t){const e=N.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})(N||(N={}));function Dt(...n){return i(kt,n)}function kt(n,t){const e=[...n];return t>0&&e.splice(-t),e}function E(...n){return i(Lt,n,E.lazy)}function Lt(n,t){return h(n,E.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})(E||(E={}));function y(n){return n.indexed=!0,n}function p(...n){return i(yn(!1),n,p.lazy)}function yn(n){return(t,e)=>h(t,n?p.lazyIndexed(e):p.lazy(e),n)}function pn(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(yn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=pn(!1),n.lazyIndexed=y(pn(!0))})(p||(p={}));function v(n){return n.single=!0,n}function S(...n){return i(xn(!1),n,S.lazy)}function xn(n){return(t,e)=>n?t.findIndex(e):t.findIndex(r=>e(r))}function gn(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(xn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=v(gn(!1)),n.lazyIndexed=v(y(gn(!0)))})(S||(S={}));function W(...n){return i(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 r;return-1}}(n=>{function t(...e){return i(zn(!0),e)}n.indexed=t})(W||(W={}));function U(...n){return i(_n(!1),n)}function _n(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(_n(!0),e)}n.indexed=t})(U||(U={}));function C(...n){return i(mn(!1),n,C.lazy)}function mn(n){return(t,e)=>n?t.find(e):t.find(r=>e(r))}function An(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(mn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=v(An(!1)),n.lazyIndexed=v(y(An(!0)))})(C||(C={}));function D(...n){return i(Rt,n,D.lazy)}function Rt([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={}))})(D||(D={}));function q(...n){return i(Nn(!1),n)}function Nn(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(Nn(!0),e)}n.indexed=t})(q||(q={}));function x(...n){return i(Mt,n,x.lazy)}function Mt(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 k(...n){return i(bt,n,k.lazy)}function bt(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})(k||(k={}));function g(...n){return i(jt,n,g.lazy)}function jt(n){return h(n,g.lazy())}function Wt(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=Wt(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(En(!1),n,z.lazy)}function En(n){return(t,e)=>h(t,n?z.lazyIndexed(e):z.lazy(e),n)}function In(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(En(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=In(!1),n.lazyIndexed=y(In(!0))})(z||(z={}));function F(...n){return i(On(!1),n)}function On(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);r[c]||(r[c]=[]),r[c].push(u)}}),r}}(n=>{function t(...e){return i(On(!0),e)}n.indexed=t,n.strict=n})(F||(F={}));function K(...n){return i(wn(!1),n)}function wn(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(wn(!0),e)}n.indexed=t})(K||(K={}));function I(...n){return i(Ut,n,I.lazy)}function Ut(n,t){const e=I.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})(I||(I={}));function O(...n){return i(qt,n,O.lazy)}function qt(n,t,e){const r=O.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})(O||(O={}));function Ft(...n){return i(Kt,n)}function Kt(n,t){return n.join(t)}function $t(...n){return i(Gt,n)}function Gt(n){return n[n.length-1]}function Ht(...n){return i(Vt,n)}function Vt(n){return"length"in n?n.length:Array.from(n).length}function _(...n){return i(Bn(!1),n,_.lazy)}function Bn(n){return(t,e)=>h(t,n?_.lazyIndexed(e):_.lazy(e),n)}function Tn(n){return t=>(e,r,u)=>({done:!1,hasNext:!0,next:n?t(e,r,u):t(e)})}(n=>{function t(...e){return i(Bn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=Tn(!1),n.lazyIndexed=y(Tn(!0)),n.strict=n})(_||(_={}));function $(...n){return i(Pn(!1),n)}function Pn(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(Pn(!0),e)}n.indexed=t})($||($={}));function vn(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 G(...n){return i(vn(!1),n)}(n=>{function t(...e){return i(vn(!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,o)=>{r+=n?e(u,o,t):e(u)}),r/t.length}}function H(...n){return i(Sn(!1),n)}(n=>{function t(...e){return i(Sn(!0),e)}n.indexed=t})(H||(H={}));function Yt(n){return n.reduce((t,e)=>({...t,...e}),{})}function Cn(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 V(...n){return i(Cn(!1),n)}(n=>{function t(...e){return i(Cn(!0),e)}n.indexed=t})(V||(V={}));function Y(...n){return i(Dn(!1),n)}function Dn(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(Dn(!0),e)}n.indexed=t})(Y||(Y={}));function kn(...n){return i(Jt,n)}function Jt(n,t){const e=[];for(let r=n;r<t;r++)e.push(r);return e}function J(...n){return i(Ln(!1),n)}function Ln(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(Ln(!0),e)}n.indexed=t})(J||(J={}));function m(...n){return i(Rn(!1),n,m.lazy)}function Rn(n){return(t,e)=>h(t,n?m.lazyIndexed(e):m.lazy(e),n)}function Mn(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(Rn(!0),e,n.lazyIndexed)}n.indexed=t,n.lazy=Mn(!1),n.lazyIndexed=y(Mn(!0))})(m||(m={}));function Qt(...n){return i(Xt,n)}function Xt(n){return n.slice().reverse()}function Zt(...n){return i(ne,n)}function ne(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 te(...n){return i(ee,n)}function ee(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 Q(...n){return i(re,n)}function re(n,t){const e=[...n];return e.sort(t),e}(n=>{n.strict=n})(Q||(Q={}));var ue=["asc","desc"],oe={asc:(n,t)=>n>t,desc:(n,t)=>n<t};function X(n,...t){const e=ie(n)?[[n,...t]]:[n,t];return i(fe,e)}function ie(n){if(typeof n=="function")return!0;const[t,e,...r]=n;return r.length>0?!1:typeof t=="function"&&ue.includes(e)}function fe(n,t){return[...n].sort(bn(...t))}function bn(n,t,...e){const r=typeof n=="function"?n:n[0],u=typeof n=="function"?"asc":n[1],o=oe[u],f=t===void 0?void 0:bn(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})(X||(X={}));function jn(...n){return i(ce,n)}function ce(n,t){const e=[...n],r=e.splice(t);return[e,r]}function se(...n){return i(le,n)}function le(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return jn(n,e);return[n,[]]}function Wn(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 Z(...n){return i(Wn(!1),n)}(n=>{function t(...e){return i(Wn(!0),e)}n.indexed=t})(Z||(Z={}));function ae(...n){return i(de,n)}function de(n,t,e){return typeof n=="string"?he(n,t,e):Un(n,t,e)}function Un(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 he(n,t,e){return Un(n.split(""),t,e).join("")}function w(...n){return i(ye,n,w.lazy)}function ye(n,t){return h(n,w.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})(w||(w={}));function pe(...n){return i(xe,n)}function xe(n,t){const e=[];for(const r of n){if(!t(r))break;e.push(r)}return e}function B(...n){return i(ge,n,B.lazy)}function ge(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 ze(...n){return i(_e,n,qn)}function _e(n,t){return h(n,qn(t))}function qn(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 T(...n){return i(me,n,T.lazy)}function me(n,t){const e=T.lazy(t);return h(n,e,!0)}function Ae(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(Ae)})(T||(T={}));function nn(...n){return i(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.push([n[u],t[u]]);return r}(n=>{n.strict=n})(nn||(nn={}));function Ee(...n){return i(Ie,n)}function Ie(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 Oe(...n){if(typeof n[0]=="function"&&n.length===1)return function(t,e){return tn(t,e,n[0])};if(typeof n[0]=="function"&&n.length===2)return function(t){return tn(t,n[1],n[0])};if(n.length===3)return tn(n[0],n[1],n[2])}function tn(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 we(...n){return i(Be,n)}function Be(n,t){return t.min!=null&&t.min>n?t.min:t.max!=null&&t.max<n?t.max:n}function Te(...n){return i(Pe,n)}function Pe(n,t,e){return{...n,[t]:e}}function Fn(n){return n===null?"Null":n===void 0?"Undefined":Object.prototype.toString.call(n).slice(8,-1)}function ve(n){return new RegExp(n.source,(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.sticky?"y":"")+(n.unicode?"u":""))}function Kn(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?Kn(n[s],t,e,!0):n[s];return o}switch(Fn(n)){case"Object":return u({});case"Array":return u([]);case"Date":return new Date(n.valueOf());case"RegExp":return ve(n);default:return n}}function Se(n){return n!=null&&typeof n.clone=="function"?n.clone():Kn(n,[],[],!0)}var $n=Array.isArray,Gn=Object.keys;function en(...n){return i(Ce,n)}function Ce(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){const e=$n(n),r=$n(t);let u,o,f;if(e&&r){if(o=n.length,o!==t.length)return!1;for(u=o;u--!==0;)if(!en(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=Gn(n);if(o=a.length,o!==Gn(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],!en(n[f],t[f]))return!1;return!0}return n!==n&&t!==t}function rn(...n){return i(Hn(!1),n)}function Hn(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(Hn(!0),e)}n.indexed=t})(rn||(rn={}));function L(n){const t={};for(const[e,r]of n)t[e]=r;return t}(n=>{n.strict=n})(L||(L={}));function De(...n){return i(ke,n)}function ke(n){const t={};for(const e in n)t[n[e]]=e;return t}function un(n){return Object.keys(n)}(n=>{n.strict=n})(un||(un={}));function Le(n,t){return arguments.length===1?e=>Vn(e,n):Vn(n,t)}function Vn(n,t){return Object.keys(n).reduce((e,r)=>(e[t(r,n[r])]=n[r],e),{})}function Re(n,t){return arguments.length===1?e=>Yn(e,n):Yn(n,t)}function Yn(n,t){return Object.keys(n).reduce((e,r)=>(e[r]=t(n[r],r),e),{})}function Me(...n){return i(be,n)}function be(n,t){return Object.assign({},n,t)}function je(...n){return i(Jn,n)}function Jn(n,t){const e={...n,...t};for(const r in t){if(!(r in n))continue;const u=n[r];if(!Qn(u))continue;const o=t[r];Qn(o)&&(e[r]=Jn(u,o))}return e}function Qn(n){return typeof n=="object"&&n!==null&&Object.getPrototypeOf(n)===Object.prototype}function We(...n){return i(Ue,n)}function Ue(n,t){if(t.length===0)return{...n};if(t.length===1){const[r]=t,{[r]:u,...o}=n;return o}if(!t.some(r=>r in n))return{...n};const e=new Set(t);return L(Object.entries(n).filter(([r])=>!e.has(r)))}function qe(...n){return i(Fe,n)}function Fe(n,t){return Object.keys(n).reduce((e,r)=>(t(n[r],r)||(e[r]=n[r]),e),{})}function Ke(...n){return i($e,n)}function $e(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 Ge(...n){return i(He,n)}function He(n,t){return n==null?{}:t.reduce((e,r)=>(r in n&&(e[r]=n[r]),e),{})}function Ve(...n){return i(Ye,n)}function Ye(n,t){return n==null?{}:Object.keys(n).reduce((e,r)=>(t(n[r],r)&&(e[r]=n[r]),e),{})}function Je(n){return({[n]:t})=>t}function Qe(...n){return i(Xe,n)}function Xe(n,t,e){return{...n,[t]:e}}function Ze(...n){return i(R,n)}function R(n,t,e){return t.length===0?e:Array.isArray(n)?n.map((r,u)=>u===t[0]?R(r,t.slice(1),e):r):{...n,[t[0]]:R(n[t[0]],t.slice(1),e)}}function nr(...n){return i(tr,n)}function tr(n,t,e){const{[t]:r,[e]:u}=n;return{...n,[t]:u,[e]:r}}function on(n){return Object.entries(n)}(n=>{function t(e){return Object.entries(e)}n.strict=t})(on||(on={}));function er(n){return Object.values(n)}var rr=/\d/,ur=["-","_","/","."];function Xn(n=""){if(!rr.test(n))return n.toUpperCase()===n}function fn(n,t){const e=t??ur,r=[];if(!n||!b(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=Xn(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[u.length-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 Zn(n){return n?n[0].toUpperCase()+n.slice(1):""}function nt(n){return n?n[0].toLowerCase()+n.slice(1):""}function tt(n){return n?(Array.isArray(n)?n:fn(n)).map(t=>Zn(t)).join(""):""}function or(n){return nt(tt(n||""))}function et(n,t){return n?(Array.isArray(n)?n:fn(n)).map(e=>e.toLowerCase()).join(t??"-"):""}function ir(n){return et(n||"","_")}function fr(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 cr(n){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=()=>t[Math.floor(Math.random()*t.length)];return kn(0,n).reduce(r=>r+e(),"")}function sr(n){return n.normalize("NFD").replace(/[\u0300-\u036F]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function lr(n){return rt(n)}function rt(n){if(n.length===0)return[];const t=n.match(/^\[(.+?)\](.*)$/)??n.match(/^\.?([^.[\]]+)(.*)$/);if(t){const[,e,r]=t;return[e,...rt(r)]}return[n]}var ar=typeof window<"u";export{ut as KEY_CODES,R as _setPath,Te as addProp,at as allPass,ht as anyPass,pt as chunk,we as clamp,Se as clone,Tt as compact,Pt as concat,j as countBy,ot as createPipe,st as debounce,N as difference,A as differenceWith,E as drop,Dt as dropLast,en as equals,p as filter,C as find,S as findIndex,U as findLast,W as findLastIndex,D as first,k as flatMap,q as flatMapToObj,x as flatten,g as flattenDeep,z as forEach,rn as forEachObj,L as fromPairs,F as groupBy,fr as humanReadableFileSize,it as identity,K as indexBy,I as intersection,O as intersectionWith,De as invert,ln as isArray,gt as isBoolean,ar as isBrowser,zt as isDate,M as isDefined,mt as isEmpty,At as isError,Nt as isFunction,Et as isNil,It as isNonNull,Ot as isNot,wt as isNumber,an as isObject,Bt as isPromise,b as isString,dn as isTruthy,Xn as isUppercase,Ft as join,un as keys,$t as last,Ht as length,_ as map,Le as mapKeys,$ as mapToObj,Re as mapValues,G as maxBy,H as meanBy,Me as merge,Yt as mergeAll,je as mergeDeep,V as minBy,ft as noop,We as omit,qe as omitBy,ct as once,Y as partition,Ke as pathOr,Ge as pick,Ve as pickBy,cn as pipe,Je as prop,i as purry,cr as randomString,kn as range,J as reduce,m as reject,Qt as reverse,Zt as sample,Qe as set,Ze as setPath,te as shuffle,lt as sleep,sr as slugify,Q as sort,X as sortBy,jn as splitAt,fn as splitByCase,se as splitWhen,lr as stringToPath,Z as sumBy,ae as swapIndices,nr as swapProps,w as take,pe as takeWhile,or as toCamelCase,et as toKebabCase,nt as toLowerFirst,on as toPairs,tt as toPascalCase,ir as toSnakeCase,Zn as toUpperFirst,Fn as type,B as uniq,ze as uniqBy,T as uniqWith,er as values,nn as zip,Ee as zipObj,Oe 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