bpsr-data / _astro /client.svelte.BK4KjTVN.js
Bingsu's picture
Upload folder using huggingface_hub
dd5505a verified
Raw
History Blame Contribute Delete
889 Bytes
import{B as e,C as t,b as n,v as r,x as i}from"./client.HO52rpX4.js";var a=new WeakMap,o=e=>async(t,n,i,{client:o})=>{if(!e.hasAttribute(`ssr`))return;let c,l,u={};for(let[e,t]of Object.entries(i))l??={},e==="default"?(l.default=!0,c=r(()=>({render:()=>`<astro-slot>${t}</astro-slot>`}))):l[e]=r(()=>({render:()=>`<astro-slot name="${e}">${t}</astro-slot>`})),e==="default"?u.children=r(()=>({render:()=>`<astro-slot>${t}</astro-slot>`})):u[e]=r(()=>({render:()=>`<astro-slot name="${e}">${t}</astro-slot>`}));let d={...n,children:c,$$slots:l,...u};if(a.has(e))a.get(e).setProps(d);else{let n=s(t,e,d,o!==`only`);a.set(e,n),e.addEventListener(`astro:unmount`,()=>n.destroy(),{once:!0})}};function s(r,a,o,s){let c=e(o),l=s?n:i;s||(a.innerHTML=``);let u=l(r,{target:a,props:c});return{setProps(e){Object.assign(c,e);for(let t in c)t in e||delete c[t]},destroy(){t(u)}}}export{o as default};