isomorfeus-preact 10.7.1 → 10.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lucid_prop_declaration/mixin.rb +3 -3
  3. data/lib/preact/version.rb +1 -1
  4. data/node_modules/.package-lock.json +6 -6
  5. data/node_modules/preact/README.md +39 -38
  6. data/node_modules/preact/compat/client.js +11 -5
  7. data/node_modules/preact/compat/client.mjs +7 -3
  8. data/node_modules/preact/compat/dist/compat.js +1 -1
  9. data/node_modules/preact/compat/dist/compat.js.map +1 -1
  10. data/node_modules/preact/compat/dist/compat.mjs +1 -1
  11. data/node_modules/preact/compat/dist/compat.module.js +1 -1
  12. data/node_modules/preact/compat/dist/compat.module.js.map +1 -1
  13. data/node_modules/preact/compat/dist/compat.umd.js +1 -1
  14. data/node_modules/preact/compat/dist/compat.umd.js.map +1 -1
  15. data/node_modules/preact/compat/package.json +47 -17
  16. data/node_modules/preact/compat/server.browser.js +4 -0
  17. data/node_modules/preact/compat/src/index.d.ts +15 -1
  18. data/node_modules/preact/compat/src/portals.js +3 -1
  19. data/node_modules/preact/compat/src/render.js +9 -0
  20. data/node_modules/preact/debug/package.json +24 -16
  21. data/node_modules/preact/devtools/dist/devtools.js +1 -1
  22. data/node_modules/preact/devtools/dist/devtools.js.map +1 -1
  23. data/node_modules/preact/devtools/dist/devtools.mjs +1 -1
  24. data/node_modules/preact/devtools/dist/devtools.module.js +1 -1
  25. data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -1
  26. data/node_modules/preact/devtools/dist/devtools.umd.js +1 -1
  27. data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -1
  28. data/node_modules/preact/devtools/package.json +9 -0
  29. data/node_modules/preact/devtools/src/devtools.js +1 -1
  30. data/node_modules/preact/dist/preact.js +1 -1
  31. data/node_modules/preact/dist/preact.js.map +1 -1
  32. data/node_modules/preact/dist/preact.min.js +1 -1
  33. data/node_modules/preact/dist/preact.min.js.map +1 -1
  34. data/node_modules/preact/dist/preact.mjs +1 -1
  35. data/node_modules/preact/dist/preact.module.js +1 -1
  36. data/node_modules/preact/dist/preact.module.js.map +1 -1
  37. data/node_modules/preact/dist/preact.umd.js +1 -1
  38. data/node_modules/preact/dist/preact.umd.js.map +1 -1
  39. data/node_modules/preact/hooks/dist/hooks.js +1 -1
  40. data/node_modules/preact/hooks/dist/hooks.js.map +1 -1
  41. data/node_modules/preact/hooks/dist/hooks.mjs +1 -1
  42. data/node_modules/preact/hooks/dist/hooks.module.js +1 -1
  43. data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -1
  44. data/node_modules/preact/hooks/dist/hooks.umd.js +1 -1
  45. data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -1
  46. data/node_modules/preact/hooks/package.json +33 -24
  47. data/node_modules/preact/hooks/src/index.js +17 -4
  48. data/node_modules/preact/jsx-runtime/package.json +9 -0
  49. data/node_modules/preact/package.json +9 -1
  50. data/node_modules/preact/src/diff/index.js +20 -6
  51. data/node_modules/preact/src/index.d.ts +3 -0
  52. data/node_modules/preact/src/jsx.d.ts +7 -1
  53. data/node_modules/preact/test-utils/dist/testUtils.js +1 -1
  54. data/node_modules/preact/test-utils/dist/testUtils.js.map +1 -1
  55. data/node_modules/preact/test-utils/dist/testUtils.mjs +1 -1
  56. data/node_modules/preact/test-utils/dist/testUtils.module.js +1 -1
  57. data/node_modules/preact/test-utils/dist/testUtils.module.js.map +1 -1
  58. data/node_modules/preact/test-utils/dist/testUtils.umd.js +1 -1
  59. data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +1 -1
  60. data/node_modules/preact/test-utils/package.json +26 -17
  61. data/node_modules/preact/test-utils/src/index.js +2 -1
  62. data/node_modules/preact-render-to-string/dist/commonjs.js +1 -1
  63. data/node_modules/preact-render-to-string/dist/commonjs.js.map +1 -1
  64. data/node_modules/preact-render-to-string/dist/index.js.map +1 -1
  65. data/node_modules/preact-render-to-string/dist/index.mjs +1 -1
  66. data/node_modules/preact-render-to-string/dist/index.module.js +1 -1
  67. data/node_modules/preact-render-to-string/dist/index.module.js.map +1 -1
  68. data/node_modules/preact-render-to-string/dist/jsx-entry.js +1 -1
  69. data/node_modules/preact-render-to-string/dist/jsx-entry.js.map +1 -1
  70. data/node_modules/preact-render-to-string/dist/jsx.js.map +1 -1
  71. data/node_modules/preact-render-to-string/dist/jsx.mjs +1 -1
  72. data/node_modules/preact-render-to-string/dist/jsx.modern.js +1 -1
  73. data/node_modules/preact-render-to-string/dist/jsx.modern.js.map +1 -1
  74. data/node_modules/preact-render-to-string/dist/jsx.module.js +1 -1
  75. data/node_modules/preact-render-to-string/dist/jsx.module.js.map +1 -1
  76. data/node_modules/preact-render-to-string/package.json +1 -1
  77. data/node_modules/preact-render-to-string/src/index.js +23 -6
  78. data/package.json +2 -2
  79. metadata +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"jsx.module.js","sources":["../src/polyfills.js","../src/util.js","../src/index.js","../node_modules/pretty-format/printString.js","../node_modules/pretty-format/index.js","../src/jsx.js"],"sourcesContent":["if (typeof Symbol !== 'function') {\n\tlet c = 0;\n\t// eslint-disable-next-line\n\tSymbol = function (s) {\n\t\treturn `@@${s}${++c}`;\n\t};\n\tSymbol.for = (s) => `@@${s}`;\n}\n","// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;\n\nconst ENCODED_ENTITIES = /[&<>\"]/;\n\nexport function encodeEntities(input) {\n\tconst s = String(input);\n\tif (!ENCODED_ENTITIES.test(s)) {\n\t\treturn s;\n\t}\n\treturn s\n\t\t.replace(/&/g, '&amp;')\n\t\t.replace(/</g, '&lt;')\n\t\t.replace(/>/g, '&gt;')\n\t\t.replace(/\"/g, '&quot;');\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tif (str) str += ' ';\n\t\t\t// str += jsToCss(prop);\n\t\t\tstr +=\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n\t\t\tstr += ': ';\n\t\t\tstr += val;\n\t\t\tif (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n\t\t\t\tstr += 'px';\n\t\t\t}\n\t\t\tstr += ';';\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn obj;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tassign,\n\tgetChildren\n} from './util';\nimport { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nconst SHALLOW = { shallow: true };\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nconst UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\n\nconst noop = () => {};\n\n/** Render Preact JSX + Components to an HTML string.\n *\t@name render\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Object} [options={}]\tRendering options\n *\t@param {Boolean} [options.shallow=false]\tIf `true`, renders nested Components as HTML elements (`<Foo a=\"b\" />`).\n *\t@param {Boolean} [options.xml=false]\t\tIf `true`, uses self-closing tags for elements without children.\n *\t@param {Boolean} [options.pretty=false]\t\tIf `true`, adds whitespace for readability\n *\t@param {RegExp|undefined} [options.voidElements] RegeEx that matches elements that are considered void (self-closing)\n */\nrenderToString.render = renderToString;\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n */\nlet shallowRender = (vnode, context) => renderToString(vnode, context, SHALLOW);\n\nconst EMPTY_ARR = [];\nfunction renderToString(vnode, context, opts) {\n\tcontext = context || {};\n\topts = opts || {};\n\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options.__s;\n\toptions.__s = true;\n\n\tconst res = _renderToString(vnode, context, opts);\n\n\t// options._commit, we don't schedule any effects in this library right now,\n\t// so we can pass an empty queue to this hook.\n\tif (options.__c) options.__c(vnode, EMPTY_ARR);\n\tEMPTY_ARR.length = 0;\n\toptions.__s = previousSkipEffects;\n\treturn res;\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\treturn encodeEntities(vnode);\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered += '\\n';\n\t\t\trendered += _renderToString(\n\t\t\t\tvnode[i],\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\tinner,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (opts.shallow && (inner || opts.renderRootComponent === false)) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToString(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = {\n\t\t\t\t__v: vnode,\n\t\t\t\tcontext,\n\t\t\t\tprops: vnode.props,\n\t\t\t\t// silently drop state updates\n\t\t\t\tsetState: noop,\n\t\t\t\tforceUpdate: noop,\n\t\t\t\t// hooks\n\t\t\t\t__h: []\n\t\t\t});\n\n\t\t\t// options._diff\n\t\t\tif (options.__b) options.__b(vnode);\n\n\t\t\t// options._render\n\t\t\tif (options.__r) options.__r(vnode);\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t\t// the context value as `this.context` just for this component.\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// stateless functional components\n\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t} else {\n\t\t\t\t// class-based components\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tc._dirty = c.__d = true;\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = assign(\n\t\t\t\t\t\tassign({}, c.state),\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = assign(assign({}, context), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (options.diffed) options.diffed(vnode);\n\t\t\treturn _renderToString(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'defaultValue') {\n\t\t\t\tname = 'value';\n\t\t\t} else if (name === 'className') {\n\t\t\t\tif (typeof props.class !== 'undefined') continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (isSvgMode && name.match(/^xlink:?./)) {\n\t\t\t\tname = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts += hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&amp;b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts += ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t// If we're looking at an <option> and it's the currently selected one\n\t\t\t\t\t\tnodeName === 'option' &&\n\t\t\t\t\t\tselectValue == v &&\n\t\t\t\t\t\t// and the <option> doesn't already have a selected attribute on it\n\t\t\t\t\t\ttypeof props.selected === 'undefined'\n\t\t\t\t\t) {\n\t\t\t\t\t\ts += ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts += ` ${name}=\"${encodeEntities(v)}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t}\n\n\ts += '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts += html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tlet hasLarge = pretty && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToString(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue\n\t\t\t\t\t);\n\n\t\t\t\tif (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (pretty) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pretty && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pieces.length || html) {\n\t\ts += pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t\ts += `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\nrenderToString.shallowRender = shallowRender;\n\nexport default renderToString;\n\nexport {\n\trenderToString as render,\n\trenderToString as renderToStaticMarkup,\n\trenderToString,\n\tshallowRender\n};\n","'use strict';\n\nconst ESCAPED_CHARACTERS = /(\\\\|\\\"|\\')/g;\n\nmodule.exports = function printString(val) {\n return val.replace(ESCAPED_CHARACTERS, '\\\\$1');\n}\n","'use strict';\n\nconst printString = require('./printString');\n\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = Symbol.prototype.toString;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/ig;\n\nconst getSymbols = Object.getOwnPropertySymbols || (obj => []);\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && (1 / val) < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\n\nfunction printFunction(val) {\n if (val.name === '') {\n return '[Function anonymous]'\n } else {\n return '[Function ' + val.name + ']';\n }\n}\n\nfunction printSymbol(val) {\n return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n\nfunction printBasicValue(val) {\n if (val === true || val === false) return '' + val;\n if (val === undefined) return 'undefined';\n if (val === null) return 'null';\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return '\"' + printString(val) + '\"';\n if (typeOf === 'function') return printFunction(val);\n if (typeOf === 'symbol') return printSymbol(val);\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') return 'WeakMap {}';\n if (toStringed === '[object WeakSet]') return 'WeakSet {}';\n if (toStringed === '[object Function]' || toStringed === '[object GeneratorFunction]') return printFunction(val, min);\n if (toStringed === '[object Symbol]') return printSymbol(val);\n if (toStringed === '[object Date]') return toISOString.call(val);\n if (toStringed === '[object Error]') return printError(val);\n if (toStringed === '[object RegExp]') return regExpToString.call(val);\n if (toStringed === '[object Arguments]' && val.length === 0) return 'Arguments []';\n if (isToStringedArrayType(toStringed) && val.length === 0) return val.constructor.name + ' []';\n\n if (val instanceof Error) return printError(val);\n\n return false;\n}\n\nfunction printList(list, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let body = '';\n\n if (list.length) {\n body += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < list.length; i++) {\n body += innerIndent + print(list[i], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n if (i < list.length - 1) {\n body += ',' + spacing;\n }\n }\n\n body += edgeSpacing + prevIndent;\n }\n\n return '[' + body + ']';\n}\n\nfunction printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : 'Arguments ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : val.constructor.name + ' ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Map {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n const key = print(current.value[0], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + key + ' => ' + value;\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const constructor = min ? '' : (val.constructor ? val.constructor.name + ' ' : 'Object ');\n let result = constructor + '{';\n let keys = Object.keys(val).sort();\n const symbols = getSymbols(val);\n\n if (symbols.length) {\n keys = keys\n .filter(key => !(typeof key === 'symbol' || toString.call(key) === '[object Symbol]'))\n .concat(symbols);\n }\n\n if (keys.length) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = print(key, indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(val[key], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Set {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n result += innerIndent + print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n refs = refs.slice();\n if (refs.indexOf(val) > -1) {\n return '[Circular]';\n } else {\n refs.push(val);\n }\n\n currentDepth++;\n\n const hitMaxDepth = currentDepth > maxDepth;\n\n if (!hitMaxDepth && val.toJSON && typeof val.toJSON === 'function') {\n return print(val.toJSON(), indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n const toStringed = toString.call(val);\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth ? '[Arguments]' : printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth ? '[Array]' : printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Map]') {\n return hitMaxDepth ? '[Map]' : printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Set]') {\n return hitMaxDepth ? '[Set]' : printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (typeof val === 'object') {\n return hitMaxDepth ? '[Object]' : printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n}\n\nfunction printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let match = false;\n let plugin;\n\n for (let p = 0; p < plugins.length; p++) {\n plugin = plugins[p];\n\n if (plugin.test(val)) {\n match = true;\n break;\n }\n }\n\n if (!match) {\n return false;\n }\n\n function boundPrint(val) {\n return print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n function boundIndent(str) {\n const indentation = prevIndent + indent;\n return indentation + str.replace(NEWLINE_REGEXP, '\\n' + indentation);\n }\n\n return plugin.print(val, boundPrint, boundIndent, {\n edgeSpacing: edgeSpacing,\n spacing: spacing\n });\n}\n\nfunction print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const basic = printBasicValue(val);\n if (basic) return basic;\n\n const plugin = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n if (plugin) return plugin;\n\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nconst DEFAULTS = {\n indent: 2,\n min: false,\n maxDepth: Infinity,\n plugins: []\n};\n\nfunction validateOptions(opts) {\n Object.keys(opts).forEach(key => {\n if (!DEFAULTS.hasOwnProperty(key)) {\n throw new Error('prettyFormat: Invalid option: ' + key);\n }\n });\n\n if (opts.min && opts.indent !== undefined && opts.indent !== 0) {\n throw new Error('prettyFormat: Cannot run with min option and indent');\n }\n}\n\nfunction normalizeOptions(opts) {\n const result = {};\n\n Object.keys(DEFAULTS).forEach(key =>\n result[key] = opts.hasOwnProperty(key) ? opts[key] : DEFAULTS[key]\n );\n\n if (result.min) {\n result.indent = 0;\n }\n\n return result;\n}\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n\nfunction prettyFormat(val, opts) {\n if (!opts) {\n opts = DEFAULTS;\n } else {\n validateOptions(opts)\n opts = normalizeOptions(opts);\n }\n\n let indent;\n let refs;\n const prevIndent = '';\n const currentDepth = 0;\n const spacing = opts.min ? ' ' : '\\n';\n const edgeSpacing = opts.min ? '' : '\\n';\n\n if (opts && opts.plugins.length) {\n indent = createIndent(opts.indent);\n refs = [];\n var pluginsResult = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n if (pluginsResult) return pluginsResult;\n }\n\n var basicResult = printBasicValue(val);\n if (basicResult) return basicResult;\n\n if (!indent) indent = createIndent(opts.indent);\n if (!refs) refs = [];\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n}\n\nmodule.exports = prettyFormat;\n","import './polyfills';\nimport renderToString from './index';\nimport { indent, encodeEntities, assign } from './util';\nimport prettyFormat from 'pretty-format';\n\n// we have to patch in Array support, Possible issue in npm.im/pretty-format\nlet preactPlugin = {\n\ttest(object) {\n\t\treturn (\n\t\t\tobject &&\n\t\t\ttypeof object === 'object' &&\n\t\t\t'type' in object &&\n\t\t\t'props' in object &&\n\t\t\t'key' in object\n\t\t);\n\t},\n\tprint(val, print, indent) {\n\t\treturn renderToString(val, preactPlugin.context, preactPlugin.opts, true);\n\t}\n};\n\nlet prettyFormatOpts = {\n\tplugins: [preactPlugin]\n};\n\nfunction attributeHook(name, value, context, opts, isComponent) {\n\tlet type = typeof value;\n\n\t// Use render-to-string's built-in handling for these properties\n\tif (name === 'dangerouslySetInnerHTML') return false;\n\n\t// always skip null & undefined values, skip false DOM attributes, skip functions if told to\n\tif (value == null || (type === 'function' && !opts.functions)) return '';\n\n\tif (\n\t\topts.skipFalseAttributes &&\n\t\t!isComponent &&\n\t\t(value === false ||\n\t\t\t((name === 'class' || name === 'style') && value === ''))\n\t)\n\t\treturn '';\n\n\tlet indentChar = typeof opts.pretty === 'string' ? opts.pretty : '\\t';\n\tif (type !== 'string') {\n\t\tif (type === 'function' && !opts.functionNames) {\n\t\t\tvalue = 'Function';\n\t\t} else {\n\t\t\tpreactPlugin.context = context;\n\t\t\tpreactPlugin.opts = opts;\n\t\t\tvalue = prettyFormat(value, prettyFormatOpts);\n\t\t\tif (~value.indexOf('\\n')) {\n\t\t\t\tvalue = `${indent('\\n' + value, indentChar)}\\n`;\n\t\t\t}\n\t\t}\n\t\treturn indent(`\\n${name}={${value}}`, indentChar);\n\t}\n\treturn `\\n${indentChar}${name}=\"${encodeEntities(value)}\"`;\n}\n\nlet defaultOpts = {\n\tattributeHook,\n\tjsx: true,\n\txml: false,\n\tfunctions: true,\n\tfunctionNames: true,\n\tskipFalseAttributes: true,\n\tpretty: ' '\n};\n\nfunction renderToJsxString(vnode, context, opts, inner) {\n\topts = assign(assign({}, defaultOpts), opts || {});\n\treturn renderToString(vnode, context, opts, inner);\n}\n\nexport default renderToJsxString;\nexport { renderToJsxString as render };\n"],"names":["Symbol","c","s","IS_NON_DIMENSIONAL","ENCODED_ENTITIES","encodeEntities","input","String","test","replace","indent","char","isLargeString","length","ignoreLines","indexOf","JS_TO_CSS","styleObjToCss","str","prop","val","toLowerCase","undefined","assign","obj","props","i","getChildren","accumulator","children","Array","isArray","reduce","push","SHALLOW","shallow","UNNAMED","VOID_ELEMENTS","UNSAFE_NAME","noop","renderToString","render","EMPTY_ARR","vnode","context","opts","previousSkipEffects","options","__s","res","_renderToString","__c","inner","isSvgMode","selectValue","pretty","indentChar","rendered","component","nodeName","type","isComponent","renderRootComponent","Fragment","shallowHighOrder","__v","setState","forceUpdate","__h","__b","__r","prototype","cxType","contextType","provider","cctx","value","__","_dirty","__d","state","_nextState","getDerivedStateFromProps","componentWillMount","call","getChildContext","diffed","displayName","Function","name","toString","match","index","getFallbackComponentName","propChildren","html","attrs","Object","keys","sortAttributes","sort","v","allAttributes","hooked","attributeHook","__html","xml","selected","sub","Error","isVoid","voidElements","pieces","hasLarge","lastWasText","child","ret","isText","join","substring","shallowRender","ESCAPED_CHARACTERS","toISOString","Date","errorToString","regExpToString","RegExp","symbolToString","SYMBOL_REGEXP","NEWLINE_REGEXP","getSymbols","getOwnPropertySymbols","isToStringedArrayType","toStringed","printFunction","printSymbol","printError","printBasicValue","typeOf","printNumber","printString","min","constructor","printList","list","prevIndent","spacing","edgeSpacing","refs","maxDepth","currentDepth","plugins","body","innerIndent","print","printComplexValue","slice","hitMaxDepth","toJSON","printArguments","printArray","result","iterator","entries","current","next","done","printMap","printSet","symbols","filter","key","concat","printObject","printPlugin","plugin","p","indentation","DEFAULTS","Infinity","createIndent","preactPlugin","object","prettyFormatOpts","defaultOpts","functions","skipFalseAttributes","functionNames","forEach","hasOwnProperty","validateOptions","normalizeOptions","pluginsResult","prettyFormat","jsx","renderToJsxString"],"mappings":"+CAAA,GAAsB,mBAAXA,OAAuB,CACjC,IAAIC,EAAI,EAERD,OAAS,SAAUE,GAClB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IAAMA,EAAO,IACXO,EAAkBvI,EAAKV,EAjBX,GAiB+BwI,EAASC,EAAaC,EAAMvG,EAAKwG,SAhB9D,EAgBsFxG,EAAK0G,QAAS1G,EAAKgG,MClSrHoD,CAAarH,EAAO2G,IACjBxK,QAAQ,QAClB6D,EAAWlE,EAAO,KAAOkE,EAAOpB,UANjCoB,EAAQ,WASFlE,OAAY+E,OAASb,MAAUpB,SAE3BA,EAAaiC,OAASpF,EAAeuE,QAKjDsH,KAAK,EACLxF,KAAK,EACL+E,WAAW,EACXE,eAAe,EACfD,qBAAqB,EACrBnI,OAAQ,MAGT,SAAS4I,EAAkBxJ,EAAOC,EAASC,EAAMO,GAEhD,OAAOZ,EAAeG,EAAOC,EAD7BC,EAAOtB,EAAOA,EAAO,GAAIiK,GAAc3I,GAAQ"}
1
+ {"version":3,"file":"jsx.module.js","sources":["../src/polyfills.js","../src/util.js","../src/index.js","../node_modules/pretty-format/printString.js","../node_modules/pretty-format/index.js","../src/jsx.js"],"sourcesContent":["if (typeof Symbol !== 'function') {\n\tlet c = 0;\n\t// eslint-disable-next-line\n\tSymbol = function (s) {\n\t\treturn `@@${s}${++c}`;\n\t};\n\tSymbol.for = (s) => `@@${s}`;\n}\n","// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;\n\nconst ENCODED_ENTITIES = /[&<>\"]/;\n\nexport function encodeEntities(input) {\n\tconst s = String(input);\n\tif (!ENCODED_ENTITIES.test(s)) {\n\t\treturn s;\n\t}\n\treturn s\n\t\t.replace(/&/g, '&amp;')\n\t\t.replace(/</g, '&lt;')\n\t\t.replace(/>/g, '&gt;')\n\t\t.replace(/\"/g, '&quot;');\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tif (str) str += ' ';\n\t\t\t// str += jsToCss(prop);\n\t\t\tstr +=\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n\t\t\tstr += ': ';\n\t\t\tstr += val;\n\t\t\tif (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n\t\t\t\tstr += 'px';\n\t\t\t}\n\t\t\tstr += ';';\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn obj;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tassign,\n\tgetChildren\n} from './util';\nimport { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nconst SHALLOW = { shallow: true };\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nconst UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\n\nfunction markAsDirty() {\n\tthis.__d = true;\n}\n\n/** Render Preact JSX + Components to an HTML string.\n *\t@name render\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Object} [options={}]\tRendering options\n *\t@param {Boolean} [options.shallow=false]\tIf `true`, renders nested Components as HTML elements (`<Foo a=\"b\" />`).\n *\t@param {Boolean} [options.xml=false]\t\tIf `true`, uses self-closing tags for elements without children.\n *\t@param {Boolean} [options.pretty=false]\t\tIf `true`, adds whitespace for readability\n *\t@param {RegExp|undefined} [options.voidElements] RegeEx that matches elements that are considered void (self-closing)\n */\nrenderToString.render = renderToString;\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n */\nlet shallowRender = (vnode, context) => renderToString(vnode, context, SHALLOW);\n\nconst EMPTY_ARR = [];\nfunction renderToString(vnode, context, opts) {\n\tcontext = context || {};\n\topts = opts || {};\n\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options.__s;\n\toptions.__s = true;\n\n\tconst res = _renderToString(vnode, context, opts);\n\n\t// options._commit, we don't schedule any effects in this library right now,\n\t// so we can pass an empty queue to this hook.\n\tif (options.__c) options.__c(vnode, EMPTY_ARR);\n\tEMPTY_ARR.length = 0;\n\toptions.__s = previousSkipEffects;\n\treturn res;\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\treturn encodeEntities(vnode);\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered += '\\n';\n\t\t\trendered += _renderToString(\n\t\t\t\tvnode[i],\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\tinner,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (opts.shallow && (inner || opts.renderRootComponent === false)) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToString(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = {\n\t\t\t\t__v: vnode,\n\t\t\t\tcontext,\n\t\t\t\tprops: vnode.props,\n\t\t\t\t// silently drop state updates\n\t\t\t\tsetState: markAsDirty,\n\t\t\t\tforceUpdate: markAsDirty,\n\t\t\t\t__d: true,\n\t\t\t\t// hooks\n\t\t\t\t__h: []\n\t\t\t});\n\n\t\t\t// options._diff\n\t\t\tif (options.__b) options.__b(vnode);\n\n\t\t\t// options._render\n\t\t\tlet renderHook = options.__r;\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t\t// the context value as `this.context` just for this component.\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// If a hook invokes setState() to invalidate the component during rendering,\n\t\t\t\t// re-render it up to 25 times to allow \"settling\" of memoized states.\n\t\t\t\t// Note:\n\t\t\t\t// This will need to be updated for Preact 11 to use internal.flags rather than component._dirty:\n\t\t\t\t// https://github.com/preactjs/preact/blob/d4ca6fdb19bc715e49fd144e69f7296b2f4daa40/src/diff/component.js#L35-L44\n\t\t\t\tlet count = 0;\n\t\t\t\twhile (c.__d && count++ < 25) {\n\t\t\t\t\tc.__d = false;\n\n\t\t\t\t\tif (renderHook) renderHook(vnode);\n\n\t\t\t\t\t// stateless functional components\n\t\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// class-based components\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tc._dirty = c.__d = true;\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = assign(\n\t\t\t\t\t\tassign({}, c.state),\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\tif (renderHook) renderHook(vnode);\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = assign(assign({}, context), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (options.diffed) options.diffed(vnode);\n\t\t\treturn _renderToString(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'defaultValue') {\n\t\t\t\tname = 'value';\n\t\t\t} else if (name === 'className') {\n\t\t\t\tif (typeof props.class !== 'undefined') continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (isSvgMode && name.match(/^xlink:?./)) {\n\t\t\t\tname = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts += hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&amp;b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts += ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t// If we're looking at an <option> and it's the currently selected one\n\t\t\t\t\t\tnodeName === 'option' &&\n\t\t\t\t\t\tselectValue == v &&\n\t\t\t\t\t\t// and the <option> doesn't already have a selected attribute on it\n\t\t\t\t\t\ttypeof props.selected === 'undefined'\n\t\t\t\t\t) {\n\t\t\t\t\t\ts += ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts += ` ${name}=\"${encodeEntities(v)}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t}\n\n\ts += '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts += html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tlet hasLarge = pretty && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToString(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue\n\t\t\t\t\t);\n\n\t\t\t\tif (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (pretty) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pretty && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pieces.length || html) {\n\t\ts += pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t\ts += `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\nrenderToString.shallowRender = shallowRender;\n\nexport default renderToString;\n\nexport {\n\trenderToString as render,\n\trenderToString as renderToStaticMarkup,\n\trenderToString,\n\tshallowRender\n};\n","'use strict';\n\nconst ESCAPED_CHARACTERS = /(\\\\|\\\"|\\')/g;\n\nmodule.exports = function printString(val) {\n return val.replace(ESCAPED_CHARACTERS, '\\\\$1');\n}\n","'use strict';\n\nconst printString = require('./printString');\n\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = Symbol.prototype.toString;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/ig;\n\nconst getSymbols = Object.getOwnPropertySymbols || (obj => []);\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && (1 / val) < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\n\nfunction printFunction(val) {\n if (val.name === '') {\n return '[Function anonymous]'\n } else {\n return '[Function ' + val.name + ']';\n }\n}\n\nfunction printSymbol(val) {\n return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n\nfunction printBasicValue(val) {\n if (val === true || val === false) return '' + val;\n if (val === undefined) return 'undefined';\n if (val === null) return 'null';\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return '\"' + printString(val) + '\"';\n if (typeOf === 'function') return printFunction(val);\n if (typeOf === 'symbol') return printSymbol(val);\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') return 'WeakMap {}';\n if (toStringed === '[object WeakSet]') return 'WeakSet {}';\n if (toStringed === '[object Function]' || toStringed === '[object GeneratorFunction]') return printFunction(val, min);\n if (toStringed === '[object Symbol]') return printSymbol(val);\n if (toStringed === '[object Date]') return toISOString.call(val);\n if (toStringed === '[object Error]') return printError(val);\n if (toStringed === '[object RegExp]') return regExpToString.call(val);\n if (toStringed === '[object Arguments]' && val.length === 0) return 'Arguments []';\n if (isToStringedArrayType(toStringed) && val.length === 0) return val.constructor.name + ' []';\n\n if (val instanceof Error) return printError(val);\n\n return false;\n}\n\nfunction printList(list, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let body = '';\n\n if (list.length) {\n body += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < list.length; i++) {\n body += innerIndent + print(list[i], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n if (i < list.length - 1) {\n body += ',' + spacing;\n }\n }\n\n body += edgeSpacing + prevIndent;\n }\n\n return '[' + body + ']';\n}\n\nfunction printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : 'Arguments ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n return (min ? '' : val.constructor.name + ' ') + printList(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nfunction printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Map {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n const key = print(current.value[0], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + key + ' => ' + value;\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const constructor = min ? '' : (val.constructor ? val.constructor.name + ' ' : 'Object ');\n let result = constructor + '{';\n let keys = Object.keys(val).sort();\n const symbols = getSymbols(val);\n\n if (symbols.length) {\n keys = keys\n .filter(key => !(typeof key === 'symbol' || toString.call(key) === '[object Symbol]'))\n .concat(symbols);\n }\n\n if (keys.length) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = print(key, indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n const value = print(val[key], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n result += innerIndent + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let result = 'Set {';\n const iterator = val.entries();\n let current = iterator.next();\n\n if (!current.done) {\n result += edgeSpacing;\n\n const innerIndent = prevIndent + indent;\n\n while (!current.done) {\n result += innerIndent + print(current.value[1], indent, innerIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + spacing;\n }\n }\n\n result += edgeSpacing + prevIndent;\n }\n\n return result + '}';\n}\n\nfunction printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n refs = refs.slice();\n if (refs.indexOf(val) > -1) {\n return '[Circular]';\n } else {\n refs.push(val);\n }\n\n currentDepth++;\n\n const hitMaxDepth = currentDepth > maxDepth;\n\n if (!hitMaxDepth && val.toJSON && typeof val.toJSON === 'function') {\n return print(val.toJSON(), indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n const toStringed = toString.call(val);\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth ? '[Arguments]' : printArguments(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth ? '[Array]' : printArray(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Map]') {\n return hitMaxDepth ? '[Map]' : printMap(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (toStringed === '[object Set]') {\n return hitMaxDepth ? '[Set]' : printSet(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n } else if (typeof val === 'object') {\n return hitMaxDepth ? '[Object]' : printObject(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n}\n\nfunction printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n let match = false;\n let plugin;\n\n for (let p = 0; p < plugins.length; p++) {\n plugin = plugins[p];\n\n if (plugin.test(val)) {\n match = true;\n break;\n }\n }\n\n if (!match) {\n return false;\n }\n\n function boundPrint(val) {\n return print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n }\n\n function boundIndent(str) {\n const indentation = prevIndent + indent;\n return indentation + str.replace(NEWLINE_REGEXP, '\\n' + indentation);\n }\n\n return plugin.print(val, boundPrint, boundIndent, {\n edgeSpacing: edgeSpacing,\n spacing: spacing\n });\n}\n\nfunction print(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min) {\n const basic = printBasicValue(val);\n if (basic) return basic;\n\n const plugin = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n if (plugin) return plugin;\n\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, maxDepth, currentDepth, plugins, min);\n}\n\nconst DEFAULTS = {\n indent: 2,\n min: false,\n maxDepth: Infinity,\n plugins: []\n};\n\nfunction validateOptions(opts) {\n Object.keys(opts).forEach(key => {\n if (!DEFAULTS.hasOwnProperty(key)) {\n throw new Error('prettyFormat: Invalid option: ' + key);\n }\n });\n\n if (opts.min && opts.indent !== undefined && opts.indent !== 0) {\n throw new Error('prettyFormat: Cannot run with min option and indent');\n }\n}\n\nfunction normalizeOptions(opts) {\n const result = {};\n\n Object.keys(DEFAULTS).forEach(key =>\n result[key] = opts.hasOwnProperty(key) ? opts[key] : DEFAULTS[key]\n );\n\n if (result.min) {\n result.indent = 0;\n }\n\n return result;\n}\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n\nfunction prettyFormat(val, opts) {\n if (!opts) {\n opts = DEFAULTS;\n } else {\n validateOptions(opts)\n opts = normalizeOptions(opts);\n }\n\n let indent;\n let refs;\n const prevIndent = '';\n const currentDepth = 0;\n const spacing = opts.min ? ' ' : '\\n';\n const edgeSpacing = opts.min ? '' : '\\n';\n\n if (opts && opts.plugins.length) {\n indent = createIndent(opts.indent);\n refs = [];\n var pluginsResult = printPlugin(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n if (pluginsResult) return pluginsResult;\n }\n\n var basicResult = printBasicValue(val);\n if (basicResult) return basicResult;\n\n if (!indent) indent = createIndent(opts.indent);\n if (!refs) refs = [];\n return printComplexValue(val, indent, prevIndent, spacing, edgeSpacing, refs, opts.maxDepth, currentDepth, opts.plugins, opts.min);\n}\n\nmodule.exports = prettyFormat;\n","import './polyfills';\nimport renderToString from './index';\nimport { indent, encodeEntities, assign } from './util';\nimport prettyFormat from 'pretty-format';\n\n// we have to patch in Array support, Possible issue in npm.im/pretty-format\nlet preactPlugin = {\n\ttest(object) {\n\t\treturn (\n\t\t\tobject &&\n\t\t\ttypeof object === 'object' &&\n\t\t\t'type' in object &&\n\t\t\t'props' in object &&\n\t\t\t'key' in object\n\t\t);\n\t},\n\tprint(val, print, indent) {\n\t\treturn renderToString(val, preactPlugin.context, preactPlugin.opts, true);\n\t}\n};\n\nlet prettyFormatOpts = {\n\tplugins: [preactPlugin]\n};\n\nfunction attributeHook(name, value, context, opts, isComponent) {\n\tlet type = typeof value;\n\n\t// Use render-to-string's built-in handling for these properties\n\tif (name === 'dangerouslySetInnerHTML') return false;\n\n\t// always skip null & undefined values, skip false DOM attributes, skip functions if told to\n\tif (value == null || (type === 'function' && !opts.functions)) return '';\n\n\tif (\n\t\topts.skipFalseAttributes &&\n\t\t!isComponent &&\n\t\t(value === false ||\n\t\t\t((name === 'class' || name === 'style') && value === ''))\n\t)\n\t\treturn '';\n\n\tlet indentChar = typeof opts.pretty === 'string' ? opts.pretty : '\\t';\n\tif (type !== 'string') {\n\t\tif (type === 'function' && !opts.functionNames) {\n\t\t\tvalue = 'Function';\n\t\t} else {\n\t\t\tpreactPlugin.context = context;\n\t\t\tpreactPlugin.opts = opts;\n\t\t\tvalue = prettyFormat(value, prettyFormatOpts);\n\t\t\tif (~value.indexOf('\\n')) {\n\t\t\t\tvalue = `${indent('\\n' + value, indentChar)}\\n`;\n\t\t\t}\n\t\t}\n\t\treturn indent(`\\n${name}={${value}}`, indentChar);\n\t}\n\treturn `\\n${indentChar}${name}=\"${encodeEntities(value)}\"`;\n}\n\nlet defaultOpts = {\n\tattributeHook,\n\tjsx: true,\n\txml: false,\n\tfunctions: true,\n\tfunctionNames: true,\n\tskipFalseAttributes: true,\n\tpretty: ' '\n};\n\nfunction renderToJsxString(vnode, context, opts, inner) {\n\topts = assign(assign({}, defaultOpts), opts || {});\n\treturn renderToString(vnode, context, opts, inner);\n}\n\nexport default renderToJsxString;\nexport { renderToJsxString as render };\n"],"names":["Symbol","c","s","IS_NON_DIMENSIONAL","ENCODED_ENTITIES","encodeEntities","input","String","test","replace","indent","char","isLargeString","length","ignoreLines","indexOf","JS_TO_CSS","styleObjToCss","str","prop","val","toLowerCase","undefined","assign","obj","props","i","getChildren","accumulator","children","Array","isArray","reduce","push","SHALLOW","shallow","UNNAMED","VOID_ELEMENTS","UNSAFE_NAME","markAsDirty","this","__d","renderToString","render","EMPTY_ARR","vnode","context","opts","previousSkipEffects","options","__s","res","_renderToString","__c","inner","isSvgMode","selectValue","pretty","indentChar","rendered","component","nodeName","type","isComponent","renderRootComponent","Fragment","shallowHighOrder","__v","setState","forceUpdate","__h","__b","renderHook","__r","prototype","cxType","contextType","provider","cctx","value","__","_dirty","state","_nextState","getDerivedStateFromProps","componentWillMount","count","call","getChildContext","diffed","displayName","Function","name","toString","match","index","getFallbackComponentName","propChildren","html","attrs","Object","keys","sortAttributes","sort","v","allAttributes","hooked","attributeHook","__html","xml","selected","sub","Error","isVoid","voidElements","pieces","hasLarge","lastWasText","child","ret","isText","join","substring","shallowRender","ESCAPED_CHARACTERS","toISOString","Date","errorToString","regExpToString","RegExp","symbolToString","SYMBOL_REGEXP","NEWLINE_REGEXP","getSymbols","getOwnPropertySymbols","isToStringedArrayType","toStringed","printFunction","printSymbol","printError","printBasicValue","typeOf","printNumber","printString","min","constructor","printList","list","prevIndent","spacing","edgeSpacing","refs","maxDepth","currentDepth","plugins","body","innerIndent","print","printComplexValue","slice","hitMaxDepth","toJSON","printArguments","printArray","result","iterator","entries","current","next","done","printMap","printSet","symbols","filter","key","concat","printObject","printPlugin","plugin","p","indentation","DEFAULTS","Infinity","createIndent","preactPlugin","object","prettyFormatOpts","defaultOpts","functions","skipFalseAttributes","functionNames","forEach","hasOwnProperty","validateOptions","normalizeOptions","pluginsResult","prettyFormat","jsx","renderToJsxString"],"mappings":"+CAAA,GAAsB,mBAAXA,OAAuB,CACjC,IAAIC,EAAI,EAERD,OAAS,SAAUE,GAClB,WAAYA,KAAMD,GAEnBD,WAAa,SAACE,cAAWA,OCLbC,EAAqB,kEAE5BC,EAAmB,kBAETC,EAAeC,GAC9B,IAAMJ,EAAIK,OAAOD,GACjB,OAAKF,EAAiBI,KAAKN,GAGpBA,EACLO,QAAQ,KAAM,SACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,UANRP,MASEQ,EAAS,SAACR,EAAGS,UACvBJ,OAAOL,GAAGO,QAAQ,SAAU,MAAQE,GAAQ,QAElCC,EAAgB,SAACV,EAAGW,EAAQC,UACtCP,OAAOL,GAAGW,QAAUA,GAAU,MAC5BC,IAA4C,IAA7BP,OAAOL,GAAGa,QAAQ,QACP,IAA5BR,OAAOL,GAAGa,QAAQ,MAEbC,EAAY,YAGFC,EAAcf,GAC7B,IAAIgB,EAAM,GACV,IAAK,IAAIC,KAAQjB,EAAG,CACnB,IAAIkB,EAAMlB,EAAEiB,GACD,MAAPC,GAAuB,KAARA,IACdF,IAAKA,GAAO,KAEhBA,GACY,KAAXC,EAAK,GACFA,EACAH,EAAUG,KACTH,EAAUG,GAAQA,EAAKV,QAAQ,WAAY,OAAOY,eACvDH,GAAO,KACPA,GAAOE,EACY,iBAARA,IAAsD,IAAlCjB,EAAmBK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derToString",
4
- "version": "5.1.21",
4
+ "version": "5.2.0",
5
5
  "description": "Render JSX to an HTML string, with support for Preact components.",
6
6
  "main": "dist/index.js",
7
7
  "umd:main": "dist/index.js",
@@ -19,7 +19,9 @@ const VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|sou
19
19
 
20
20
  const UNSAFE_NAME = /[\s\n\\/='"\0<>]/;
21
21
 
22
- const noop = () => {};
22
+ function markAsDirty() {
23
+ this.__d = true;
24
+ }
23
25
 
24
26
  /** Render Preact JSX + Components to an HTML string.
25
27
  * @name render
@@ -124,8 +126,9 @@ function _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {
124
126
  context,
125
127
  props: vnode.props,
126
128
  // silently drop state updates
127
- setState: noop,
128
- forceUpdate: noop,
129
+ setState: markAsDirty,
130
+ forceUpdate: markAsDirty,
131
+ __d: true,
129
132
  // hooks
130
133
  __h: []
131
134
  });
@@ -134,7 +137,7 @@ function _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {
134
137
  if (options.__b) options.__b(vnode);
135
138
 
136
139
  // options._render
137
- if (options.__r) options.__r(vnode);
140
+ let renderHook = options.__r;
138
141
 
139
142
  if (
140
143
  !nodeName.prototype ||
@@ -151,8 +154,20 @@ function _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {
151
154
  : cxType.__
152
155
  : context;
153
156
 
154
- // stateless functional components
155
- rendered = nodeName.call(vnode.__c, props, cctx);
157
+ // If a hook invokes setState() to invalidate the component during rendering,
158
+ // re-render it up to 25 times to allow "settling" of memoized states.
159
+ // Note:
160
+ // This will need to be updated for Preact 11 to use internal.flags rather than component._dirty:
161
+ // https://github.com/preactjs/preact/blob/d4ca6fdb19bc715e49fd144e69f7296b2f4daa40/src/diff/component.js#L35-L44
162
+ let count = 0;
163
+ while (c.__d && count++ < 25) {
164
+ c.__d = false;
165
+
166
+ if (renderHook) renderHook(vnode);
167
+
168
+ // stateless functional components
169
+ rendered = nodeName.call(vnode.__c, props, cctx);
170
+ }
156
171
  } else {
157
172
  // class-based components
158
173
  let cxType = nodeName.contextType;
@@ -195,6 +210,8 @@ function _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {
195
210
  : c.state;
196
211
  }
197
212
 
213
+ if (renderHook) renderHook(vnode);
214
+
198
215
  rendered = c.render(c.props, c.state, c.context);
199
216
  }
200
217
 
data/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "isomorfeus-preact",
3
3
  "dependencies": {
4
- "preact": "10.7.1",
5
- "preact-render-to-string": "5.1.21",
4
+ "preact": "10.8.0",
5
+ "preact-render-to-string": "5.2.0",
6
6
  "wouter-preact": "2.7.5"
7
7
  }
8
8
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-preact
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.7.1
4
+ version: 10.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-24 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.9
19
+ version: 1.1.10
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.1.9
26
+ version: 1.1.10
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: oj
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.13.11
33
+ version: 3.13.13
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.13.11
40
+ version: 3.13.13
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: opal
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 0.14.22
95
+ version: 0.14.24
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 0.14.22
102
+ version: 0.14.24
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: isomorfeus-redux
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -307,6 +307,7 @@ files:
307
307
  - node_modules/preact/compat/package.json
308
308
  - node_modules/preact/compat/scheduler.js
309
309
  - node_modules/preact/compat/scheduler.mjs
310
+ - node_modules/preact/compat/server.browser.js
310
311
  - node_modules/preact/compat/server.js
311
312
  - node_modules/preact/compat/server.mjs
312
313
  - node_modules/preact/compat/src/Children.js