UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.

1,249 lines (1,241 loc) 756 kB
import { d as mp, c as nn, l as qr, T as Ca, U as Vu, j as ei, t as bp, aV as Ep, aW as wp, aX as xp } from "./mermaid-d733041c.js"; import { c as Tp } from "./createText-98e4790d.js"; var Ki = function() { var pe = function(j, Y, te, L) { for (te = te || {}, L = j.length; L--; te[j[L]] = Y) ; return te; }, fe = [1, 4], ee = [1, 13], ce = [1, 12], H = [1, 15], O = [1, 16], T = [1, 20], x = [1, 19], S = [6, 7, 8], G = [1, 26], U = [1, 24], P = [1, 25], K = [6, 7, 11], D = [1, 6, 13, 15, 16, 19, 22], V = [1, 33], _ = [1, 34], Q = [1, 6, 7, 11, 13, 15, 16, 19, 22], ne = { trace: function() { }, yy: {}, symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 }, terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], performAction: function(Y, te, L, $, k, q, he) { var ge = q.length - 1; switch (k) { case 6: case 7: return $; case 8: $.getLogger().trace("Stop NL "); break; case 9: $.getLogger().trace("Stop EOF "); break; case 11: $.getLogger().trace("Stop NL2 "); break; case 12: $.getLogger().trace("Stop EOF2 "); break; case 15: $.getLogger().info("Node: ", q[ge].id), $.addNode(q[ge - 1].length, q[ge].id, q[ge].descr, q[ge].type); break; case 16: $.getLogger().trace("Icon: ", q[ge]), $.decorateNode({ icon: q[ge] }); break; case 17: case 21: $.decorateNode({ class: q[ge] }); break; case 18: $.getLogger().trace("SPACELIST"); break; case 19: $.getLogger().trace("Node: ", q[ge].id), $.addNode(0, q[ge].id, q[ge].descr, q[ge].type); break; case 20: $.decorateNode({ icon: q[ge] }); break; case 25: $.getLogger().trace("node found ..", q[ge - 2]), this.$ = { id: q[ge - 1], descr: q[ge - 1], type: $.getType(q[ge - 2], q[ge]) }; break; case 26: this.$ = { id: q[ge], descr: q[ge], type: $.nodeType.DEFAULT }; break; case 27: $.getLogger().trace("node found ..", q[ge - 3]), this.$ = { id: q[ge - 3], descr: q[ge - 1], type: $.getType(q[ge - 2], q[ge]) }; break; } }, table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: fe }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: fe }, { 6: ee, 7: [1, 10], 9: 9, 12: 11, 13: ce, 14: 14, 15: H, 16: O, 17: 17, 18: 18, 19: T, 22: x }, pe(S, [2, 3]), { 1: [2, 2] }, pe(S, [2, 4]), pe(S, [2, 5]), { 1: [2, 6], 6: ee, 12: 21, 13: ce, 14: 14, 15: H, 16: O, 17: 17, 18: 18, 19: T, 22: x }, { 6: ee, 9: 22, 12: 11, 13: ce, 14: 14, 15: H, 16: O, 17: 17, 18: 18, 19: T, 22: x }, { 6: G, 7: U, 10: 23, 11: P }, pe(K, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: T, 22: x }), pe(K, [2, 18]), pe(K, [2, 19]), pe(K, [2, 20]), pe(K, [2, 21]), pe(K, [2, 23]), pe(K, [2, 24]), pe(K, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: G, 7: U, 10: 32, 11: P }, { 1: [2, 7], 6: ee, 12: 21, 13: ce, 14: 14, 15: H, 16: O, 17: 17, 18: 18, 19: T, 22: x }, pe(D, [2, 14], { 7: V, 11: _ }), pe(Q, [2, 8]), pe(Q, [2, 9]), pe(Q, [2, 10]), pe(K, [2, 15]), pe(K, [2, 16]), pe(K, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, pe(D, [2, 13], { 7: V, 11: _ }), pe(Q, [2, 11]), pe(Q, [2, 12]), { 21: [1, 37] }, pe(K, [2, 25]), pe(K, [2, 27])], defaultActions: { 2: [2, 1], 6: [2, 2] }, parseError: function(Y, te) { if (te.recoverable) this.trace(Y); else { var L = new Error(Y); throw L.hash = te, L; } }, parse: function(Y) { var te = this, L = [0], $ = [], k = [null], q = [], he = this.table, ge = "", Ae = 0, Ne = 0, _e = 2, tt = 1, ct = q.slice.call(arguments, 1), Pe = Object.create(this.lexer), $e = { yy: {} }; for (var Xe in this.yy) Object.prototype.hasOwnProperty.call(this.yy, Xe) && ($e.yy[Xe] = this.yy[Xe]); Pe.setInput(Y, $e.yy), $e.yy.lexer = Pe, $e.yy.parser = this, typeof Pe.yylloc > "u" && (Pe.yylloc = {}); var rt = Pe.yylloc; q.push(rt); var lt = Pe.options && Pe.options.ranges; typeof $e.yy.parseError == "function" ? this.parseError = $e.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; function nt() { var jt; return jt = $.pop() || Pe.lex() || tt, typeof jt != "number" && (jt instanceof Array && ($ = jt, jt = $.pop()), jt = te.symbols_[jt] || jt), jt; } for (var je, pt, Et, kt, vt = {}, vr, qt, on, Kr; ; ) { if (pt = L[L.length - 1], this.defaultActions[pt] ? Et = this.defaultActions[pt] : ((je === null || typeof je > "u") && (je = nt()), Et = he[pt] && he[pt][je]), typeof Et > "u" || !Et.length || !Et[0]) { var Da = ""; Kr = []; for (vr in he[pt]) this.terminals_[vr] && vr > _e && Kr.push("'" + this.terminals_[vr] + "'"); Pe.showPosition ? Da = "Parse error on line " + (Ae + 1) + `: ` + Pe.showPosition() + ` Expecting ` + Kr.join(", ") + ", got '" + (this.terminals_[je] || je) + "'" : Da = "Parse error on line " + (Ae + 1) + ": Unexpected " + (je == tt ? "end of input" : "'" + (this.terminals_[je] || je) + "'"), this.parseError(Da, { text: Pe.match, token: this.terminals_[je] || je, line: Pe.yylineno, loc: rt, expected: Kr }); } if (Et[0] instanceof Array && Et.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + pt + ", token: " + je); switch (Et[0]) { case 1: L.push(je), k.push(Pe.yytext), q.push(Pe.yylloc), L.push(Et[1]), je = null, Ne = Pe.yyleng, ge = Pe.yytext, Ae = Pe.yylineno, rt = Pe.yylloc; break; case 2: if (qt = this.productions_[Et[1]][1], vt.$ = k[k.length - qt], vt._$ = { first_line: q[q.length - (qt || 1)].first_line, last_line: q[q.length - 1].last_line, first_column: q[q.length - (qt || 1)].first_column, last_column: q[q.length - 1].last_column }, lt && (vt._$.range = [ q[q.length - (qt || 1)].range[0], q[q.length - 1].range[1] ]), kt = this.performAction.apply(vt, [ ge, Ne, Ae, $e.yy, Et[1], k, q ].concat(ct)), typeof kt < "u") return kt; qt && (L = L.slice(0, -1 * qt * 2), k = k.slice(0, -1 * qt), q = q.slice(0, -1 * qt)), L.push(this.productions_[Et[1]][0]), k.push(vt.$), q.push(vt._$), on = he[L[L.length - 2]][L[L.length - 1]], L.push(on); break; case 3: return !0; } } return !0; } }, ue = function() { var j = { EOF: 1, parseError: function(te, L) { if (this.yy.parser) this.yy.parser.parseError(te, L); else throw new Error(te); }, // resets the lexer, sets new input setInput: function(Y, te) { return this.yy = te || this.yy || {}, this._input = Y, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; }, // consumes and returns one char from the input input: function() { var Y = this._input[0]; this.yytext += Y, this.yyleng++, this.offset++, this.match += Y, this.matched += Y; var te = Y.match(/(?:\r\n?|\n).*/g); return te ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Y; }, // unshifts one char (or a string) into the input unput: function(Y) { var te = Y.length, L = Y.split(/(?:\r\n?|\n)/g); this._input = Y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - te), this.offset -= te; var $ = this.match.split(/(?:\r\n?|\n)/g); this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), L.length - 1 && (this.yylineno -= L.length - 1); var k = this.yylloc.range; return this.yylloc = { first_line: this.yylloc.first_line, last_line: this.yylineno + 1, first_column: this.yylloc.first_column, last_column: L ? (L.length === $.length ? this.yylloc.first_column : 0) + $[$.length - L.length].length - L[0].length : this.yylloc.first_column - te }, this.options.ranges && (this.yylloc.range = [k[0], k[0] + this.yyleng - te]), this.yyleng = this.yytext.length, this; }, // When called from action, caches matched text and appends it on next action more: function() { return this._more = !0, this; }, // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. reject: function() { if (this.options.backtrack_lexer) this._backtrack = !0; else return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). ` + this.showPosition(), { text: "", token: null, line: this.yylineno }); return this; }, // retain first n characters of the match less: function(Y) { this.unput(this.match.slice(Y)); }, // displays already matched input, i.e. for error messages pastInput: function() { var Y = this.matched.substr(0, this.matched.length - this.match.length); return (Y.length > 20 ? "..." : "") + Y.substr(-20).replace(/\n/g, ""); }, // displays upcoming input, i.e. for error messages upcomingInput: function() { var Y = this.match; return Y.length < 20 && (Y += this._input.substr(0, 20 - Y.length)), (Y.substr(0, 20) + (Y.length > 20 ? "..." : "")).replace(/\n/g, ""); }, // displays the character position where the lexing error occurred, i.e. for error messages showPosition: function() { var Y = this.pastInput(), te = new Array(Y.length + 1).join("-"); return Y + this.upcomingInput() + ` ` + te + "^"; }, // test the lexed token: return FALSE when not a match, otherwise return token test_match: function(Y, te) { var L, $, k; if (this.options.backtrack_lexer && (k = { yylineno: this.yylineno, yylloc: { first_line: this.yylloc.first_line, last_line: this.last_line, first_column: this.yylloc.first_column, last_column: this.yylloc.last_column }, yytext: this.yytext, match: this.match, matches: this.matches, matched: this.matched, yyleng: this.yyleng, offset: this.offset, _more: this._more, _input: this._input, yy: this.yy, conditionStack: this.conditionStack.slice(0), done: this.done }, this.options.ranges && (k.yylloc.range = this.yylloc.range.slice(0))), $ = Y[0].match(/(?:\r\n?|\n).*/g), $ && (this.yylineno += $.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: $ ? $[$.length - 1].length - $[$.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Y[0].length }, this.yytext += Y[0], this.match += Y[0], this.matches = Y, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(Y[0].length), this.matched += Y[0], L = this.performAction.call(this, this.yy, this, te, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), L) return L; if (this._backtrack) { for (var q in k) this[q] = k[q]; return !1; } return !1; }, // return next match in input next: function() { if (this.done) return this.EOF; this._input || (this.done = !0); var Y, te, L, $; this._more || (this.yytext = "", this.match = ""); for (var k = this._currentRules(), q = 0; q < k.length; q++) if (L = this._input.match(this.rules[k[q]]), L && (!te || L[0].length > te[0].length)) { if (te = L, $ = q, this.options.backtrack_lexer) { if (Y = this.test_match(L, k[q]), Y !== !1) return Y; if (this._backtrack) { te = !1; continue; } else return !1; } else if (!this.options.flex) break; } return te ? (Y = this.test_match(te, k[$]), Y !== !1 ? Y : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. ` + this.showPosition(), { text: "", token: null, line: this.yylineno }); }, // return next match that has a token lex: function() { var te = this.next(); return te || this.lex(); }, // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) begin: function(te) { this.conditionStack.push(te); }, // pop the previously active lexer condition state off the condition stack popState: function() { var te = this.conditionStack.length - 1; return te > 0 ? this.conditionStack.pop() : this.conditionStack[0]; }, // produce the lexer rule set which is active for the currently active lexer condition state _currentRules: function() { return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; }, // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available topState: function(te) { return te = this.conditionStack.length - 1 - Math.abs(te || 0), te >= 0 ? this.conditionStack[te] : "INITIAL"; }, // alias for begin(condition) pushState: function(te) { this.begin(te); }, // return the number of states currently on the stack stateStackSize: function() { return this.conditionStack.length; }, options: { "case-insensitive": !0 }, performAction: function(te, L, $, k) { switch ($) { case 0: return te.getLogger().trace("Found comment", L.yytext), 6; case 1: return 8; case 2: this.begin("CLASS"); break; case 3: return this.popState(), 16; case 4: this.popState(); break; case 5: te.getLogger().trace("Begin icon"), this.begin("ICON"); break; case 6: return te.getLogger().trace("SPACELINE"), 6; case 7: return 7; case 8: return 15; case 9: te.getLogger().trace("end icon"), this.popState(); break; case 10: return te.getLogger().trace("Exploding node"), this.begin("NODE"), 19; case 11: return te.getLogger().trace("Cloud"), this.begin("NODE"), 19; case 12: return te.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19; case 13: return te.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19; case 14: return this.begin("NODE"), 19; case 15: return this.begin("NODE"), 19; case 16: return this.begin("NODE"), 19; case 17: return this.begin("NODE"), 19; case 18: return 13; case 19: return 22; case 20: return 11; case 21: this.begin("NSTR2"); break; case 22: return "NODE_DESCR"; case 23: this.popState(); break; case 24: te.getLogger().trace("Starting NSTR"), this.begin("NSTR"); break; case 25: return te.getLogger().trace("description:", L.yytext), "NODE_DESCR"; case 26: this.popState(); break; case 27: return this.popState(), te.getLogger().trace("node end ))"), "NODE_DEND"; case 28: return this.popState(), te.getLogger().trace("node end )"), "NODE_DEND"; case 29: return this.popState(), te.getLogger().trace("node end ...", L.yytext), "NODE_DEND"; case 30: return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; case 31: return this.popState(), te.getLogger().trace("node end (-"), "NODE_DEND"; case 32: return this.popState(), te.getLogger().trace("node end (-"), "NODE_DEND"; case 33: return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; case 34: return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; case 35: return te.getLogger().trace("Long description:", L.yytext), 20; case 36: return te.getLogger().trace("Long description:", L.yytext), 20; } }, rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } } }; return j; }(); ne.lexer = ue; function J() { this.yy = {}; } return J.prototype = ne, ne.Parser = J, new J(); }(); Ki.parser = Ki; const Cp = Ki, sn = (pe) => mp(pe, nn()); let Jt = [], _u = 0, Zi = {}; const Dp = () => { Jt = [], _u = 0, Zi = {}; }, Sp = function(pe) { for (let fe = Jt.length - 1; fe >= 0; fe--) if (Jt[fe].level < pe) return Jt[fe]; return null; }, Lp = () => Jt.length > 0 ? Jt[0] : null, Ap = (pe, fe, ee, ce) => { qr.info("addNode", pe, fe, ee, ce); const H = nn(), O = { id: _u++, nodeId: sn(fe), level: pe, descr: sn(ee), type: ce, children: [], width: nn().mindmap.maxNodeWidth }; switch (O.type) { case yt.ROUNDED_RECT: O.padding = 2 * H.mindmap.padding; break; case yt.RECT: O.padding = 2 * H.mindmap.padding; break; case yt.HEXAGON: O.padding = 2 * H.mindmap.padding; break; default: O.padding = H.mindmap.padding; } const T = Sp(pe); if (T) T.children.push(O), Jt.push(O); else if (Jt.length === 0) Jt.push(O); else { let x = new Error( 'There can be only one root. No parent could be found for ("' + O.descr + '")' ); throw x.hash = { text: "branch " + name, token: "branch " + name, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ['"checkout ' + name + '"'] }, x; } }, yt = { DEFAULT: 0, NO_BORDER: 0, ROUNDED_RECT: 1, RECT: 2, CIRCLE: 3, CLOUD: 4, BANG: 5, HEXAGON: 6 }, Op = (pe, fe) => { switch (qr.debug("In get type", pe, fe), pe) { case "[": return yt.RECT; case "(": return fe === ")" ? yt.ROUNDED_RECT : yt.CLOUD; case "((": return yt.CIRCLE; case ")": return yt.CLOUD; case "))": return yt.BANG; case "{{": return yt.HEXAGON; default: return yt.DEFAULT; } }, Uu = (pe, fe) => { Zi[pe] = fe; }, Np = (pe) => { const fe = Jt[Jt.length - 1]; pe && pe.icon && (fe.icon = sn(pe.icon)), pe && pe.class && (fe.class = sn(pe.class)); }, Wr = (pe) => { switch (pe) { case yt.DEFAULT: return "no-border"; case yt.RECT: return "rect"; case yt.ROUNDED_RECT: return "rounded-rect"; case yt.CIRCLE: return "circle"; case yt.CLOUD: return "cloud"; case yt.BANG: return "bang"; case yt.HEXAGON: return "hexgon"; default: return "no-border"; } }; let Yu; const Mp = (pe) => { Yu = pe; }, Ip = () => qr, Rp = (pe) => Jt[pe], Qi = (pe) => Zi[pe], kp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, addNode: Ap, clear: Dp, decorateNode: Np, getElementById: Qi, getLogger: Ip, getMindmap: Lp, getNodeById: Rp, getType: Op, nodeType: yt, get parseError() { return Yu; }, sanitizeText: sn, setElementForId: Uu, setErrorHandler: Mp, type2Str: Wr }, Symbol.toStringTag, { value: "Module" })), Hu = 12, Pp = function(pe, fe, ee) { pe.append("path").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr( "d", `M0 ${fe.height - 5} v${-fe.height + 2 * 5} q0,-5 5,-5 h${fe.width - 2 * 5} q5,0 5,5 v${fe.height - 5} H0 Z` ), pe.append("line").attr("class", "node-line-" + ee).attr("x1", 0).attr("y1", fe.height).attr("x2", fe.width).attr("y2", fe.height); }, Bp = function(pe, fe) { pe.append("rect").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr("height", fe.height).attr("width", fe.width); }, Fp = function(pe, fe) { const ee = fe.width, ce = fe.height, H = 0.15 * ee, O = 0.25 * ee, T = 0.35 * ee, x = 0.2 * ee; pe.append("path").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr( "d", `M0 0 a${H},${H} 0 0,1 ${ee * 0.25},${-1 * ee * 0.1} a${T},${T} 1 0,1 ${ee * 0.4},${-1 * ee * 0.1} a${O},${O} 1 0,1 ${ee * 0.35},${1 * ee * 0.2} a${H},${H} 1 0,1 ${ee * 0.15},${1 * ce * 0.35} a${x},${x} 1 0,1 ${-1 * ee * 0.15},${1 * ce * 0.65} a${O},${H} 1 0,1 ${-1 * ee * 0.25},${ee * 0.15} a${T},${T} 1 0,1 ${-1 * ee * 0.5},0 a${H},${H} 1 0,1 ${-1 * ee * 0.25},${-1 * ee * 0.15} a${H},${H} 1 0,1 ${-1 * ee * 0.1},${-1 * ce * 0.35} a${x},${x} 1 0,1 ${ee * 0.1},${-1 * ce * 0.65} H0 V0 Z` ); }, zp = function(pe, fe) { const ee = fe.width, ce = fe.height, H = 0.15 * ee; pe.append("path").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr( "d", `M0 0 a${H},${H} 1 0,0 ${ee * 0.25},${-1 * ce * 0.1} a${H},${H} 1 0,0 ${ee * 0.25},0 a${H},${H} 1 0,0 ${ee * 0.25},0 a${H},${H} 1 0,0 ${ee * 0.25},${1 * ce * 0.1} a${H},${H} 1 0,0 ${ee * 0.15},${1 * ce * 0.33} a${H * 0.8},${H * 0.8} 1 0,0 0,${1 * ce * 0.34} a${H},${H} 1 0,0 ${-1 * ee * 0.15},${1 * ce * 0.33} a${H},${H} 1 0,0 ${-1 * ee * 0.25},${ce * 0.15} a${H},${H} 1 0,0 ${-1 * ee * 0.25},0 a${H},${H} 1 0,0 ${-1 * ee * 0.25},0 a${H},${H} 1 0,0 ${-1 * ee * 0.25},${-1 * ce * 0.15} a${H},${H} 1 0,0 ${-1 * ee * 0.1},${-1 * ce * 0.33} a${H * 0.8},${H * 0.8} 1 0,0 0,${-1 * ce * 0.34} a${H},${H} 1 0,0 ${ee * 0.1},${-1 * ce * 0.33} H0 V0 Z` ); }, Gp = function(pe, fe) { pe.append("circle").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr("r", fe.width / 2); }; function $p(pe, fe, ee, ce, H) { return pe.insert("polygon", ":first-child").attr( "points", ce.map(function(O) { return O.x + "," + O.y; }).join(" ") ).attr("transform", "translate(" + (H.width - fe) / 2 + ", " + ee + ")"); } const Vp = function(pe, fe) { const ee = fe.height, H = ee / 4, O = fe.width - fe.padding + 2 * H, T = [ { x: H, y: 0 }, { x: O - H, y: 0 }, { x: O, y: -ee / 2 }, { x: O - H, y: -ee }, { x: H, y: -ee }, { x: 0, y: -ee / 2 } ]; $p(pe, O, ee, T, fe); }, _p = function(pe, fe) { pe.append("rect").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr("height", fe.height).attr("rx", fe.padding).attr("ry", fe.padding).attr("width", fe.width); }, Up = function(pe, fe, ee, ce) { const H = ce.htmlLabels, O = ee % (Hu - 1), T = pe.append("g"); fe.section = O; let x = "section-" + O; O < 0 && (x += " section-root"), T.attr("class", (fe.class ? fe.class + " " : "") + "mindmap-node " + x); const S = T.append("g"), G = T.append("g"), U = fe.descr.replace(/(<br\/*>)/g, ` `); Tp(G, U, { useHtmlLabels: H, width: fe.width, classes: "mindmap-node-label" }), H || G.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"); const P = G.node().getBBox(), K = ce.fontSize.replace ? ce.fontSize.replace("px", "") : ce.fontSize; if (fe.height = P.height + K * 1.1 * 0.5 + fe.padding, fe.width = P.width + 2 * fe.padding, fe.icon) if (fe.type === yt.CIRCLE) fe.height += 50, fe.width += 50, T.append("foreignObject").attr("height", "50px").attr("width", fe.width).attr("style", "text-align: center;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + O + " " + fe.icon), G.attr( "transform", "translate(" + fe.width / 2 + ", " + (fe.height / 2 - 1.5 * fe.padding) + ")" ); else { fe.width += 50; const D = fe.height; fe.height = Math.max(D, 60); const V = Math.abs(fe.height - D); T.append("foreignObject").attr("width", "60px").attr("height", fe.height).attr("style", "text-align: center;margin-top:" + V / 2 + "px;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + O + " " + fe.icon), G.attr( "transform", "translate(" + (25 + fe.width / 2) + ", " + (V / 2 + fe.padding / 2) + ")" ); } else if (H) { const D = (fe.width - P.width) / 2, V = (fe.height - P.height) / 2; G.attr("transform", "translate(" + D + ", " + V + ")"); } else { const D = fe.width / 2, V = fe.padding / 2; G.attr("transform", "translate(" + D + ", " + V + ")"); } switch (fe.type) { case yt.DEFAULT: Pp(S, fe, O); break; case yt.ROUNDED_RECT: _p(S, fe); break; case yt.RECT: Bp(S, fe); break; case yt.CIRCLE: S.attr("transform", "translate(" + fe.width / 2 + ", " + +fe.height / 2 + ")"), Gp(S, fe); break; case yt.CLOUD: Fp(S, fe); break; case yt.BANG: zp(S, fe); break; case yt.HEXAGON: Vp(S, fe); break; } return Uu(fe.id, T), fe.height; }, Yp = function(fe, ee, ce, H, O) { const T = O % (Hu - 1), x = ce.x + ce.width / 2, S = ce.y + ce.height / 2, G = ee.x + ee.width / 2, U = ee.y + ee.height / 2, P = G > x ? x + Math.abs(x - G) / 2 : x - Math.abs(x - G) / 2, K = U > S ? S + Math.abs(S - U) / 2 : S - Math.abs(S - U) / 2, D = G > x ? Math.abs(x - P) / 2 + x : -Math.abs(x - P) / 2 + x, V = U > S ? Math.abs(S - K) / 2 + S : -Math.abs(S - K) / 2 + S; fe.append("path").attr( "d", ce.direction === "TB" || ce.direction === "BT" ? `M${x},${S} Q${x},${V} ${P},${K} T${G},${U}` : `M${x},${S} Q${D},${S} ${P},${K} T${G},${U}` ).attr("class", "edge section-edge-" + T + " edge-depth-" + H); }, Hp = function(pe) { const fe = Qi(pe.id), ee = pe.x || 0, ce = pe.y || 0; fe.attr("transform", "translate(" + ee + "," + ce + ")"); }, Xu = { drawNode: Up, positionNode: Hp, drawEdge: Yp }; var qu = { exports: {} }; (function(pe, fe) { (function(ee, ce) { pe.exports = ce(); })(Ca, function() { function ee(t) { return ee = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, ee(t); } function ce(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function H(t, e) { for (var r = 0; r < e.length; r++) { var a = e[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(t, a.key, a); } } function O(t, e, r) { return e && H(t.prototype, e), r && H(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t; } function T(t, e, r) { return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } function x(t, e) { return S(t) || G(t, e) || U(t, e) || K(); } function S(t) { if (Array.isArray(t)) return t; } function G(t, e) { var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; if (r != null) { var a = [], n = !0, i = !1, s, o; try { for (r = r.call(t); !(n = (s = r.next()).done) && (a.push(s.value), !(e && a.length === e)); n = !0) ; } catch (l) { i = !0, o = l; } finally { try { !n && r.return != null && r.return(); } finally { if (i) throw o; } } return a; } } function U(t, e) { if (t) { if (typeof t == "string") return P(t, e); var r = Object.prototype.toString.call(t).slice(8, -1); if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t); if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return P(t, e); } } function P(t, e) { (e == null || e > t.length) && (e = t.length); for (var r = 0, a = new Array(e); r < e; r++) a[r] = t[r]; return a; } function K() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var D = typeof window > "u" ? null : window, V = D ? D.navigator : null; D && D.document; var _ = ee(""), Q = ee({}), ne = ee(function() { }), ue = typeof HTMLElement > "u" ? "undefined" : ee(HTMLElement), J = function(e) { return e && e.instanceString && Y(e.instanceString) ? e.instanceString() : null; }, j = function(e) { return e != null && ee(e) == _; }, Y = function(e) { return e != null && ee(e) === ne; }, te = function(e) { return !ge(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, L = function(e) { return e != null && ee(e) === Q && !te(e) && e.constructor === Object; }, $ = function(e) { return e != null && ee(e) === Q; }, k = function(e) { return e != null && ee(e) === ee(1) && !isNaN(e); }, q = function(e) { return k(e) && Math.floor(e) === e; }, he = function(e) { if (ue !== "undefined") return e != null && e instanceof HTMLElement; }, ge = function(e) { return Ae(e) || Ne(e); }, Ae = function(e) { return J(e) === "collection" && e._private.single; }, Ne = function(e) { return J(e) === "collection" && !e._private.single; }, _e = function(e) { return J(e) === "core"; }, tt = function(e) { return J(e) === "stylesheet"; }, ct = function(e) { return J(e) === "event"; }, Pe = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); }, $e = function(e) { return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, Xe = function(e) { return L(e) && k(e.x1) && k(e.x2) && k(e.y1) && k(e.y2); }, rt = function(e) { return $(e) && Y(e.then); }, lt = function() { return V && V.userAgent.match(/msie|trident|edge/i); }, nt = function(e, r) { r || (r = function() { if (arguments.length === 1) return arguments[0]; if (arguments.length === 0) return "undefined"; for (var i = [], s = 0; s < arguments.length; s++) i.push(arguments[s]); return i.join("$"); }); var a = function n() { var i = this, s = arguments, o, l = r.apply(i, s), u = n.cache; return (o = u[l]) || (o = u[l] = e.apply(i, s)), o; }; return a.cache = {}, a; }, je = nt(function(t) { return t.replace(/([A-Z])/g, function(e) { return "-" + e.toLowerCase(); }); }), pt = nt(function(t) { return t.replace(/(-\w)/g, function(e) { return e[1].toUpperCase(); }); }), Et = nt(function(t, e) { return t + e[0].toUpperCase() + e.substring(1); }, function(t, e) { return t + "$" + e; }), kt = function(e) { return Pe(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, vt = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", vr = "rgb[a]?\\((" + vt + "[%]?)\\s*,\\s*(" + vt + "[%]?)\\s*,\\s*(" + vt + "[%]?)(?:\\s*,\\s*(" + vt + "))?\\)", qt = "rgb[a]?\\((?:" + vt + "[%]?)\\s*,\\s*(?:" + vt + "[%]?)\\s*,\\s*(?:" + vt + "[%]?)(?:\\s*,\\s*(?:" + vt + "))?\\)", on = "hsl[a]?\\((" + vt + ")\\s*,\\s*(" + vt + "[%])\\s*,\\s*(" + vt + "[%])(?:\\s*,\\s*(" + vt + "))?\\)", Kr = "hsl[a]?\\((?:" + vt + ")\\s*,\\s*(?:" + vt + "[%])\\s*,\\s*(?:" + vt + "[%])(?:\\s*,\\s*(?:" + vt + "))?\\)", Da = "\\#[0-9a-fA-F]{3}", jt = "\\#[0-9a-fA-F]{6}", Ji = function(e, r) { return e < r ? -1 : e > r ? 1 : 0; }, Ju = function(e, r) { return -1 * Ji(e, r); }, Ue = Object.assign != null ? Object.assign.bind(Object) : function(t) { for (var e = arguments, r = 1; r < e.length; r++) { var a = e[r]; if (a != null) for (var n = Object.keys(a), i = 0; i < n.length; i++) { var s = n[i]; t[s] = a[s]; } } return t; }, ju = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var r = e.length === 4, a, n, i, s = 16; return r ? (a = parseInt(e[1] + e[1], s), n = parseInt(e[2] + e[2], s), i = parseInt(e[3] + e[3], s)) : (a = parseInt(e[1] + e[2], s), n = parseInt(e[3] + e[4], s), i = parseInt(e[5] + e[6], s)), [a, n, i]; } }, el = function(e) { var r, a, n, i, s, o, l, u; function f(d, g, y) { return y < 0 && (y += 1), y > 1 && (y -= 1), y < 1 / 6 ? d + (g - d) * 6 * y : y < 1 / 2 ? g : y < 2 / 3 ? d + (g - d) * (2 / 3 - y) * 6 : d; } var h = new RegExp("^" + on + "$").exec(e); if (h) { if (a = parseInt(h[1]), a < 0 ? a = (360 - -1 * a % 360) % 360 : a > 360 && (a = a % 360), a /= 360, n = parseFloat(h[2]), n < 0 || n > 100 || (n = n / 100, i = parseFloat(h[3]), i < 0 || i > 100) || (i = i / 100, s = h[4], s !== void 0 && (s = parseFloat(s), s < 0 || s > 1))) return; if (n === 0) o = l = u = Math.round(i * 255); else { var c = i < 0.5 ? i * (1 + n) : i + n - i * n, v = 2 * i - c; o = Math.round(255 * f(v, c, a + 1 / 3)), l = Math.round(255 * f(v, c, a)), u = Math.round(255 * f(v, c, a - 1 / 3)); } r = [o, l, u, s]; } return r; }, tl = function(e) { var r, a = new RegExp("^" + vr + "$").exec(e); if (a) { r = []; for (var n = [], i = 1; i <= 3; i++) { var s = a[i]; if (s[s.length - 1] === "%" && (n[i] = !0), s = parseFloat(s), n[i] && (s = s / 100 * 255), s < 0 || s > 255) return; r.push(Math.floor(s)); } var o = n[1] || n[2] || n[3], l = n[1] && n[2] && n[3]; if (o && !l) return; var u = a[4]; if (u !== void 0) { if (u = parseFloat(u), u < 0 || u > 1) return; r.push(u); } } return r; }, rl = function(e) { return nl[e.toLowerCase()]; }, al = function(e) { return (te(e) ? e : null) || rl(e) || ju(e) || tl(e) || el(e); }, nl = { // special colour names transparent: [0, 0, 0, 0], // NB alpha === 0 // regular colours aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], grey: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] }, ji = function(e) { for (var r = e.map, a = e.keys, n = a.length, i = 0; i < n; i++) { var s = a[i]; if (L(s)) throw Error("Tried to set map with object key"); i < a.length - 1 ? (r[s] == null && (r[s] = {}), r = r[s]) : r[s] = e.value; } }, es = function(e) { for (var r = e.map, a = e.keys, n = a.length, i = 0; i < n; i++) { var s = a[i]; if (L(s)) throw Error("Tried to get map with object key"); if (r = r[s], r == null) return r; } return r; }; function il(t) { var e = typeof t; return t != null && (e == "object" || e == "function"); } var Rr = il, Sa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof Ca < "u" ? Ca : typeof self < "u" ? self : {}; function sl(t, e) { return e = { exports: {} }, t(e, e.exports), e.exports; } var ol = typeof Sa == "object" && Sa && Sa.Object === Object && Sa, ul = ol, ll = typeof self == "object" && self && self.Object === Object && self, fl = ul || ll || Function("return this")(), un = fl, hl = function() { return un.Date.now(); }, ti = hl, cl = /\s/; function vl(t) { for (var e = t.length; e-- && cl.test(t.charAt(e)); ) ; return e; } var dl = vl, gl = /^\s+/; function pl(t) { return t && t.slice(0, dl(t) + 1).replace(gl, ""); } var yl = pl, ml = un.Symbol, Zr = ml, ts = Object.prototype, bl = ts.hasOwnProperty, El = ts.toString, La = Zr ? Zr.toStringTag : void 0; function wl(t) { var e = bl.call(t, La), r = t[La]; try { t[La] = void 0; var a = !0; } catch { } var n = El.call(t); return a && (e ? t[La] = r : delete t[La]), n; } var xl = wl, Tl = Object.prototype, Cl = Tl.toString; function Dl(t) { return Cl.call(t); } var Sl = Dl, Ll = "[object Null]", Al = "[object Undefined]", rs = Zr ? Zr.toStringTag : void 0; function Ol(t) { return t == null ? t === void 0 ? Al : Ll : rs && rs in Object(t) ? xl(t) : Sl(t); } var as = Ol; function Nl(t) { return t != null && typeof t == "object"; } var Ml = Nl, Il = "[object Symbol]"; function Rl(t) { return typeof t == "symbol" || Ml(t) && as(t) == Il; } var Aa = Rl, ns = 0 / 0, kl = /^[-+]0x[0-9a-f]+$/i, Pl = /^0b[01]+$/i, Bl = /^0o[0-7]+$/i, Fl = parseInt; function zl(t) { if (typeof t == "number") return t; if (Aa(t)) return ns; if (Rr(t)) { var e = typeof t.valueOf == "function" ? t.valueOf() : t; t = Rr(e) ? e + "" : e; } if (typeof t != "string") return t === 0 ? t : +t; t = yl(t); var r = Pl.test(t); return r || Bl.test(t) ? Fl(t.slice(2), r ? 2 : 8) : kl.test(t) ? ns : +t; } var is = zl, Gl = "Expected a function", $l = Math.max, Vl = Math.min; function _l(t, e, r) { var a, n, i, s, o, l, u = 0, f = !1, h = !1, c = !0; if (typeof t != "function") throw new TypeError(Gl); e = is(e) || 0, Rr(r) && (f = !!r.leading, h = "maxWait" in r, i = h ? $l(is(r.maxWait) || 0, e) : i, c = "trailing" in r ? !!r.trailing : c); function v(A) { var w = a, I = n; return a = n = void 0, u = A, s = t.apply(I, w), s; } function d(A) { return u = A, o = setTimeout(p, e), f ? v(A) : s; } function g(A) { var w = A - l, I = A - u, C = e - w; return h ? Vl(C, i - I) : C; } function y(A) { var w = A - l, I = A - u; return l === void 0 || w >= e || w < 0 || h && I >= i; } function p() { var A = ti(); if (y(A)) return m(A); o = setTimeout(p, g(A)); } function m(A) { return o = void 0, c && a ? v(A) : (a = n = void 0, s); } function b() { o !== void 0 && clearTimeout(o), u = 0, a = l = n = o = void 0; } function E() { return o === void 0 ? s : m(ti()); } function M() { var A = ti(), w = y(A); if (a = arguments, n = this, l = A, w) { if (o === void 0) return d(l); if (h) return clearTimeout(o), o = setTimeout(p, e), v(l); } return o === void 0 && (o = setTimeout(p, e)), s; } return M.cancel = b, M.flush = E, M; } var ln = _l, ri = D ? D.performance : null, ss = ri && ri.now ? function() { return ri.now(); } : function() { return Date.now(); }, Ul = function() { if (D) { if (D.requestAnimationFrame) return function(t) { D.requestAnimationFrame(t); }; if (D.mozRequestAnimationFrame) return function(t) { D.mozRequestAnimationFrame(t); }; if (D.webkitRequestAnimationFrame) return function(t) { D.webkitRequestAnimationFrame(t); }; if (D.msRequestAnimationFrame) return function(t) { D.msRequestAnimationFrame(t); }; } return function(t) { t && setTimeout(function() { t(ss()); }, 1e3 / 60); }; }(), fn = function(e) { return Ul(e); }, dr = ss, Qr = 9261, os = 65599, Oa = 5381, us = function(e) { for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Qr, a = r, n; n = e.next(), !n.done; ) a = a * os + n.value | 0; return a; }, Na = function(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Qr; return r * os + e | 0; }, Ma = function(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Oa; return (r << 5) + r + e | 0; }, Yl = function(e, r) { return e * 2097152 + r; }, Er = function(e) { return e[0] * 2097152 + e[1]; }, hn = function(e, r) { return [Na(e[0], r[0]), Ma(e[1], r[1])]; }, Hl = function(e, r) { var a = { value: 0, done: !1 }, n = 0, i = e.length, s = { next: function() { return n < i ? a.value = e[n++] : a.done = !0, a; } }; return us(s, r); }, kr = function(e, r) { var a = { value: 0, done: !1 }, n = 0, i = e.length, s = { next: function() { return n < i ? a.value = e.charCodeAt(n++) : a.done = !0, a; } }; return us(s, r); }, ls = function() { return Xl(arguments); }, Xl = function(e) { for (var r, a = 0; a < e.length; a++) { var n = e[a]; a === 0 ? r = kr(n) : r = kr(n, r); } return r; }, fs = !0, ql = console.warn != null, Wl = console.trace != null, ai = Number.MAX_SAFE_INTEGER || 9007199254740991, hs = function() { return !0; }, cn = function() { return !1; }, cs = function() { return 0; }, ni = function() { }, xt = function(e) { throw