const l={EMPTY:Object.freeze({}),mapValues(e,n){return e&&l.fromEntries(l.entries(e).map(([t,r])=>[t,n(r,t)]))},fromEntries(e){return Object.fromEntries(e)},entries(e){return Object.entries(e)},keys(e){return Object.keys(e)},size(e){return Object.keys(e).length},keyBy(e,n){let t={};for(let r of e){let i=n(r);i!==void 0&&(t[i]=r)}return t},collect(e,n,t){return l.mapValues(l.keyBy(e,n),t)},groupBy(e,n,t){let r={};for(let i of e){let o=n(i);if(o===void 0)continue;let s=t(i);o in r?r[o].push(s):r[o]=[s]}return r},filter(e,n){let t={};for(let[r,i]of l.entries(e))n(i,r)&&(t[r]=e[r]);return t},omit(e,n){let t=new Set(n);return l.filter(e,(r,i)=>!t.has(i))},pick(e,n){let t={};for(let r of n)Object.hasOwn(e,r)&&(t[r]=e[r]);return t}};export{l as t};
