Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

preact-render-to-string

Package Overview
Dependencies
Maintainers
6
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact-render-to-string - npm Package Compare versions

Comparing version 6.5.12 to 6.5.13

2

dist/commonjs.js

@@ -1,2 +0,2 @@

var e=require("preact"),t=/[\s\n\\/='"\0<>]/,n=/^(xlink|xmlns|xml)([A-Z])/,r=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,o=/^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/,i=new Set(["draggable","spellcheck"]),a=/["&<]/;function s(e){if(0===e.length||!1===a.test(e))return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var c={},l=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),u=/[A-Z]/g;function p(e){var t="";for(var n in e){var r=e[n];if(null!=r&&""!==r){var o="-"==n[0]?n:c[n]||(c[n]=n.replace(u,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||l.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function f(){this.__d=!0}function h(e,t){return{__v:e,context:t,props:e.props,setState:f,forceUpdate:f,__d:!0,__h:new Array(0)}}function d(e,t,n){if(!e.s){if(n instanceof _){if(!n.s)return void(n.o=d.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(d.bind(null,e,t),d.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}var _=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{d(r,1,i(this.v))}catch(e){d(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?d(r,1,t?t(o):o):n?d(r,1,n(o)):d(r,2,o)}catch(e){d(r,2,e)}},r},e}();function v(e){return e instanceof _&&1&e.s}function m(e,t,n){for(var r;;){var o=e();if(v(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!v(i)){r=1;break}i=i.s}if(t){var a=t();if(a&&a.then&&!v(a)){r=2;break}}}var s=new _,c=d.bind(null,s,2);return(0===r?o.then(u):1===r?i.then(l):a.then(p)).then(void 0,c),s;function l(r){i=r;do{if(t&&(a=t())&&a.then&&!v(a))return void a.then(p).then(void 0,c);if(!(o=e())||v(o)&&!o.v)return void d(s,1,i);if(o.then)return void o.then(u).then(void 0,c);v(i=n())&&(i=i.v)}while(!i||!i.then);i.then(l).then(void 0,c)}function u(e){e?(i=n())&&i.then?i.then(l).then(void 0,c):l(i):d(s,1,i)}function p(){(o=e())?o.then?o.then(u).then(void 0,c):u(o):d(s,1,i)}}function g(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}var y,b,k,x,w={},C=[],S=Array.isArray,A=Object.assign;function F(t,n,r){var o=e.options.__s;e.options.__s=!0,y=e.options.__b,b=e.options.diffed,k=e.options.__r,x=e.options.unmount;var i=e.h(e.Fragment,null);i.__k=[t];try{var a=T(t,n||w,!1,void 0,i,!1,r);return S(a)?a.join(""):a}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.options.__c&&e.options.__c(t,C),e.options.__s=o,C.length=0}}function L(e,t){var n,r=e.type,o=!0;return e.__c?(o=!1,(n=e.__c).state=n.__s):n=new r(e.props,t),e.__c=n,n.__v=e,n.props=e.props,n.context=t,n.__d=!0,null==n.state&&(n.state=w),null==n.__s&&(n.__s=n.state),r.getDerivedStateFromProps?n.state=A({},n.state,r.getDerivedStateFromProps(n.props,n.state)):o&&n.componentWillMount?(n.componentWillMount(),n.state=n.__s!==n.state?n.__s:n.state):!o&&n.componentWillUpdate&&n.componentWillUpdate(),k&&k(e),n.render(n.props,n.state,t)}function T(a,c,l,u,f,d,_){if(null==a||!0===a||!1===a||""===a)return"";var v=typeof a;if("object"!=v)return"function"==v?"":"string"==v?s(a):a+"";if(S(a)){var m,g="";f.__k=a;for(var C=a.length,F=0;F<C;F++){var j=a[F];if(null!=j&&"boolean"!=typeof j){var D,P=T(j,c,l,u,f,d,_);"string"==typeof P?g+=P:(m||(m=new Array(C)),g&&m.push(g),g="",S(P)?(D=m).push.apply(D,P):m.push(P))}}return m?(g&&m.push(g),m):g}if(void 0!==a.constructor)return"";a.__=f,y&&y(a);var M=a.type,U=a.props;if("function"==typeof M){var Z,W,$,q=c;if(M===e.Fragment){if("tpl"in U){for(var z="",H=0;H<U.tpl.length;H++)if(z+=U.tpl[H],U.exprs&&H<U.exprs.length){var N=U.exprs[H];if(null==N)continue;"object"!=typeof N||void 0!==N.constructor&&!S(N)?z+=N:z+=T(N,c,l,u,a,d,_)}return z}if("UNSTABLE_comment"in U)return"\x3c!--"+s(U.UNSTABLE_comment)+"--\x3e";W=U.children}else{if(null!=(Z=M.contextType)){var B=c[Z.__c];q=B?B.props.value:Z.__}var I=M.prototype&&"function"==typeof M.prototype.render;if(I)W=L(a,q),$=a.__c;else{a.__c=$=h(a,q);for(var O=0;$.__d&&O++<25;)$.__d=!1,k&&k(a),W=M.call($,U,q);$.__d=!0}if(null!=$.getChildContext&&(c=A({},c,$.getChildContext())),I&&e.options.errorBoundaries&&(M.getDerivedStateFromError||$.componentDidCatch)){W=null!=W&&W.type===e.Fragment&&null==W.key&&null==W.props.tpl?W.props.children:W;try{return T(W,c,l,u,a,d,_)}catch(t){return M.getDerivedStateFromError&&($.__s=M.getDerivedStateFromError(t)),$.componentDidCatch&&$.componentDidCatch(t,w),$.__d?(W=L(a,c),null!=($=a.__c).getChildContext&&(c=A({},c,$.getChildContext())),T(W=null!=W&&W.type===e.Fragment&&null==W.key&&null==W.props.tpl?W.props.children:W,c,l,u,a,d,_)):""}finally{b&&b(a),a.__=null,x&&x(a)}}}W=null!=W&&W.type===e.Fragment&&null==W.key&&null==W.props.tpl?W.props.children:W;try{var R=T(W,c,l,u,a,d,_);return b&&b(a),a.__=null,e.options.unmount&&e.options.unmount(a),R}catch(t){if(!d&&_&&_.onError){var V=_.onError(t,a,function(e){return T(e,c,l,u,a,d,_)});if(void 0!==V)return V;var K=e.options.__e;return K&&K(t,a),""}if(!d)throw t;if(!t||"function"!=typeof t.then)throw t;return t.then(function e(){try{return T(W,c,l,u,a,d,_)}catch(t){if(!t||"function"!=typeof t.then)throw t;return t.then(function(){return T(W,c,l,u,a,d,_)},e)}})}}var G,J="<"+M,Q="";for(var X in U){var Y=U[X];if("function"!=typeof Y||"class"===X||"className"===X){switch(X){case"children":G=Y;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in U)continue;X="for";break;case"className":if("class"in U)continue;X="class";break;case"defaultChecked":X="checked";break;case"defaultSelected":X="selected";break;case"defaultValue":case"value":switch(X="value",M){case"textarea":G=Y;continue;case"select":u=Y;continue;case"option":u!=Y||"selected"in U||(J+=" selected")}break;case"dangerouslySetInnerHTML":Q=Y&&Y.__html;continue;case"style":"object"==typeof Y&&(Y=p(Y));break;case"acceptCharset":X="accept-charset";break;case"httpEquiv":X="http-equiv";break;default:if(n.test(X))X=X.replace(n,"$1:$2").toLowerCase();else{if(t.test(X))continue;"-"!==X[4]&&!i.has(X)||null==Y?l?o.test(X)&&(X="panose1"===X?"panose-1":X.replace(/([A-Z])/g,"-$1").toLowerCase()):r.test(X)&&(X=X.toLowerCase()):Y+=""}}null!=Y&&!1!==Y&&(J=!0===Y||""===Y?J+" "+X:J+" "+X+'="'+("string"==typeof Y?s(Y):Y+"")+'"')}}if(t.test(M))throw new Error(M+" is not a valid HTML tag name in "+J+">");if(Q||("string"==typeof G?Q=s(G):null!=G&&!1!==G&&!0!==G&&(Q=T(G,c,"svg"===M||"foreignObject"!==M&&l,u,a,d,_))),b&&b(a),a.__=null,x&&x(a),!Q&&E.has(M))return J+"/>";var ee="</"+M+">",te=J+">";return S(Q)?[te].concat(Q,[ee]):"string"!=typeof Q?[te,Q,ee]:te+Q+ee}var E=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),j=F,D=F;exports.default=F,exports.render=j,exports.renderToStaticMarkup=D,exports.renderToString=F,exports.renderToStringAsync=function(t,n){try{var r=e.options.__s;e.options.__s=!0,y=e.options.__b,b=e.options.diffed,k=e.options.__r,x=e.options.unmount;var o=e.h(e.Fragment,null);return o.__k=[t],Promise.resolve(g(function(){return Promise.resolve(T(t,n||w,!1,void 0,o,!0,void 0)).then(function(e){var t,n=function(){if(S(e)){var n=function(){var e=o.join("");return t=1,e},r=0,o=e,i=m(function(){return!!o.some(function(e){return e&&"function"==typeof e.then})&&r++<25},void 0,function(){return Promise.resolve(Promise.all(o)).then(function(e){o=e.flat()})});return i&&i.then?i.then(n):n()}}();return n&&n.then?n.then(function(n){return t?n:e}):t?n:e})},function(n,o){if(e.options.__c&&e.options.__c(t,C),e.options.__s=r,C.length=0,n)throw o;return o}))}catch(e){return Promise.reject(e)}};
var e=require("preact"),t=/[\s\n\\/='"\0<>]/,n=/^(xlink|xmlns|xml)([A-Z])/,r=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,o=/^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/,i=new Set(["draggable","spellcheck"]),a=/["&<]/;function s(e){if(0===e.length||!1===a.test(e))return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var c={},l=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),u=/[A-Z]/g;function p(e){var t="";for(var n in e){var r=e[n];if(null!=r&&""!==r){var o="-"==n[0]?n:c[n]||(c[n]=n.replace(u,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||l.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function f(){this.__d=!0}function h(e,t){return{__v:e,context:t,props:e.props,setState:f,forceUpdate:f,__d:!0,__h:new Array(0)}}function d(e,t,n){if(!e.s){if(n instanceof v){if(!n.s)return void(n.o=d.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(d.bind(null,e,t),d.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}var v=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{d(r,1,i(this.v))}catch(e){d(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?d(r,1,t?t(o):o):n?d(r,1,n(o)):d(r,2,o)}catch(e){d(r,2,e)}},r},e}();function _(e){return e instanceof v&&1&e.s}function m(e,t,n){for(var r;;){var o=e();if(_(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!_(i)){r=1;break}i=i.s}if(t){var a=t();if(a&&a.then&&!_(a)){r=2;break}}}var s=new v,c=d.bind(null,s,2);return(0===r?o.then(u):1===r?i.then(l):a.then(p)).then(void 0,c),s;function l(r){i=r;do{if(t&&(a=t())&&a.then&&!_(a))return void a.then(p).then(void 0,c);if(!(o=e())||_(o)&&!o.v)return void d(s,1,i);if(o.then)return void o.then(u).then(void 0,c);_(i=n())&&(i=i.v)}while(!i||!i.then);i.then(l).then(void 0,c)}function u(e){e?(i=n())&&i.then?i.then(l).then(void 0,c):l(i):d(s,1,i)}function p(){(o=e())?o.then?o.then(u).then(void 0,c):u(o):d(s,1,i)}}function g(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}var y,b,k,x,w={},C=[],S=Array.isArray,A=Object.assign;function F(t,n,r){var o=e.options.__s;e.options.__s=!0,y=e.options.__b,b=e.options.diffed,k=e.options.__r,x=e.options.unmount;var i=e.h(e.Fragment,null);i.__k=[t];try{var a=T(t,n||w,!1,void 0,i,!1,r);return S(a)?a.join(""):a}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.options.__c&&e.options.__c(t,C),e.options.__s=o,C.length=0}}function L(e,t){var n,r=e.type,o=!0;return e.__c?(o=!1,(n=e.__c).state=n.__s):n=new r(e.props,t),e.__c=n,n.__v=e,n.props=e.props,n.context=t,n.__d=!0,null==n.state&&(n.state=w),null==n.__s&&(n.__s=n.state),r.getDerivedStateFromProps?n.state=A({},n.state,r.getDerivedStateFromProps(n.props,n.state)):o&&n.componentWillMount?(n.componentWillMount(),n.state=n.__s!==n.state?n.__s:n.state):!o&&n.componentWillUpdate&&n.componentWillUpdate(),k&&k(e),n.render(n.props,n.state,t)}function T(a,c,l,u,f,d,v){if(null==a||!0===a||!1===a||""===a)return"";var _=typeof a;if("object"!=_)return"function"==_?"":"string"==_?s(a):a+"";if(S(a)){var m,g="";f.__k=a;for(var C=a.length,F=0;F<C;F++){var j=a[F];if(null!=j&&"boolean"!=typeof j){var D,P=T(j,c,l,u,f,d,v);"string"==typeof P?g+=P:(m||(m=new Array(C)),g&&m.push(g),g="",S(P)?(D=m).push.apply(D,P):m.push(P))}}return m?(g&&m.push(g),m):g}if(void 0!==a.constructor)return"";a.__=f,y&&y(a);var M=a.type,U=a.props;if("function"==typeof M){var Z,W,$,q=c;if(M===e.Fragment){if("tpl"in U){for(var z="",H=0;H<U.tpl.length;H++)if(z+=U.tpl[H],U.exprs&&H<U.exprs.length){var N=U.exprs[H];if(null==N)continue;"object"!=typeof N||void 0!==N.constructor&&!S(N)?z+=N:z+=T(N,c,l,u,a,d,v)}return z}if("UNSTABLE_comment"in U)return"\x3c!--"+s(U.UNSTABLE_comment)+"--\x3e";W=U.children}else{if(null!=(Z=M.contextType)){var B=c[Z.__c];q=B?B.props.value:Z.__}var I=M.prototype&&"function"==typeof M.prototype.render;if(I)W=L(a,q),$=a.__c;else{a.__c=$=h(a,q);for(var O=0;$.__d&&O++<25;)$.__d=!1,k&&k(a),W=M.call($,U,q);$.__d=!0}if(null!=$.getChildContext&&(c=A({},c,$.getChildContext())),I&&e.options.errorBoundaries&&(M.getDerivedStateFromError||$.componentDidCatch)){W=null!=W&&W.type===e.Fragment&&null==W.key&&null==W.props.tpl?W.props.children:W;try{return T(W,c,l,u,a,d,v)}catch(t){return M.getDerivedStateFromError&&($.__s=M.getDerivedStateFromError(t)),$.componentDidCatch&&$.componentDidCatch(t,w),$.__d?(W=L(a,c),null!=($=a.__c).getChildContext&&(c=A({},c,$.getChildContext())),T(W=null!=W&&W.type===e.Fragment&&null==W.key&&null==W.props.tpl?W.props.children:W,c,l,u,a,d,v)):""}finally{b&&b(a),x&&x(a)}}}W=null!=W&&W.type===e.Fragment&&null==W.key&&null==W.props.tpl?W.props.children:W;try{var R=T(W,c,l,u,a,d,v);return b&&b(a),e.options.unmount&&e.options.unmount(a),R}catch(t){if(!d&&v&&v.onError){var V=v.onError(t,a,function(e,t){return T(e,c,l,u,t,d,v)});if(void 0!==V)return V;var K=e.options.__e;return K&&K(t,a),""}if(!d)throw t;if(!t||"function"!=typeof t.then)throw t;return t.then(function e(){try{return T(W,c,l,u,a,d,v)}catch(t){if(!t||"function"!=typeof t.then)throw t;return t.then(function(){return T(W,c,l,u,a,d,v)},e)}})}}var G,J="<"+M,Q="";for(var X in U){var Y=U[X];if("function"!=typeof Y||"class"===X||"className"===X){switch(X){case"children":G=Y;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in U)continue;X="for";break;case"className":if("class"in U)continue;X="class";break;case"defaultChecked":X="checked";break;case"defaultSelected":X="selected";break;case"defaultValue":case"value":switch(X="value",M){case"textarea":G=Y;continue;case"select":u=Y;continue;case"option":u!=Y||"selected"in U||(J+=" selected")}break;case"dangerouslySetInnerHTML":Q=Y&&Y.__html;continue;case"style":"object"==typeof Y&&(Y=p(Y));break;case"acceptCharset":X="accept-charset";break;case"httpEquiv":X="http-equiv";break;default:if(n.test(X))X=X.replace(n,"$1:$2").toLowerCase();else{if(t.test(X))continue;"-"!==X[4]&&!i.has(X)||null==Y?l?o.test(X)&&(X="panose1"===X?"panose-1":X.replace(/([A-Z])/g,"-$1").toLowerCase()):r.test(X)&&(X=X.toLowerCase()):Y+=""}}null!=Y&&!1!==Y&&(J=!0===Y||""===Y?J+" "+X:J+" "+X+'="'+("string"==typeof Y?s(Y):Y+"")+'"')}}if(t.test(M))throw new Error(M+" is not a valid HTML tag name in "+J+">");if(Q||("string"==typeof G?Q=s(G):null!=G&&!1!==G&&!0!==G&&(Q=T(G,c,"svg"===M||"foreignObject"!==M&&l,u,a,d,v))),b&&b(a),x&&x(a),!Q&&E.has(M))return J+"/>";var ee="</"+M+">",te=J+">";return S(Q)?[te].concat(Q,[ee]):"string"!=typeof Q?[te,Q,ee]:te+Q+ee}var E=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),j=F,D=F;exports.default=F,exports.render=j,exports.renderToStaticMarkup=D,exports.renderToString=F,exports.renderToStringAsync=function(t,n){try{var r=e.options.__s;e.options.__s=!0,y=e.options.__b,b=e.options.diffed,k=e.options.__r,x=e.options.unmount;var o=e.h(e.Fragment,null);return o.__k=[t],Promise.resolve(g(function(){return Promise.resolve(T(t,n||w,!1,void 0,o,!0,void 0)).then(function(e){var t,n=function(){if(S(e)){var n=function(){var e=o.join("");return t=1,e},r=0,o=e,i=m(function(){return!!o.some(function(e){return e&&"function"==typeof e.then})&&r++<25},void 0,function(){return Promise.resolve(Promise.all(o)).then(function(e){o=e.flat()})});return i&&i.then?i.then(n):n()}}();return n&&n.then?n.then(function(n){return t?n:e}):t?n:e})},function(n,o){if(e.options.__c&&e.options.__c(t,C),e.options.__s=r,C.length=0,n)throw o;return o}))}catch(e){return Promise.reject(e)}};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{options as e,h as t,Fragment as n}from"preact";var r=/[\s\n\\/='"\0<>]/,o=/^(xlink|xmlns|xml)([A-Z])/,i=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,a=/^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/,c=new Set(["draggable","spellcheck"]),s=/["&<]/;function l(e){if(0===e.length||!1===s.test(e))return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var u={},f=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),p=/[A-Z]/g;function h(e){var t="";for(var n in e){var r=e[n];if(null!=r&&""!==r){var o="-"==n[0]?n:u[n]||(u[n]=n.replace(p,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||f.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function d(){this.__d=!0}function _(e,t){return{__v:e,context:t,props:e.props,setState:d,forceUpdate:d,__d:!0,__h:new Array(0)}}function v(e,t,n){if(!e.s){if(n instanceof m){if(!n.s)return void(n.o=v.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(v.bind(null,e,t),v.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}var m=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{v(r,1,i(this.v))}catch(e){v(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?v(r,1,t?t(o):o):n?v(r,1,n(o)):v(r,2,o)}catch(e){v(r,2,e)}},r},e}();function y(e){return e instanceof m&&1&e.s}function g(e,t,n){for(var r;;){var o=e();if(y(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!y(i)){r=1;break}i=i.s}if(t){var a=t();if(a&&a.then&&!y(a)){r=2;break}}}var c=new m,s=v.bind(null,c,2);return(0===r?o.then(u):1===r?i.then(l):a.then(f)).then(void 0,s),c;function l(r){i=r;do{if(t&&(a=t())&&a.then&&!y(a))return void a.then(f).then(void 0,s);if(!(o=e())||y(o)&&!o.v)return void v(c,1,i);if(o.then)return void o.then(u).then(void 0,s);y(i=n())&&(i=i.v)}while(!i||!i.then);i.then(l).then(void 0,s)}function u(e){e?(i=n())&&i.then?i.then(l).then(void 0,s):l(i):v(c,1,i)}function f(){(o=e())?o.then?o.then(u).then(void 0,s):u(o):v(c,1,i)}}function b(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}var k,w,x,C,A=function(r,o){try{var i=e.__s;e.__s=!0,k=e.__b,w=e.diffed,x=e.__r,C=e.unmount;var a=t(n,null);return a.__k=[r],Promise.resolve(b(function(){return Promise.resolve(U(r,o||S,!1,void 0,a,!0,void 0)).then(function(e){var t,n=function(){if(E(e)){var n=function(){var e=o.join(j);return t=1,e},r=0,o=e,i=g(function(){return!!o.some(function(e){return e&&"function"==typeof e.then})&&r++<25},void 0,function(){return Promise.resolve(Promise.all(o)).then(function(e){o=e.flat()})});return i&&i.then?i.then(n):n()}}();return n&&n.then?n.then(function(n){return t?n:e}):t?n:e})},function(t,n){if(e.__c&&e.__c(r,L),e.__s=i,L.length=0,t)throw n;return n}))}catch(e){return Promise.reject(e)}},S={},L=[],E=Array.isArray,T=Object.assign,j="";function D(r,o,i){var a=e.__s;e.__s=!0,k=e.__b,w=e.diffed,x=e.__r,C=e.unmount;var c=t(n,null);c.__k=[r];try{var s=U(r,o||S,!1,void 0,c,!1,i);return E(s)?s.join(j):s}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.__c&&e.__c(r,L),e.__s=a,L.length=0}}function P(e,t){var n,r=e.type,o=!0;return e.__c?(o=!1,(n=e.__c).state=n.__s):n=new r(e.props,t),e.__c=n,n.__v=e,n.props=e.props,n.context=t,n.__d=!0,null==n.state&&(n.state=S),null==n.__s&&(n.__s=n.state),r.getDerivedStateFromProps?n.state=T({},n.state,r.getDerivedStateFromProps(n.props,n.state)):o&&n.componentWillMount?(n.componentWillMount(),n.state=n.__s!==n.state?n.__s:n.state):!o&&n.componentWillUpdate&&n.componentWillUpdate(),x&&x(e),n.render(n.props,n.state,t)}function U(t,s,u,f,p,d,v){if(null==t||!0===t||!1===t||t===j)return j;var m=typeof t;if("object"!=m)return"function"==m?j:"string"==m?l(t):t+j;if(E(t)){var y,g=j;p.__k=t;for(var b=t.length,A=0;A<b;A++){var L=t[A];if(null!=L&&"boolean"!=typeof L){var D,F=U(L,s,u,f,p,d,v);"string"==typeof F?g+=F:(y||(y=new Array(b)),g&&y.push(g),g=j,E(F)?(D=y).push.apply(D,F):y.push(F))}}return y?(g&&y.push(g),y):g}if(void 0!==t.constructor)return j;t.__=p,k&&k(t);var M=t.type,W=t.props;if("function"==typeof M){var $,z,H,N=s;if(M===n){if("tpl"in W){for(var q=j,B=0;B<W.tpl.length;B++)if(q+=W.tpl[B],W.exprs&&B<W.exprs.length){var I=W.exprs[B];if(null==I)continue;"object"!=typeof I||void 0!==I.constructor&&!E(I)?q+=I:q+=U(I,s,u,f,t,d,v)}return q}if("UNSTABLE_comment"in W)return"\x3c!--"+l(W.UNSTABLE_comment)+"--\x3e";z=W.children}else{if(null!=($=M.contextType)){var O=s[$.__c];N=O?O.props.value:$.__}var R=M.prototype&&"function"==typeof M.prototype.render;if(R)z=P(t,N),H=t.__c;else{t.__c=H=_(t,N);for(var V=0;H.__d&&V++<25;)H.__d=!1,x&&x(t),z=M.call(H,W,N);H.__d=!0}if(null!=H.getChildContext&&(s=T({},s,H.getChildContext())),R&&e.errorBoundaries&&(M.getDerivedStateFromError||H.componentDidCatch)){z=null!=z&&z.type===n&&null==z.key&&null==z.props.tpl?z.props.children:z;try{return U(z,s,u,f,t,d,v)}catch(e){return M.getDerivedStateFromError&&(H.__s=M.getDerivedStateFromError(e)),H.componentDidCatch&&H.componentDidCatch(e,S),H.__d?(z=P(t,s),null!=(H=t.__c).getChildContext&&(s=T({},s,H.getChildContext())),U(z=null!=z&&z.type===n&&null==z.key&&null==z.props.tpl?z.props.children:z,s,u,f,t,d,v)):j}finally{w&&w(t),t.__=null,C&&C(t)}}}z=null!=z&&z.type===n&&null==z.key&&null==z.props.tpl?z.props.children:z;try{var K=U(z,s,u,f,t,d,v);return w&&w(t),t.__=null,e.unmount&&e.unmount(t),K}catch(n){if(!d&&v&&v.onError){var G=v.onError(n,t,function(e){return U(e,s,u,f,t,d,v)});if(void 0!==G)return G;var J=e.__e;return J&&J(n,t),j}if(!d)throw n;if(!n||"function"!=typeof n.then)throw n;return n.then(function e(){try{return U(z,s,u,f,t,d,v)}catch(n){if(!n||"function"!=typeof n.then)throw n;return n.then(function(){return U(z,s,u,f,t,d,v)},e)}})}}var Q,X="<"+M,Y=j;for(var ee in W){var te=W[ee];if("function"!=typeof te||"class"===ee||"className"===ee){switch(ee){case"children":Q=te;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in W)continue;ee="for";break;case"className":if("class"in W)continue;ee="class";break;case"defaultChecked":ee="checked";break;case"defaultSelected":ee="selected";break;case"defaultValue":case"value":switch(ee="value",M){case"textarea":Q=te;continue;case"select":f=te;continue;case"option":f!=te||"selected"in W||(X+=" selected")}break;case"dangerouslySetInnerHTML":Y=te&&te.__html;continue;case"style":"object"==typeof te&&(te=h(te));break;case"acceptCharset":ee="accept-charset";break;case"httpEquiv":ee="http-equiv";break;default:if(o.test(ee))ee=ee.replace(o,"$1:$2").toLowerCase();else{if(r.test(ee))continue;"-"!==ee[4]&&!c.has(ee)||null==te?u?a.test(ee)&&(ee="panose1"===ee?"panose-1":ee.replace(/([A-Z])/g,"-$1").toLowerCase()):i.test(ee)&&(ee=ee.toLowerCase()):te+=j}}null!=te&&!1!==te&&(X=!0===te||te===j?X+" "+ee:X+" "+ee+'="'+("string"==typeof te?l(te):te+j)+'"')}}if(r.test(M))throw new Error(M+" is not a valid HTML tag name in "+X+">");if(Y||("string"==typeof Q?Y=l(Q):null!=Q&&!1!==Q&&!0!==Q&&(Y=U(Q,s,"svg"===M||"foreignObject"!==M&&u,f,t,d,v))),w&&w(t),t.__=null,C&&C(t),!Y&&Z.has(M))return X+"/>";var ne="</"+M+">",re=X+">";return E(Y)?[re].concat(Y,[ne]):"string"!=typeof Y?[re,Y,ne]:re+Y+ne}var Z=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),F=D,M=D;export default D;export{F as render,M as renderToStaticMarkup,D as renderToString,A as renderToStringAsync};
import{options as e,h as t,Fragment as r}from"preact";var n=/[\s\n\\/='"\0<>]/,o=/^(xlink|xmlns|xml)([A-Z])/,i=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,a=/^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/,c=new Set(["draggable","spellcheck"]),s=/["&<]/;function l(e){if(0===e.length||!1===s.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var u={},f=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),p=/[A-Z]/g;function h(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:u[r]||(u[r]=r.replace(p,"-$&").toLowerCase()),i=";";"number"!=typeof n||o.startsWith("--")||f.has(o)||(i="px;"),t=t+o+":"+n+i}}return t||void 0}function d(){this.__d=!0}function v(e,t){return{__v:e,context:t,props:e.props,setState:d,forceUpdate:d,__d:!0,__h:new Array(0)}}function _(e,t,r){if(!e.s){if(r instanceof m){if(!r.s)return void(r.o=_.bind(null,e,t));1&t&&(t=r.s),r=r.v}if(r&&r.then)return void r.then(_.bind(null,e,t),_.bind(null,e,2));e.s=t,e.v=r;const n=e.o;n&&n(e)}}var m=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,r){var n=new e,o=this.s;if(o){var i=1&o?t:r;if(i){try{_(n,1,i(this.v))}catch(e){_(n,2,e)}return n}return this}return this.o=function(e){try{var o=e.v;1&e.s?_(n,1,t?t(o):o):r?_(n,1,r(o)):_(n,2,o)}catch(e){_(n,2,e)}},n},e}();function y(e){return e instanceof m&&1&e.s}function g(e,t,r){for(var n;;){var o=e();if(y(o)&&(o=o.v),!o)return i;if(o.then){n=0;break}var i=r();if(i&&i.then){if(!y(i)){n=1;break}i=i.s}if(t){var a=t();if(a&&a.then&&!y(a)){n=2;break}}}var c=new m,s=_.bind(null,c,2);return(0===n?o.then(u):1===n?i.then(l):a.then(f)).then(void 0,s),c;function l(n){i=n;do{if(t&&(a=t())&&a.then&&!y(a))return void a.then(f).then(void 0,s);if(!(o=e())||y(o)&&!o.v)return void _(c,1,i);if(o.then)return void o.then(u).then(void 0,s);y(i=r())&&(i=i.v)}while(!i||!i.then);i.then(l).then(void 0,s)}function u(e){e?(i=r())&&i.then?i.then(l).then(void 0,s):l(i):_(c,1,i)}function f(){(o=e())?o.then?o.then(u).then(void 0,s):u(o):_(c,1,i)}}function b(e,t){try{var r=e()}catch(e){return t(!0,e)}return r&&r.then?r.then(t.bind(null,!1),t.bind(null,!0)):t(!1,r)}var k,w,x,C,A=function(n,o){try{var i=e.__s;e.__s=!0,k=e.__b,w=e.diffed,x=e.__r,C=e.unmount;var a=t(r,null);return a.__k=[n],Promise.resolve(b(function(){return Promise.resolve(U(n,o||S,!1,void 0,a,!0,void 0)).then(function(e){var t,r=function(){if(E(e)){var r=function(){var e=o.join(j);return t=1,e},n=0,o=e,i=g(function(){return!!o.some(function(e){return e&&"function"==typeof e.then})&&n++<25},void 0,function(){return Promise.resolve(Promise.all(o)).then(function(e){o=e.flat()})});return i&&i.then?i.then(r):r()}}();return r&&r.then?r.then(function(r){return t?r:e}):t?r:e})},function(t,r){if(e.__c&&e.__c(n,L),e.__s=i,L.length=0,t)throw r;return r}))}catch(e){return Promise.reject(e)}},S={},L=[],E=Array.isArray,T=Object.assign,j="";function D(n,o,i){var a=e.__s;e.__s=!0,k=e.__b,w=e.diffed,x=e.__r,C=e.unmount;var c=t(r,null);c.__k=[n];try{var s=U(n,o||S,!1,void 0,c,!1,i);return E(s)?s.join(j):s}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.__c&&e.__c(n,L),e.__s=a,L.length=0}}function P(e,t){var r,n=e.type,o=!0;return e.__c?(o=!1,(r=e.__c).state=r.__s):r=new n(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=S),null==r.__s&&(r.__s=r.state),n.getDerivedStateFromProps?r.state=T({},r.state,n.getDerivedStateFromProps(r.props,r.state)):o&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!o&&r.componentWillUpdate&&r.componentWillUpdate(),x&&x(e),r.render(r.props,r.state,t)}function U(t,s,u,f,p,d,_){if(null==t||!0===t||!1===t||t===j)return j;var m=typeof t;if("object"!=m)return"function"==m?j:"string"==m?l(t):t+j;if(E(t)){var y,g=j;p.__k=t;for(var b=t.length,A=0;A<b;A++){var L=t[A];if(null!=L&&"boolean"!=typeof L){var D,F=U(L,s,u,f,p,d,_);"string"==typeof F?g+=F:(y||(y=new Array(b)),g&&y.push(g),g=j,E(F)?(D=y).push.apply(D,F):y.push(F))}}return y?(g&&y.push(g),y):g}if(void 0!==t.constructor)return j;t.__=p,k&&k(t);var M=t.type,W=t.props;if("function"==typeof M){var $,z,H,N=s;if(M===r){if("tpl"in W){for(var q=j,B=0;B<W.tpl.length;B++)if(q+=W.tpl[B],W.exprs&&B<W.exprs.length){var I=W.exprs[B];if(null==I)continue;"object"!=typeof I||void 0!==I.constructor&&!E(I)?q+=I:q+=U(I,s,u,f,t,d,_)}return q}if("UNSTABLE_comment"in W)return"\x3c!--"+l(W.UNSTABLE_comment)+"--\x3e";z=W.children}else{if(null!=($=M.contextType)){var O=s[$.__c];N=O?O.props.value:$.__}var R=M.prototype&&"function"==typeof M.prototype.render;if(R)z=P(t,N),H=t.__c;else{t.__c=H=v(t,N);for(var V=0;H.__d&&V++<25;)H.__d=!1,x&&x(t),z=M.call(H,W,N);H.__d=!0}if(null!=H.getChildContext&&(s=T({},s,H.getChildContext())),R&&e.errorBoundaries&&(M.getDerivedStateFromError||H.componentDidCatch)){z=null!=z&&z.type===r&&null==z.key&&null==z.props.tpl?z.props.children:z;try{return U(z,s,u,f,t,d,_)}catch(e){return M.getDerivedStateFromError&&(H.__s=M.getDerivedStateFromError(e)),H.componentDidCatch&&H.componentDidCatch(e,S),H.__d?(z=P(t,s),null!=(H=t.__c).getChildContext&&(s=T({},s,H.getChildContext())),U(z=null!=z&&z.type===r&&null==z.key&&null==z.props.tpl?z.props.children:z,s,u,f,t,d,_)):j}finally{w&&w(t),C&&C(t)}}}z=null!=z&&z.type===r&&null==z.key&&null==z.props.tpl?z.props.children:z;try{var K=U(z,s,u,f,t,d,_);return w&&w(t),e.unmount&&e.unmount(t),K}catch(r){if(!d&&_&&_.onError){var G=_.onError(r,t,function(e,t){return U(e,s,u,f,t,d,_)});if(void 0!==G)return G;var J=e.__e;return J&&J(r,t),j}if(!d)throw r;if(!r||"function"!=typeof r.then)throw r;return r.then(function e(){try{return U(z,s,u,f,t,d,_)}catch(r){if(!r||"function"!=typeof r.then)throw r;return r.then(function(){return U(z,s,u,f,t,d,_)},e)}})}}var Q,X="<"+M,Y=j;for(var ee in W){var te=W[ee];if("function"!=typeof te||"class"===ee||"className"===ee){switch(ee){case"children":Q=te;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in W)continue;ee="for";break;case"className":if("class"in W)continue;ee="class";break;case"defaultChecked":ee="checked";break;case"defaultSelected":ee="selected";break;case"defaultValue":case"value":switch(ee="value",M){case"textarea":Q=te;continue;case"select":f=te;continue;case"option":f!=te||"selected"in W||(X+=" selected")}break;case"dangerouslySetInnerHTML":Y=te&&te.__html;continue;case"style":"object"==typeof te&&(te=h(te));break;case"acceptCharset":ee="accept-charset";break;case"httpEquiv":ee="http-equiv";break;default:if(o.test(ee))ee=ee.replace(o,"$1:$2").toLowerCase();else{if(n.test(ee))continue;"-"!==ee[4]&&!c.has(ee)||null==te?u?a.test(ee)&&(ee="panose1"===ee?"panose-1":ee.replace(/([A-Z])/g,"-$1").toLowerCase()):i.test(ee)&&(ee=ee.toLowerCase()):te+=j}}null!=te&&!1!==te&&(X=!0===te||te===j?X+" "+ee:X+" "+ee+'="'+("string"==typeof te?l(te):te+j)+'"')}}if(n.test(M))throw new Error(M+" is not a valid HTML tag name in "+X+">");if(Y||("string"==typeof Q?Y=l(Q):null!=Q&&!1!==Q&&!0!==Q&&(Y=U(Q,s,"svg"===M||"foreignObject"!==M&&u,f,t,d,_))),w&&w(t),C&&C(t),!Y&&Z.has(M))return X+"/>";var re="</"+M+">",ne=X+">";return E(Y)?[ne].concat(Y,[re]):"string"!=typeof Y?[ne,Y,re]:ne+Y+re}var Z=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),F=D,M=D;export default D;export{F as render,M as renderToStaticMarkup,D as renderToString,A as renderToStringAsync};
//# sourceMappingURL=index.module.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((e||self).preactRenderToString={},e.preact)}(this,function(e,t){var n=/[\s\n\\/='"\0<>]/,r=/^(xlink|xmlns|xml)([A-Z])/,o=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,i=/^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/,a=new Set(["draggable","spellcheck"]),s=/["&<]/;function c(e){if(0===e.length||!1===s.test(e))return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var l={},u=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),f=/[A-Z]/g;function p(e){var t="";for(var n in e){var r=e[n];if(null!=r&&""!==r){var o="-"==n[0]?n:l[n]||(l[n]=n.replace(f,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||u.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function h(){this.__d=!0}function d(e,t){return{__v:e,context:t,props:e.props,setState:h,forceUpdate:h,__d:!0,__h:new Array(0)}}function _(e,t,n){if(!e.s){if(n instanceof v){if(!n.s)return void(n.o=_.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(_.bind(null,e,t),_.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}var v=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{_(r,1,i(this.v))}catch(e){_(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?_(r,1,t?t(o):o):n?_(r,1,n(o)):_(r,2,o)}catch(e){_(r,2,e)}},r},e}();function m(e){return e instanceof v&&1&e.s}function g(e,t,n){for(var r;;){var o=e();if(m(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!m(i)){r=1;break}i=i.s}if(t){var a=t();if(a&&a.then&&!m(a)){r=2;break}}}var s=new v,c=_.bind(null,s,2);return(0===r?o.then(u):1===r?i.then(l):a.then(f)).then(void 0,c),s;function l(r){i=r;do{if(t&&(a=t())&&a.then&&!m(a))return void a.then(f).then(void 0,c);if(!(o=e())||m(o)&&!o.v)return void _(s,1,i);if(o.then)return void o.then(u).then(void 0,c);m(i=n())&&(i=i.v)}while(!i||!i.then);i.then(l).then(void 0,c)}function u(e){e?(i=n())&&i.then?i.then(l).then(void 0,c):l(i):_(s,1,i)}function f(){(o=e())?o.then?o.then(u).then(void 0,c):u(o):_(s,1,i)}}function y(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}var b,k,w,x,S={},C=[],A=Array.isArray,T=Object.assign,F="";function L(e,n,r){var o=t.options.__s;t.options.__s=!0,b=t.options.__b,k=t.options.diffed,w=t.options.__r,x=t.options.unmount;var i=t.h(t.Fragment,null);i.__k=[e];try{var a=j(e,n||S,!1,void 0,i,!1,r);return A(a)?a.join(F):a}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{t.options.__c&&t.options.__c(e,C),t.options.__s=o,C.length=0}}function E(e,t){var n,r=e.type,o=!0;return e.__c?(o=!1,(n=e.__c).state=n.__s):n=new r(e.props,t),e.__c=n,n.__v=e,n.props=e.props,n.context=t,n.__d=!0,null==n.state&&(n.state=S),null==n.__s&&(n.__s=n.state),r.getDerivedStateFromProps?n.state=T({},n.state,r.getDerivedStateFromProps(n.props,n.state)):o&&n.componentWillMount?(n.componentWillMount(),n.state=n.__s!==n.state?n.__s:n.state):!o&&n.componentWillUpdate&&n.componentWillUpdate(),w&&w(e),n.render(n.props,n.state,t)}function j(e,s,l,u,f,h,_){if(null==e||!0===e||!1===e||e===F)return F;var v=typeof e;if("object"!=v)return"function"==v?F:"string"==v?c(e):e+F;if(A(e)){var m,g=F;f.__k=e;for(var y=e.length,C=0;C<y;C++){var L=e[C];if(null!=L&&"boolean"!=typeof L){var P,M=j(L,s,l,u,f,h,_);"string"==typeof M?g+=M:(m||(m=new Array(y)),g&&m.push(g),g=F,A(M)?(P=m).push.apply(P,M):m.push(M))}}return m?(g&&m.push(g),m):g}if(void 0!==e.constructor)return F;e.__=f,b&&b(e);var U=e.type,Z=e.props;if("function"==typeof U){var W,$,q,z=s;if(U===t.Fragment){if("tpl"in Z){for(var H=F,N=0;N<Z.tpl.length;N++)if(H+=Z.tpl[N],Z.exprs&&N<Z.exprs.length){var B=Z.exprs[N];if(null==B)continue;"object"!=typeof B||void 0!==B.constructor&&!A(B)?H+=B:H+=j(B,s,l,u,e,h,_)}return H}if("UNSTABLE_comment"in Z)return"\x3c!--"+c(Z.UNSTABLE_comment)+"--\x3e";$=Z.children}else{if(null!=(W=U.contextType)){var I=s[W.__c];z=I?I.props.value:W.__}var O=U.prototype&&"function"==typeof U.prototype.render;if(O)$=E(e,z),q=e.__c;else{e.__c=q=d(e,z);for(var R=0;q.__d&&R++<25;)q.__d=!1,w&&w(e),$=U.call(q,Z,z);q.__d=!0}if(null!=q.getChildContext&&(s=T({},s,q.getChildContext())),O&&t.options.errorBoundaries&&(U.getDerivedStateFromError||q.componentDidCatch)){$=null!=$&&$.type===t.Fragment&&null==$.key&&null==$.props.tpl?$.props.children:$;try{return j($,s,l,u,e,h,_)}catch(n){return U.getDerivedStateFromError&&(q.__s=U.getDerivedStateFromError(n)),q.componentDidCatch&&q.componentDidCatch(n,S),q.__d?($=E(e,s),null!=(q=e.__c).getChildContext&&(s=T({},s,q.getChildContext())),j($=null!=$&&$.type===t.Fragment&&null==$.key&&null==$.props.tpl?$.props.children:$,s,l,u,e,h,_)):F}finally{k&&k(e),e.__=null,x&&x(e)}}}$=null!=$&&$.type===t.Fragment&&null==$.key&&null==$.props.tpl?$.props.children:$;try{var V=j($,s,l,u,e,h,_);return k&&k(e),e.__=null,t.options.unmount&&t.options.unmount(e),V}catch(n){if(!h&&_&&_.onError){var K=_.onError(n,e,function(t){return j(t,s,l,u,e,h,_)});if(void 0!==K)return K;var G=t.options.__e;return G&&G(n,e),F}if(!h)throw n;if(!n||"function"!=typeof n.then)throw n;return n.then(function t(){try{return j($,s,l,u,e,h,_)}catch(n){if(!n||"function"!=typeof n.then)throw n;return n.then(function(){return j($,s,l,u,e,h,_)},t)}})}}var J,Q="<"+U,X=F;for(var Y in Z){var ee=Z[Y];if("function"!=typeof ee||"class"===Y||"className"===Y){switch(Y){case"children":J=ee;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in Z)continue;Y="for";break;case"className":if("class"in Z)continue;Y="class";break;case"defaultChecked":Y="checked";break;case"defaultSelected":Y="selected";break;case"defaultValue":case"value":switch(Y="value",U){case"textarea":J=ee;continue;case"select":u=ee;continue;case"option":u!=ee||"selected"in Z||(Q+=" selected")}break;case"dangerouslySetInnerHTML":X=ee&&ee.__html;continue;case"style":"object"==typeof ee&&(ee=p(ee));break;case"acceptCharset":Y="accept-charset";break;case"httpEquiv":Y="http-equiv";break;default:if(r.test(Y))Y=Y.replace(r,"$1:$2").toLowerCase();else{if(n.test(Y))continue;"-"!==Y[4]&&!a.has(Y)||null==ee?l?i.test(Y)&&(Y="panose1"===Y?"panose-1":Y.replace(/([A-Z])/g,"-$1").toLowerCase()):o.test(Y)&&(Y=Y.toLowerCase()):ee+=F}}null!=ee&&!1!==ee&&(Q=!0===ee||ee===F?Q+" "+Y:Q+" "+Y+'="'+("string"==typeof ee?c(ee):ee+F)+'"')}}if(n.test(U))throw new Error(U+" is not a valid HTML tag name in "+Q+">");if(X||("string"==typeof J?X=c(J):null!=J&&!1!==J&&!0!==J&&(X=j(J,s,"svg"===U||"foreignObject"!==U&&l,u,e,h,_))),k&&k(e),e.__=null,x&&x(e),!X&&D.has(U))return Q+"/>";var te="</"+U+">",ne=Q+">";return A(X)?[ne].concat(X,[te]):"string"!=typeof X?[ne,X,te]:ne+X+te}var D=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),P=L,M=L;e.default=L,e.render=P,e.renderToStaticMarkup=M,e.renderToString=L,e.renderToStringAsync=function(e,n){try{var r=t.options.__s;t.options.__s=!0,b=t.options.__b,k=t.options.diffed,w=t.options.__r,x=t.options.unmount;var o=t.h(t.Fragment,null);return o.__k=[e],Promise.resolve(y(function(){return Promise.resolve(j(e,n||S,!1,void 0,o,!0,void 0)).then(function(e){var t,n=function(){if(A(e)){var n=function(){var e=o.join(F);return t=1,e},r=0,o=e,i=g(function(){return!!o.some(function(e){return e&&"function"==typeof e.then})&&r++<25},void 0,function(){return Promise.resolve(Promise.all(o)).then(function(e){o=e.flat()})});return i&&i.then?i.then(n):n()}}();return n&&n.then?n.then(function(n){return t?n:e}):t?n:e})},function(n,o){if(t.options.__c&&t.options.__c(e,C),t.options.__s=r,C.length=0,n)throw o;return o}))}catch(e){return Promise.reject(e)}}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((e||self).preactRenderToString={},e.preact)}(this,function(e,t){var n=/[\s\n\\/='"\0<>]/,r=/^(xlink|xmlns|xml)([A-Z])/,o=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,i=/^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/,a=new Set(["draggable","spellcheck"]),s=/["&<]/;function c(e){if(0===e.length||!1===s.test(e))return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var l={},u=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),f=/[A-Z]/g;function p(e){var t="";for(var n in e){var r=e[n];if(null!=r&&""!==r){var o="-"==n[0]?n:l[n]||(l[n]=n.replace(f,"-$&").toLowerCase()),i=";";"number"!=typeof r||o.startsWith("--")||u.has(o)||(i="px;"),t=t+o+":"+r+i}}return t||void 0}function h(){this.__d=!0}function d(e,t){return{__v:e,context:t,props:e.props,setState:h,forceUpdate:h,__d:!0,__h:new Array(0)}}function v(e,t,n){if(!e.s){if(n instanceof _){if(!n.s)return void(n.o=v.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(v.bind(null,e,t),v.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}var _=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var r=new e,o=this.s;if(o){var i=1&o?t:n;if(i){try{v(r,1,i(this.v))}catch(e){v(r,2,e)}return r}return this}return this.o=function(e){try{var o=e.v;1&e.s?v(r,1,t?t(o):o):n?v(r,1,n(o)):v(r,2,o)}catch(e){v(r,2,e)}},r},e}();function m(e){return e instanceof _&&1&e.s}function g(e,t,n){for(var r;;){var o=e();if(m(o)&&(o=o.v),!o)return i;if(o.then){r=0;break}var i=n();if(i&&i.then){if(!m(i)){r=1;break}i=i.s}if(t){var a=t();if(a&&a.then&&!m(a)){r=2;break}}}var s=new _,c=v.bind(null,s,2);return(0===r?o.then(u):1===r?i.then(l):a.then(f)).then(void 0,c),s;function l(r){i=r;do{if(t&&(a=t())&&a.then&&!m(a))return void a.then(f).then(void 0,c);if(!(o=e())||m(o)&&!o.v)return void v(s,1,i);if(o.then)return void o.then(u).then(void 0,c);m(i=n())&&(i=i.v)}while(!i||!i.then);i.then(l).then(void 0,c)}function u(e){e?(i=n())&&i.then?i.then(l).then(void 0,c):l(i):v(s,1,i)}function f(){(o=e())?o.then?o.then(u).then(void 0,c):u(o):v(s,1,i)}}function y(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}var b,k,w,x,S={},C=[],A=Array.isArray,T=Object.assign,F="";function L(e,n,r){var o=t.options.__s;t.options.__s=!0,b=t.options.__b,k=t.options.diffed,w=t.options.__r,x=t.options.unmount;var i=t.h(t.Fragment,null);i.__k=[e];try{var a=j(e,n||S,!1,void 0,i,!1,r);return A(a)?a.join(F):a}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{t.options.__c&&t.options.__c(e,C),t.options.__s=o,C.length=0}}function E(e,t){var n,r=e.type,o=!0;return e.__c?(o=!1,(n=e.__c).state=n.__s):n=new r(e.props,t),e.__c=n,n.__v=e,n.props=e.props,n.context=t,n.__d=!0,null==n.state&&(n.state=S),null==n.__s&&(n.__s=n.state),r.getDerivedStateFromProps?n.state=T({},n.state,r.getDerivedStateFromProps(n.props,n.state)):o&&n.componentWillMount?(n.componentWillMount(),n.state=n.__s!==n.state?n.__s:n.state):!o&&n.componentWillUpdate&&n.componentWillUpdate(),w&&w(e),n.render(n.props,n.state,t)}function j(e,s,l,u,f,h,v){if(null==e||!0===e||!1===e||e===F)return F;var _=typeof e;if("object"!=_)return"function"==_?F:"string"==_?c(e):e+F;if(A(e)){var m,g=F;f.__k=e;for(var y=e.length,C=0;C<y;C++){var L=e[C];if(null!=L&&"boolean"!=typeof L){var P,M=j(L,s,l,u,f,h,v);"string"==typeof M?g+=M:(m||(m=new Array(y)),g&&m.push(g),g=F,A(M)?(P=m).push.apply(P,M):m.push(M))}}return m?(g&&m.push(g),m):g}if(void 0!==e.constructor)return F;e.__=f,b&&b(e);var U=e.type,Z=e.props;if("function"==typeof U){var W,$,q,z=s;if(U===t.Fragment){if("tpl"in Z){for(var H=F,N=0;N<Z.tpl.length;N++)if(H+=Z.tpl[N],Z.exprs&&N<Z.exprs.length){var B=Z.exprs[N];if(null==B)continue;"object"!=typeof B||void 0!==B.constructor&&!A(B)?H+=B:H+=j(B,s,l,u,e,h,v)}return H}if("UNSTABLE_comment"in Z)return"\x3c!--"+c(Z.UNSTABLE_comment)+"--\x3e";$=Z.children}else{if(null!=(W=U.contextType)){var I=s[W.__c];z=I?I.props.value:W.__}var O=U.prototype&&"function"==typeof U.prototype.render;if(O)$=E(e,z),q=e.__c;else{e.__c=q=d(e,z);for(var R=0;q.__d&&R++<25;)q.__d=!1,w&&w(e),$=U.call(q,Z,z);q.__d=!0}if(null!=q.getChildContext&&(s=T({},s,q.getChildContext())),O&&t.options.errorBoundaries&&(U.getDerivedStateFromError||q.componentDidCatch)){$=null!=$&&$.type===t.Fragment&&null==$.key&&null==$.props.tpl?$.props.children:$;try{return j($,s,l,u,e,h,v)}catch(n){return U.getDerivedStateFromError&&(q.__s=U.getDerivedStateFromError(n)),q.componentDidCatch&&q.componentDidCatch(n,S),q.__d?($=E(e,s),null!=(q=e.__c).getChildContext&&(s=T({},s,q.getChildContext())),j($=null!=$&&$.type===t.Fragment&&null==$.key&&null==$.props.tpl?$.props.children:$,s,l,u,e,h,v)):F}finally{k&&k(e),x&&x(e)}}}$=null!=$&&$.type===t.Fragment&&null==$.key&&null==$.props.tpl?$.props.children:$;try{var V=j($,s,l,u,e,h,v);return k&&k(e),t.options.unmount&&t.options.unmount(e),V}catch(n){if(!h&&v&&v.onError){var K=v.onError(n,e,function(e,t){return j(e,s,l,u,t,h,v)});if(void 0!==K)return K;var G=t.options.__e;return G&&G(n,e),F}if(!h)throw n;if(!n||"function"!=typeof n.then)throw n;return n.then(function t(){try{return j($,s,l,u,e,h,v)}catch(n){if(!n||"function"!=typeof n.then)throw n;return n.then(function(){return j($,s,l,u,e,h,v)},t)}})}}var J,Q="<"+U,X=F;for(var Y in Z){var ee=Z[Y];if("function"!=typeof ee||"class"===Y||"className"===Y){switch(Y){case"children":J=ee;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in Z)continue;Y="for";break;case"className":if("class"in Z)continue;Y="class";break;case"defaultChecked":Y="checked";break;case"defaultSelected":Y="selected";break;case"defaultValue":case"value":switch(Y="value",U){case"textarea":J=ee;continue;case"select":u=ee;continue;case"option":u!=ee||"selected"in Z||(Q+=" selected")}break;case"dangerouslySetInnerHTML":X=ee&&ee.__html;continue;case"style":"object"==typeof ee&&(ee=p(ee));break;case"acceptCharset":Y="accept-charset";break;case"httpEquiv":Y="http-equiv";break;default:if(r.test(Y))Y=Y.replace(r,"$1:$2").toLowerCase();else{if(n.test(Y))continue;"-"!==Y[4]&&!a.has(Y)||null==ee?l?i.test(Y)&&(Y="panose1"===Y?"panose-1":Y.replace(/([A-Z])/g,"-$1").toLowerCase()):o.test(Y)&&(Y=Y.toLowerCase()):ee+=F}}null!=ee&&!1!==ee&&(Q=!0===ee||ee===F?Q+" "+Y:Q+" "+Y+'="'+("string"==typeof ee?c(ee):ee+F)+'"')}}if(n.test(U))throw new Error(U+" is not a valid HTML tag name in "+Q+">");if(X||("string"==typeof J?X=c(J):null!=J&&!1!==J&&!0!==J&&(X=j(J,s,"svg"===U||"foreignObject"!==U&&l,u,e,h,v))),k&&k(e),x&&x(e),!X&&D.has(U))return Q+"/>";var te="</"+U+">",ne=Q+">";return A(X)?[ne].concat(X,[te]):"string"!=typeof X?[ne,X,te]:ne+X+te}var D=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),P=L,M=L;e.default=L,e.render=P,e.renderToStaticMarkup=M,e.renderToString=L,e.renderToStringAsync=function(e,n){try{var r=t.options.__s;t.options.__s=!0,b=t.options.__b,k=t.options.diffed,w=t.options.__r,x=t.options.unmount;var o=t.h(t.Fragment,null);return o.__k=[e],Promise.resolve(y(function(){return Promise.resolve(j(e,n||S,!1,void 0,o,!0,void 0)).then(function(e){var t,n=function(){if(A(e)){var n=function(){var e=o.join(F);return t=1,e},r=0,o=e,i=g(function(){return!!o.some(function(e){return e&&"function"==typeof e.then})&&r++<25},void 0,function(){return Promise.resolve(Promise.all(o)).then(function(e){o=e.flat()})});return i&&i.then?i.then(n):n()}}();return n&&n.then?n.then(function(n){return t?n:e}):t?n:e})},function(n,o){if(t.options.__c&&t.options.__c(e,C),t.options.__s=r,C.length=0,n)throw o;return o}))}catch(e){return Promise.reject(e)}}});
//# sourceMappingURL=index.umd.js.map

@@ -1,2 +0,2 @@

import { ComponentChildren, VNode } from 'preact';
import { ComponentChildren, ComponentChild, VNode } from 'preact';

@@ -18,3 +18,3 @@ interface Suspended {

vnode: VNode<{ fallback: any }>,
renderChild: (child: ComponentChildren) => string
renderChild: (child: ComponentChildren, parent: ComponentChild) => string
): string | undefined;

@@ -21,0 +21,0 @@ }

@@ -11,10 +11,10 @@ import { VNode } from 'preact';

interface PipeableStream {
abort: () => void;
abort: (reason?: unknown) => void;
pipe: (writable: WritableStream) => void;
}
export function renderToPipeableStream(
vnode: VNode,
export function renderToPipeableStream<P = {}>(
vnode: VNode<P>,
options: RenderToPipeableStreamOptions,
context?: any
): PipeableStream;

@@ -7,5 +7,5 @@ import { VNode } from 'preact';

export function renderToReadableStream(
vnode: VNode,
export function renderToReadableStream<P = {}>(
vnode: VNode<P>,
context?: any
): RenderStream;

@@ -1,2 +0,2 @@

var e=require("preact"),t=/[\s\n\\/='"\0<>]/,r=/^(xlink|xmlns|xml)([A-Z])/,n=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,o=/^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/,i=new Set(["draggable","spellcheck"]),a=/["&<]/;function s(e){if(0===e.length||!1===a.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var c={},l=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),u=/[A-Z]/g;function p(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:c[r]||(c[r]=r.replace(u,"-$&").toLowerCase()),i=";";"number"!=typeof n||o.startsWith("--")||l.has(o)||(i="px;"),t=t+o+":"+n+i}}return t||void 0}function f(){this.__d=!0}function d(e,t){return{__v:e,context:t,props:e.props,setState:f,forceUpdate:f,__d:!0,__h:new Array(0)}}var h,v,_,m,g=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})},y={},b=[],x=Array.isArray,k=Object.assign;function w(t,r,n){var o=e.options.__s;e.options.__s=!0,h=e.options.__b,v=e.options.diffed,_=e.options.__r,m=e.options.unmount;var i=e.h(e.Fragment,null);i.__k=[t];try{var a=S(t,r||y,!1,void 0,i,!1,n);return x(a)?a.join(""):a}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.options.__c&&e.options.__c(t,b),e.options.__s=o,b.length=0}}function C(e,t){var r,n=e.type,o=!0;return e.__c?(o=!1,(r=e.__c).state=r.__s):r=new n(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=y),null==r.__s&&(r.__s=r.state),n.getDerivedStateFromProps?r.state=k({},r.state,n.getDerivedStateFromProps(r.props,r.state)):o&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!o&&r.componentWillUpdate&&r.componentWillUpdate(),_&&_(e),r.render(r.props,r.state,t)}function S(a,c,l,u,f,g,b){if(null==a||!0===a||!1===a||""===a)return"";var w=typeof a;if("object"!=w)return"function"==w?"":"string"==w?s(a):a+"";if(x(a)){var E,L="";f.__k=a;for(var P=a.length,F=0;F<P;F++){var T=a[F];if(null!=T&&"boolean"!=typeof T){var j,W=S(T,c,l,u,f,g,b);"string"==typeof W?L+=W:(E||(E=new Array(P)),L&&E.push(L),L="",x(W)?(j=E).push.apply(j,W):E.push(W))}}return E?(L&&E.push(L),E):L}if(void 0!==a.constructor)return"";a.__=f,h&&h(a);var D=a.type,N=a.props;if("function"==typeof D){var M,U,Z,q=c;if(D===e.Fragment){if("tpl"in N){for(var $="",H=0;H<N.tpl.length;H++)if($+=N.tpl[H],N.exprs&&H<N.exprs.length){var R=N.exprs[H];if(null==R)continue;"object"!=typeof R||void 0!==R.constructor&&!x(R)?$+=R:$+=S(R,c,l,u,a,g,b)}return $}if("UNSTABLE_comment"in N)return"\x3c!--"+s(N.UNSTABLE_comment)+"--\x3e";U=N.children}else{if(null!=(M=D.contextType)){var z=c[M.__c];q=z?z.props.value:M.__}var I=D.prototype&&"function"==typeof D.prototype.render;if(I)U=C(a,q),Z=a.__c;else{a.__c=Z=d(a,q);for(var B=0;Z.__d&&B++<25;)Z.__d=!1,_&&_(a),U=D.call(Z,N,q);Z.__d=!0}if(null!=Z.getChildContext&&(c=k({},c,Z.getChildContext())),I&&e.options.errorBoundaries&&(D.getDerivedStateFromError||Z.componentDidCatch)){U=null!=U&&U.type===e.Fragment&&null==U.key&&null==U.props.tpl?U.props.children:U;try{return S(U,c,l,u,a,g,b)}catch(t){return D.getDerivedStateFromError&&(Z.__s=D.getDerivedStateFromError(t)),Z.componentDidCatch&&Z.componentDidCatch(t,y),Z.__d?(U=C(a,c),null!=(Z=a.__c).getChildContext&&(c=k({},c,Z.getChildContext())),S(U=null!=U&&U.type===e.Fragment&&null==U.key&&null==U.props.tpl?U.props.children:U,c,l,u,a,g,b)):""}finally{v&&v(a),a.__=null,m&&m(a)}}}U=null!=U&&U.type===e.Fragment&&null==U.key&&null==U.props.tpl?U.props.children:U;try{var O=S(U,c,l,u,a,g,b);return v&&v(a),a.__=null,e.options.unmount&&e.options.unmount(a),O}catch(t){if(!g&&b&&b.onError){var V=b.onError(t,a,function(e){return S(e,c,l,u,a,g,b)});if(void 0!==V)return V;var K=e.options.__e;return K&&K(t,a),""}if(!g)throw t;if(!t||"function"!=typeof t.then)throw t;return t.then(function e(){try{return S(U,c,l,u,a,g,b)}catch(t){if(!t||"function"!=typeof t.then)throw t;return t.then(function(){return S(U,c,l,u,a,g,b)},e)}})}}var G,J="<"+D,Q="";for(var X in N){var Y=N[X];if("function"!=typeof Y||"class"===X||"className"===X){switch(X){case"children":G=Y;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in N)continue;X="for";break;case"className":if("class"in N)continue;X="class";break;case"defaultChecked":X="checked";break;case"defaultSelected":X="selected";break;case"defaultValue":case"value":switch(X="value",D){case"textarea":G=Y;continue;case"select":u=Y;continue;case"option":u!=Y||"selected"in N||(J+=" selected")}break;case"dangerouslySetInnerHTML":Q=Y&&Y.__html;continue;case"style":"object"==typeof Y&&(Y=p(Y));break;case"acceptCharset":X="accept-charset";break;case"httpEquiv":X="http-equiv";break;default:if(r.test(X))X=X.replace(r,"$1:$2").toLowerCase();else{if(t.test(X))continue;"-"!==X[4]&&!i.has(X)||null==Y?l?o.test(X)&&(X="panose1"===X?"panose-1":X.replace(/([A-Z])/g,"-$1").toLowerCase()):n.test(X)&&(X=X.toLowerCase()):Y+=""}}null!=Y&&!1!==Y&&(J=!0===Y||""===Y?J+" "+X:J+" "+X+'="'+("string"==typeof Y?s(Y):Y+"")+'"')}}if(t.test(D))throw new Error(D+" is not a valid HTML tag name in "+J+">");if(Q||("string"==typeof G?Q=s(G):null!=G&&!1!==G&&!0!==G&&(Q=S(G,c,"svg"===D||"foreignObject"!==D&&l,u,a,g,b))),v&&v(a),a.__=null,m&&m(a),!Q&&A.has(D))return J+"/>";var ee="</"+D+">",te=J+">";return x(Q)?[te].concat(Q,[ee]):"string"!=typeof Q?[te,Q,ee]:te+Q+ee}var A=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function E(e,t){return'<preact-island hidden data-target="'+e+'">'+t+"</preact-island>"}var L=function e(t){try{var r=function(){if(t.suspended.length>0){var r=[].concat(t.suspended);return Promise.resolve(Promise.all(t.suspended.map(function(e){return e.promise}))).then(function(){return t.suspended=t.suspended.filter(function(e){return!r.includes(e)}),Promise.resolve(e(t)).then(function(){})})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},P=function(e,t){var r=t.context,n=t.onWrite,o=t.abortSignal;try{r=r||{};var i={start:Date.now(),abortSignal:o,onWrite:n,onError:F,suspended:[]},a=w(e,r,i);n(a);var s=i.suspended.length,c=function(){if(s>0)return n("<div hidden>"),n('<script>(function(){class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute("data-target");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data=="preact-island:"+t?r=e:e.data=="/preact-island:"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define("preact-island",e);}())<\/script>'),Promise.resolve(L(i)).then(function(){n("</div>")})}();return Promise.resolve(c&&c.then?c.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};function F(e,t,r){var n=this;if(e&&e.then){for(;t=t.__;){var o=t.__c;if(o&&o.__c)break}if(t){var i=t.__v,a=this.suspended.find(function(e){return e.id===i}),s=new g,c=this.abortSignal;c&&(c.aborted?s.resolve():c.addEventListener("abort",s.resolve));var l=e.then(function(){if(!c||!c.aborted){var e=r(t.props.children);e&&n.onWrite(E(i,e))}},this.onError);this.suspended.push({id:i,vnode:t,promise:Promise.race([l,s.promise])});var u=r(t.props.fallback);return a?"":"\x3c!--preact-island:"+i+"--\x3e"+u+"\x3c!--/preact-island:"+i+"--\x3e"}}}exports.renderToReadableStream=function(e,t){var r=new g,n=new TextEncoder("utf-8"),o=new ReadableStream({start:function(o){P(e,{context:t,onError:function(e){r.reject(e),o.abort(e)},onWrite:function(e){o.enqueue(n.encode(e))}}).then(function(){o.close(),r.resolve()}).catch(function(e){o.error(e),r.reject(e)})}});return o.allReady=r.promise,o};
var e=require("preact"),t=/[\s\n\\/='"\0<>]/,r=/^(xlink|xmlns|xml)([A-Z])/,n=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,o=/^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/,i=new Set(["draggable","spellcheck"]),a=/["&<]/;function s(e){if(0===e.length||!1===a.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var c={},l=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),u=/[A-Z]/g;function p(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:c[r]||(c[r]=r.replace(u,"-$&").toLowerCase()),i=";";"number"!=typeof n||o.startsWith("--")||l.has(o)||(i="px;"),t=t+o+":"+n+i}}return t||void 0}function f(){this.__d=!0}function d(e,t){return{__v:e,context:t,props:e.props,setState:f,forceUpdate:f,__d:!0,__h:new Array(0)}}var h,v,m,_,g=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})},y={},b=[],x=Array.isArray,k=Object.assign;function w(t,r,n){var o=e.options.__s;e.options.__s=!0,h=e.options.__b,v=e.options.diffed,m=e.options.__r,_=e.options.unmount;var i=e.h(e.Fragment,null);i.__k=[t];try{var a=S(t,r||y,!1,void 0,i,!1,n);return x(a)?a.join(""):a}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.options.__c&&e.options.__c(t,b),e.options.__s=o,b.length=0}}function C(e,t){var r,n=e.type,o=!0;return e.__c?(o=!1,(r=e.__c).state=r.__s):r=new n(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=y),null==r.__s&&(r.__s=r.state),n.getDerivedStateFromProps?r.state=k({},r.state,n.getDerivedStateFromProps(r.props,r.state)):o&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!o&&r.componentWillUpdate&&r.componentWillUpdate(),m&&m(e),r.render(r.props,r.state,t)}function S(a,c,l,u,f,g,b){if(null==a||!0===a||!1===a||""===a)return"";var w=typeof a;if("object"!=w)return"function"==w?"":"string"==w?s(a):a+"";if(x(a)){var E,L="";f.__k=a;for(var P=a.length,F=0;F<P;F++){var T=a[F];if(null!=T&&"boolean"!=typeof T){var j,W=S(T,c,l,u,f,g,b);"string"==typeof W?L+=W:(E||(E=new Array(P)),L&&E.push(L),L="",x(W)?(j=E).push.apply(j,W):E.push(W))}}return E?(L&&E.push(L),E):L}if(void 0!==a.constructor)return"";a.__=f,h&&h(a);var D=a.type,N=a.props;if("function"==typeof D){var M,U,Z,q=c;if(D===e.Fragment){if("tpl"in N){for(var $="",H=0;H<N.tpl.length;H++)if($+=N.tpl[H],N.exprs&&H<N.exprs.length){var R=N.exprs[H];if(null==R)continue;"object"!=typeof R||void 0!==R.constructor&&!x(R)?$+=R:$+=S(R,c,l,u,a,g,b)}return $}if("UNSTABLE_comment"in N)return"\x3c!--"+s(N.UNSTABLE_comment)+"--\x3e";U=N.children}else{if(null!=(M=D.contextType)){var z=c[M.__c];q=z?z.props.value:M.__}var I=D.prototype&&"function"==typeof D.prototype.render;if(I)U=C(a,q),Z=a.__c;else{a.__c=Z=d(a,q);for(var B=0;Z.__d&&B++<25;)Z.__d=!1,m&&m(a),U=D.call(Z,N,q);Z.__d=!0}if(null!=Z.getChildContext&&(c=k({},c,Z.getChildContext())),I&&e.options.errorBoundaries&&(D.getDerivedStateFromError||Z.componentDidCatch)){U=null!=U&&U.type===e.Fragment&&null==U.key&&null==U.props.tpl?U.props.children:U;try{return S(U,c,l,u,a,g,b)}catch(t){return D.getDerivedStateFromError&&(Z.__s=D.getDerivedStateFromError(t)),Z.componentDidCatch&&Z.componentDidCatch(t,y),Z.__d?(U=C(a,c),null!=(Z=a.__c).getChildContext&&(c=k({},c,Z.getChildContext())),S(U=null!=U&&U.type===e.Fragment&&null==U.key&&null==U.props.tpl?U.props.children:U,c,l,u,a,g,b)):""}finally{v&&v(a),_&&_(a)}}}U=null!=U&&U.type===e.Fragment&&null==U.key&&null==U.props.tpl?U.props.children:U;try{var O=S(U,c,l,u,a,g,b);return v&&v(a),e.options.unmount&&e.options.unmount(a),O}catch(t){if(!g&&b&&b.onError){var V=b.onError(t,a,function(e,t){return S(e,c,l,u,t,g,b)});if(void 0!==V)return V;var K=e.options.__e;return K&&K(t,a),""}if(!g)throw t;if(!t||"function"!=typeof t.then)throw t;return t.then(function e(){try{return S(U,c,l,u,a,g,b)}catch(t){if(!t||"function"!=typeof t.then)throw t;return t.then(function(){return S(U,c,l,u,a,g,b)},e)}})}}var G,J="<"+D,Q="";for(var X in N){var Y=N[X];if("function"!=typeof Y||"class"===X||"className"===X){switch(X){case"children":G=Y;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in N)continue;X="for";break;case"className":if("class"in N)continue;X="class";break;case"defaultChecked":X="checked";break;case"defaultSelected":X="selected";break;case"defaultValue":case"value":switch(X="value",D){case"textarea":G=Y;continue;case"select":u=Y;continue;case"option":u!=Y||"selected"in N||(J+=" selected")}break;case"dangerouslySetInnerHTML":Q=Y&&Y.__html;continue;case"style":"object"==typeof Y&&(Y=p(Y));break;case"acceptCharset":X="accept-charset";break;case"httpEquiv":X="http-equiv";break;default:if(r.test(X))X=X.replace(r,"$1:$2").toLowerCase();else{if(t.test(X))continue;"-"!==X[4]&&!i.has(X)||null==Y?l?o.test(X)&&(X="panose1"===X?"panose-1":X.replace(/([A-Z])/g,"-$1").toLowerCase()):n.test(X)&&(X=X.toLowerCase()):Y+=""}}null!=Y&&!1!==Y&&(J=!0===Y||""===Y?J+" "+X:J+" "+X+'="'+("string"==typeof Y?s(Y):Y+"")+'"')}}if(t.test(D))throw new Error(D+" is not a valid HTML tag name in "+J+">");if(Q||("string"==typeof G?Q=s(G):null!=G&&!1!==G&&!0!==G&&(Q=S(G,c,"svg"===D||"foreignObject"!==D&&l,u,a,g,b))),v&&v(a),_&&_(a),!Q&&A.has(D))return J+"/>";var ee="</"+D+">",te=J+">";return x(Q)?[te].concat(Q,[ee]):"string"!=typeof Q?[te,Q,ee]:te+Q+ee}var A=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function E(e,t){return'<preact-island hidden data-target="'+e+'">'+t+"</preact-island>"}var L=function e(t){try{var r=function(){if(t.suspended.length>0){var r=[].concat(t.suspended);return Promise.resolve(Promise.all(t.suspended.map(function(e){return e.promise}))).then(function(){return t.suspended=t.suspended.filter(function(e){return!r.includes(e)}),Promise.resolve(e(t)).then(function(){})})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},P=function(e,t){var r=t.context,n=t.onWrite,o=t.abortSignal;try{r=r||{};var i={start:Date.now(),abortSignal:o,onWrite:n,onError:F,suspended:[]},a=w(e,r,i);n(a);var s=i.suspended.length,c=function(){if(s>0)return n("<div hidden>"),n('<script>(function(){class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute("data-target");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data=="preact-island:"+t?r=e:e.data=="/preact-island:"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define("preact-island",e);}())<\/script>'),Promise.resolve(L(i)).then(function(){n("</div>")})}();return Promise.resolve(c&&c.then?c.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};function F(e,t,r){var n=this;if(e&&e.then){for(;t=t.__;){var o=t.__c;if(o&&o.__c)break}if(t){var i=t.__v,a=this.suspended.find(function(e){return e.id===i}),s=new g,c=this.abortSignal;c&&(c.aborted?s.resolve():c.addEventListener("abort",s.resolve));var l=e.then(function(){if(!c||!c.aborted){var e=r(t.props.children,t);e&&n.onWrite(E(i,e))}},this.onError);this.suspended.push({id:i,vnode:t,promise:Promise.race([l,s.promise])});var u=r(t.props.fallback);return a?"":"\x3c!--preact-island:"+i+"--\x3e"+u+"\x3c!--/preact-island:"+i+"--\x3e"}}}exports.renderToReadableStream=function(e,t){var r=new g,n=new TextEncoder("utf-8"),o=new ReadableStream({start:function(o){P(e,{context:t,onError:function(e){r.reject(e),o.abort(e)},onWrite:function(e){o.enqueue(n.encode(e))}}).then(function(){o.close(),r.resolve()}).catch(function(e){o.error(e),r.reject(e)})}});return o.allReady=r.promise,o};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import{options as e,h as t,Fragment as r}from"preact";var n=/[\s\n\\/='"\0<>]/,o=/^(xlink|xmlns|xml)([A-Z])/,a=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,i=/^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/,s=new Set(["draggable","spellcheck"]),c=/["&<]/;function l(e){if(0===e.length||!1===c.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var u={},p=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),f=/[A-Z]/g;function d(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:u[r]||(u[r]=r.replace(f,"-$&").toLowerCase()),a=";";"number"!=typeof n||o.startsWith("--")||p.has(o)||(a="px;"),t=t+o+":"+n+a}}return t||void 0}function h(){this.__d=!0}function v(e,t){return{__v:e,context:t,props:e.props,setState:h,forceUpdate:h,__d:!0,__h:new Array(0)}}var _,m,g,y,b=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})},x={},k=[],w=Array.isArray,C=Object.assign;function S(n,o,a){var i=e.__s;e.__s=!0,_=e.__b,m=e.diffed,g=e.__r,y=e.unmount;var s=t(r,null);s.__k=[n];try{var c=E(n,o||x,!1,void 0,s,!1,a);return w(c)?c.join(""):c}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.__c&&e.__c(n,k),e.__s=i,k.length=0}}function A(e,t){var r,n=e.type,o=!0;return e.__c?(o=!1,(r=e.__c).state=r.__s):r=new n(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=x),null==r.__s&&(r.__s=r.state),n.getDerivedStateFromProps?r.state=C({},r.state,n.getDerivedStateFromProps(r.props,r.state)):o&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!o&&r.componentWillUpdate&&r.componentWillUpdate(),g&&g(e),r.render(r.props,r.state,t)}function E(t,c,u,p,f,h,b){if(null==t||!0===t||!1===t||""===t)return"";var k=typeof t;if("object"!=k)return"function"==k?"":"string"==k?l(t):t+"";if(w(t)){var S,P="";f.__k=t;for(var j=t.length,T=0;T<j;T++){var W=t[T];if(null!=W&&"boolean"!=typeof W){var D,N=E(W,c,u,p,f,h,b);"string"==typeof N?P+=N:(S||(S=new Array(j)),P&&S.push(P),P="",w(N)?(D=S).push.apply(D,N):S.push(N))}}return S?(P&&S.push(P),S):P}if(void 0!==t.constructor)return"";t.__=f,_&&_(t);var F=t.type,M=t.props;if("function"==typeof F){var U,Z,$,q=c;if(F===r){if("tpl"in M){for(var H="",z=0;z<M.tpl.length;z++)if(H+=M.tpl[z],M.exprs&&z<M.exprs.length){var I=M.exprs[z];if(null==I)continue;"object"!=typeof I||void 0!==I.constructor&&!w(I)?H+=I:H+=E(I,c,u,p,t,h,b)}return H}if("UNSTABLE_comment"in M)return"\x3c!--"+l(M.UNSTABLE_comment)+"--\x3e";Z=M.children}else{if(null!=(U=F.contextType)){var R=c[U.__c];q=R?R.props.value:U.__}var B=F.prototype&&"function"==typeof F.prototype.render;if(B)Z=A(t,q),$=t.__c;else{t.__c=$=v(t,q);for(var O=0;$.__d&&O++<25;)$.__d=!1,g&&g(t),Z=F.call($,M,q);$.__d=!0}if(null!=$.getChildContext&&(c=C({},c,$.getChildContext())),B&&e.errorBoundaries&&(F.getDerivedStateFromError||$.componentDidCatch)){Z=null!=Z&&Z.type===r&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z;try{return E(Z,c,u,p,t,h,b)}catch(e){return F.getDerivedStateFromError&&($.__s=F.getDerivedStateFromError(e)),$.componentDidCatch&&$.componentDidCatch(e,x),$.__d?(Z=A(t,c),null!=($=t.__c).getChildContext&&(c=C({},c,$.getChildContext())),E(Z=null!=Z&&Z.type===r&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z,c,u,p,t,h,b)):""}finally{m&&m(t),t.__=null,y&&y(t)}}}Z=null!=Z&&Z.type===r&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z;try{var V=E(Z,c,u,p,t,h,b);return m&&m(t),t.__=null,e.unmount&&e.unmount(t),V}catch(r){if(!h&&b&&b.onError){var K=b.onError(r,t,function(e){return E(e,c,u,p,t,h,b)});if(void 0!==K)return K;var G=e.__e;return G&&G(r,t),""}if(!h)throw r;if(!r||"function"!=typeof r.then)throw r;return r.then(function e(){try{return E(Z,c,u,p,t,h,b)}catch(r){if(!r||"function"!=typeof r.then)throw r;return r.then(function(){return E(Z,c,u,p,t,h,b)},e)}})}}var J,Q="<"+F,X="";for(var Y in M){var ee=M[Y];if("function"!=typeof ee||"class"===Y||"className"===Y){switch(Y){case"children":J=ee;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in M)continue;Y="for";break;case"className":if("class"in M)continue;Y="class";break;case"defaultChecked":Y="checked";break;case"defaultSelected":Y="selected";break;case"defaultValue":case"value":switch(Y="value",F){case"textarea":J=ee;continue;case"select":p=ee;continue;case"option":p!=ee||"selected"in M||(Q+=" selected")}break;case"dangerouslySetInnerHTML":X=ee&&ee.__html;continue;case"style":"object"==typeof ee&&(ee=d(ee));break;case"acceptCharset":Y="accept-charset";break;case"httpEquiv":Y="http-equiv";break;default:if(o.test(Y))Y=Y.replace(o,"$1:$2").toLowerCase();else{if(n.test(Y))continue;"-"!==Y[4]&&!s.has(Y)||null==ee?u?i.test(Y)&&(Y="panose1"===Y?"panose-1":Y.replace(/([A-Z])/g,"-$1").toLowerCase()):a.test(Y)&&(Y=Y.toLowerCase()):ee+=""}}null!=ee&&!1!==ee&&(Q=!0===ee||""===ee?Q+" "+Y:Q+" "+Y+'="'+("string"==typeof ee?l(ee):ee+"")+'"')}}if(n.test(F))throw new Error(F+" is not a valid HTML tag name in "+Q+">");if(X||("string"==typeof J?X=l(J):null!=J&&!1!==J&&!0!==J&&(X=E(J,c,"svg"===F||"foreignObject"!==F&&u,p,t,h,b))),m&&m(t),t.__=null,y&&y(t),!X&&L.has(F))return Q+"/>";var te="</"+F+">",re=Q+">";return w(X)?[re].concat(X,[te]):"string"!=typeof X?[re,X,te]:re+X+te}var L=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function P(e,t){return'<preact-island hidden data-target="'+e+'">'+t+"</preact-island>"}var j=function e(t){try{var r=function(){if(t.suspended.length>0){var r=[].concat(t.suspended);return Promise.resolve(Promise.all(t.suspended.map(function(e){return e.promise}))).then(function(){return t.suspended=t.suspended.filter(function(e){return!r.includes(e)}),Promise.resolve(e(t)).then(function(){})})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},T=function(e,t){var r=t.context,n=t.onWrite,o=t.abortSignal;try{r=r||{};var a={start:Date.now(),abortSignal:o,onWrite:n,onError:W,suspended:[]},i=S(e,r,a);n(i);var s=a.suspended.length,c=function(){if(s>0)return n("<div hidden>"),n('<script>(function(){class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute("data-target");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data=="preact-island:"+t?r=e:e.data=="/preact-island:"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define("preact-island",e);}())<\/script>'),Promise.resolve(j(a)).then(function(){n("</div>")})}();return Promise.resolve(c&&c.then?c.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};function W(e,t,r){var n=this;if(e&&e.then){for(;t=t.__;){var o=t.__c;if(o&&o.__c)break}if(t){var a=t.__v,i=this.suspended.find(function(e){return e.id===a}),s=new b,c=this.abortSignal;c&&(c.aborted?s.resolve():c.addEventListener("abort",s.resolve));var l=e.then(function(){if(!c||!c.aborted){var e=r(t.props.children);e&&n.onWrite(P(a,e))}},this.onError);this.suspended.push({id:a,vnode:t,promise:Promise.race([l,s.promise])});var u=r(t.props.fallback);return i?"":"\x3c!--preact-island:"+a+"--\x3e"+u+"\x3c!--/preact-island:"+a+"--\x3e"}}}function D(e,t){var r=new b,n=new TextEncoder("utf-8"),o=new ReadableStream({start:function(o){T(e,{context:t,onError:function(e){r.reject(e),o.abort(e)},onWrite:function(e){o.enqueue(n.encode(e))}}).then(function(){o.close(),r.resolve()}).catch(function(e){o.error(e),r.reject(e)})}});return o.allReady=r.promise,o}export{D as renderToReadableStream};
import{options as e,h as t,Fragment as r}from"preact";var n=/[\s\n\\/='"\0<>]/,o=/^(xlink|xmlns|xml)([A-Z])/,a=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,i=/^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/,s=new Set(["draggable","spellcheck"]),c=/["&<]/;function l(e){if(0===e.length||!1===c.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var u={},p=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),f=/[A-Z]/g;function d(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:u[r]||(u[r]=r.replace(f,"-$&").toLowerCase()),a=";";"number"!=typeof n||o.startsWith("--")||p.has(o)||(a="px;"),t=t+o+":"+n+a}}return t||void 0}function h(){this.__d=!0}function v(e,t){return{__v:e,context:t,props:e.props,setState:h,forceUpdate:h,__d:!0,__h:new Array(0)}}var _,m,g,y,b=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})},x={},k=[],w=Array.isArray,C=Object.assign;function S(n,o,a){var i=e.__s;e.__s=!0,_=e.__b,m=e.diffed,g=e.__r,y=e.unmount;var s=t(r,null);s.__k=[n];try{var c=E(n,o||x,!1,void 0,s,!1,a);return w(c)?c.join(""):c}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{e.__c&&e.__c(n,k),e.__s=i,k.length=0}}function A(e,t){var r,n=e.type,o=!0;return e.__c?(o=!1,(r=e.__c).state=r.__s):r=new n(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=x),null==r.__s&&(r.__s=r.state),n.getDerivedStateFromProps?r.state=C({},r.state,n.getDerivedStateFromProps(r.props,r.state)):o&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!o&&r.componentWillUpdate&&r.componentWillUpdate(),g&&g(e),r.render(r.props,r.state,t)}function E(t,c,u,p,f,h,b){if(null==t||!0===t||!1===t||""===t)return"";var k=typeof t;if("object"!=k)return"function"==k?"":"string"==k?l(t):t+"";if(w(t)){var S,P="";f.__k=t;for(var j=t.length,T=0;T<j;T++){var W=t[T];if(null!=W&&"boolean"!=typeof W){var D,N=E(W,c,u,p,f,h,b);"string"==typeof N?P+=N:(S||(S=new Array(j)),P&&S.push(P),P="",w(N)?(D=S).push.apply(D,N):S.push(N))}}return S?(P&&S.push(P),S):P}if(void 0!==t.constructor)return"";t.__=f,_&&_(t);var F=t.type,M=t.props;if("function"==typeof F){var U,Z,$,q=c;if(F===r){if("tpl"in M){for(var H="",z=0;z<M.tpl.length;z++)if(H+=M.tpl[z],M.exprs&&z<M.exprs.length){var I=M.exprs[z];if(null==I)continue;"object"!=typeof I||void 0!==I.constructor&&!w(I)?H+=I:H+=E(I,c,u,p,t,h,b)}return H}if("UNSTABLE_comment"in M)return"\x3c!--"+l(M.UNSTABLE_comment)+"--\x3e";Z=M.children}else{if(null!=(U=F.contextType)){var R=c[U.__c];q=R?R.props.value:U.__}var B=F.prototype&&"function"==typeof F.prototype.render;if(B)Z=A(t,q),$=t.__c;else{t.__c=$=v(t,q);for(var O=0;$.__d&&O++<25;)$.__d=!1,g&&g(t),Z=F.call($,M,q);$.__d=!0}if(null!=$.getChildContext&&(c=C({},c,$.getChildContext())),B&&e.errorBoundaries&&(F.getDerivedStateFromError||$.componentDidCatch)){Z=null!=Z&&Z.type===r&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z;try{return E(Z,c,u,p,t,h,b)}catch(e){return F.getDerivedStateFromError&&($.__s=F.getDerivedStateFromError(e)),$.componentDidCatch&&$.componentDidCatch(e,x),$.__d?(Z=A(t,c),null!=($=t.__c).getChildContext&&(c=C({},c,$.getChildContext())),E(Z=null!=Z&&Z.type===r&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z,c,u,p,t,h,b)):""}finally{m&&m(t),y&&y(t)}}}Z=null!=Z&&Z.type===r&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z;try{var V=E(Z,c,u,p,t,h,b);return m&&m(t),e.unmount&&e.unmount(t),V}catch(r){if(!h&&b&&b.onError){var K=b.onError(r,t,function(e,t){return E(e,c,u,p,t,h,b)});if(void 0!==K)return K;var G=e.__e;return G&&G(r,t),""}if(!h)throw r;if(!r||"function"!=typeof r.then)throw r;return r.then(function e(){try{return E(Z,c,u,p,t,h,b)}catch(r){if(!r||"function"!=typeof r.then)throw r;return r.then(function(){return E(Z,c,u,p,t,h,b)},e)}})}}var J,Q="<"+F,X="";for(var Y in M){var ee=M[Y];if("function"!=typeof ee||"class"===Y||"className"===Y){switch(Y){case"children":J=ee;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in M)continue;Y="for";break;case"className":if("class"in M)continue;Y="class";break;case"defaultChecked":Y="checked";break;case"defaultSelected":Y="selected";break;case"defaultValue":case"value":switch(Y="value",F){case"textarea":J=ee;continue;case"select":p=ee;continue;case"option":p!=ee||"selected"in M||(Q+=" selected")}break;case"dangerouslySetInnerHTML":X=ee&&ee.__html;continue;case"style":"object"==typeof ee&&(ee=d(ee));break;case"acceptCharset":Y="accept-charset";break;case"httpEquiv":Y="http-equiv";break;default:if(o.test(Y))Y=Y.replace(o,"$1:$2").toLowerCase();else{if(n.test(Y))continue;"-"!==Y[4]&&!s.has(Y)||null==ee?u?i.test(Y)&&(Y="panose1"===Y?"panose-1":Y.replace(/([A-Z])/g,"-$1").toLowerCase()):a.test(Y)&&(Y=Y.toLowerCase()):ee+=""}}null!=ee&&!1!==ee&&(Q=!0===ee||""===ee?Q+" "+Y:Q+" "+Y+'="'+("string"==typeof ee?l(ee):ee+"")+'"')}}if(n.test(F))throw new Error(F+" is not a valid HTML tag name in "+Q+">");if(X||("string"==typeof J?X=l(J):null!=J&&!1!==J&&!0!==J&&(X=E(J,c,"svg"===F||"foreignObject"!==F&&u,p,t,h,b))),m&&m(t),y&&y(t),!X&&L.has(F))return Q+"/>";var te="</"+F+">",re=Q+">";return w(X)?[re].concat(X,[te]):"string"!=typeof X?[re,X,te]:re+X+te}var L=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function P(e,t){return'<preact-island hidden data-target="'+e+'">'+t+"</preact-island>"}var j=function e(t){try{var r=function(){if(t.suspended.length>0){var r=[].concat(t.suspended);return Promise.resolve(Promise.all(t.suspended.map(function(e){return e.promise}))).then(function(){return t.suspended=t.suspended.filter(function(e){return!r.includes(e)}),Promise.resolve(e(t)).then(function(){})})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},T=function(e,t){var r=t.context,n=t.onWrite,o=t.abortSignal;try{r=r||{};var a={start:Date.now(),abortSignal:o,onWrite:n,onError:W,suspended:[]},i=S(e,r,a);n(i);var s=a.suspended.length,c=function(){if(s>0)return n("<div hidden>"),n('<script>(function(){class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute("data-target");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data=="preact-island:"+t?r=e:e.data=="/preact-island:"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define("preact-island",e);}())<\/script>'),Promise.resolve(j(a)).then(function(){n("</div>")})}();return Promise.resolve(c&&c.then?c.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};function W(e,t,r){var n=this;if(e&&e.then){for(;t=t.__;){var o=t.__c;if(o&&o.__c)break}if(t){var a=t.__v,i=this.suspended.find(function(e){return e.id===a}),s=new b,c=this.abortSignal;c&&(c.aborted?s.resolve():c.addEventListener("abort",s.resolve));var l=e.then(function(){if(!c||!c.aborted){var e=r(t.props.children,t);e&&n.onWrite(P(a,e))}},this.onError);this.suspended.push({id:a,vnode:t,promise:Promise.race([l,s.promise])});var u=r(t.props.fallback);return i?"":"\x3c!--preact-island:"+a+"--\x3e"+u+"\x3c!--/preact-island:"+a+"--\x3e"}}}function D(e,t){var r=new b,n=new TextEncoder("utf-8"),o=new ReadableStream({start:function(o){T(e,{context:t,onError:function(e){r.reject(e),o.abort(e)},onWrite:function(e){o.enqueue(n.encode(e))}}).then(function(){o.close(),r.resolve()}).catch(function(e){o.error(e),r.reject(e)})}});return o.allReady=r.promise,o}export{D as renderToReadableStream};
//# sourceMappingURL=index.module.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((e||self).preactRenderToString={},e.preact)}(this,function(e,t){var r=/[\s\n\\/='"\0<>]/,n=/^(xlink|xmlns|xml)([A-Z])/,o=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,i=/^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/,a=new Set(["draggable","spellcheck"]),s=/["&<]/;function c(e){if(0===e.length||!1===s.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var l={},u=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),p=/[A-Z]/g;function f(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:l[r]||(l[r]=r.replace(p,"-$&").toLowerCase()),i=";";"number"!=typeof n||o.startsWith("--")||u.has(o)||(i="px;"),t=t+o+":"+n+i}}return t||void 0}function d(){this.__d=!0}function h(e,t){return{__v:e,context:t,props:e.props,setState:d,forceUpdate:d,__d:!0,__h:new Array(0)}}var v,_,m,g,y=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})},b={},x=[],k=Array.isArray,w=Object.assign,C="";function S(e,r,n){var o=t.options.__s;t.options.__s=!0,v=t.options.__b,_=t.options.diffed,m=t.options.__r,g=t.options.unmount;var i=t.h(t.Fragment,null);i.__k=[e];try{var a=E(e,r||b,!1,void 0,i,!1,n);return k(a)?a.join(C):a}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{t.options.__c&&t.options.__c(e,x),t.options.__s=o,x.length=0}}function A(e,t){var r,n=e.type,o=!0;return e.__c?(o=!1,(r=e.__c).state=r.__s):r=new n(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=b),null==r.__s&&(r.__s=r.state),n.getDerivedStateFromProps?r.state=w({},r.state,n.getDerivedStateFromProps(r.props,r.state)):o&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!o&&r.componentWillUpdate&&r.componentWillUpdate(),m&&m(e),r.render(r.props,r.state,t)}function E(e,s,l,u,p,d,y){if(null==e||!0===e||!1===e||e===C)return C;var x=typeof e;if("object"!=x)return"function"==x?C:"string"==x?c(e):e+C;if(k(e)){var S,L=C;p.__k=e;for(var P=e.length,j=0;j<P;j++){var F=e[j];if(null!=F&&"boolean"!=typeof F){var W,D=E(F,s,l,u,p,d,y);"string"==typeof D?L+=D:(S||(S=new Array(P)),L&&S.push(L),L=C,k(D)?(W=S).push.apply(W,D):S.push(D))}}return S?(L&&S.push(L),S):L}if(void 0!==e.constructor)return C;e.__=p,v&&v(e);var N=e.type,M=e.props;if("function"==typeof N){var U,Z,q,R=s;if(N===t.Fragment){if("tpl"in M){for(var $=C,H=0;H<M.tpl.length;H++)if($+=M.tpl[H],M.exprs&&H<M.exprs.length){var z=M.exprs[H];if(null==z)continue;"object"!=typeof z||void 0!==z.constructor&&!k(z)?$+=z:$+=E(z,s,l,u,e,d,y)}return $}if("UNSTABLE_comment"in M)return"\x3c!--"+c(M.UNSTABLE_comment)+"--\x3e";Z=M.children}else{if(null!=(U=N.contextType)){var I=s[U.__c];R=I?I.props.value:U.__}var B=N.prototype&&"function"==typeof N.prototype.render;if(B)Z=A(e,R),q=e.__c;else{e.__c=q=h(e,R);for(var O=0;q.__d&&O++<25;)q.__d=!1,m&&m(e),Z=N.call(q,M,R);q.__d=!0}if(null!=q.getChildContext&&(s=w({},s,q.getChildContext())),B&&t.options.errorBoundaries&&(N.getDerivedStateFromError||q.componentDidCatch)){Z=null!=Z&&Z.type===t.Fragment&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z;try{return E(Z,s,l,u,e,d,y)}catch(r){return N.getDerivedStateFromError&&(q.__s=N.getDerivedStateFromError(r)),q.componentDidCatch&&q.componentDidCatch(r,b),q.__d?(Z=A(e,s),null!=(q=e.__c).getChildContext&&(s=w({},s,q.getChildContext())),E(Z=null!=Z&&Z.type===t.Fragment&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z,s,l,u,e,d,y)):C}finally{_&&_(e),e.__=null,g&&g(e)}}}Z=null!=Z&&Z.type===t.Fragment&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z;try{var V=E(Z,s,l,u,e,d,y);return _&&_(e),e.__=null,t.options.unmount&&t.options.unmount(e),V}catch(r){if(!d&&y&&y.onError){var K=y.onError(r,e,function(t){return E(t,s,l,u,e,d,y)});if(void 0!==K)return K;var G=t.options.__e;return G&&G(r,e),C}if(!d)throw r;if(!r||"function"!=typeof r.then)throw r;return r.then(function t(){try{return E(Z,s,l,u,e,d,y)}catch(r){if(!r||"function"!=typeof r.then)throw r;return r.then(function(){return E(Z,s,l,u,e,d,y)},t)}})}}var J,Q="<"+N,X=C;for(var Y in M){var ee=M[Y];if("function"!=typeof ee||"class"===Y||"className"===Y){switch(Y){case"children":J=ee;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in M)continue;Y="for";break;case"className":if("class"in M)continue;Y="class";break;case"defaultChecked":Y="checked";break;case"defaultSelected":Y="selected";break;case"defaultValue":case"value":switch(Y="value",N){case"textarea":J=ee;continue;case"select":u=ee;continue;case"option":u!=ee||"selected"in M||(Q+=" selected")}break;case"dangerouslySetInnerHTML":X=ee&&ee.__html;continue;case"style":"object"==typeof ee&&(ee=f(ee));break;case"acceptCharset":Y="accept-charset";break;case"httpEquiv":Y="http-equiv";break;default:if(n.test(Y))Y=Y.replace(n,"$1:$2").toLowerCase();else{if(r.test(Y))continue;"-"!==Y[4]&&!a.has(Y)||null==ee?l?i.test(Y)&&(Y="panose1"===Y?"panose-1":Y.replace(/([A-Z])/g,"-$1").toLowerCase()):o.test(Y)&&(Y=Y.toLowerCase()):ee+=C}}null!=ee&&!1!==ee&&(Q=!0===ee||ee===C?Q+" "+Y:Q+" "+Y+'="'+("string"==typeof ee?c(ee):ee+C)+'"')}}if(r.test(N))throw new Error(N+" is not a valid HTML tag name in "+Q+">");if(X||("string"==typeof J?X=c(J):null!=J&&!1!==J&&!0!==J&&(X=E(J,s,"svg"===N||"foreignObject"!==N&&l,u,e,d,y))),_&&_(e),e.__=null,g&&g(e),!X&&T.has(N))return Q+"/>";var te="</"+N+">",re=Q+">";return k(X)?[re].concat(X,[te]):"string"!=typeof X?[re,X,te]:re+X+te}var T=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function L(e,t){return'<preact-island hidden data-target="'+e+'">'+t+"</preact-island>"}var P=function e(t){try{var r=function(){if(t.suspended.length>0){var r=[].concat(t.suspended);return Promise.resolve(Promise.all(t.suspended.map(function(e){return e.promise}))).then(function(){return t.suspended=t.suspended.filter(function(e){return!r.includes(e)}),Promise.resolve(e(t)).then(function(){})})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},j=function(e,t){var r=t.context,n=t.onWrite,o=t.abortSignal;try{r=r||{};var i={start:Date.now(),abortSignal:o,onWrite:n,onError:F,suspended:[]},a=S(e,r,i);n(a);var s=i.suspended.length,c=function(){if(s>0)return n("<div hidden>"),n('<script>(function(){class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute("data-target");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data=="preact-island:"+t?r=e:e.data=="/preact-island:"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define("preact-island",e);}())<\/script>'),Promise.resolve(P(i)).then(function(){n("</div>")})}();return Promise.resolve(c&&c.then?c.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};function F(e,t,r){var n=this;if(e&&e.then){for(;t=t.__;){var o=t.__c;if(o&&o.__c)break}if(t){var i=t.__v,a=this.suspended.find(function(e){return e.id===i}),s=new y,c=this.abortSignal;c&&(c.aborted?s.resolve():c.addEventListener("abort",s.resolve));var l=e.then(function(){if(!c||!c.aborted){var e=r(t.props.children);e&&n.onWrite(L(i,e))}},this.onError);this.suspended.push({id:i,vnode:t,promise:Promise.race([l,s.promise])});var u=r(t.props.fallback);return a?"":"\x3c!--preact-island:"+i+"--\x3e"+u+"\x3c!--/preact-island:"+i+"--\x3e"}}}e.renderToReadableStream=function(e,t){var r=new y,n=new TextEncoder("utf-8"),o=new ReadableStream({start:function(o){j(e,{context:t,onError:function(e){r.reject(e),o.abort(e)},onWrite:function(e){o.enqueue(n.encode(e))}}).then(function(){o.close(),r.resolve()}).catch(function(e){o.error(e),r.reject(e)})}});return o.allReady=r.promise,o}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((e||self).preactRenderToString={},e.preact)}(this,function(e,t){var r=/[\s\n\\/='"\0<>]/,n=/^(xlink|xmlns|xml)([A-Z])/,o=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,i=/^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/,a=new Set(["draggable","spellcheck"]),s=/["&<]/;function c(e){if(0===e.length||!1===s.test(e))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1}return r!==t&&(n+=e.slice(t,r)),n}var l={},u=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),p=/[A-Z]/g;function f(e){var t="";for(var r in e){var n=e[r];if(null!=n&&""!==n){var o="-"==r[0]?r:l[r]||(l[r]=r.replace(p,"-$&").toLowerCase()),i=";";"number"!=typeof n||o.startsWith("--")||u.has(o)||(i="px;"),t=t+o+":"+n+i}}return t||void 0}function d(){this.__d=!0}function h(e,t){return{__v:e,context:t,props:e.props,setState:d,forceUpdate:d,__d:!0,__h:new Array(0)}}var v,m,_,g,y=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})},b={},x=[],k=Array.isArray,w=Object.assign,C="";function S(e,r,n){var o=t.options.__s;t.options.__s=!0,v=t.options.__b,m=t.options.diffed,_=t.options.__r,g=t.options.unmount;var i=t.h(t.Fragment,null);i.__k=[e];try{var a=E(e,r||b,!1,void 0,i,!1,n);return k(a)?a.join(C):a}catch(e){if(e.then)throw new Error('Use "renderToStringAsync" for suspenseful rendering.');throw e}finally{t.options.__c&&t.options.__c(e,x),t.options.__s=o,x.length=0}}function A(e,t){var r,n=e.type,o=!0;return e.__c?(o=!1,(r=e.__c).state=r.__s):r=new n(e.props,t),e.__c=r,r.__v=e,r.props=e.props,r.context=t,r.__d=!0,null==r.state&&(r.state=b),null==r.__s&&(r.__s=r.state),n.getDerivedStateFromProps?r.state=w({},r.state,n.getDerivedStateFromProps(r.props,r.state)):o&&r.componentWillMount?(r.componentWillMount(),r.state=r.__s!==r.state?r.__s:r.state):!o&&r.componentWillUpdate&&r.componentWillUpdate(),_&&_(e),r.render(r.props,r.state,t)}function E(e,s,l,u,p,d,y){if(null==e||!0===e||!1===e||e===C)return C;var x=typeof e;if("object"!=x)return"function"==x?C:"string"==x?c(e):e+C;if(k(e)){var S,L=C;p.__k=e;for(var P=e.length,j=0;j<P;j++){var F=e[j];if(null!=F&&"boolean"!=typeof F){var W,D=E(F,s,l,u,p,d,y);"string"==typeof D?L+=D:(S||(S=new Array(P)),L&&S.push(L),L=C,k(D)?(W=S).push.apply(W,D):S.push(D))}}return S?(L&&S.push(L),S):L}if(void 0!==e.constructor)return C;e.__=p,v&&v(e);var N=e.type,M=e.props;if("function"==typeof N){var U,Z,q,R=s;if(N===t.Fragment){if("tpl"in M){for(var $=C,H=0;H<M.tpl.length;H++)if($+=M.tpl[H],M.exprs&&H<M.exprs.length){var z=M.exprs[H];if(null==z)continue;"object"!=typeof z||void 0!==z.constructor&&!k(z)?$+=z:$+=E(z,s,l,u,e,d,y)}return $}if("UNSTABLE_comment"in M)return"\x3c!--"+c(M.UNSTABLE_comment)+"--\x3e";Z=M.children}else{if(null!=(U=N.contextType)){var I=s[U.__c];R=I?I.props.value:U.__}var B=N.prototype&&"function"==typeof N.prototype.render;if(B)Z=A(e,R),q=e.__c;else{e.__c=q=h(e,R);for(var O=0;q.__d&&O++<25;)q.__d=!1,_&&_(e),Z=N.call(q,M,R);q.__d=!0}if(null!=q.getChildContext&&(s=w({},s,q.getChildContext())),B&&t.options.errorBoundaries&&(N.getDerivedStateFromError||q.componentDidCatch)){Z=null!=Z&&Z.type===t.Fragment&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z;try{return E(Z,s,l,u,e,d,y)}catch(r){return N.getDerivedStateFromError&&(q.__s=N.getDerivedStateFromError(r)),q.componentDidCatch&&q.componentDidCatch(r,b),q.__d?(Z=A(e,s),null!=(q=e.__c).getChildContext&&(s=w({},s,q.getChildContext())),E(Z=null!=Z&&Z.type===t.Fragment&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z,s,l,u,e,d,y)):C}finally{m&&m(e),g&&g(e)}}}Z=null!=Z&&Z.type===t.Fragment&&null==Z.key&&null==Z.props.tpl?Z.props.children:Z;try{var V=E(Z,s,l,u,e,d,y);return m&&m(e),t.options.unmount&&t.options.unmount(e),V}catch(r){if(!d&&y&&y.onError){var K=y.onError(r,e,function(e,t){return E(e,s,l,u,t,d,y)});if(void 0!==K)return K;var G=t.options.__e;return G&&G(r,e),C}if(!d)throw r;if(!r||"function"!=typeof r.then)throw r;return r.then(function t(){try{return E(Z,s,l,u,e,d,y)}catch(r){if(!r||"function"!=typeof r.then)throw r;return r.then(function(){return E(Z,s,l,u,e,d,y)},t)}})}}var J,Q="<"+N,X=C;for(var Y in M){var ee=M[Y];if("function"!=typeof ee||"class"===Y||"className"===Y){switch(Y){case"children":J=ee;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in M)continue;Y="for";break;case"className":if("class"in M)continue;Y="class";break;case"defaultChecked":Y="checked";break;case"defaultSelected":Y="selected";break;case"defaultValue":case"value":switch(Y="value",N){case"textarea":J=ee;continue;case"select":u=ee;continue;case"option":u!=ee||"selected"in M||(Q+=" selected")}break;case"dangerouslySetInnerHTML":X=ee&&ee.__html;continue;case"style":"object"==typeof ee&&(ee=f(ee));break;case"acceptCharset":Y="accept-charset";break;case"httpEquiv":Y="http-equiv";break;default:if(n.test(Y))Y=Y.replace(n,"$1:$2").toLowerCase();else{if(r.test(Y))continue;"-"!==Y[4]&&!a.has(Y)||null==ee?l?i.test(Y)&&(Y="panose1"===Y?"panose-1":Y.replace(/([A-Z])/g,"-$1").toLowerCase()):o.test(Y)&&(Y=Y.toLowerCase()):ee+=C}}null!=ee&&!1!==ee&&(Q=!0===ee||ee===C?Q+" "+Y:Q+" "+Y+'="'+("string"==typeof ee?c(ee):ee+C)+'"')}}if(r.test(N))throw new Error(N+" is not a valid HTML tag name in "+Q+">");if(X||("string"==typeof J?X=c(J):null!=J&&!1!==J&&!0!==J&&(X=E(J,s,"svg"===N||"foreignObject"!==N&&l,u,e,d,y))),m&&m(e),g&&g(e),!X&&T.has(N))return Q+"/>";var te="</"+N+">",re=Q+">";return k(X)?[re].concat(X,[te]):"string"!=typeof X?[re,X,te]:re+X+te}var T=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function L(e,t){return'<preact-island hidden data-target="'+e+'">'+t+"</preact-island>"}var P=function e(t){try{var r=function(){if(t.suspended.length>0){var r=[].concat(t.suspended);return Promise.resolve(Promise.all(t.suspended.map(function(e){return e.promise}))).then(function(){return t.suspended=t.suspended.filter(function(e){return!r.includes(e)}),Promise.resolve(e(t)).then(function(){})})}}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},j=function(e,t){var r=t.context,n=t.onWrite,o=t.abortSignal;try{r=r||{};var i={start:Date.now(),abortSignal:o,onWrite:n,onError:F,suspended:[]},a=S(e,r,i);n(a);var s=i.suspended.length,c=function(){if(s>0)return n("<div hidden>"),n('<script>(function(){class e extends HTMLElement{connectedCallback(){var e=this;if(!e.isConnected)return;let t=this.getAttribute("data-target");if(t){for(var r,a,i=document.createNodeIterator(document,128);i.nextNode();){let e=i.referenceNode;if(e.data=="preact-island:"+t?r=e:e.data=="/preact-island:"+t&&(a=e),r&&a)break}r&&a&&requestAnimationFrame((()=>{for(var t=a.previousSibling;t!=r&&t&&t!=r;)a.parentNode.removeChild(t),t=a.previousSibling;for(i=r;e.firstChild;)r=e.firstChild,e.removeChild(r),i.after(r),i=r;e.parentNode.removeChild(e)}))}}}customElements.define("preact-island",e);}())<\/script>'),Promise.resolve(P(i)).then(function(){n("</div>")})}();return Promise.resolve(c&&c.then?c.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};function F(e,t,r){var n=this;if(e&&e.then){for(;t=t.__;){var o=t.__c;if(o&&o.__c)break}if(t){var i=t.__v,a=this.suspended.find(function(e){return e.id===i}),s=new y,c=this.abortSignal;c&&(c.aborted?s.resolve():c.addEventListener("abort",s.resolve));var l=e.then(function(){if(!c||!c.aborted){var e=r(t.props.children,t);e&&n.onWrite(L(i,e))}},this.onError);this.suspended.push({id:i,vnode:t,promise:Promise.race([l,s.promise])});var u=r(t.props.fallback);return a?"":"\x3c!--preact-island:"+i+"--\x3e"+u+"\x3c!--/preact-island:"+i+"--\x3e"}}}e.renderToReadableStream=function(e,t){var r=new y,n=new TextEncoder("utf-8"),o=new ReadableStream({start:function(o){j(e,{context:t,onError:function(e){r.reject(e),o.abort(e)},onWrite:function(e){o.enqueue(n.encode(e))}}).then(function(){o.close(),r.resolve()}).catch(function(e){o.error(e),r.reject(e)})}});return o.allReady=r.promise,o}});
//# sourceMappingURL=index.umd.js.map

@@ -405,3 +405,2 @@ var node_stream = require('node:stream');

if (afterDiff) afterDiff(vnode);
vnode[PARENT] = null;
if (ummountHook) ummountHook(vnode);

@@ -423,3 +422,2 @@ }

vnode[PARENT] = null;
if (preact.options.unmount) preact.options.unmount(vnode);

@@ -429,3 +427,3 @@ return str;

if (!asyncMode && renderer && renderer.onError) {
let res = renderer.onError(error, vnode, child => _renderToString(child, context, isSvgMode, selectValue, vnode, asyncMode, renderer));
let res = renderer.onError(error, vnode, (child, parent) => _renderToString(child, context, isSvgMode, selectValue, parent, asyncMode, renderer));
if (res !== undefined) return res;

@@ -588,5 +586,3 @@ let errorHook = preact.options[CATCH_ERROR];

if (afterDiff) afterDiff(vnode); // TODO: this was commented before
vnode[PARENT] = null;
if (afterDiff) afterDiff(vnode);
if (ummountHook) ummountHook(vnode); // Emit self-closing tag for empty void elements:

@@ -732,3 +728,3 @@

if (abortSignal && abortSignal.aborted) return;
const child = renderChild(vnode.props.children);
const child = renderChild(vnode.props.children, vnode);
if (child) this.onWrite(createSubtree(id, child));

@@ -790,3 +786,9 @@ }, // TODO: Abort and send hydration code snippet to client

}).catch(error => {
stream.destroy(error);
stream.destroy();
if (options.onError) {
options.onError(error);
} else {
throw error;
}
});

@@ -797,5 +799,12 @@ Promise.resolve().then(() => {

return {
abort() {
/**
* @param {unknown} [reason]
*/
abort(reason = new Error('The render was aborted by the server without a reason.')) {
controller.abort();
stream.destroy(new Error('aborted'));
stream.destroy();
if (options.onError) {
options.onError(reason);
}
},

@@ -802,0 +811,0 @@

@@ -405,3 +405,2 @@ import { PassThrough } from 'node:stream';

if (afterDiff) afterDiff(vnode);
vnode[PARENT] = null;
if (ummountHook) ummountHook(vnode);

@@ -423,3 +422,2 @@ }

vnode[PARENT] = null;
if (options.unmount) options.unmount(vnode);

@@ -429,3 +427,3 @@ return str;

if (!asyncMode && renderer && renderer.onError) {
let res = renderer.onError(error, vnode, child => _renderToString(child, context, isSvgMode, selectValue, vnode, asyncMode, renderer));
let res = renderer.onError(error, vnode, (child, parent) => _renderToString(child, context, isSvgMode, selectValue, parent, asyncMode, renderer));
if (res !== undefined) return res;

@@ -588,5 +586,3 @@ let errorHook = options[CATCH_ERROR];

if (afterDiff) afterDiff(vnode); // TODO: this was commented before
vnode[PARENT] = null;
if (afterDiff) afterDiff(vnode);
if (ummountHook) ummountHook(vnode); // Emit self-closing tag for empty void elements:

@@ -732,3 +728,3 @@

if (abortSignal && abortSignal.aborted) return;
const child = renderChild(vnode.props.children);
const child = renderChild(vnode.props.children, vnode);
if (child) this.onWrite(createSubtree(id, child));

@@ -790,3 +786,9 @@ }, // TODO: Abort and send hydration code snippet to client

}).catch(error => {
stream.destroy(error);
stream.destroy();
if (options.onError) {
options.onError(error);
} else {
throw error;
}
});

@@ -797,5 +799,12 @@ Promise.resolve().then(() => {

return {
abort() {
/**
* @param {unknown} [reason]
*/
abort(reason = new Error('The render was aborted by the server without a reason.')) {
controller.abort();
stream.destroy(new Error('aborted'));
stream.destroy();
if (options.onError) {
options.onError(reason);
}
},

@@ -802,0 +811,0 @@

@@ -407,3 +407,2 @@ (function (global, factory) {

if (afterDiff) afterDiff(vnode);
vnode[PARENT] = null;
if (ummountHook) ummountHook(vnode);

@@ -425,3 +424,2 @@ }

vnode[PARENT] = null;
if (preact.options.unmount) preact.options.unmount(vnode);

@@ -431,3 +429,3 @@ return str;

if (!asyncMode && renderer && renderer.onError) {
let res = renderer.onError(error, vnode, child => _renderToString(child, context, isSvgMode, selectValue, vnode, asyncMode, renderer));
let res = renderer.onError(error, vnode, (child, parent) => _renderToString(child, context, isSvgMode, selectValue, parent, asyncMode, renderer));
if (res !== undefined) return res;

@@ -590,5 +588,3 @@ let errorHook = preact.options[CATCH_ERROR];

if (afterDiff) afterDiff(vnode); // TODO: this was commented before
vnode[PARENT] = null;
if (afterDiff) afterDiff(vnode);
if (ummountHook) ummountHook(vnode); // Emit self-closing tag for empty void elements:

@@ -734,3 +730,3 @@

if (abortSignal && abortSignal.aborted) return;
const child = renderChild(vnode.props.children);
const child = renderChild(vnode.props.children, vnode);
if (child) this.onWrite(createSubtree(id, child));

@@ -792,3 +788,9 @@ }, // TODO: Abort and send hydration code snippet to client

}).catch(error => {
stream.destroy(error);
stream.destroy();
if (options.onError) {
options.onError(error);
} else {
throw error;
}
});

@@ -799,5 +801,12 @@ Promise.resolve().then(() => {

return {
abort() {
/**
* @param {unknown} [reason]
*/
abort(reason = new Error('The render was aborted by the server without a reason.')) {
controller.abort();
stream.destroy(new Error('aborted'));
stream.destroy();
if (options.onError) {
options.onError(reason);
}
},

@@ -804,0 +813,0 @@

{
"name": "preact-render-to-string",
"amdName": "preactRenderToString",
"version": "6.5.12",
"version": "6.5.13",
"description": "Render JSX to an HTML string, with support for Preact components.",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -446,3 +446,2 @@ import {

if (afterDiff) afterDiff(vnode);
vnode[PARENT] = null;

@@ -477,3 +476,2 @@ if (ummountHook) ummountHook(vnode);

// when we are dealing with suspense we can't do this...
vnode[PARENT] = null;

@@ -485,3 +483,3 @@ if (options.unmount) options.unmount(vnode);

if (!asyncMode && renderer && renderer.onError) {
let res = renderer.onError(error, vnode, (child) =>
let res = renderer.onError(error, vnode, (child, parent) =>
_renderToString(

@@ -492,3 +490,3 @@ child,

selectValue,
vnode,
parent,
asyncMode,

@@ -695,5 +693,2 @@ renderer

// TODO: this was commented before
vnode[PARENT] = null;
if (ummountHook) ummountHook(vnode);

@@ -700,0 +695,0 @@

@@ -1,2 +0,2 @@

import { ComponentChildren, VNode } from 'preact';
import { ComponentChildren, ComponentChild, VNode } from 'preact';

@@ -18,3 +18,3 @@ interface Suspended {

vnode: VNode<{ fallback: any }>,
renderChild: (child: ComponentChildren) => string
renderChild: (child: ComponentChildren, parent: ComponentChild) => string
): string | undefined;

@@ -21,0 +21,0 @@ }

@@ -78,3 +78,3 @@ import { renderToString } from '../index.js';

if (abortSignal && abortSignal.aborted) return;
const child = renderChild(vnode.props.children);
const child = renderChild(vnode.props.children, vnode);
if (child) this.onWrite(createSubtree(id, child));

@@ -81,0 +81,0 @@ },

@@ -11,10 +11,10 @@ import { VNode } from 'preact';

interface PipeableStream {
abort: () => void;
abort: (reason?: unknown) => void;
pipe: (writable: WritableStream) => void;
}
export function renderToPipeableStream(
vnode: VNode,
export function renderToPipeableStream<P = {}>(
vnode: VNode<P>,
options: RenderToPipeableStreamOptions,
context?: any
): PipeableStream;

@@ -47,3 +47,8 @@ import { PassThrough } from 'node:stream';

.catch((error) => {
stream.destroy(error);
stream.destroy();
if (options.onError) {
options.onError(error);
} else {
throw error;
}
});

@@ -56,5 +61,11 @@

return {
abort() {
/**
* @param {unknown} [reason]
*/
abort(reason = new Error('The render was aborted by the server without a reason.')) {
controller.abort();
stream.destroy(new Error('aborted'));
stream.destroy();
if (options.onError) {
options.onError(reason);
}
},

@@ -61,0 +72,0 @@ /**

@@ -7,5 +7,5 @@ import { VNode } from 'preact';

export function renderToReadableStream(
vnode: VNode,
export function renderToReadableStream<P = {}>(
vnode: VNode<P>,
context?: any
): RenderStream;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc