mfuntowicz's picture
mfuntowicz HF Staff
Upload folder using huggingface_hub
3bb8d79 verified
import{ab as E,ac as O,y as g,p as x,k as R,j as y,b as S,h as L,w as M,ad as B,d as N,f as k,G as Y,ae as F,H as C,D as U,z as j,Q as T,af as q,ag as z,ah as G,g as m,a5 as H,ai as K,aj as $,ak as Q,al as Z,c as J,am as V,an as W,u as X,_ as ee,ao as te,ap as se,aq as re,a0 as ae,ar as ie}from"./BYqqIqIr.js";class ne{anchor;#t=new Map;#s=new Map;#e=new Map;#r=new Set;#a=!0;constructor(e,r=!0){this.anchor=e,this.#a=r}#i=()=>{var e=E;if(this.#t.has(e)){var r=this.#t.get(e),s=this.#s.get(r);if(s)O(s),this.#r.delete(r);else{var f=this.#e.get(r);f&&(this.#s.set(r,f.effect),this.#e.delete(r),f.fragment.lastChild.remove(),this.anchor.before(f.fragment),s=f.effect)}for(const[a,n]of this.#t){if(this.#t.delete(a),a===e)break;const i=this.#e.get(n);i&&(g(i.effect),this.#e.delete(n))}for(const[a,n]of this.#s){if(a===r||this.#r.has(a))continue;const i=()=>{if(Array.from(this.#t.values()).includes(a)){var d=document.createDocumentFragment();M(n,d),d.append(R()),this.#e.set(a,{effect:n,fragment:d})}else g(n);this.#r.delete(a),this.#s.delete(a)};this.#a||!s?(this.#r.add(a),x(n,i,!1)):i()}}};#n=e=>{this.#t.delete(e);const r=Array.from(this.#t.values());for(const[s,f]of this.#e)r.includes(s)||(g(f.effect),this.#e.delete(s))};ensure(e,r){var s=E,f=B();if(r&&!this.#s.has(e)&&!this.#e.has(e))if(f){var a=document.createDocumentFragment(),n=R();a.append(n),this.#e.set(e,{effect:y(()=>r(n)),fragment:a})}else this.#s.set(e,y(()=>r(this.anchor)));if(this.#t.set(s,e),f){for(const[i,c]of this.#s)i===e?s.skipped_effects.delete(c):s.skipped_effects.add(c);for(const[i,c]of this.#e)i===e?s.skipped_effects.delete(c.effect):s.skipped_effects.add(c.effect);s.oncommit(this.#i),s.ondiscard(this.#n)}else S&&(this.anchor=L),this.#i()}}function de(t,e,r=!1){S&&k();var s=new ne(t),f=r?Y:0;function a(n,i){if(S){const d=F(t)===C;if(n===d){var c=U();j(c),s.anchor=c,T(!1),s.ensure(n,i),T(!0);return}}s.ensure(n,i)}N(()=>{var n=!1;e((i,c=!0)=>{n=!0,a(c,i)}),n||a(!1,null)},f)}let p=!1;function fe(t){var e=p;try{return p=!1,[t(),p]}finally{p=e}}const ce={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function oe(t,e,r){return new Proxy({props:t,exclude:e},ce)}function he(t,e,r,s){var f=!ee||(r&te)!==0,a=(r&W)!==0,n=(r&re)!==0,i=s,c=!0,d=()=>(c&&(c=!1,i=n?X(s):s),i),h;if(a){var w=ae in t||ie in t;h=q(t,e)?.set??(w&&e in t?u=>t[e]=u:void 0)}var l,P=!1;a?[l,P]=fe(()=>t[e]):l=t[e],l===void 0&&s!==void 0&&(l=d(),h&&(f&&z(),h(l)));var o;if(f?o=()=>{var u=t[e];return u===void 0?d():(c=!0,u)}:o=()=>{var u=t[e];return u!==void 0&&(i=void 0),u===void 0?i:u},f&&(r&G)===0)return o;if(h){var I=t.$$legacy;return(function(u,v){return arguments.length>0?((!f||!v||I||P)&&h(v?o():u),u):o()})}var b=!1,_=((r&se)!==0?H:K)(()=>(b=!1,o()));a&&m(_);var D=J;return(function(u,v){if(arguments.length>0){const A=v?m(_):f&&a?$(u):u;return Q(_,A),b=!0,i!==void 0&&(i=A),u}return Z&&b||(D.f&V)!==0?_.v:m(_)})}export{ne as B,de as i,he as p,oe as r};