UNPKG

@ea-lab/reactive-json

Version:

A REACT-based lib that transforms JSON (or YAML) into interactive HTML markup.

1,844 lines 51.1 kB
import { g as Te } from "./_commonjsHelpers-DaMA6jEr.js"; import he from "react"; var F = {}, L = {}, z = {}, D = {}, x = {}, X = {}, Y; function ve() { return Y || (Y = 1, function(r) { Object.defineProperty(r, "__esModule", { value: !0 }), r.Doctype = r.CDATA = r.Tag = r.Style = r.Script = r.Comment = r.Directive = r.Text = r.Root = r.isTag = r.ElementType = void 0; var s; (function(u) { u.Root = "root", u.Text = "text", u.Directive = "directive", u.Comment = "comment", u.Script = "script", u.Style = "style", u.Tag = "tag", u.CDATA = "cdata", u.Doctype = "doctype"; })(s = r.ElementType || (r.ElementType = {})); function f(u) { return u.type === s.Tag || u.type === s.Script || u.type === s.Style; } r.isTag = f, r.Root = s.Root, r.Text = s.Text, r.Directive = s.Directive, r.Comment = s.Comment, r.Script = s.Script, r.Style = s.Style, r.Tag = s.Tag, r.CDATA = s.CDATA, r.Doctype = s.Doctype; }(X)), X; } var m = {}, Z; function K() { if (Z) return m; Z = 1; var r = m && m.__extends || /* @__PURE__ */ function() { var e = function(i, a) { return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_, b) { _.__proto__ = b; } || function(_, b) { for (var O in b) Object.prototype.hasOwnProperty.call(b, O) && (_[O] = b[O]); }, e(i, a); }; return function(i, a) { if (typeof a != "function" && a !== null) throw new TypeError("Class extends value " + String(a) + " is not a constructor or null"); e(i, a); function _() { this.constructor = i; } i.prototype = a === null ? Object.create(a) : (_.prototype = a.prototype, new _()); }; }(), s = m && m.__assign || function() { return s = Object.assign || function(e) { for (var i, a = 1, _ = arguments.length; a < _; a++) { i = arguments[a]; for (var b in i) Object.prototype.hasOwnProperty.call(i, b) && (e[b] = i[b]); } return e; }, s.apply(this, arguments); }; Object.defineProperty(m, "__esModule", { value: !0 }), m.cloneNode = m.hasChildren = m.isDocument = m.isDirective = m.isComment = m.isText = m.isCDATA = m.isTag = m.Element = m.Document = m.CDATA = m.NodeWithChildren = m.ProcessingInstruction = m.Comment = m.Text = m.DataNode = m.Node = void 0; var f = /* @__PURE__ */ ve(), u = ( /** @class */ function() { function e() { this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null; } return Object.defineProperty(e.prototype, "parentNode", { // Read-write aliases for properties /** * Same as {@link parent}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.parent; }, set: function(i) { this.parent = i; }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "previousSibling", { /** * Same as {@link prev}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.prev; }, set: function(i) { this.prev = i; }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "nextSibling", { /** * Same as {@link next}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.next; }, set: function(i) { this.next = i; }, enumerable: !1, configurable: !0 }), e.prototype.cloneNode = function(i) { return i === void 0 && (i = !1), P(this, i); }, e; }() ); m.Node = u; var d = ( /** @class */ function(e) { r(i, e); function i(a) { var _ = e.call(this) || this; return _.data = a, _; } return Object.defineProperty(i.prototype, "nodeValue", { /** * Same as {@link data}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.data; }, set: function(a) { this.data = a; }, enumerable: !1, configurable: !0 }), i; }(u) ); m.DataNode = d; var p = ( /** @class */ function(e) { r(i, e); function i() { var a = e !== null && e.apply(this, arguments) || this; return a.type = f.ElementType.Text, a; } return Object.defineProperty(i.prototype, "nodeType", { get: function() { return 3; }, enumerable: !1, configurable: !0 }), i; }(d) ); m.Text = p; var T = ( /** @class */ function(e) { r(i, e); function i() { var a = e !== null && e.apply(this, arguments) || this; return a.type = f.ElementType.Comment, a; } return Object.defineProperty(i.prototype, "nodeType", { get: function() { return 8; }, enumerable: !1, configurable: !0 }), i; }(d) ); m.Comment = T; var o = ( /** @class */ function(e) { r(i, e); function i(a, _) { var b = e.call(this, _) || this; return b.name = a, b.type = f.ElementType.Directive, b; } return Object.defineProperty(i.prototype, "nodeType", { get: function() { return 1; }, enumerable: !1, configurable: !0 }), i; }(d) ); m.ProcessingInstruction = o; var t = ( /** @class */ function(e) { r(i, e); function i(a) { var _ = e.call(this) || this; return _.children = a, _; } return Object.defineProperty(i.prototype, "firstChild", { // Aliases /** First child of the node. */ get: function() { var a; return (a = this.children[0]) !== null && a !== void 0 ? a : null; }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "lastChild", { /** Last child of the node. */ get: function() { return this.children.length > 0 ? this.children[this.children.length - 1] : null; }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "childNodes", { /** * Same as {@link children}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.children; }, set: function(a) { this.children = a; }, enumerable: !1, configurable: !0 }), i; }(u) ); m.NodeWithChildren = t; var n = ( /** @class */ function(e) { r(i, e); function i() { var a = e !== null && e.apply(this, arguments) || this; return a.type = f.ElementType.CDATA, a; } return Object.defineProperty(i.prototype, "nodeType", { get: function() { return 4; }, enumerable: !1, configurable: !0 }), i; }(t) ); m.CDATA = n; var l = ( /** @class */ function(e) { r(i, e); function i() { var a = e !== null && e.apply(this, arguments) || this; return a.type = f.ElementType.Root, a; } return Object.defineProperty(i.prototype, "nodeType", { get: function() { return 9; }, enumerable: !1, configurable: !0 }), i; }(t) ); m.Document = l; var c = ( /** @class */ function(e) { r(i, e); function i(a, _, b, O) { b === void 0 && (b = []), O === void 0 && (O = a === "script" ? f.ElementType.Script : a === "style" ? f.ElementType.Style : f.ElementType.Tag); var w = e.call(this, b) || this; return w.name = a, w.attribs = _, w.type = O, w; } return Object.defineProperty(i.prototype, "nodeType", { get: function() { return 1; }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "tagName", { // DOM Level 1 aliases /** * Same as {@link name}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.name; }, set: function(a) { this.name = a; }, enumerable: !1, configurable: !0 }), Object.defineProperty(i.prototype, "attributes", { get: function() { var a = this; return Object.keys(this.attribs).map(function(_) { var b, O; return { name: _, value: a.attribs[_], namespace: (b = a["x-attribsNamespace"]) === null || b === void 0 ? void 0 : b[_], prefix: (O = a["x-attribsPrefix"]) === null || O === void 0 ? void 0 : O[_] }; }); }, enumerable: !1, configurable: !0 }), i; }(t) ); m.Element = c; function v(e) { return (0, f.isTag)(e); } m.isTag = v; function S(e) { return e.type === f.ElementType.CDATA; } m.isCDATA = S; function A(e) { return e.type === f.ElementType.Text; } m.isText = A; function y(e) { return e.type === f.ElementType.Comment; } m.isComment = y; function h(e) { return e.type === f.ElementType.Directive; } m.isDirective = h; function R(e) { return e.type === f.ElementType.Root; } m.isDocument = R; function g(e) { return Object.prototype.hasOwnProperty.call(e, "children"); } m.hasChildren = g; function P(e, i) { i === void 0 && (i = !1); var a; if (A(e)) a = new p(e.data); else if (y(e)) a = new T(e.data); else if (v(e)) { var _ = i ? k(e.children) : [], b = new c(e.name, s({}, e.attribs), _); _.forEach(function(C) { return C.parent = b; }), e.namespace != null && (b.namespace = e.namespace), e["x-attribsNamespace"] && (b["x-attribsNamespace"] = s({}, e["x-attribsNamespace"])), e["x-attribsPrefix"] && (b["x-attribsPrefix"] = s({}, e["x-attribsPrefix"])), a = b; } else if (S(e)) { var _ = i ? k(e.children) : [], O = new n(_); _.forEach(function(E) { return E.parent = O; }), a = O; } else if (R(e)) { var _ = i ? k(e.children) : [], w = new l(_); _.forEach(function(E) { return E.parent = w; }), e["x-mode"] && (w["x-mode"] = e["x-mode"]), a = w; } else if (h(e)) { var M = new o(e.name, e.data); e["x-name"] != null && (M["x-name"] = e["x-name"], M["x-publicId"] = e["x-publicId"], M["x-systemId"] = e["x-systemId"]), a = M; } else throw new Error("Not implemented yet: ".concat(e.type)); return a.startIndex = e.startIndex, a.endIndex = e.endIndex, e.sourceCodeLocation != null && (a.sourceCodeLocation = e.sourceCodeLocation), a; } m.cloneNode = P; function k(e) { for (var i = e.map(function(_) { return P(_, !0); }), a = 1; a < i.length; a++) i[a].prev = i[a - 1], i[a - 1].next = i[a]; return i; } return m; } var J; function me() { return J || (J = 1, function(r) { var s = x && x.__createBinding || (Object.create ? function(o, t, n, l) { l === void 0 && (l = n); var c = Object.getOwnPropertyDescriptor(t, n); (!c || ("get" in c ? !t.__esModule : c.writable || c.configurable)) && (c = { enumerable: !0, get: function() { return t[n]; } }), Object.defineProperty(o, l, c); } : function(o, t, n, l) { l === void 0 && (l = n), o[l] = t[n]; }), f = x && x.__exportStar || function(o, t) { for (var n in o) n !== "default" && !Object.prototype.hasOwnProperty.call(t, n) && s(t, o, n); }; Object.defineProperty(r, "__esModule", { value: !0 }), r.DomHandler = void 0; var u = /* @__PURE__ */ ve(), d = /* @__PURE__ */ K(); f(/* @__PURE__ */ K(), r); var p = { withStartIndices: !1, withEndIndices: !1, xmlMode: !1 }, T = ( /** @class */ function() { function o(t, n, l) { this.dom = [], this.root = new d.Document(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, typeof n == "function" && (l = n, n = p), typeof t == "object" && (n = t, t = void 0), this.callback = t ?? null, this.options = n ?? p, this.elementCB = l ?? null; } return o.prototype.onparserinit = function(t) { this.parser = t; }, o.prototype.onreset = function() { this.dom = [], this.root = new d.Document(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null; }, o.prototype.onend = function() { this.done || (this.done = !0, this.parser = null, this.handleCallback(null)); }, o.prototype.onerror = function(t) { this.handleCallback(t); }, o.prototype.onclosetag = function() { this.lastNode = null; var t = this.tagStack.pop(); this.options.withEndIndices && (t.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(t); }, o.prototype.onopentag = function(t, n) { var l = this.options.xmlMode ? u.ElementType.Tag : void 0, c = new d.Element(t, n, void 0, l); this.addNode(c), this.tagStack.push(c); }, o.prototype.ontext = function(t) { var n = this.lastNode; if (n && n.type === u.ElementType.Text) n.data += t, this.options.withEndIndices && (n.endIndex = this.parser.endIndex); else { var l = new d.Text(t); this.addNode(l), this.lastNode = l; } }, o.prototype.oncomment = function(t) { if (this.lastNode && this.lastNode.type === u.ElementType.Comment) { this.lastNode.data += t; return; } var n = new d.Comment(t); this.addNode(n), this.lastNode = n; }, o.prototype.oncommentend = function() { this.lastNode = null; }, o.prototype.oncdatastart = function() { var t = new d.Text(""), n = new d.CDATA([t]); this.addNode(n), t.parent = n, this.lastNode = t; }, o.prototype.oncdataend = function() { this.lastNode = null; }, o.prototype.onprocessinginstruction = function(t, n) { var l = new d.ProcessingInstruction(t, n); this.addNode(l); }, o.prototype.handleCallback = function(t) { if (typeof this.callback == "function") this.callback(t, this.dom); else if (t) throw t; }, o.prototype.addNode = function(t) { var n = this.tagStack[this.tagStack.length - 1], l = n.children[n.children.length - 1]; this.options.withStartIndices && (t.startIndex = this.parser.startIndex), this.options.withEndIndices && (t.endIndex = this.parser.endIndex), n.children.push(t), l && (t.prev = l, l.next = t), t.parent = n, this.lastNode = null; }, o; }() ); r.DomHandler = T, r.default = T; }(x)), x; } var $ = {}, Q; function Re() { return Q || (Q = 1, function(r) { Object.defineProperty(r, "__esModule", { value: !0 }), r.CARRIAGE_RETURN_PLACEHOLDER_REGEX = r.CARRIAGE_RETURN_PLACEHOLDER = r.CARRIAGE_RETURN_REGEX = r.CARRIAGE_RETURN = r.CASE_SENSITIVE_TAG_NAMES_MAP = r.CASE_SENSITIVE_TAG_NAMES = void 0, r.CASE_SENSITIVE_TAG_NAMES = [ "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "linearGradient", "radialGradient", "textPath" ], r.CASE_SENSITIVE_TAG_NAMES_MAP = r.CASE_SENSITIVE_TAG_NAMES.reduce(function(s, f) { return s[f.toLowerCase()] = f, s; }, {}), r.CARRIAGE_RETURN = "\r", r.CARRIAGE_RETURN_REGEX = new RegExp(r.CARRIAGE_RETURN, "g"), r.CARRIAGE_RETURN_PLACEHOLDER = "__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(), "__"), r.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(r.CARRIAGE_RETURN_PLACEHOLDER, "g"); }($)), $; } var ee; function ge() { if (ee) return D; ee = 1, Object.defineProperty(D, "__esModule", { value: !0 }), D.formatAttributes = u, D.escapeSpecialCharacters = p, D.revertEscapedCharacters = T, D.formatDOM = o; var r = /* @__PURE__ */ me(), s = Re(); function f(t) { return s.CASE_SENSITIVE_TAG_NAMES_MAP[t]; } function u(t) { for (var n = {}, l = 0, c = t.length; l < c; l++) { var v = t[l]; n[v.name] = v.value; } return n; } function d(t) { t = t.toLowerCase(); var n = f(t); return n || t; } function p(t) { return t.replace(s.CARRIAGE_RETURN_REGEX, s.CARRIAGE_RETURN_PLACEHOLDER); } function T(t) { return t.replace(s.CARRIAGE_RETURN_PLACEHOLDER_REGEX, s.CARRIAGE_RETURN); } function o(t, n, l) { n === void 0 && (n = null); for (var c = [], v, S = 0, A = t.length; S < A; S++) { var y = t[S]; switch (y.nodeType) { case 1: { var h = d(y.nodeName); v = new r.Element(h, u(y.attributes)), v.children = o( // template children are on content h === "template" ? y.content.childNodes : y.childNodes, v ); break; } case 3: v = new r.Text(T(y.nodeValue)); break; case 8: v = new r.Comment(y.nodeValue); break; default: continue; } var R = c[S - 1] || null; R && (R.next = v), v.parent = n, v.prev = R, v.next = null, c.push(v); } return l && (v = new r.ProcessingInstruction(l.substring(0, l.indexOf(" ")).toLowerCase(), l), v.next = c[0] || null, v.parent = n, c.unshift(v), c[1] && (c[1].prev = c[0])), c; } return D; } var te; function be() { if (te) return z; te = 1, Object.defineProperty(z, "__esModule", { value: !0 }), z.default = y; var r = ge(), s = "html", f = "head", u = "body", d = /<([a-zA-Z]+[0-9]?)/, p = /<head[^]*>/i, T = /<body[^]*>/i, o = function(h, R) { throw new Error("This browser does not support `document.implementation.createHTMLDocument`"); }, t = function(h, R) { throw new Error("This browser does not support `DOMParser.prototype.parseFromString`"); }, n = typeof window == "object" && window.DOMParser; if (typeof n == "function") { var l = new n(), c = "text/html"; t = function(h, R) { return R && (h = "<".concat(R, ">").concat(h, "</").concat(R, ">")), l.parseFromString(h, c); }, o = t; } if (typeof document == "object" && document.implementation) { var v = document.implementation.createHTMLDocument(); o = function(h, R) { if (R) { var g = v.documentElement.querySelector(R); return g && (g.innerHTML = h), v; } return v.documentElement.innerHTML = h, v; }; } var S = typeof document == "object" && document.createElement("template"), A; S && S.content && (A = function(h) { return S.innerHTML = h, S.content.childNodes; }); function y(h) { var R, g; h = (0, r.escapeSpecialCharacters)(h); var P = h.match(d), k = P && P[1] ? P[1].toLowerCase() : ""; switch (k) { case s: { var e = t(h); if (!p.test(h)) { var i = e.querySelector(f); (R = i == null ? void 0 : i.parentNode) === null || R === void 0 || R.removeChild(i); } if (!T.test(h)) { var i = e.querySelector(u); (g = i == null ? void 0 : i.parentNode) === null || g === void 0 || g.removeChild(i); } return e.querySelectorAll(s); } case f: case u: { var a = o(h).querySelectorAll(k); return T.test(h) && p.test(h) ? a[0].parentNode.childNodes : a; } // low-level tag or text default: { if (A) return A(h); var i = o(h, u).querySelector(u); return i.childNodes; } } } return z; } var re; function Ce() { if (re) return L; re = 1; var r = L && L.__importDefault || function(p) { return p && p.__esModule ? p : { default: p }; }; Object.defineProperty(L, "__esModule", { value: !0 }), L.default = d; var s = r(be()), f = ge(), u = /<(![a-zA-Z\s]+)>/; function d(p) { if (typeof p != "string") throw new TypeError("First argument must be a string"); if (!p) return []; var T = p.match(u), o = T ? T[1] : void 0; return (0, f.formatDOM)((0, s.default)(p), null, o); } return L; } var V = {}, N = {}, G = {}, ne; function Ae() { if (ne) return G; ne = 1; var r = 0; G.SAME = r; var s = 1; return G.CAMELCASE = s, G.possibleStandardNames = { accept: 0, acceptCharset: 1, "accept-charset": "acceptCharset", accessKey: 1, action: 0, allowFullScreen: 1, alt: 0, as: 0, async: 0, autoCapitalize: 1, autoComplete: 1, autoCorrect: 1, autoFocus: 1, autoPlay: 1, autoSave: 1, capture: 0, cellPadding: 1, cellSpacing: 1, challenge: 0, charSet: 1, checked: 0, children: 0, cite: 0, class: "className", classID: 1, className: 1, cols: 0, colSpan: 1, content: 0, contentEditable: 1, contextMenu: 1, controls: 0, controlsList: 1, coords: 0, crossOrigin: 1, dangerouslySetInnerHTML: 1, data: 0, dateTime: 1, default: 0, defaultChecked: 1, defaultValue: 1, defer: 0, dir: 0, disabled: 0, disablePictureInPicture: 1, disableRemotePlayback: 1, download: 0, draggable: 0, encType: 1, enterKeyHint: 1, for: "htmlFor", form: 0, formMethod: 1, formAction: 1, formEncType: 1, formNoValidate: 1, formTarget: 1, frameBorder: 1, headers: 0, height: 0, hidden: 0, high: 0, href: 0, hrefLang: 1, htmlFor: 1, httpEquiv: 1, "http-equiv": "httpEquiv", icon: 0, id: 0, innerHTML: 1, inputMode: 1, integrity: 0, is: 0, itemID: 1, itemProp: 1, itemRef: 1, itemScope: 1, itemType: 1, keyParams: 1, keyType: 1, kind: 0, label: 0, lang: 0, list: 0, loop: 0, low: 0, manifest: 0, marginWidth: 1, marginHeight: 1, max: 0, maxLength: 1, media: 0, mediaGroup: 1, method: 0, min: 0, minLength: 1, multiple: 0, muted: 0, name: 0, noModule: 1, nonce: 0, noValidate: 1, open: 0, optimum: 0, pattern: 0, placeholder: 0, playsInline: 1, poster: 0, preload: 0, profile: 0, radioGroup: 1, readOnly: 1, referrerPolicy: 1, rel: 0, required: 0, reversed: 0, role: 0, rows: 0, rowSpan: 1, sandbox: 0, scope: 0, scoped: 0, scrolling: 0, seamless: 0, selected: 0, shape: 0, size: 0, sizes: 0, span: 0, spellCheck: 1, src: 0, srcDoc: 1, srcLang: 1, srcSet: 1, start: 0, step: 0, style: 0, summary: 0, tabIndex: 1, target: 0, title: 0, type: 0, useMap: 1, value: 0, width: 0, wmode: 0, wrap: 0, about: 0, accentHeight: 1, "accent-height": "accentHeight", accumulate: 0, additive: 0, alignmentBaseline: 1, "alignment-baseline": "alignmentBaseline", allowReorder: 1, alphabetic: 0, amplitude: 0, arabicForm: 1, "arabic-form": "arabicForm", ascent: 0, attributeName: 1, attributeType: 1, autoReverse: 1, azimuth: 0, baseFrequency: 1, baselineShift: 1, "baseline-shift": "baselineShift", baseProfile: 1, bbox: 0, begin: 0, bias: 0, by: 0, calcMode: 1, capHeight: 1, "cap-height": "capHeight", clip: 0, clipPath: 1, "clip-path": "clipPath", clipPathUnits: 1, clipRule: 1, "clip-rule": "clipRule", color: 0, colorInterpolation: 1, "color-interpolation": "colorInterpolation", colorInterpolationFilters: 1, "color-interpolation-filters": "colorInterpolationFilters", colorProfile: 1, "color-profile": "colorProfile", colorRendering: 1, "color-rendering": "colorRendering", contentScriptType: 1, contentStyleType: 1, cursor: 0, cx: 0, cy: 0, d: 0, datatype: 0, decelerate: 0, descent: 0, diffuseConstant: 1, direction: 0, display: 0, divisor: 0, dominantBaseline: 1, "dominant-baseline": "dominantBaseline", dur: 0, dx: 0, dy: 0, edgeMode: 1, elevation: 0, enableBackground: 1, "enable-background": "enableBackground", end: 0, exponent: 0, externalResourcesRequired: 1, fill: 0, fillOpacity: 1, "fill-opacity": "fillOpacity", fillRule: 1, "fill-rule": "fillRule", filter: 0, filterRes: 1, filterUnits: 1, floodOpacity: 1, "flood-opacity": "floodOpacity", floodColor: 1, "flood-color": "floodColor", focusable: 0, fontFamily: 1, "font-family": "fontFamily", fontSize: 1, "font-size": "fontSize", fontSizeAdjust: 1, "font-size-adjust": "fontSizeAdjust", fontStretch: 1, "font-stretch": "fontStretch", fontStyle: 1, "font-style": "fontStyle", fontVariant: 1, "font-variant": "fontVariant", fontWeight: 1, "font-weight": "fontWeight", format: 0, from: 0, fx: 0, fy: 0, g1: 0, g2: 0, glyphName: 1, "glyph-name": "glyphName", glyphOrientationHorizontal: 1, "glyph-orientation-horizontal": "glyphOrientationHorizontal", glyphOrientationVertical: 1, "glyph-orientation-vertical": "glyphOrientationVertical", glyphRef: 1, gradientTransform: 1, gradientUnits: 1, hanging: 0, horizAdvX: 1, "horiz-adv-x": "horizAdvX", horizOriginX: 1, "horiz-origin-x": "horizOriginX", ideographic: 0, imageRendering: 1, "image-rendering": "imageRendering", in2: 0, in: 0, inlist: 0, intercept: 0, k1: 0, k2: 0, k3: 0, k4: 0, k: 0, kernelMatrix: 1, kernelUnitLength: 1, kerning: 0, keyPoints: 1, keySplines: 1, keyTimes: 1, lengthAdjust: 1, letterSpacing: 1, "letter-spacing": "letterSpacing", lightingColor: 1, "lighting-color": "lightingColor", limitingConeAngle: 1, local: 0, markerEnd: 1, "marker-end": "markerEnd", markerHeight: 1, markerMid: 1, "marker-mid": "markerMid", markerStart: 1, "marker-start": "markerStart", markerUnits: 1, markerWidth: 1, mask: 0, maskContentUnits: 1, maskUnits: 1, mathematical: 0, mode: 0, numOctaves: 1, offset: 0, opacity: 0, operator: 0, order: 0, orient: 0, orientation: 0, origin: 0, overflow: 0, overlinePosition: 1, "overline-position": "overlinePosition", overlineThickness: 1, "overline-thickness": "overlineThickness", paintOrder: 1, "paint-order": "paintOrder", panose1: 0, "panose-1": "panose1", pathLength: 1, patternContentUnits: 1, patternTransform: 1, patternUnits: 1, pointerEvents: 1, "pointer-events": "pointerEvents", points: 0, pointsAtX: 1, pointsAtY: 1, pointsAtZ: 1, prefix: 0, preserveAlpha: 1, preserveAspectRatio: 1, primitiveUnits: 1, property: 0, r: 0, radius: 0, refX: 1, refY: 1, renderingIntent: 1, "rendering-intent": "renderingIntent", repeatCount: 1, repeatDur: 1, requiredExtensions: 1, requiredFeatures: 1, resource: 0, restart: 0, result: 0, results: 0, rotate: 0, rx: 0, ry: 0, scale: 0, security: 0, seed: 0, shapeRendering: 1, "shape-rendering": "shapeRendering", slope: 0, spacing: 0, specularConstant: 1, specularExponent: 1, speed: 0, spreadMethod: 1, startOffset: 1, stdDeviation: 1, stemh: 0, stemv: 0, stitchTiles: 1, stopColor: 1, "stop-color": "stopColor", stopOpacity: 1, "stop-opacity": "stopOpacity", strikethroughPosition: 1, "strikethrough-position": "strikethroughPosition", strikethroughThickness: 1, "strikethrough-thickness": "strikethroughThickness", string: 0, stroke: 0, strokeDasharray: 1, "stroke-dasharray": "strokeDasharray", strokeDashoffset: 1, "stroke-dashoffset": "strokeDashoffset", strokeLinecap: 1, "stroke-linecap": "strokeLinecap", strokeLinejoin: 1, "stroke-linejoin": "strokeLinejoin", strokeMiterlimit: 1, "stroke-miterlimit": "strokeMiterlimit", strokeWidth: 1, "stroke-width": "strokeWidth", strokeOpacity: 1, "stroke-opacity": "strokeOpacity", suppressContentEditableWarning: 1, suppressHydrationWarning: 1, surfaceScale: 1, systemLanguage: 1, tableValues: 1, targetX: 1, targetY: 1, textAnchor: 1, "text-anchor": "textAnchor", textDecoration: 1, "text-decoration": "textDecoration", textLength: 1, textRendering: 1, "text-rendering": "textRendering", to: 0, transform: 0, typeof: 0, u1: 0, u2: 0, underlinePosition: 1, "underline-position": "underlinePosition", underlineThickness: 1, "underline-thickness": "underlineThickness", unicode: 0, unicodeBidi: 1, "unicode-bidi": "unicodeBidi", unicodeRange: 1, "unicode-range": "unicodeRange", unitsPerEm: 1, "units-per-em": "unitsPerEm", unselectable: 0, vAlphabetic: 1, "v-alphabetic": "vAlphabetic", values: 0, vectorEffect: 1, "vector-effect": "vectorEffect", version: 0, vertAdvY: 1, "vert-adv-y": "vertAdvY", vertOriginX: 1, "vert-origin-x": "vertOriginX", vertOriginY: 1, "vert-origin-y": "vertOriginY", vHanging: 1, "v-hanging": "vHanging", vIdeographic: 1, "v-ideographic": "vIdeographic", viewBox: 1, viewTarget: 1, visibility: 0, vMathematical: 1, "v-mathematical": "vMathematical", vocab: 0, widths: 0, wordSpacing: 1, "word-spacing": "wordSpacing", writingMode: 1, "writing-mode": "writingMode", x1: 0, x2: 0, x: 0, xChannelSelector: 1, xHeight: 1, "x-height": "xHeight", xlinkActuate: 1, "xlink:actuate": "xlinkActuate", xlinkArcrole: 1, "xlink:arcrole": "xlinkArcrole", xlinkHref: 1, "xlink:href": "xlinkHref", xlinkRole: 1, "xlink:role": "xlinkRole", xlinkShow: 1, "xlink:show": "xlinkShow", xlinkTitle: 1, "xlink:title": "xlinkTitle", xlinkType: 1, "xlink:type": "xlinkType", xmlBase: 1, "xml:base": "xmlBase", xmlLang: 1, "xml:lang": "xmlLang", xmlns: 0, "xml:space": "xmlSpace", xmlnsXlink: 1, "xmlns:xlink": "xmlnsXlink", xmlSpace: 1, y1: 0, y2: 0, y: 0, yChannelSelector: 1, z: 0, zoomAndPan: 1 }, G; } var ie; function Se() { if (ie) return N; ie = 1; const r = 0, s = 1, f = 2, u = 3, d = 4, p = 5, T = 6; function o(e) { return n.hasOwnProperty(e) ? n[e] : null; } function t(e, i, a, _, b, O, w) { this.acceptsBooleans = i === f || i === u || i === d, this.attributeName = _, this.attributeNamespace = b, this.mustUseProperty = a, this.propertyName = e, this.type = i, this.sanitizeURL = O, this.removeEmptyString = w; } const n = {}; [ "children", "dangerouslySetInnerHTML", // TODO: This prevents the assignment of defaultValue to regular // elements (not just inputs). Now that ReactDOMInput assigns to the // defaultValue property -- do we need this? "defaultValue", "defaultChecked", "innerHTML", "suppressContentEditableWarning", "suppressHydrationWarning", "style" ].forEach((e) => { n[e] = new t( e, r, !1, // mustUseProperty e, // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), [ ["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"] ].forEach(([e, i]) => { n[e] = new t( e, s, !1, // mustUseProperty i, // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), ["contentEditable", "draggable", "spellCheck", "value"].forEach((e) => { n[e] = new t( e, f, !1, // mustUseProperty e.toLowerCase(), // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), [ "autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha" ].forEach((e) => { n[e] = new t( e, f, !1, // mustUseProperty e, // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), [ "allowFullScreen", "async", // Note: there is a special case that prevents it from being written to the DOM // on the client side because the browsers are inconsistent. Instead we call focus(). "autoFocus", "autoPlay", "controls", "default", "defer", "disabled", "disablePictureInPicture", "disableRemotePlayback", "formNoValidate", "hidden", "loop", "noModule", "noValidate", "open", "playsInline", "readOnly", "required", "reversed", "scoped", "seamless", // Microdata "itemScope" ].forEach((e) => { n[e] = new t( e, u, !1, // mustUseProperty e.toLowerCase(), // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), [ "checked", // Note: `option.selected` is not updated if `select.multiple` is // disabled with `removeAttribute`. We have special logic for handling this. "multiple", "muted", "selected" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach((e) => { n[e] = new t( e, u, !0, // mustUseProperty e, // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), [ "capture", "download" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach((e) => { n[e] = new t( e, d, !1, // mustUseProperty e, // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), [ "cols", "rows", "size", "span" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach((e) => { n[e] = new t( e, T, !1, // mustUseProperty e, // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), ["rowSpan", "start"].forEach((e) => { n[e] = new t( e, p, !1, // mustUseProperty e.toLowerCase(), // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }); const c = /[\-\:]([a-z])/g, v = (e) => e[1].toUpperCase(); [ "accent-height", "alignment-baseline", "arabic-form", "baseline-shift", "cap-height", "clip-path", "clip-rule", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "dominant-baseline", "enable-background", "fill-opacity", "fill-rule", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "glyph-name", "glyph-orientation-horizontal", "glyph-orientation-vertical", "horiz-adv-x", "horiz-origin-x", "image-rendering", "letter-spacing", "lighting-color", "marker-end", "marker-mid", "marker-start", "overline-position", "overline-thickness", "paint-order", "panose-1", "pointer-events", "rendering-intent", "shape-rendering", "stop-color", "stop-opacity", "strikethrough-position", "strikethrough-thickness", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-anchor", "text-decoration", "text-rendering", "underline-position", "underline-thickness", "unicode-bidi", "unicode-range", "units-per-em", "v-alphabetic", "v-hanging", "v-ideographic", "v-mathematical", "vector-effect", "vert-adv-y", "vert-origin-x", "vert-origin-y", "word-spacing", "writing-mode", "xmlns:xlink", "x-height" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach((e) => { const i = e.replace(c, v); n[i] = new t( i, s, !1, // mustUseProperty e, null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }), [ "xlink:actuate", "xlink:arcrole", "xlink:role", "xlink:show", "xlink:title", "xlink:type" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach((e) => { const i = e.replace(c, v); n[i] = new t( i, s, !1, // mustUseProperty e, "http://www.w3.org/1999/xlink", !1, // sanitizeURL !1 // removeEmptyString ); }), [ "xml:base", "xml:lang", "xml:space" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach((e) => { const i = e.replace(c, v); n[i] = new t( i, s, !1, // mustUseProperty e, "http://www.w3.org/XML/1998/namespace", !1, // sanitizeURL !1 // removeEmptyString ); }), ["tabIndex", "crossOrigin"].forEach((e) => { n[e] = new t( e, s, !1, // mustUseProperty e.toLowerCase(), // attributeName null, // attributeNamespace !1, // sanitizeURL !1 // removeEmptyString ); }); const S = "xlinkHref"; n[S] = new t( "xlinkHref", s, !1, // mustUseProperty "xlink:href", "http://www.w3.org/1999/xlink", !0, // sanitizeURL !1 // removeEmptyString ), ["src", "href", "action", "formAction"].forEach((e) => { n[e] = new t( e, s, !1, // mustUseProperty e.toLowerCase(), // attributeName null, // attributeNamespace !0, // sanitizeURL !0 // removeEmptyString ); }); const { CAMELCASE: A, SAME: y, possibleStandardNames: h } = Ae(), 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" + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040", P = RegExp.prototype.test.bind( // eslint-disable-next-line no-misleading-character-class new RegExp("^(data|aria)-[" + g + "]*$") ), k = Object.keys( h ).reduce((e, i) => { const a = h[i]; return a === y ? e[i] = i : a === A ? e[i.toLowerCase()] = i : e[i] = a, e; }, {}); return N.BOOLEAN = u, N.BOOLEANISH_STRING = f, N.NUMERIC = p, N.OVERLOADED_BOOLEAN = d, N.POSITIVE_NUMERIC = T, N.RESERVED = r, N.STRING = s, N.getPropertyInfo = o, N.isCustomAttribute = P, N.possibleStandardNames = k, N; } var U = {}, j = {}, W, ae; function Oe() { if (ae) return W; ae = 1; var r = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, s = /\n/g, f = /^\s*/, u = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, d = /^:\s*/, p = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, T = /^[;\s]*/, o = /^\s+|\s+$/g, t = ` `, n = "/", l = "*", c = "", v = "comment", S = "declaration"; W = function(y, h) { if (typeof y != "string") throw new TypeError("First argument must be a string"); if (!y) return []; h = h || {}; var R = 1, g = 1; function P(C) { var E = C.match(s); E && (R += E.length); var I = C.lastIndexOf(t); g = ~I ? C.length - I : g + C.length; } function k() { var C = { line: R, column: g }; return function(E) { return E.position = new e(C), _(), E; }; } function e(C) { this.start = C, this.end = { line: R, column: g }, this.source = h.source; } e.prototype.content = y; function i(C) { var E = new Error( h.source + ":" + R + ":" + g + ": " + C ); if (E.reason = C, E.filename = h.source, E.line = R, E.column = g, E.source = y, !h.silent) throw E; } function a(C) { var E = C.exec(y); if (E) { var I = E[0]; return P(I), y = y.slice(I.length), E; } } function _() { a(f); } function b(C) { var E; for (C = C || []; E = O(); ) E !== !1 && C.push(E); return C; } function O() { var C = k(); if (!(n != y.charAt(0) || l != y.charAt(1))) { for (var E = 2; c != y.charAt(E) && (l != y.charAt(E) || n != y.charAt(E + 1)); ) ++E; if (E += 2, c === y.charAt(E - 1)) return i("End of comment missing"); var I = y.slice(2, E - 2); return g += 2, P(I), y = y.slice(E), g += 2, C({ type: v, comment: I }); } } function w() { var C = k(), E = a(u); if (E) { if (O(), !a(d)) return i("property missing ':'"); var I = a(p), _e = C({ type: S, property: A(E[0].replace(r, c)), value: I ? A(I[0].replace(r, c)) : c }); return a(T), _e; } } function M() { var C = []; b(C); for (var E; E = w(); ) E !== !1 && (C.push(E), b(C)); return C; } return _(), M(); }; function A(y) { return y ? y.replace(o, c) : c; } return W; } var oe; function Pe() { if (oe) return j; oe = 1; var r = j && j.__importDefault || function(u) { return u && u.__esModule ? u : { default: u }; }; Object.defineProperty(j, "__esModule", { value: !0 }), j.default = f; var s = r(Oe()); function f(u, d) { var p = null; if (!u || typeof u != "string") return p; var T = (0, s.default)(u), o = typeof d == "function"; return T.forEach(function(t) { if (t.type === "declaration") { var n = t.property, l = t.value; o ? d(n, l, t) : l && (p = p || {}, p[n] = l); } }), p; } return j; } var q = {}, le; function ke() { if (le) return q; le = 1, Object.defineProperty(q, "__esModule", { value: !0 }), q.camelCase = void 0; var r = /^--[a-zA-Z0-9_-]+$/, s = /-([a-z])/g, f = /^[^-]+$/, u = /^-(webkit|moz|ms|o|khtml)-/, d = /^-(ms)-/, p = function(n) { return !n || f.test(n) || r.test(n); }, T = function(n, l) { return l.toUpperCase(); }, o = function(n, l) { return "".concat(l, "-"); }, t = function(n, l) { return l === void 0 && (l = {}), p(n) ? n : (n = n.toLowerCase(), l.reactCompat ? n = n.replace(d, o) : n = n.replace(u, o), n.replace(s, T)); }; return q.camelCase = t, q; } var B, se; function we() { if (se) return B; se = 1; var r = B && B.__importDefault || function(d) { return d && d.__esModule ? d : { default: d }; }, s = r(Pe()), f = ke(); function u(d, p) { var T = {}; return !d || typeof d != "string" || (0, s.default)(d, function(o, t) { o && t && (T[(0, f.camelCase)(o, p)] = t); }), T; } return u.default = u, B = u, B; } var ue; function Ee() { return ue || (ue = 1, function(r) { var s = U && U.__importDefault || function(l) { return l && l.__esModule ? l : { default: l }; }; Object.defineProperty(r, "__esModule", { value: !0 }), r.returnFirstArg = r.canTextBeChildOfNode = r.ELEMENTS_WITH_NO_TEXT_CHILDREN = r.PRESERVE_CUSTOM_ATTRIBUTES = void 0, r.isCustomComponent = p, r.setStyleProp = o; var f = he, u = s(we()), d = /* @__PURE__ */ new Set([ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ]); function p(l, c) { return l.includes("-") ? !d.has(l) : !!(c && typeof c.is == "string"); } var T = { reactCompat: !0 }; function o(l, c) { if (typeof l == "string") { if (!l.trim()) { c.style = {}; return; } try { c.style = (0, u.default)(l, T); } catch { c.style = {}; } } } r.PRESERVE_CUSTOM_ATTRIBUTES = Number(f.version.split(".")[0]) >= 16, r.ELEMENTS_WITH_NO_TEXT_CHILDREN = /* @__PURE__ */ new Set([ "tr", "tbody", "thead", "tfoot", "colgroup", "table", "head", "html", "frameset" ]); var t = function(l) { return !r.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(l.name); }; r.canTextBeChildOfNode = t; var n = function(l) { return l; }; r.returnFirstArg = n; }(U)), U; } var ce; function ye() { if (ce) return V; ce = 1, Object.defineProperty(V, "__esModule", { value: !0 }), V.default = p; var r = Se(), s = Ee(), f = ["checked", "value"], u = ["input", "select", "textarea"], d = { reset: !0, submit: !0 }; function p(o, t) { o === void 0 && (o = {}); var n = {}, l = !!(o.type && d[o.type]); for (var c in o) { var v = o[c]; if ((0, r.isCustomAttribute)(c)) { n[c] = v; continue; } var S = c.toLowerCase(), A = T(S); if (A) { var y = (0, r.getPropertyInfo)(A); switch (f.includes(A) && u.includes(t) && !l && (A = T("default" + S)), n[A] = v, y && y.type) { case r.BOOLEAN: n[A] = !0; break; case r.OVERLOADED_BOOLEAN: v === "" && (n[A] = !0); break; } continue; } s.PRESERVE_CUSTOM_ATTRIBUTES && (n[c] = v); } return (0, s.setStyleProp)(o.style, n), n; } function T(o) { return r.possibleStandardNames[o]; } return V; } var H = {}, fe; function Ne() { if (fe) return H; fe = 1; var r = H && H.__importDefault || function(o) { return o && o.__esModule ? o : { default: o }; }; Object.defineProperty(H, "__esModule", { value: !0 }), H.default = p; var s = he, f = r(ye()), u = Ee(), d = { cloneElement: s.cloneElement, createElement: s.createElement, isValidElement: s.isValidElement }; function p(o, t) { t === void 0 && (t = {}); for (var n = [], l = typeof t.replace == "function", c = t.transform || u.returnFirstArg, v = t.library || d, S = v.cloneElement, A = v.createElement, y = v.isValidElement, h = o.length, R = 0; R < h; R++) { var g = o[R]; if (l) { var P = t.replace(g, R); if (y(P)) { h > 1 && (P = S(P, { key: P.key || R })), n.push(c(P, g, R)); continue; } } if (g.type === "text") { var k = !g.data.trim().length; if (k && g.parent && !(0, u.canTextBeChildOfNode)(g.parent) || t.trim && k) continue; n.push(c(g.data, g, R)); continue; } var e = g, i = {}; T(e) ? ((0, u.setStyleProp)(e.attribs.style, e.attribs), i = e.attribs) : e.attribs && (i = (0, f.default)(e.attribs, e.name)); var a = void 0; switch (g.type) { case "script": case "style": g.children[0] && (i.dangerouslySetInnerHTML = { __html: g.children[0].data }); break; case "tag": g.name === "textarea" && g.children[0] ? i.defaultValue = g.children[0].data : g.children && g.children.length && (a = p(g.children, t)); break; // skip all other cases (e.g., comment) default: continue; } h > 1 && (i.key = R), n.push(c(A(g.name, i, a), g, R)); } return n.length === 1 ? n[0] : n; } function T(o) { return u.PRESERVE_CUSTOM_ATTRIBUTES && o.type === "tag" && (0, u.isCustomComponent)(o.name, o.attribs); } return H; } var de; function Ie() { return de || (de = 1, function(r) { var s = F && F.__importDefault || function(t) { return t && t.__esModule ? t : { default: t }; }; Object.defineProperty(r, "__esModule", { value: !0 }), r.htmlToDOM = r.d