function n(n,t){return n===t||null!=n&&null!=t&&(Object.keys(n).length===Object.keys(t).length&&Object.entries(n).every((([n,e])=>t[n]===e)))}function t(n,t){if(n===t)return!0;if(null==n||null==t)return!1;if(t.length!==n.length)return!1;for(let e=0;e<n.length;e+=1)if(n[e]!==t[e])return!1;return!0}function e(n,t,e){return t===e.length-1?Array.from(new Set(e)):[]}function r(n,t=!1){return(e,r)=>!1===t?e[n].localeCompare(r[n]):r[n].localeCompare(e[n])}function u(n,t){const e={};for(const r of n){const n=t(r);if(null!=n){let t=e[n];null==t&&(t=[],e[n]=t),t.push(r)}}return e}function o(n,t){return Promise.all(n.map(t))}function l(n,t="narrowSymbol"){return new Intl.NumberFormat("en",{style:"currency",currency:n,currencyDisplay:t}).formatToParts(0).find((n=>"currency"===n.type)).value}function i(n,t){const e=Math.min(n,t),r=Math.max(n,t),u=[];for(let n=e;n<=r;n++)u.push(n);return u}function c(n,t){return Math.floor(Math.random()*(t-n+1)+n)}function f(n){if(0===n.length)return null;return n[c(0,n.length-1)]}function h(n=8,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"){if(0===t.length)throw new Error("Alphabet cannot be an empty string");const e=t.length-1;let r="";for(let u=0;u<n;u++)r+=t.charAt(c(0,e));return r}function a(n,t,e){return Math.min(Math.max(n,t??-1/0),e??1/0)}function g(n){return null==n||0===n.length}function m(n){return null==n||0===n.trim().length}function s(n,t,e="…"){if(t<=0)throw new Error("maxLength must be greater than 0");return n.length<=t?n:n.slice(0,t-e.length)+e}function y(n){return new Promise((t=>{setTimeout(t,n)}))}function p(n,t){const e=n.getBoundingClientRect(),r=t.getBoundingClientRect();return e.top>=r.top&&e.left>=r.left&&e.bottom<=r.bottom&&e.right<=r.right}export{t as arrayEquals,o as asyncMap,a as clampNumber,l as getCurrencySymbol,u as groupBy,m as isStringBlank,g as isStringEmpty,p as isVisibleInContainer,n as objectEquals,c as random,f as randomPick,h as randomString,i as range,y as sleep,r as sortBy,s as truncateString,e as unique};
//# sourceMappingURL=utils.js.map
