"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function m(n){return(e,...t)=>e.reduce((r,o,i)=>{const c=b(n,t[i-1]);return r+c+o})}const g=[2,0,1,1,1,2];function b(n,e){n=Math.abs(n);const t=n%100>4&&n%100<20?2:g[n%10<5?n%10:5];return e[t]}async function y(n=1e3){return new Promise(e=>setTimeout(e,n))}function s(n){return Object.entries(n)}function N(n,e){const t={};for(const r of e)t[r]=n[r];return t}function x(n,e){const t={};for(const r in n)e.includes(r)||(t[r]=n[r]);return t}function f(n,e=16){if(!n||n.length<3)return null;const[t,r,o,i]=n;return{r:parseInt(t,e),g:parseInt(r,e),b:parseInt(o,e),a:i?parseInt(i,e):void 0}}function T(n){return f(a(n))}function w(n){if(typeof n=="string"){const t=f(n.match(/[\.\d]+/g),0);if(!t)return"";n=t}return`#${s(n).map(([t,r])=>{if(r===void 0)return"";const o=Math.abs(r).toString(16);return o.length>2?"00":o.length===1?`0${o}`:o}).join("")}`}function a(n){return n.match(/([a-f\d]{2})/gi)}function B(n){return(n.r*299+n.g*587+n.b*114)/1e3}function k(n,e){let t,r;return(...o)=>(t||(t=!0,setTimeout(()=>t=!1,e),r=n(...o)),r)}function M(n,e){let t;return(...r)=>{t&&clearTimeout(t),t=setTimeout(()=>n(...r),e)}}function C(n){const e=parseFloat(n);return isNaN(e)?0:e}function A(n){return n=Math.abs(n),n>9?`${n}`:`0${n}`}function O(n=0,e=Number.MAX_SAFE_INTEGER-1){return Math.floor(Math.random()*(e-n+1))+n}function $(n,e,t){return Math.min(Math.max(n,e),t)}function E(n,e){const t=[],r=e.charCodeAt(0);for(let o=n.charCodeAt(0);o<=r;++o)t.push(String.fromCharCode(o));return t}function j(n){return n.charAt(0).toUpperCase()+n.slice(1)}function l(){return Math.random().toString(36).slice(2)}function v(n,e){let t="";for(const r of n)t+=r.repeat(e);return t}function I(n,e){const t=[];if(n===e)return t;for(let r=0;r!0){const i=l();return e[i]=o,i}const r=n(t);return function(...o){if(Object.keys(e).length===0)throw new Error("No predicates were defined");for(const i in e)if(e[i](...o)){const u=r[i];return u instanceof Function?u(...o):u}return null}}function d(n){return Array.isArray(n)}function F(n){return typeof n=="string"}function h(n){return typeof n=="object"&&n!==null&&!d(n)}function z(n){return typeof n=="number"&&!isNaN(n)}function H(n){return n===!0||n===!1}function P(n){return typeof n=="function"}function U(n){return h(n)?!Object.keys(n).length:!1}function _(n){return n!=null}function D(n){return n!==null}function L(n){return n!==void 0}function S(n){return!!n}function p(){return typeof window<"u"}function Z(){return typeof process<"u"}const G={info:"#2ecc71",debug:"#7f8c8d",warn:"#f39c12",error:"#c0392b"};function V(n,e){return[`%c${n}`,`background:${G[e]};border-radius:0.5em;color:white;font-weightbold;padding:2px 0.5em;font-family:cursive`]}const X={info:"\x1B[32m",debug:"\x1B[90m",warn:"\x1B[33m",error:"\x1B[31m"};function q(n,e){return`${X[e]}${n}\x1B[0m`}class J{#n;info;debug;warn;error;constructor(e){this.#n=e;for(const t of["info","debug","warn","error"])this[t]=(...r)=>this.print(t,...r)}print(e,...t){const r=console[e];p()?r(...V(this.#n,e),...t):r(q(this.#n,e),...t)}}exports.Logger=J;exports.addZero=A;exports.capitalize=j;exports.clamp=$;exports.colorBrightness=B;exports.debounce=M;exports.entries=s;exports.generateChars=E;exports.getDifference=I;exports.hexToRgb=T;exports.isArray=d;exports.isBoolean=H;exports.isBrowser=p;exports.isFunction=P;exports.isNode=Z;exports.isNumber=z;exports.isObject=h;exports.isObjectEmpty=U;exports.isString=F;exports.isTruthy=S;exports.match=R;exports.notNull=D;exports.notNullish=_;exports.notUndefined=L;exports.omit=x;exports.parseHex=a;exports.pick=N;exports.pluralize=m;exports.randomNum=O;exports.randomToken=l;exports.repeatEveryChars=v;exports.rgbToHex=w;exports.sleep=y;exports.throttle=k;exports.toNumber=C; //# sourceMappingURL=index.cjs.map