import{b3 as f}from"./Dd9LBWfc.js";import{j as y,a as h,F as b,p as _,_ as p,V as v,l as g,aj as m,g as T}from"./ChPOfM_V.js";const j=Symbol.for("nuxt:client-only"),M=y({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(r,{slots:t,attrs:l}){const o=h(!1);return b(()=>{o.value=!0}),_(j,!0),n=>{var i;if(o.value)return(i=t.default)==null?void 0:i.call(t);const a=t.fallback||t.placeholder;if(a)return a();const c=n.fallback||n.placeholder||"",d=n.fallbackTag||n.placeholderTag||"span";return p(d,l,c)}}}),u=new WeakMap;function V(r){if(u.has(r))return u.get(r);const t={...r};return t.render?t.render=(l,o,n,a,c,d)=>{var i;if(a.mounted$??l.mounted$){const e=(i=r.render)==null?void 0:i.bind(l)(l,o,n,a,c,d);return e.children===null||typeof e.children=="string"?v(e):g(e)}else{const e=f(l._.vnode.el??null)??["<div></div>"];return m(e.join(""),e.length)}}:t.template&&(t.template=`
      <template v-if="mounted$">${r.template}</template>
      <template v-else><div></div></template>
    `),t.setup=(l,o)=>{var i;const n=T(),a={...n.attrs},c=$(n);for(const e in a)delete n.attrs[e];const d=h(!1);return b(()=>{Object.assign(n.attrs,a),n.vnode.dirs=c,d.value=!0}),Promise.resolve(((i=r.setup)==null?void 0:i.call(r,l,o))||{}).then(e=>typeof e!="function"?(e=e||{},e.mounted$=d,e):(...k)=>{if(d.value){const s=e(...k);return s.children===null||typeof s.children=="string"?v(s):g(s)}else{const s=f((n==null?void 0:n.vnode.el)??null)??["<div></div>"];return m(s.join(""),s.length)}})},u.set(r,t),t}function $(r){if(!r||!r.vnode.dirs)return null;const t=r.vnode.dirs;return r.vnode.dirs=null,t}export{M as _,V as c};
