Buckets:
| import{u as l,v as c,w as b,x as _,y as p,z as g,A as o,B as m,C as k,D as y,e as w,F as A,E as F,G as x,H as E,I as M,J as v}from"./CNc7KuUZ.js";class B{anchor;#t=new Map;#s=new Map;#e=new Map;#a=new Set;#i=!0;constructor(t,s=!0){this.anchor=t,this.#i=s}#r=t=>{if(this.#t.has(t)){var s=this.#t.get(t),e=this.#s.get(s);if(e)l(e),this.#a.delete(s);else{var i=this.#e.get(s);i&&(l(i.effect),this.#s.set(s,i.effect),this.#e.delete(s),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),e=i.effect)}for(const[r,f]of this.#t){if(this.#t.delete(r),r===t)break;const a=this.#e.get(f);a&&(c(a.effect),this.#e.delete(f))}for(const[r,f]of this.#s){if(r===s||this.#a.has(r))continue;const a=()=>{if(Array.from(this.#t.values()).includes(r)){var h=document.createDocumentFragment();k(f,h),h.append(_()),this.#e.set(r,{effect:f,fragment:h})}else c(f);this.#a.delete(r),this.#s.delete(r)};this.#i||!e?(this.#a.add(r),b(f,a,!1)):a()}}};#f=t=>{this.#t.delete(t);const s=Array.from(this.#t.values());for(const[e,i]of this.#e)s.includes(e)||(c(i.effect),this.#e.delete(e))};ensure(t,s){var e=g,i=y();if(s&&!this.#s.has(t)&&!this.#e.has(t))if(i){var r=document.createDocumentFragment(),f=_();r.append(f),this.#e.set(t,{effect:p(()=>s(f)),fragment:r})}else this.#s.set(t,p(()=>s(this.anchor)));if(this.#t.set(e,t),i){for(const[a,n]of this.#s)a===t?e.unskip_effect(n):e.skip_effect(n);for(const[a,n]of this.#e)a===t?e.unskip_effect(n.effect):e.skip_effect(n.effect);e.oncommit(this.#r),e.ondiscard(this.#f)}else o&&(this.anchor=m),this.#r(e)}}function D(d,t,s=!1){var e;o&&(e=m,A());var i=new B(d),r=s?F:0;function f(a,n){if(o){var h=x(e);if(a!==parseInt(h.substring(1))){var u=E();M(u),i.anchor=u,v(!1),i.ensure(a,n),v(!0);return}}i.ensure(a,n)}w(()=>{var a=!1;t((n,h=0)=>{a=!0,f(h,n)}),a||f(-1,null)},r)}export{B,D as i}; | |
Xet Storage Details
- Size:
- 1.81 kB
- Xet hash:
- 708c3b9ee918494be412957e920d00f66292ad8828982aff12b034ed55e6973f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.