import{s as a,u as h,a as d,g as i,b as o,i as n}from"./DWmC0QM7.js";var c=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],v=["difference","intersection","symmetricDifference","union"],f=!1;class u extends Set{#r=new Map;#e=a(0);#s=a(0);#t=h||-1;constructor(e){if(super(),e){for(var s of e)super.add(s);this.#s.v=super.size}f||this.#o()}#i(e){return h===this.#t?a(e):d(e)}#o(){f=!0;var e=u.prototype,s=Set.prototype;for(const r of c)e[r]=function(...t){return i(this.#e),s[r].apply(this,t)};for(const r of v)e[r]=function(...t){i(this.#e);var p=s[r].apply(this,t);return new u(p)}}has(e){var s=super.has(e),r=this.#r,t=r.get(e);if(t===void 0){if(!s)return i(this.#e),!1;t=this.#i(!0),r.set(e,t)}return i(t),s}add(e){return super.has(e)||(super.add(e),o(this.#s,super.size),n(this.#e)),this}delete(e){var s=super.delete(e),r=this.#r,t=r.get(e);return t!==void 0&&(r.delete(e),o(t,!1)),s&&(o(this.#s,super.size),n(this.#e)),s}clear(){if(super.size!==0){super.clear();var e=this.#r;for(var s of e.values())o(s,!1);e.clear(),o(this.#s,0),n(this.#e)}}keys(){return this.values()}values(){return i(this.#e),super.values()}entries(){return i(this.#e),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return i(this.#s)}}export{u as S};
