!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FastIntSet={})}(this,(function(t){"use strict";var e=Object.defineProperty,n=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,"symbol"!=typeof n?n+"":n,r),r);const r=32,I="@npm/fast-int-set/";var s=(t=>(t[t.POSITIVE=0]="POSITIVE",t[t.NEGATIVE=1]="NEGATIVE",t))(s||{});function i(t,e){const{length:n}=t;let r=-1;for(;++rn+=t?(t>>>0).toString(16).padStart(8,"0"):"-")),n}const o=[function(t,e){const n=e.match(/[\da-f]{8}|-/g)||[];let r=0;i(n,(e=>{t[r++]="-"===e?0:parseInt(e,16)}))}],T={toString(t,e=!1){const n=!!t._[s.NEGATIVE].length,r=E(t._[s.POSITIVE]),i=n?E(t._[s.NEGATIVE],"."):"",o=r+(n?`.${i}`:"");if(e)return o;const T=t.constructor.TAG||"";return`${`${I}${T}`}:0:${o}`},fromString(t,e,n=!1,r="0"){if(!t||"string"!=typeof e||!n&&!e.startsWith(I))return!1;let i="",E=r,T="",c="",V="";n?[c,V]=e.split("."):([i,E,T]=e.split(":"),[c,V]=T.split("."));const u=o[+E];return u(t._[s.POSITIVE],c),V&&t._[s.NEGATIVE].length&&u(t._[s.NEGATIVE],V),!0}};function c(t,e){return ts?s:I);for(var I,s;r--;)t[r]=e[r]&n[r]}function u(t,e,n){let r=c(e.length,n.length);for(;r--;)t[r]=e[r]|n[r]}function h(t,e,n){let r=e.length;for(;r--;)t[r]=e[r]&~n[r]}function _(t,e,n){let r=c(e.length,n.length);for(;r--;)t[r]=e[r]^n[r]}function f(t,e){if(!t.length||!e.length)return!1;let n=t.length;for(;n--;){const r=t[n];if(!r)continue;const I=e[n];if(!((r|I)===I))return!1}return!0}function l(t,e){if(!t.length||!e.length)return!0;let n=t.length;for(;n--;){if(0!=(t[n]&e[n]))return!1}return!0}function S(t){const e=t-(t>>1&1431655765),n=(858993459&e)+(e>>2&858993459);return 16843009*(n+(n>>4)&252645135)>>24}class O{constructor(){n(this,"_",[[],[]])}clear(){this._=[[],[]]}values(){const t=[];let e=0;return this.forEach((n=>t[e++]=n)),t}}n(O,"MAX_INTEGER",137438953472);const P=class extends O{constructor(t=[]){super(),i(t,this.add.bind(this))}get size(){let t=0;return i(this._[s.POSITIVE],(e=>t+=S(e))),t}add(t){const e=1<t+=S(e);return i(this._[s.POSITIVE],e),i(this._[s.NEGATIVE],e),t}add(t){const e=G(t),n=1<=0?s.POSITIVE:s.NEGATIVE][I]|=n}has(t){const e=G(t),n=1<=0?s.POSITIVE:s.NEGATIVE][I]&n)}delete(t){const e=G(t),n=1<=0?s.POSITIVE:s.NEGATIVE];0!=(i[I]&n)&&(i[I]^=n)}forEach(t){const e=this._[s.NEGATIVE];let n=e.length,I=-e.length*r;for(;n--;)if(e[n]){let s=r;for(;s--;)e[n]&1<