inferno-server
Advanced tools
Comparing version 9.0.0-alpha.2 to 9.0.0-alpha.3
@@ -14,6 +14,6 @@ (function (global, factory) { | ||
function isNullOrUndef(o) { | ||
return o === void 0 || o === null; | ||
return o === undefined || o === null; | ||
} | ||
function isInvalid(o) { | ||
return o === null || o === false || o === true || o === void 0; | ||
return o === null || o === false || o === true || o === undefined; | ||
} | ||
@@ -33,3 +33,3 @@ function isFunction(o) { | ||
function isUndefined(o) { | ||
return o === void 0; | ||
return o === undefined; | ||
} | ||
@@ -75,4 +75,4 @@ function throwError(message) { | ||
var start = 0; | ||
var i; | ||
for (i = 0; i < text.length; ++i) { | ||
var i = 0; | ||
for (; i < text.length; ++i) { | ||
switch (text.charCodeAt(i)) { | ||
@@ -112,11 +112,12 @@ case 34: | ||
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; | ||
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp( | ||
// eslint-disable-next-line no-misleading-character-class | ||
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); | ||
'^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); | ||
var illegalAttributeNameCache = {}; | ||
var validatedAttributeNameCache = {}; | ||
function isAttributeNameSafe(attributeName) { | ||
if (validatedAttributeNameCache[attributeName] !== void 0) { | ||
if (validatedAttributeNameCache[attributeName] !== undefined) { | ||
return true; | ||
} | ||
if (illegalAttributeNameCache[attributeName] !== void 0) { | ||
if (illegalAttributeNameCache[attributeName] !== undefined) { | ||
return false; | ||
@@ -155,3 +156,2 @@ } | ||
if (isClass) { | ||
// eslint-disable-next-line new-cap | ||
var instance = new type(props, context); | ||
@@ -297,3 +297,2 @@ var hasNewAPI = Boolean(type.getDerivedStateFromProps); | ||
if (String(type).match(/[\s\n/='"\0<>]/)) { | ||
// eslint-disable-next-line @typescript-eslint/no-throw-literal | ||
throw renderedString; | ||
@@ -366,3 +365,2 @@ } | ||
_proto._read = function _read() { | ||
// eslint-disable-next-line @typescript-eslint/unbound-method | ||
setTimeout(this.pushQueue, 0); | ||
@@ -392,2 +390,3 @@ }; | ||
_proto.pushQueue = function pushQueue() { | ||
var _this2 = this; | ||
var chunk = this.collector[0]; | ||
@@ -400,10 +399,7 @@ // Output strings directly | ||
} else if (!!chunk && (typeof chunk === 'object' || isFunction(chunk)) && isFunction(chunk.then)) { | ||
// eslint-disable-next-line @typescript-eslint/no-this-alias | ||
var self = this; | ||
chunk.then(function (index) { | ||
var _self$collector; | ||
(_self$collector = self.collector).splice.apply(_self$collector, [0, 1].concat(self.promises[index])); | ||
self.promises[index] = null; | ||
// eslint-disable-next-line @typescript-eslint/unbound-method | ||
setTimeout(self.pushQueue, 0); | ||
var _this2$collector; | ||
(_this2$collector = _this2.collector).splice.apply(_this2$collector, [0, 1].concat(_this2.promises[index])); | ||
_this2.promises[index] = null; | ||
setTimeout(_this2.pushQueue, 0); | ||
}); | ||
@@ -417,3 +413,3 @@ this.collector[0] = null; | ||
_proto.renderVNodeToQueue = function renderVNodeToQueue(vNode, context, position) { | ||
var _this2 = this; | ||
var _this3 = this; | ||
var flags = vNode.flags; | ||
@@ -428,3 +424,2 @@ var type = vNode.type; | ||
if (isClass) { | ||
// eslint-disable-next-line new-cap | ||
var instance = new type(props, context); | ||
@@ -463,12 +458,11 @@ var hasNewAPI = Boolean(type.getDerivedStateFromProps); | ||
if (isInvalid(renderOut)) { | ||
_this2.addToQueue('<!--!-->', promisePosition); | ||
_this3.addToQueue('<!--!-->', promisePosition); | ||
} else if (isString(renderOut)) { | ||
_this2.addToQueue(escapeText(renderOut), promisePosition); | ||
_this3.addToQueue(escapeText(renderOut), promisePosition); | ||
} else if (isNumber(renderOut)) { | ||
_this2.addToQueue(renderOut + '', promisePosition); | ||
_this3.addToQueue(renderOut + '', promisePosition); | ||
} else { | ||
_this2.renderVNodeToQueue(renderOut, instance.context, promisePosition); | ||
_this3.renderVNodeToQueue(renderOut, instance.context, promisePosition); | ||
} | ||
// eslint-disable-next-line @typescript-eslint/unbound-method | ||
setTimeout(_this2.pushQueue, 0); | ||
setTimeout(_this3.pushQueue, 0); | ||
return promisePosition; | ||
@@ -562,3 +556,2 @@ }), position); | ||
if (String(type).match(/[\s\n/='"\0<>]/)) { | ||
// eslint-disable-next-line @typescript-eslint/no-throw-literal | ||
throw renderedString; | ||
@@ -633,5 +626,5 @@ } | ||
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } | ||
function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: true, configurable: true, writable: true }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: true }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(true); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next; return next.value = t, next.done = true, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: true }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: true }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { undefined === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = false, next; } return next.done = true, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = true; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, true); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, true); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } | ||
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } | ||
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } | ||
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(undefined); }); }; } | ||
function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); } | ||
@@ -644,3 +637,3 @@ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } | ||
_this = _Readable.call(this) || this; | ||
_this.initNode = void 0; | ||
_this.initNode = undefined; | ||
_this.started = false; | ||
@@ -739,3 +732,2 @@ _this.initNode = initNode; | ||
} | ||
// eslint-disable-next-line new-cap | ||
var instance = new type(props, context); | ||
@@ -754,3 +746,3 @@ var hasNewAPI = Boolean(type.getDerivedStateFromProps); | ||
instance.$BR = true; | ||
return Promise.resolve(!hasNewAPI && (instance.componentWillMount == null ? void 0 : instance.componentWillMount())).then(function () { | ||
return Promise.resolve(!hasNewAPI && (instance.componentWillMount == null ? undefined : instance.componentWillMount())).then(function () { | ||
mergePendingState(instance); | ||
@@ -879,3 +871,2 @@ if (hasNewAPI) { | ||
if (String(type).match(/[\s\n/='"\0<>]/)) { | ||
// eslint-disable-next-line @typescript-eslint/no-throw-literal | ||
throw renderedString; | ||
@@ -882,0 +873,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("inferno"),require("stream")):"function"===typeof define&&define.amd?define(["exports","inferno","stream"],t):t(((e="undefined"!==typeof globalThis?globalThis:e||self).Inferno=e.Inferno||{},e.Inferno.Server=e.Inferno.Server||{}),e.Inferno,e.stream)}(this,(function(e,t,r){"use strict";var n=Array.isArray;function o(e){return void 0===e||null===e}function i(e){return null===e||!1===e||!0===e||void 0===e}function u(e){return"function"===typeof e}function a(e){return"string"===typeof e}function s(e){return"number"===typeof e}function c(e){return null===e}function l(e){return void 0===e}function f(e){throw e||(e="a runtime error occured! Use Inferno in development environment to find the error."),new Error("Inferno Error: "+e)}function h(e){if(a(e))return e;var t,r="";for(var n in e){var o=e[n];("string"===(t=typeof o)||"number"===t)&&(r+=n+":"+o+";")}return r}function p(e){var t=h(e);if(t)return' style="'+t+'"';return""}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(null,arguments)}var v=/["'&<>]/;function y(e){if(!v.test(e))return e;var t,r="",n="",o=0;for(t=0;t<e.length;++t){switch(e.charCodeAt(t)){case 34:n=""";break;case 39:n="'";break;case 38:n="&";break;case 60:n="<";break;case 62:n=">";break;default:continue}t>o&&(r+=e.slice(o,t)),r+=n,o=t+1}return r+e.slice(o,t)}var g=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",m=new RegExp("^["+g+"]["+g+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),b={},w={};function x(e){if(void 0!==w[e])return!0;if(void 0!==b[e])return!1;if(m.test(e))return w[e]=!0,!0;return b[e]=!0,!1}var T=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function k(e,t,r){if(e.constructor.getDerivedStateFromProps)return d({},r,e.constructor.getDerivedStateFromProps(t,r));return r}function O(e,r){var n=e.props||t.EMPTY_OBJ;return 32768&e.flags?e.type.render(n,e.ref,r):e.type(n,r)}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(null,arguments)}function S(e,r,l){var h=e.flags,d=e.type,v=e.props||t.EMPTY_OBJ,g=e.children;if(0!==(14&h)){if(4&h){var m,b=new d(v,l),w=Boolean(d.getDerivedStateFromProps);if(b.$BS=!1,b.$SSR=!0,u(b.getChildContext)&&(m=b.getChildContext()),m=o(m)?l:P({},l,m),b.props===t.EMPTY_OBJ&&(b.props=v),b.context=l,!w&&u(b.componentWillMount)){b.$BR=!0,b.componentWillMount(),b.$BR=!1;var F=b.$PS;if(F){var Q=b.state;if(null===Q)b.state=F;else for(var _ in F)Q[_]=F[_];b.$PSS=!1,b.$PS=null}}w&&(b.state=k(b,v,b.state));var E=b.render(v,b.state,b.context);if(i(E))return"\x3c!--!--\x3e";if(a(E))return y(E);if(s(E))return E+"";return S(E,e,m)}var j=O(e,l);if(i(j))return"\x3c!--!--\x3e";if(a(j))return y(j);if(s(j))return j+"";return S(j,e,l)}if(0!==(481&h)){var N,L="<"+d,C=T.has(d),B=e.className;if(a(B)?L+=' class="'+y(B)+'"':s(B)&&(L+=' class="'+B+'"'),!c(v)){for(var M in v){var $=v[M];switch(M){case"dangerouslySetInnerHTML":N=$.__html;break;case"style":o(v.style)||(L+=p(v.style));break;case"children":case"className":break;case"defaultValue":v.value||(L+=' value="'+(a($)?y($):$)+'"');break;case"defaultChecked":v.checked||(L+=' checked="'+$+'"');break;default:x(M)&&(a($)?L+=" "+M+'="'+y($)+'"':s($)?L+=" "+M+'="'+$+'"':!0===$&&(L+=" "+M))}}"option"===d&&"undefined"!==typeof v.value&&v.value===r.props.value&&(L+=" selected")}if(C)L+=">";else{L+=">";var I=e.childFlags;if(2===I)L+=S(g,e,l);else if(12&I)for(var D=0,R=g.length;D<R;++D)L+=S(g[D],e,l);else 16===I?L+=""===g?" ":y(g):N&&(L+=N);C||(L+="</"+d+">")}if(String(d).match(/[\s\n/='"\0<>]/))throw L;return L}if(0!==(16&h))return""===g?" ":y(g);if(n(e)||0!==(8192&h)){var A=e.childFlags;if(2===A||n(e)&&0===e.length)return"\x3c!--!--\x3e";if(12&A||n(e)){for(var V=n(e)?e:g,G="",Y=0,W=V.length;Y<W;++Y)G+=S(V[Y],e,l);return G}}else f();return""}function F(e){return S(e,{},{})}function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Q.apply(null,arguments)}function _(e){var t=e.$PS;if(t){var r=e.state;e.state=null===r?t:Q({},r,t),e.$PS=null}e.$BR=!1}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(null,arguments)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var N=function(e){function r(t){var r;return(r=e.call(this)||this).collector=[1/0],r.promises=[],r.pushQueue=r.pushQueue.bind(r),t&&r.renderVNodeToQueue(t,null,null),r}var h,d;d=e,(h=r).prototype=Object.create(d.prototype),h.prototype.constructor=h,j(h,d);var v=r.prototype;return v._read=function(){setTimeout(this.pushQueue,0)},v.addToQueue=function(e,t){if(o(t))"string"===typeof e&&this.collector.length-1===0?this.push(e):"string"===typeof e&&"string"===typeof this.collector[this.collector.length-2]?this.collector[this.collector.length-2]+=e:this.collector.splice(-1,0,e);else{var r=this.promises[t].length-1;"string"===typeof this.promises[t][r]&&"string"===typeof e?this.promises[t][r]+=e:this.promises[t].push(e)}},v.pushQueue=function(){var e=this.collector[0];if("string"===typeof e)this.push(e),this.collector.shift();else if(e&&("object"===typeof e||u(e))&&u(e.then)){var t=this;e.then((function(e){var r;(r=t.collector).splice.apply(r,[0,1].concat(t.promises[e])),t.promises[e]=null,setTimeout(t.pushQueue,0)})),this.collector[0]=null}else e===1/0&&this.emit("end")},v.renderVNodeToQueue=function(e,r,h){var d=this,v=e.flags,g=e.type,m=e.props||t.EMPTY_OBJ,b=e.children;if((14&v)>0)if(4&v){var w,P=new g(m,r),S=Boolean(g.getDerivedStateFromProps);if(P.$BS=!1,P.$SSR=!0,l(P.getChildContext)||(w=P.getChildContext()),o(w)||(r=E({},r,w)),P.props===t.EMPTY_OBJ&&(P.props=m),P.context=r,!S&&u(P.componentWillMount)&&(P.$BR=!0,P.componentWillMount(),_(P)),u(P.getInitialProps)){var F=P.getInitialProps(P.props,P.context);if(F){if(Promise.resolve(F)===F){var Q=this.promises.push([])-1;return void this.addToQueue(F.then((function(e){"object"===typeof e&&(P.props=E({},P.props,e));var t=P.render(P.props,P.state,P.context);return i(t)?d.addToQueue("\x3c!--!--\x3e",Q):a(t)?d.addToQueue(y(t),Q):s(t)?d.addToQueue(t+"",Q):d.renderVNodeToQueue(t,P.context,Q),setTimeout(d.pushQueue,0),Q})),h)}P.props=E({},P.props,F)}}S&&(P.state=k(P,m,P.state));var j=P.render(P.props,P.state,P.context);i(j)?this.addToQueue("\x3c!--!--\x3e",h):a(j)?this.addToQueue(y(j),h):s(j)?this.addToQueue(j+"",h):this.renderVNodeToQueue(j,r,h)}else{var N=O(e,r);i(N)?this.addToQueue("\x3c!--!--\x3e",h):a(N)?this.addToQueue(y(N),h):s(N)?this.addToQueue(N+"",h):this.renderVNodeToQueue(N,r,h)}else if((481&v)>0){var L,C="<"+g,B=T.has(g),M=e.className;if(a(M)?C+=' class="'+y(M)+'"':s(M)&&(C+=' class="'+M+'"'),!c(m))for(var $ in m){var I=m[$];switch($){case"dangerouslySetInnerHTML":L=I.__html;break;case"style":o(m.style)||(C+=p(m.style));break;case"children":case"className":break;case"defaultValue":m.value||(C+=' value="'+(a(I)?y(I):I)+'"');break;case"defaultChecked":m.checked||(C+=' checked="'+I+'"');break;default:x($)&&(a(I)?C+=" "+$+'="'+y(I)+'"':s(I)?C+=" "+$+'="'+I+'"':!0===I&&(C+=" "+$))}}if(C+=">",String(g).match(/[\s\n/='"\0<>]/))throw C;if(B)this.addToQueue(C,h);else{var D=e.childFlags;if(2===D)return this.addToQueue(C,h),this.renderVNodeToQueue(b,r,h),void this.addToQueue("</"+g+">",h);if(16===D)return this.addToQueue(C,h),this.addToQueue(""===b?" ":y(b+""),h),void this.addToQueue("</"+g+">",h);if(12&D){this.addToQueue(C,h);for(var R=0,A=b.length;R<A;++R)this.renderVNodeToQueue(b[R],r,h);return void this.addToQueue("</"+g+">",h)}if(L)return void this.addToQueue(C+L+"</"+g+">",h);B||this.addToQueue(C+"</"+g+">",h)}}else if((16&v)>0)this.addToQueue(""===b?" ":y(b),h);else if(n(e)||0!==(8192&v)){var V=e.childFlags;if(2===V||n(e)&&0===e.length)this.addToQueue("\x3c!--!--\x3e",h);else if(12&V||n(e))for(var G=n(e)?e:e.children,Y=0,W=G.length;Y<W;++Y)this.renderVNodeToQueue(G[Y],r,h)}else f()},r}(r.Readable);function L(e){return new N(e)}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(null,arguments)}function B(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */B=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,u=Object.create(i.prototype),a=new E(n||[]);return o(u,"_invoke",{value:S(e,r,a)}),u}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,u,(function(){return this}));var x=Object.getPrototypeOf,T=x&&x(x(j([])));T&&T!==r&&n.call(T,u)&&(w=T);var k=b.prototype=g.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,a){var s=f(e[o],e,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,u,a)}),(function(e){r("throw",e,u,a)})):t.resolve(l).then((function(e){c.value=e,u(c)}),(function(e){return r("throw",e,u,a)}))}a(s.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function S(t,r,n){var o=h;return function(i,u){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw u;return{value:e,done:!0}}for(n.method=i,n.arg=u;;){var a=n.delegate;if(a){var s=F(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?v:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function F(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,F(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var u=i.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function Q(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Q,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return m.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=c(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},O(P.prototype),c(P.prototype,a,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new P(l(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},O(k),c(k,s,"Generator"),c(k,u,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var s=n.call(u,"catchLoc"),c=n.call(u,"finallyLoc");if(s&&c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(s){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=e,u.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function M(e,t,r,n,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function $(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){M(i,n,o,u,a,"next",e)}function a(e){M(i,n,o,u,a,"throw",e)}u(void 0)}))}}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var D=Promise.resolve(),R=function(e){function t(t){var r;return(r=e.call(this)||this).initNode=void 0,r.started=!1,r.initNode=t,r}var r,l;l=e,(r=t).prototype=Object.create(l.prototype),r.prototype.constructor=r,I(r,l);var f=t.prototype;return f._read=function(){var e=this;if(this.started)return;this.started=!0,D.then((function(){return e.renderNode(e.initNode,null)})).then((function(){e.push(null)})).catch((function(t){e.emit("error",t)}))},f.renderNode=function(e,t){var r=e.flags;if((14&r)>0)return this.renderComponent(e,t,4&r);if((481&r)>0)return this.renderElement(e,t);if(n(e)||0!==(8192&r))return this.renderArrayOrFragment(e,t);this.renderText(e)},f.renderArrayOrFragment=function(e,t){var r=this,o=e.childFlags;if(2===o||n(e)&&0===e.length)return this.push("\x3c!--!--\x3e");if(12&o||n(e))return(n(e)?e:e.children).reduce(function(){var e=$(B().mark((function e(n,o){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.then($(B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve(r.renderNode(o,t)).then((function(){return!!(16&o.flags)}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve(!1))},f.renderComponent=function(e,t,r){var n=this,c=e.type,l=e.props;if(!r){var f=O(e,t);if(i(f))return this.push("\x3c!--!--\x3e");if(a(f))return this.push(y(f));if(s(f))return this.push(f+"");return this.renderNode(f,t)}var h,p=new c(l,t),d=Boolean(c.getDerivedStateFromProps);return p.$BS=!1,p.$SSR=!0,u(p.getChildContext)&&(h=p.getChildContext()),o(h)||(t=C({},t,h)),p.context=t,p.$BR=!0,Promise.resolve(!d&&(null==p.componentWillMount?void 0:p.componentWillMount())).then((function(){_(p),d&&(p.state=k(p,l,p.state));var e=p.render(p.props,p.state,p.context);if(i(e))return n.push("\x3c!--!--\x3e");if(a(e))return n.push(y(e));if(s(e))return n.push(e+"");return n.renderNode(e,t)}))},f.renderChildren=function(e,t,r){var n=this;if(2===r)return this.renderNode(e,t);if(16===r)return this.push(""===e?" ":y(e+""));if(12&r)return e.reduce(function(){var e=$(B().mark((function e(r,o){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.then($(B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve(n.renderNode(o,t)).then((function(){return!!(16&o.flags)}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve(!1))},f.renderText=function(e){this.push(""===e.children?" ":y(e.children))},f.renderElement=function(e,t){var r,n=this,i=e.type,u=e.props,l="<"+i,f=T.has(i),h=e.className;if(a(h)?l+=' class="'+y(h)+'"':s(h)&&(l+=' class="'+h+'"'),!c(u))for(var d in u){var v=u[d];switch(d){case"dangerouslySetInnerHTML":r=v.__html;break;case"style":o(u.style)||(l+=p(u.style));break;case"children":case"className":break;case"defaultValue":u.value||(l+=' value="'+(a(v)?y(v):v)+'"');break;case"defaultChecked":u.checked||(l+=' checked="'+v+'"');break;default:if(x(d)){a(v)?l+=" "+d+'="'+y(v)+'"':s(v)?l+=" "+d+'="'+v+'"':!0===v&&(l+=" "+d);break}}}if(l+=">",this.push(l),String(i).match(/[\s\n/='"\0<>]/))throw l;if(f)return;if(r)return this.push(r),void this.push("</"+i+">");var g=e.childFlags;if(1===g)return void this.push("</"+i+">");return Promise.resolve(this.renderChildren(e.children,t,g)).then((function(){n.push("</"+i+">")}))},t}(r.Readable);function A(e){return new R(e)}e.RenderQueueStream=N,e.RenderStream=R,e.renderToStaticMarkup=F,e.renderToString=F,e.streamAsStaticMarkup=A,e.streamAsString=A,e.streamQueueAsStaticMarkup=L,e.streamQueueAsString=L})); | ||
!function(e,t){"object"===typeof exports&&"undefined"!==typeof module?t(exports,require("inferno"),require("stream")):"function"===typeof define&&define.amd?define(["exports","inferno","stream"],t):t(((e="undefined"!==typeof globalThis?globalThis:e||self).Inferno=e.Inferno||{},e.Inferno.Server=e.Inferno.Server||{}),e.Inferno,e.stream)}(this,(function(e,t,r){"use strict";var n=Array.isArray;function o(e){return void 0===e||null===e}function i(e){return null===e||!1===e||!0===e||void 0===e}function u(e){return"function"===typeof e}function a(e){return"string"===typeof e}function s(e){return"number"===typeof e}function c(e){return null===e}function l(e){return void 0===e}function f(e){throw e||(e="a runtime error occured! Use Inferno in development environment to find the error."),new Error("Inferno Error: "+e)}function h(e){if(a(e))return e;var t,r="";for(var n in e){var o=e[n];("string"===(t=typeof o)||"number"===t)&&(r+=n+":"+o+";")}return r}function p(e){var t=h(e);if(t)return' style="'+t+'"';return""}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(null,arguments)}var v=/["'&<>]/;function y(e){if(!v.test(e))return e;for(var t="",r="",n=0,o=0;o<e.length;++o){switch(e.charCodeAt(o)){case 34:r=""";break;case 39:r="'";break;case 38:r="&";break;case 60:r="<";break;case 62:r=">";break;default:continue}o>n&&(t+=e.slice(n,o)),t+=r,n=o+1}return t+e.slice(n,o)}var g=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",m=new RegExp("^["+g+"]["+g+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),b={},w={};function x(e){if(void 0!==w[e])return!0;if(void 0!==b[e])return!1;if(m.test(e))return w[e]=!0,!0;return b[e]=!0,!1}var T=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function k(e,t,r){if(e.constructor.getDerivedStateFromProps)return d({},r,e.constructor.getDerivedStateFromProps(t,r));return r}function O(e,r){var n=e.props||t.EMPTY_OBJ;return 32768&e.flags?e.type.render(n,e.ref,r):e.type(n,r)}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(null,arguments)}function S(e,r,l){var h=e.flags,d=e.type,v=e.props||t.EMPTY_OBJ,g=e.children;if(0!==(14&h)){if(4&h){var m,b=new d(v,l),w=Boolean(d.getDerivedStateFromProps);if(b.$BS=!1,b.$SSR=!0,u(b.getChildContext)&&(m=b.getChildContext()),m=o(m)?l:P({},l,m),b.props===t.EMPTY_OBJ&&(b.props=v),b.context=l,!w&&u(b.componentWillMount)){b.$BR=!0,b.componentWillMount(),b.$BR=!1;var F=b.$PS;if(F){var Q=b.state;if(null===Q)b.state=F;else for(var _ in F)Q[_]=F[_];b.$PSS=!1,b.$PS=null}}w&&(b.state=k(b,v,b.state));var E=b.render(v,b.state,b.context);if(i(E))return"\x3c!--!--\x3e";if(a(E))return y(E);if(s(E))return E+"";return S(E,e,m)}var j=O(e,l);if(i(j))return"\x3c!--!--\x3e";if(a(j))return y(j);if(s(j))return j+"";return S(j,e,l)}if(0!==(481&h)){var N,L="<"+d,C=T.has(d),B=e.className;if(a(B)?L+=' class="'+y(B)+'"':s(B)&&(L+=' class="'+B+'"'),!c(v)){for(var M in v){var $=v[M];switch(M){case"dangerouslySetInnerHTML":N=$.__html;break;case"style":o(v.style)||(L+=p(v.style));break;case"children":case"className":break;case"defaultValue":v.value||(L+=' value="'+(a($)?y($):$)+'"');break;case"defaultChecked":v.checked||(L+=' checked="'+$+'"');break;default:x(M)&&(a($)?L+=" "+M+'="'+y($)+'"':s($)?L+=" "+M+'="'+$+'"':!0===$&&(L+=" "+M))}}"option"===d&&"undefined"!==typeof v.value&&v.value===r.props.value&&(L+=" selected")}if(C)L+=">";else{L+=">";var I=e.childFlags;if(2===I)L+=S(g,e,l);else if(12&I)for(var D=0,R=g.length;D<R;++D)L+=S(g[D],e,l);else 16===I?L+=""===g?" ":y(g):N&&(L+=N);C||(L+="</"+d+">")}if(String(d).match(/[\s\n/='"\0<>]/))throw L;return L}if(0!==(16&h))return""===g?" ":y(g);if(n(e)||0!==(8192&h)){var A=e.childFlags;if(2===A||n(e)&&0===e.length)return"\x3c!--!--\x3e";if(12&A||n(e)){for(var V=n(e)?e:g,G="",Y=0,W=V.length;Y<W;++Y)G+=S(V[Y],e,l);return G}}else f();return""}function F(e){return S(e,{},{})}function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Q.apply(null,arguments)}function _(e){var t=e.$PS;if(t){var r=e.state;e.state=null===r?t:Q({},r,t),e.$PS=null}e.$BR=!1}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(null,arguments)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var N=function(e){function r(t){var r;return(r=e.call(this)||this).collector=[1/0],r.promises=[],r.pushQueue=r.pushQueue.bind(r),t&&r.renderVNodeToQueue(t,null,null),r}var h,d;d=e,(h=r).prototype=Object.create(d.prototype),h.prototype.constructor=h,j(h,d);var v=r.prototype;return v._read=function(){setTimeout(this.pushQueue,0)},v.addToQueue=function(e,t){if(o(t))"string"===typeof e&&this.collector.length-1===0?this.push(e):"string"===typeof e&&"string"===typeof this.collector[this.collector.length-2]?this.collector[this.collector.length-2]+=e:this.collector.splice(-1,0,e);else{var r=this.promises[t].length-1;"string"===typeof this.promises[t][r]&&"string"===typeof e?this.promises[t][r]+=e:this.promises[t].push(e)}},v.pushQueue=function(){var e=this,t=this.collector[0];"string"===typeof t?(this.push(t),this.collector.shift()):t&&("object"===typeof t||u(t))&&u(t.then)?(t.then((function(t){var r;(r=e.collector).splice.apply(r,[0,1].concat(e.promises[t])),e.promises[t]=null,setTimeout(e.pushQueue,0)})),this.collector[0]=null):t===1/0&&this.emit("end")},v.renderVNodeToQueue=function(e,r,h){var d=this,v=e.flags,g=e.type,m=e.props||t.EMPTY_OBJ,b=e.children;if((14&v)>0)if(4&v){var w,P=new g(m,r),S=Boolean(g.getDerivedStateFromProps);if(P.$BS=!1,P.$SSR=!0,l(P.getChildContext)||(w=P.getChildContext()),o(w)||(r=E({},r,w)),P.props===t.EMPTY_OBJ&&(P.props=m),P.context=r,!S&&u(P.componentWillMount)&&(P.$BR=!0,P.componentWillMount(),_(P)),u(P.getInitialProps)){var F=P.getInitialProps(P.props,P.context);if(F){if(Promise.resolve(F)===F){var Q=this.promises.push([])-1;return void this.addToQueue(F.then((function(e){"object"===typeof e&&(P.props=E({},P.props,e));var t=P.render(P.props,P.state,P.context);return i(t)?d.addToQueue("\x3c!--!--\x3e",Q):a(t)?d.addToQueue(y(t),Q):s(t)?d.addToQueue(t+"",Q):d.renderVNodeToQueue(t,P.context,Q),setTimeout(d.pushQueue,0),Q})),h)}P.props=E({},P.props,F)}}S&&(P.state=k(P,m,P.state));var j=P.render(P.props,P.state,P.context);i(j)?this.addToQueue("\x3c!--!--\x3e",h):a(j)?this.addToQueue(y(j),h):s(j)?this.addToQueue(j+"",h):this.renderVNodeToQueue(j,r,h)}else{var N=O(e,r);i(N)?this.addToQueue("\x3c!--!--\x3e",h):a(N)?this.addToQueue(y(N),h):s(N)?this.addToQueue(N+"",h):this.renderVNodeToQueue(N,r,h)}else if((481&v)>0){var L,C="<"+g,B=T.has(g),M=e.className;if(a(M)?C+=' class="'+y(M)+'"':s(M)&&(C+=' class="'+M+'"'),!c(m))for(var $ in m){var I=m[$];switch($){case"dangerouslySetInnerHTML":L=I.__html;break;case"style":o(m.style)||(C+=p(m.style));break;case"children":case"className":break;case"defaultValue":m.value||(C+=' value="'+(a(I)?y(I):I)+'"');break;case"defaultChecked":m.checked||(C+=' checked="'+I+'"');break;default:x($)&&(a(I)?C+=" "+$+'="'+y(I)+'"':s(I)?C+=" "+$+'="'+I+'"':!0===I&&(C+=" "+$))}}if(C+=">",String(g).match(/[\s\n/='"\0<>]/))throw C;if(B)this.addToQueue(C,h);else{var D=e.childFlags;if(2===D)return this.addToQueue(C,h),this.renderVNodeToQueue(b,r,h),void this.addToQueue("</"+g+">",h);if(16===D)return this.addToQueue(C,h),this.addToQueue(""===b?" ":y(b+""),h),void this.addToQueue("</"+g+">",h);if(12&D){this.addToQueue(C,h);for(var R=0,A=b.length;R<A;++R)this.renderVNodeToQueue(b[R],r,h);return void this.addToQueue("</"+g+">",h)}if(L)return void this.addToQueue(C+L+"</"+g+">",h);B||this.addToQueue(C+"</"+g+">",h)}}else if((16&v)>0)this.addToQueue(""===b?" ":y(b),h);else if(n(e)||0!==(8192&v)){var V=e.childFlags;if(2===V||n(e)&&0===e.length)this.addToQueue("\x3c!--!--\x3e",h);else if(12&V||n(e))for(var G=n(e)?e:e.children,Y=0,W=G.length;Y<W;++Y)this.renderVNodeToQueue(G[Y],r,h)}else f()},r}(r.Readable);function L(e){return new N(e)}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(null,arguments)}function B(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */B=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,u=Object.create(i.prototype),a=new E(n||[]);return o(u,"_invoke",{value:S(e,r,a)}),u}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,u,(function(){return this}));var x=Object.getPrototypeOf,T=x&&x(x(j([])));T&&T!==r&&n.call(T,u)&&(w=T);var k=b.prototype=g.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,a){var s=f(e[o],e,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,u,a)}),(function(e){r("throw",e,u,a)})):t.resolve(l).then((function(e){c.value=e,u(c)}),(function(e){return r("throw",e,u,a)}))}a(s.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function S(t,r,n){var o=h;return function(i,u){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw u;return{value:e,done:!0}}for(n.method=i,n.arg=u;;){var a=n.delegate;if(a){var s=F(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?v:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function F(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,F(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var u=i.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function Q(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Q,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return m.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=c(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},O(P.prototype),c(P.prototype,a,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new P(l(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},O(k),c(k,s,"Generator"),c(k,u,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var s=n.call(u,"catchLoc"),c=n.call(u,"finallyLoc");if(s&&c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(s){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=e,u.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function M(e,t,r,n,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function $(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){M(i,n,o,u,a,"next",e)}function a(e){M(i,n,o,u,a,"throw",e)}u(void 0)}))}}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var D=Promise.resolve(),R=function(e){function t(t){var r;return(r=e.call(this)||this).initNode=void 0,r.started=!1,r.initNode=t,r}var r,l;l=e,(r=t).prototype=Object.create(l.prototype),r.prototype.constructor=r,I(r,l);var f=t.prototype;return f._read=function(){var e=this;if(this.started)return;this.started=!0,D.then((function(){return e.renderNode(e.initNode,null)})).then((function(){e.push(null)})).catch((function(t){e.emit("error",t)}))},f.renderNode=function(e,t){var r=e.flags;if((14&r)>0)return this.renderComponent(e,t,4&r);if((481&r)>0)return this.renderElement(e,t);if(n(e)||0!==(8192&r))return this.renderArrayOrFragment(e,t);this.renderText(e)},f.renderArrayOrFragment=function(e,t){var r=this,o=e.childFlags;if(2===o||n(e)&&0===e.length)return this.push("\x3c!--!--\x3e");if(12&o||n(e))return(n(e)?e:e.children).reduce(function(){var e=$(B().mark((function e(n,o){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.then($(B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve(r.renderNode(o,t)).then((function(){return!!(16&o.flags)}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve(!1))},f.renderComponent=function(e,t,r){var n=this,c=e.type,l=e.props;if(!r){var f=O(e,t);if(i(f))return this.push("\x3c!--!--\x3e");if(a(f))return this.push(y(f));if(s(f))return this.push(f+"");return this.renderNode(f,t)}var h,p=new c(l,t),d=Boolean(c.getDerivedStateFromProps);return p.$BS=!1,p.$SSR=!0,u(p.getChildContext)&&(h=p.getChildContext()),o(h)||(t=C({},t,h)),p.context=t,p.$BR=!0,Promise.resolve(!d&&(null==p.componentWillMount?void 0:p.componentWillMount())).then((function(){_(p),d&&(p.state=k(p,l,p.state));var e=p.render(p.props,p.state,p.context);if(i(e))return n.push("\x3c!--!--\x3e");if(a(e))return n.push(y(e));if(s(e))return n.push(e+"");return n.renderNode(e,t)}))},f.renderChildren=function(e,t,r){var n=this;if(2===r)return this.renderNode(e,t);if(16===r)return this.push(""===e?" ":y(e+""));if(12&r)return e.reduce(function(){var e=$(B().mark((function e(r,o){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.then($(B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve(n.renderNode(o,t)).then((function(){return!!(16&o.flags)}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve(!1))},f.renderText=function(e){this.push(""===e.children?" ":y(e.children))},f.renderElement=function(e,t){var r,n=this,i=e.type,u=e.props,l="<"+i,f=T.has(i),h=e.className;if(a(h)?l+=' class="'+y(h)+'"':s(h)&&(l+=' class="'+h+'"'),!c(u))for(var d in u){var v=u[d];switch(d){case"dangerouslySetInnerHTML":r=v.__html;break;case"style":o(u.style)||(l+=p(u.style));break;case"children":case"className":break;case"defaultValue":u.value||(l+=' value="'+(a(v)?y(v):v)+'"');break;case"defaultChecked":u.checked||(l+=' checked="'+v+'"');break;default:if(x(d)){a(v)?l+=" "+d+'="'+y(v)+'"':s(v)?l+=" "+d+'="'+v+'"':!0===v&&(l+=" "+d);break}}}if(l+=">",this.push(l),String(i).match(/[\s\n/='"\0<>]/))throw l;if(f)return;if(r)return this.push(r),void this.push("</"+i+">");var g=e.childFlags;if(1===g)return void this.push("</"+i+">");return Promise.resolve(this.renderChildren(e.children,t,g)).then((function(){n.push("</"+i+">")}))},t}(r.Readable);function A(e){return new R(e)}e.RenderQueueStream=N,e.RenderStream=R,e.renderToStaticMarkup=F,e.renderToString=F,e.streamAsStaticMarkup=A,e.streamAsString=A,e.streamQueueAsStaticMarkup=L,e.streamQueueAsString=L})); |
{ | ||
"name": "inferno-server", | ||
"version": "9.0.0-alpha.2", | ||
"version": "9.0.0-alpha.3", | ||
"license": "MIT", | ||
@@ -40,3 +40,5 @@ "type": "module", | ||
"require": "./index.cjs" | ||
} | ||
}, | ||
"./dist/index.dev.mjs": "./dist/index.dev.mjs", | ||
"./dist/index.mjs": "./dist/index.mjs" | ||
}, | ||
@@ -55,10 +57,10 @@ "module": "index.mjs", | ||
"devDependencies": { | ||
"inferno-create-element": "9.0.0-alpha.2", | ||
"inferno-hydrate": "9.0.0-alpha.2", | ||
"inferno-shared": "9.0.0-alpha.2", | ||
"inferno-vnode-flags": "9.0.0-alpha.2", | ||
"inferno-create-element": "9.0.0-alpha.3", | ||
"inferno-hydrate": "9.0.0-alpha.3", | ||
"inferno-shared": "9.0.0-alpha.3", | ||
"inferno-vnode-flags": "9.0.0-alpha.3", | ||
"mobx": "*" | ||
}, | ||
"dependencies": { | ||
"inferno": "9.0.0-alpha.2" | ||
"inferno": "9.0.0-alpha.3" | ||
}, | ||
@@ -75,3 +77,3 @@ "rollup": { | ||
}, | ||
"gitHead": "5df76afa8932d05ee02ce9ce6de47ede52f569d6" | ||
"gitHead": "b242af50261bfe56d5bd4a2b060dcef86b074444" | ||
} |
# inferno-server | ||
> Inferno package for working with the server | ||
@@ -14,11 +15,11 @@ | ||
* renderToString | ||
* RenderQueueStream | ||
* RenderStream | ||
* renderToStaticMarkup | ||
* renderToString | ||
* streamAsStaticMarkup | ||
* streamAsString | ||
* streamQueueAsStaticMarkup | ||
* streamQueueAsString | ||
- renderToString | ||
- RenderQueueStream | ||
- RenderStream | ||
- renderToStaticMarkup | ||
- renderToString | ||
- streamAsStaticMarkup | ||
- streamAsString | ||
- streamQueueAsStaticMarkup | ||
- streamQueueAsString | ||
@@ -32,2 +33,1 @@ ## Usage | ||
``` | ||
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
192095
3609
+ Addedinferno@9.0.0-alpha.3(transitive)
+ Addedinferno-vnode-flags@9.0.0-alpha.3(transitive)
- Removedinferno@9.0.0-alpha.2(transitive)
- Removedinferno-vnode-flags@9.0.0-alpha.2(transitive)
Updatedinferno@9.0.0-alpha.3