varh=Object.defineProperty;varr=(u,e)=>h(u,"name",{value:e,configurable:!0});varo=classextendsMap{get(e){returnsuper.get(e)}set(e,i){returnsuper.set(e,i)}has(e){returnsuper.has(e)}delete(e){returnsuper.delete(e)}clear(){returnsuper.clear()}hasAll(...e){returne.every(i=>super.has(i))}hasAny(...e){returne.some(i=>super.has(i))}first(e){if(typeofe=="undefined")returnthis.values().next().value;if(e<0)returnthis.last(e*-1);e=Math.min(this.size,e);leti=this.values();returnArray.from({length:e},()=>i.next().value)}firstKey(e){if(typeofe=="undefined")returnthis.keys().next().value;if(e<0)returnthis.lastKey(e*-1);e=Math.min(this.size,e);leti=this.keys();returnArray.from({length:e},()=>i.next().value)}last(e){leti=[...this.values()];returntypeofe=="undefined"?i[i.length-1]:e<0?this.first(e*-1):e?i.slice(-e):[]}lastKey(e){leti=[...this.keys()];returntypeofe=="undefined"?i[i.length-1]:e<0?this.firstKey(e*-1):e?i.slice(-e):[]}random(e){leti=[...this.values()];returntypeofe=="undefined"?i[Math.floor(Math.random()*i.length)]:!i.length||!e?[]:Array.from({length:Math.min(e,i.length)},()=>i.splice(Math.floor(Math.random()*i.length),1)[0])}randomKey(e){leti=[...this.keys()];returntypeofe=="undefined"?i[Math.floor(Math.random()*i.length)]:!i.length||!e?[]:Array.from({length:Math.min(e,i.length)},()=>i.splice(Math.floor(Math.random()*i.length),1)[0])}find(e,i){typeofi!="undefined"&&(e=e.bind(i));for(let[t,l]ofthis)if(e(l,t,this))returnl}findKey(e,i){typeofi!="undefined"&&(e=e.bind(i));for(let[t,l]ofthis)if(e(l,t,this))returnt}sweep(e,i){typeofi!="undefined"&&(e=e.bind(i));lett=this.size;for(let[l,n]ofthis)e(n,l,this)&&this.delete(l);returnt-this.size}filter(e,i){typeofi!="undefined"&&(e=e.bind(i));lett=newthis.constructor[Symbol.species];for(let[l,n]ofthis)e(n,l,this)&&t.set(l,n);returnt}partition(e,i){typeofi!="undefined"&&(e=e.bind(i));lett=[newthis.constructor[Symbol.species],newthis.constructor[Symbol.species]];for(let[l,n]ofthis)e(n,l,this)?t[0].set(l,n):t[1].set(l,n);returnt}flatMap(e,i){lett=this.map(e,i);returnnewthis.constructor[Symbol.species]().concat(...t)}map(e,i){typeofi!="undefined"&&(e=e.bind(i));lett=this.entries();returnArray.from({length:this.size},()=>{let[l,n]=t.next().value;returne(n,l,this)})}mapValues(e,i){typeofi!="undefined"&&(e=e.bind(i));lett=newthis.constructor[Symbol.species];for(let[l,n]ofthis)t.set(l,e(n,l,this));returnt}some(e,i){typeofi!="undefined"&&(e=e.bind(i));for(let[t,l]ofthis)if(e(l,t,this))return!0;return!1}every(e,i){typeofi!="undefined"&&(e=e.bind(i));for(let[t,l]ofthis)if(!e(l,t,this))return!1;return!0}reduce(e,i){lett;if(typeofi!="undefined"){t=i;for(let[n,s]ofthis)t=e(t,s,n,this);returnt}letl=!0;for(let[n,s]ofthis){if(l){t=s,l=!1;continue}t=e(t,s,n,this)}if(l)thrownewTypeError("Reduce of empty collection with no initial value");returnt}each(e,i){returnthis.forEach(e,i),this}tap(e,i){returntypeofi!="undefined"&&(e=e.bind(i)),e(this),this}clone(){returnnewthis.constructor[Symbol.species](this)}concat(...e){leti=this.clone();for(lettofe)for(let[l,n]oft)i.set(l,n);returni}equals(e){if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(let[i,t]ofthis)if(!e.has(i)||t!==e.get(i))return!1;return!0}sort(e=o.defaultSort){leti=[...this.entries()];i.sort((t,l)=>e(t[1],l[1],t[0],l[0])),super.clear();for(let[t,l]ofi)super.set(t,l);returnthis}intersect(e){leti=newthis.constructor[Symbol.species];for(let[t,l]ofe)this.has(t)&&i.set(t,l);returni}difference(e){leti=newthis.constructor[Symbol.species];for(let[t,l]ofe)this.has(t)||i.set(t,l);for(let[t,l]ofthis)e.has(t)||i.set(t,l);returni}sorted(e=o.defaultSort){returnnewthis.constructor[Symbol.species](this).sort((i,t,l,n)=>e(i,t,l,n))}toJSON(){return[...this.values()]}staticdefaultSort(e,i){returnNumber(e>i)||Number(e===i)-1}},c=o;r(c,"Collection"),"constructor",c.default=o;varf=c;export{casCollection,fasdefault};