import{r as o}from"./index.DIfZGIpv.js";import{c as p}from"./client.D72tZIIN.js";import"./index.XeJbqeyU.js";const y=({value:t,name:e,hydrate:r=!0})=>{if(!t)return null;const a=r?"astro-slot":"astro-static-slot";return o.createElement(a,{name:e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}})};y.shouldComponentUpdate=()=>!1;var h=y;function _(t){for(const e in t)if(e.startsWith("__reactContainer"))return e}function N(t){let e={};for(const r of t.attributes)e[r.name]=r.value;return t.firstChild===null?o.createElement(t.localName,e):o.createElement(t.localName,e,Array.from(t.childNodes).map(r=>r.nodeType===Node.TEXT_NODE?r.data:r.nodeType===Node.ELEMENT_NODE?N(r):void 0).filter(r=>!!r))}function b(t,e){if(e&&t){let r=[],a=document.createElement("template");a.innerHTML=t;for(let s of a.content.children)r.push(N(s));return r}else return t?o.createElement(h,{value:t}):void 0}let E=new WeakMap;const m=(t,e)=>{let r=E.get(t);return r||(r=e(),E.set(t,r)),r};var x=t=>(e,r,{default:a,...s},{client:v})=>{if(!t.hasAttribute("ssr"))return;const c=t.getAttribute("data-action-key"),d=t.getAttribute("data-action-name"),l=t.getAttribute("data-action-result"),A=c&&d&&l?[JSON.parse(l),c,d]:void 0,T={identifierPrefix:t.getAttribute("prefix"),formState:A};for(const[i,n]of Object.entries(s))r[i]=o.createElement(h,{value:n,name:i});const u=o.createElement(e,r,b(a,t.hasAttribute("data-react-children"))),f=_(t);if(f&&delete t[f],v==="only")return o.startTransition(()=>{m(t,()=>{const n=p.createRoot(t);return t.addEventListener("astro:unmount",()=>n.unmount(),{once:!0}),n}).render(u)});o.startTransition(()=>{m(t,()=>{const n=p.hydrateRoot(t,u,T);return t.addEventListener("astro:unmount",()=>n.unmount(),{once:!0}),n}).render(u)})};export{x as default};
