"use strict";function t(t,s,i,e){if("a"===i&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof s?t!==s||!e:!s.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?e:"a"===i?e.call(t):e?e.value:s.get(t)}function s(t,s,i,e,h){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!h)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof s?t!==s||!h:!s.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?h.call(t,i):h?h.value=i:s.set(t,i),i}function i(t,s){const i=new Set(s);return t.filter((t=>!i.has(t)))}var e,h,f,r,n,o,l,a,c,u,p,m,w,d;"function"==typeof SuppressedError&&SuppressedError;h=new WeakMap,f=new WeakMap,r=new WeakMap,n=new WeakMap,o=new WeakMap,l=new WeakMap,e=new WeakSet,a=function(){const i=Object.keys(t(this,f,"f")).map(Number);if(!t(this,h,"f"))for(let e of i){if(t(this,h,"f"))break;s(this,h,t(this,f,"f")[e].split("_").length,"f")}for(let s=0;s{!t(this,n,"f")[i].includes(s)&&s>-1&&t(this,n,"f")[i].push(s)}));this.options.callback?.(Array(t(this,h,"f")).fill([]),null)},c=function(){for(let s=0;s{null===i&&t(this,n,"f")[e].length||s++})),t(this,e,"m",w).call(this,s);let i=null;if(s===t(this,h,"f")){const s=t(this,e,"m",m).call(this,t(this,r,"f"));for(let e of Object.keys(t(this,f,"f")).map(Number))s.test(t(this,f,"f")[e])&&(i=e)}this.options.callback?.(t(this,o,"f"),i)},m=function(s){const i=[];for(let e=0;e{t(this,l,"f")[i].includes(s)||t(this,l,"f")[i].push(s)}))}for(let s in t(this,l,"f"))if(!(s in h))for(let e of i(t(this,n,"f")[s],t(this,l,"f")[s]))t(this,o,"f")[s].includes(e)||t(this,o,"f")[s].push(e)},module.exports=class{constructor(i){e.add(this),this.options=i,h.set(this,0),f.set(this,{}),r.set(this,[]),n.set(this,[]),o.set(this,[]),l.set(this,[]),s(this,f,i.items,"f"),i.depth&&s(this,h,i.depth,"f"),t(this,e,"m",a).call(this)}set(s,i){t(this,r,"f")[s]=i,t(this,e,"m",u).call(this),t(this,e,"m",p).call(this)}unset(s){t(this,r,"f")[s]=null,t(this,e,"m",u).call(this),t(this,e,"m",p).call(this)}};