{"version":3,"file":"jsx.js","sources":["jsx.js"],"sourcesContent":["!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports,require(\"preact\")):\"function\"==typeof define&&define.amd?define([\"exports\",\"preact\"],n):n((t||self).preactRenderToString={},t.preact)}(this,function(t,n){if(\"function\"!=typeof Symbol){var e=0;Symbol=function(t){return\"@@\"+t+ ++e},Symbol.for=function(t){return\"@@\"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>\"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,\"&\").replace(//g,\">\").replace(/\"/g,\""\"):n}var a=function(t,n){return String(t).replace(/(\\n+)/g,\"$1\"+(n||\"\\t\"))},c=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf(\"\\n\")||-1!==String(t).indexOf(\"<\")},u={};function l(t){var n=\"\";for(var e in t){var o=t[e];null!=o&&\"\"!==o&&(n&&(n+=\" \"),n+=\"-\"==e[0]?e:u[e]||(u[e]=e.replace(/([A-Z])/g,\"-$1\").toLowerCase()),n+=\": \",n+=o,\"number\"==typeof o&&!1===r.test(e)&&(n+=\"px\"),n+=\";\")}return n||void 0}function s(t,n){for(var e in n)t[e]=n[e];return t}function f(t,n){return Array.isArray(n)?n.reduce(f,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,d=/[\\s\\n\\\\/='\"\\0<>]/,b=function(){};h.render=h;var m=[];function h(t,e,r){e=e||{},r=r||{};var o=n.options.__s;n.options.__s=!0;var i=_(t,e,r);return n.options.__c&&n.options.__c(t,m),m.length=0,n.options.__s=o,i}function _(t,e,r,o,u,p){if(null==t||\"boolean\"==typeof t)return\"\";if(\"object\"!=typeof t)return i(t);var m=r.pretty,h=m&&\"string\"==typeof m?m:\"\\t\";if(Array.isArray(t)){for(var v=\"\",x=0;x0&&(v+=\"\\n\"),v+=_(t[x],e,r,o,u,p);return v}var j,S=t.type,A=t.props,O=!1;if(\"function\"==typeof S){if(O=!0,!r.shallow||!o&&!1!==r.renderRootComponent){if(S===n.Fragment){var w=[];return f(w,t.props.children),_(w,e,r,!1!==r.shallowHighOrder,u,p)}var k,F=t.__c={__v:t,context:e,props:t.props,setState:b,forceUpdate:b,__h:[]};if(n.options.__b&&n.options.__b(t),n.options.__r&&n.options.__r(t),S.prototype&&\"function\"==typeof S.prototype.render){var E=S.contextType,C=E&&e[E.__c],M=null!=E?C?C.props.value:E.__:e;(F=t.__c=new S(A,M)).__v=t,F._dirty=F.__d=!0,F.props=A,null==F.state&&(F.state={}),null==F._nextState&&null==F.__s&&(F._nextState=F.__s=F.state),F.context=M,S.getDerivedStateFromProps?F.state=s(s({},F.state),S.getDerivedStateFromProps(F.props,F.state)):F.componentWillMount&&(F.componentWillMount(),F.state=F._nextState!==F.state?F._nextState:F.__s!==F.state?F.__s:F.state),k=F.render(F.props,F.state,F.context)}else{var N=S.contextType,D=N&&e[N.__c];k=S.call(t.__c,A,null!=N?D?D.props.value:N.__:e)}return F.getChildContext&&(e=s(s({},e),F.getChildContext())),n.options.diffed&&n.options.diffed(t),_(k,e,r,!1!==r.shallowHighOrder,u,p)}S=(j=S).displayName||j!==Function&&j.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\\s*function\\s+([^( ]+)/)||\"\")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n=\"UnnamedComponent\"+e}return n}(j)}var H,I,T=\"<\"+S;if(A){var $=Object.keys(A);r&&!0===r.sortAttributes&&$.sort();for(var U=0;U<$.length;U++){var W=$[U],L=A[W];if(\"children\"!==W){if(!d.test(W)&&(r&&r.allAttributes||\"key\"!==W&&\"ref\"!==W&&\"__self\"!==W&&\"__source\"!==W&&\"defaultValue\"!==W)){if(\"className\"===W){if(A.class)continue;W=\"class\"}else u&&W.match(/^xlink:?./)&&(W=W.toLowerCase().replace(/^xlink:?/,\"xlink:\"));if(\"htmlFor\"===W){if(A.for)continue;W=\"for\"}\"style\"===W&&L&&\"object\"==typeof L&&(L=l(L)),\"a\"===W[0]&&\"r\"===W[1]&&\"boolean\"==typeof L&&(L=String(L));var P=r.attributeHook&&r.attributeHook(W,L,e,r,O);if(P||\"\"===P)T+=P;else if(\"dangerouslySetInnerHTML\"===W)I=L&&L.__html;else if(\"textarea\"===S&&\"value\"===W)H=L;else if((L||0===L||\"\"===L)&&\"function\"!=typeof L){if(!(!0!==L&&\"\"!==L||(L=W,r&&r.xml))){T+=\" \"+W;continue}if(\"value\"===W){if(\"select\"===S){p=L;continue}\"option\"===S&&p==L&&(T+=\" selected\")}T+=\" \"+W+'=\"'+i(L)+'\"'}}}else H=L}}if(m){var R=T.replace(/\\n\\s*/,\" \");R===T||~R.indexOf(\"\\n\")?m&&~T.indexOf(\"\\n\")&&(T+=\"\\n\"):T=R}if(T+=\">\",d.test(S))throw new Error(S+\" is not a valid HTML tag name in \"+T);var J,q=g.test(S)||r.voidElements&&r.voidElements.test(S),V=[];if(I)m&&c(I)&&(I=\"\\n\"+h+a(I,h)),T+=I;else if(null!=H&&f(J=[],H).length){for(var z=m&&~T.indexOf(\"\\n\"),B=!1,G=0;G0&&\"<\"!=K[0];B&&Q?V[V.length-1]+=K:V.push(K),B=Q}else V.push(K)}}if(m&&z)for(var X=V.length;X--;)V[X]=\"\\n\"+h+a(V[X],h)}if(V.length||I)T+=V.join(\"\");else if(r&&r.xml)return T.substring(0,T.length-1)+\" />\";return!q||J||I?(m&&~T.indexOf(\"\\n\")&&(T+=\"\\n\"),T+=\"\"):T=T.replace(/>$/,\" />\"),T}h.shallowRender=function(t,n){return h(t,n,p)};const v=/(\\\\|\\\"|\\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\\((.*)\\)(.*)$/,k=/\\n/gi,F=Object.getOwnPropertySymbols||(t=>[]);function E(t){return\"[object Array]\"===t||\"[object ArrayBuffer]\"===t||\"[object DataView]\"===t||\"[object Float32Array]\"===t||\"[object Float64Array]\"===t||\"[object Int8Array]\"===t||\"[object Int16Array]\"===t||\"[object Int32Array]\"===t||\"[object Uint8Array]\"===t||\"[object Uint8ClampedArray]\"===t||\"[object Uint16Array]\"===t||\"[object Uint32Array]\"===t}function C(t){return\"\"===t.name?\"[Function anonymous]\":\"[Function \"+t.name+\"]\"}function M(t){return O.call(t).replace(w,\"Symbol($1)\")}function N(t){return\"[\"+S.call(t)+\"]\"}function D(t){if(!0===t||!1===t)return\"\"+t;if(void 0===t)return\"undefined\";if(null===t)return\"null\";const n=typeof t;if(\"number\"===n)return function(t){return t!=+t?\"NaN\":0===t&&1/t<0?\"-0\":\"\"+t}(t);if(\"string\"===n)return'\"'+function(t){return t.replace(v,\"\\\\$1\")}(t)+'\"';if(\"function\"===n)return C(t);if(\"symbol\"===n)return M(t);const e=x.call(t);return\"[object WeakMap]\"===e?\"WeakMap {}\":\"[object WeakSet]\"===e?\"WeakSet {}\":\"[object Function]\"===e||\"[object GeneratorFunction]\"===e?C(t,min):\"[object Symbol]\"===e?M(t):\"[object Date]\"===e?j.call(t):\"[object Error]\"===e?N(t):\"[object RegExp]\"===e?A.call(t):\"[object Arguments]\"===e&&0===t.length?\"Arguments []\":E(e)&&0===t.length?t.constructor.name+\" []\":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,c,u,l){let s=\"\";if(t.length){s+=o;const f=e+n;for(let e=0;e-1)return\"[Circular]\";i.push(t);const s=++c>a;if(!s&&t.toJSON&&\"function\"==typeof t.toJSON)return $(t.toJSON(),n,e,r,o,i,a,c,u,l);const f=x.call(t);return\"[object Arguments]\"===f?s?\"[Arguments]\":function(t,n,e,r,o,i,a,c,u,l){return(l?\"\":\"Arguments \")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):E(f)?s?\"[Array]\":function(t,n,e,r,o,i,a,c,u,l){return(l?\"\":t.constructor.name+\" \")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):\"[object Map]\"===f?s?\"[Map]\":function(t,n,e,r,o,i,a,c,u,l){let s=\"Map {\";const f=t.entries();let p=f.next();if(!p.done){s+=o;const t=e+n;for(;!p.done;)s+=t+$(p.value[0],n,t,r,o,i,a,c,u,l)+\" => \"+$(p.value[1],n,t,r,o,i,a,c,u,l),p=f.next(),p.done||(s+=\",\"+r);s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):\"[object Set]\"===f?s?\"[Set]\":function(t,n,e,r,o,i,a,c,u,l){let s=\"Set {\";const f=t.entries();let p=f.next();if(!p.done){s+=o;const t=e+n;for(;!p.done;)s+=t+$(p.value[1],n,t,r,o,i,a,c,u,l),p=f.next(),p.done||(s+=\",\"+r);s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):\"object\"==typeof t?s?\"[Object]\":function(t,n,e,r,o,i,a,c,u,l){let s=(l?\"\":t.constructor?t.constructor.name+\" \":\"Object \")+\"{\",f=Object.keys(t).sort();const p=F(t);if(p.length&&(f=f.filter(t=>!(\"symbol\"==typeof t||\"[object Symbol]\"===x.call(t))).concat(p)),f.length){s+=o;const p=e+n;for(let e=0;e{if(!U.hasOwnProperty(t))throw new Error(\"prettyFormat: Invalid option: \"+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error(\"prettyFormat: Cannot run with min option and indent\")}(n),n=function(t){const n={};return Object.keys(U).forEach(e=>n[e]=t.hasOwnProperty(e)?t[e]:U[e]),n.min&&(n.indent=0),n}(n)):n=U;const o=n.min?\" \":\"\\n\",i=n.min?\"\":\"\\n\";if(n&&n.plugins.length){e=W(n.indent),r=[];var a=T(t,e,\"\",o,i,r,n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=W(n.indent)),r||(r=[]),I(t,e,\"\",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,P)).indexOf(\"\\n\")&&(n=a(\"\\n\"+n,u)+\"\\n\")):n=\"Function\",a(\"\\n\"+t+\"={\"+n+\"}\",u)):\"\\n\"+u+t+'=\"'+i(n)+'\"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:\" \"};function J(t,n,e,r){return h(t,n,e=s(s({},R),e||{}))}t.default=J,t.render=J});\n//# sourceMappingURL=jsx.js.map\n"],"names":["t","Symbol","e","s","c"],"mappings":"mEAAA,SAAsBA,GAAA,MAAXC,KAAAA,KAAuBC,GACjCD,WAEAA,SAASD,GAAUG,MAClB,KAAAH,OAAkBI,EAAAA"}