/// /* esm.sh - esbuild bundle(preact-render-to-string@6.4.2) denonext production */ import {options as u,h as V,Fragment as E} from"./compat.js"; var J=/[\s\n\\/='"\0<>]/,M=/^(xlink|xmlns|xml)([A-Z])/,oe=/^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/,ae=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,ie=/["&<]/;function H(e){if(e.length===0||ie.test(e)===!1)return e;for(var n=0,t=0,r="",a="";t";s=h.children}else{if((S=f.contextType)!=null){var G=n[S.__c];j=G?G.props.value:S.__}if(f.prototype&&typeof f.prototype.render=="function")s=K(e,j),d=e.__c;else{e.__c=d={__v:e,props:h,context:j,setState:Y,forceUpdate:Y,__d:!0,__h:[]};for(var ee=0;d.__d&&ee++<25;)d.__d=!1,P&&P(e),s=f.call(d,h,j);d.__d=!0}if(d.getChildContext!=null&&(n=R({},n,d.getChildContext())),(f.getDerivedStateFromError||d.componentDidCatch)&&u.errorBoundaries){var z="";s=s!=null&&s.type===E&&s.key==null?s.props.children:s;try{return z=k(s,n,t,r,e,o)}catch(w){return f.getDerivedStateFromError&&(d.__s=f.getDerivedStateFromError(w)),d.componentDidCatch&&d.componentDidCatch(w,{}),d.__d&&(s=K(e,n),(d=e.__c).getChildContext!=null&&(n=R({},n,d.getChildContext())),z=k(s=s!=null&&s.type===E&&s.key==null?s.props.children:s,n,t,r,e,o)),z}finally{A&&A(e),e.__=null,C&&C(e)}}}s=s!=null&&s.type===E&&s.key==null&&s.props.tpl==null?s.props.children:s;try{var te=k(s,n,t,r,e,o);return A&&A(e),e.__=null,C&&C(e),te}catch(w){if(!o||!w||typeof w.then!="function")throw w;var ne=function re(){try{return k(s,n,t,r,e,o)}catch(Z){if(!Z||typeof Z.then!="function")throw Z;return Z.then(function(){return k(s,n,t,r,e,o)},function(){return re()})}};return w.then(function(){return ne()})}}var x,L="<"+f,b="";for(var c in h){var p=h[c];switch(c){case"children":x=p;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in h)continue;c="for";break;case"className":if("class"in h)continue;c="class";break;case"defaultChecked":c="checked";break;case"defaultSelected":c="selected";break;case"defaultValue":case"value":switch(c="value",f){case"textarea":x=p;continue;case"select":r=p;continue;case"option":r!=p||"selected"in h||(L+=" selected")}break;case"dangerouslySetInnerHTML":b=p&&p.__html;continue;case"style":typeof p=="object"&&(p=le(p));break;case"acceptCharset":c="accept-charset";break;case"httpEquiv":c="http-equiv";break;default:if(M.test(c))c=c.replace(M,"$1:$2").toLowerCase();else{if(J.test(c))continue;c[4]!=="-"&&c!=="draggable"||p==null?t?ae.test(c)&&(c=c==="panose1"?"panose-1":c.replace(/([A-Z])/g,"-$1").toLowerCase()):oe.test(c)&&(c=c.toLowerCase()):p+=""}}p!=null&&p!==!1&&typeof p!="function"&&(L=p===!0||p===""?L+" "+c:L+" "+c+'="'+H(p+"")+'"')}if(J.test(f))throw new Error(f+" is not a valid HTML tag name in "+L+">");if(b||(typeof x=="string"?b=H(x):x!=null&&x!==!1&&x!==!0&&(b=k(x,n,f==="svg"||f!=="foreignObject"&&t,r,e,o))),A&&A(e),e.__=null,C&&C(e),!b&&pe.has(f))return L+"/>";var B="",I=L+">";return Array.isArray(b)?[I].concat(b,[B]):typeof b!="string"?[I,b,B]:I+b+B}var pe=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),_e=$,ve=$,me=$; export{me as default,_e as render,ve as renderToStaticMarkup,$ as renderToString,de as renderToStringAsync};