An error occurred:
" + Pe(n.message + "", true) + ""; + if (e) + return Promise.resolve(s); + if (t) { + t(null, s); + return; + } + return s; + } + if (e) + return Promise.reject(n); + if (t) { + t(n); + return; + } + throw n; + }; + } + function iv(i, e) { + return (t, n, s) => { + typeof n == "function" && (s = n, n = null); + const l = { ...n }; + n = { ...U2.defaults, ...l }; + const c = nH(n.silent, n.async, s); + if (typeof t > "u" || t === null) + return c(new Error("marked(): input parameter is undefined or null")); + if (typeof t != "string") + return c(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected")); + if (Jz(n), n.hooks && (n.hooks.options = n), s) { + const L = n.highlight; + let d; + try { + n.hooks && (t = n.hooks.preprocess(t)), d = i(t, n); + } catch (m) { + return c(m); + } + const _ = /* @__PURE__ */ __name(function(m) { + let f; + if (!m) + try { + n.walkTokens && U2.walkTokens(d, n.walkTokens), f = e(d, n), n.hooks && (f = n.hooks.postprocess(f)); + } catch (h) { + m = h; + } + return n.highlight = L, m ? c(m) : s(null, f); + }, "_"); + if (!L || L.length < 3 || (delete n.highlight, !d.length)) return _(); + let p = 0; + U2.walkTokens(d, function(m) { + m.type === "code" && (p++, setTimeout(() => { + L(m.text, m.lang, function(f, h) { + if (f) + return _(f); + h != null && h !== m.text && (m.text = h, m.escaped = true), p--, p === 0 && _(); + }); + }, 0)); + }), p === 0 && _(); + return; + } + if (n.async) + return Promise.resolve(n.hooks ? n.hooks.preprocess(t) : t).then((L) => i(L, n)).then((L) => n.walkTokens ? Promise.all(U2.walkTokens(L, n.walkTokens)).then(() => L) : L).then((L) => e(L, n)).then((L) => n.hooks ? n.hooks.postprocess(L) : L).catch(c); + try { + n.hooks && (t = n.hooks.preprocess(t)); + const L = i(t, n); + n.walkTokens && U2.walkTokens(L, n.walkTokens); + let d = e(L, n); + return n.hooks && (d = n.hooks.postprocess(d)), d; + } catch (L) { + return c(L); + } + }; + } + function U2(i, e, t) { + return iv(Zt.lex, Bt.parse)(i, e, t); + } + function Xe(i) { + return function(e) { + e instanceof RegExp && (e.lastIndex = 0); + for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++) + n[s - 1] = arguments[s]; + return tc(i, e, n); + }; + } + function uH(i) { + return function() { + for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) + t[n] = arguments[n]; + return nc(i, t); + }; + } + function c1(i, e) { + let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Z8; + np && np(i, null); + let n = e.length; + for (; n--; ) { + let s = e[n]; + if (typeof s == "string") { + const l = t(s); + l !== s && (iH(e) || (e[n] = l), s = l); + } + i[s] = true; + } + return i; + } + function LH(i) { + for (let e = 0; e < i.length; e++) + l4(i, e) || (i[e] = null); + return i; + } + function d9(i) { + const e = av(null); + for (const [t, n] of rv(i)) + l4(i, t) && (Array.isArray(n) ? e[t] = LH(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = d9(n) : e[t] = n); + return e; + } + function O5(i, e) { + for (; i !== null; ) { + const n = aH(i, e); + if (n) { + if (n.get) + return Xe(n.get); + if (typeof n.value == "function") + return Xe(n.value); + } + i = rH(i); + } + function t() { + return null; + } + __name(t, "t"); + return t; + } + function lv() { + let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : TH(); + const e = /* @__PURE__ */ __name((D2) => lv(D2), "e"); + if (e.version = "3.2.5", e.removed = [], !i || !i.document || i.document.nodeType !== I5.document || !i.Element) + return e.isSupported = false, e; + let { + document: t + } = i; + const n = t, s = n.currentScript, { + DocumentFragment: l, + HTMLTemplateElement: c, + Node: L, + Element: d, + NodeFilter: _, + NamedNodeMap: p = i.NamedNodeMap || i.MozNamedAttrMap, + HTMLFormElement: m, + DOMParser: f, + trustedTypes: h + } = i, R = d.prototype, b = O5(R, "cloneNode"), M = O5(R, "remove"), w = O5(R, "nextSibling"), O = O5(R, "childNodes"), D = O5(R, "parentNode"); + if (typeof c == "function") { + const D2 = t.createElement("template"); + D2.content && D2.content.ownerDocument && (t = D2.content.ownerDocument); + } + let N, F = ""; + const { + implementation: U, + createNodeIterator: k, + createDocumentFragment: n2, + getElementsByTagName: K + } = t, { + importNode: X + } = n; + let r2 = up(); + e.isSupported = typeof rv == "function" && typeof D == "function" && U && U.createHTMLDocument !== void 0; + const { + MUSTACHE_EXPR: t2, + ERB_EXPR: g2, + TMPLIT_EXPR: R2, + DATA_ATTR: H, + ARIA_ATTR: A, + IS_SCRIPT_OR_DATA: B, + ATTR_WHITESPACE: e2, + CUSTOM_ELEMENT: u2 + } = cp; + let { + IS_ALLOWED_URI: y + } = cp, q = null; + const s2 = c1({}, [...ap, ...kr, ...Pr, ...Fr, ...sp]); + let i2 = null; + const a2 = c1({}, [...op, ...Ur, ...lp, ...N8]); + let _2 = Object.seal(av(null, { + tagNameCheck: { + writable: true, + configurable: false, + enumerable: true, + value: null + }, + attributeNameCheck: { + writable: true, + configurable: false, + enumerable: true, + value: null + }, + allowCustomizedBuiltInElements: { + writable: true, + configurable: false, + enumerable: true, + value: false + } + })), f2 = null, V2 = null, q2 = true, v1 = true, p1 = false, P1 = true, z1 = false, he = true, de = false, g3 = false, we = false, O1 = false, J3 = false, k3 = false, t3 = true, fe = false; + const et = "user-content-"; + let e4 = true, p3 = false, m3 = {}, le = null; + const W1 = c1({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); + let Me = null; + const $1 = c1({}, ["audio", "video", "img", "source", "image", "track"]); + let P3 = null; + const C4 = c1({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), K1 = "http://www.w3.org/1998/Math/MathML", r1 = "http://www.w3.org/2000/svg", te = "http://www.w3.org/1999/xhtml"; + let ne = te, F3 = false, U3 = null; + const Y = c1({}, [K1, r1, te], Dr); + let o2 = c1({}, ["mi", "mo", "mn", "ms", "mtext"]), E2 = c1({}, ["annotation-xml"]); + const k2 = c1({}, ["title", "style", "font", "a", "script"]); + let Q2 = null; + const u1 = ["application/xhtml+xml", "text/html"], I1 = "text/html"; + let p2 = null, v2 = null; + const H2 = t.createElement("form"), W2 = /* @__PURE__ */ __name(function(Z) { + return Z instanceof RegExp || Z instanceof Function; + }, "W2"), E1 = /* @__PURE__ */ __name(function() { + let Z = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + if (!(v2 && v2 === Z)) { + if ((!Z || typeof Z != "object") && (Z = {}), Z = d9(Z), Q2 = // eslint-disable-next-line unicorn/prefer-includes + u1.indexOf(Z.PARSER_MEDIA_TYPE) === -1 ? I1 : Z.PARSER_MEDIA_TYPE, p2 = Q2 === "application/xhtml+xml" ? Dr : Z8, q = l4(Z, "ALLOWED_TAGS") ? c1({}, Z.ALLOWED_TAGS, p2) : s2, i2 = l4(Z, "ALLOWED_ATTR") ? c1({}, Z.ALLOWED_ATTR, p2) : a2, U3 = l4(Z, "ALLOWED_NAMESPACES") ? c1({}, Z.ALLOWED_NAMESPACES, Dr) : Y, P3 = l4(Z, "ADD_URI_SAFE_ATTR") ? c1(d9(C4), Z.ADD_URI_SAFE_ATTR, p2) : C4, Me = l4(Z, "ADD_DATA_URI_TAGS") ? c1(d9($1), Z.ADD_DATA_URI_TAGS, p2) : $1, le = l4(Z, "FORBID_CONTENTS") ? c1({}, Z.FORBID_CONTENTS, p2) : W1, f2 = l4(Z, "FORBID_TAGS") ? c1({}, Z.FORBID_TAGS, p2) : {}, V2 = l4(Z, "FORBID_ATTR") ? c1({}, Z.FORBID_ATTR, p2) : {}, m3 = l4(Z, "USE_PROFILES") ? Z.USE_PROFILES : false, q2 = Z.ALLOW_ARIA_ATTR !== false, v1 = Z.ALLOW_DATA_ATTR !== false, p1 = Z.ALLOW_UNKNOWN_PROTOCOLS || false, P1 = Z.ALLOW_SELF_CLOSE_IN_ATTR !== false, z1 = Z.SAFE_FOR_TEMPLATES || false, he = Z.SAFE_FOR_XML !== false, de = Z.WHOLE_DOCUMENT || false, O1 = Z.RETURN_DOM || false, J3 = Z.RETURN_DOM_FRAGMENT || false, k3 = Z.RETURN_TRUSTED_TYPE || false, we = Z.FORCE_BODY || false, t3 = Z.SANITIZE_DOM !== false, fe = Z.SANITIZE_NAMED_PROPS || false, e4 = Z.KEEP_CONTENT !== false, p3 = Z.IN_PLACE || false, y = Z.ALLOWED_URI_REGEXP || sv, ne = Z.NAMESPACE || te, o2 = Z.MATHML_TEXT_INTEGRATION_POINTS || o2, E2 = Z.HTML_INTEGRATION_POINTS || E2, _2 = Z.CUSTOM_ELEMENT_HANDLING || {}, Z.CUSTOM_ELEMENT_HANDLING && W2(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (_2.tagNameCheck = Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck), Z.CUSTOM_ELEMENT_HANDLING && W2(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (_2.attributeNameCheck = Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), Z.CUSTOM_ELEMENT_HANDLING && typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (_2.allowCustomizedBuiltInElements = Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), z1 && (v1 = false), J3 && (O1 = true), m3 && (q = c1({}, sp), i2 = [], m3.html === true && (c1(q, ap), c1(i2, op)), m3.svg === true && (c1(q, kr), c1(i2, Ur), c1(i2, N8)), m3.svgFilters === true && (c1(q, Pr), c1(i2, Ur), c1(i2, N8)), m3.mathMl === true && (c1(q, Fr), c1(i2, lp), c1(i2, N8))), Z.ADD_TAGS && (q === s2 && (q = d9(q)), c1(q, Z.ADD_TAGS, p2)), Z.ADD_ATTR && (i2 === a2 && (i2 = d9(i2)), c1(i2, Z.ADD_ATTR, p2)), Z.ADD_URI_SAFE_ATTR && c1(P3, Z.ADD_URI_SAFE_ATTR, p2), Z.FORBID_CONTENTS && (le === W1 && (le = d9(le)), c1(le, Z.FORBID_CONTENTS, p2)), e4 && (q["#text"] = true), de && c1(q, ["html", "head", "body"]), q.table && (c1(q, ["tbody"]), delete f2.tbody), Z.TRUSTED_TYPES_POLICY) { + if (typeof Z.TRUSTED_TYPES_POLICY.createHTML != "function") + throw N5('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); + if (typeof Z.TRUSTED_TYPES_POLICY.createScriptURL != "function") + throw N5('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); + N = Z.TRUSTED_TYPES_POLICY, F = N.createHTML(""); + } else + N === void 0 && (N = vH(h, s)), N !== null && typeof F == "string" && (F = N.createHTML("")); + je && je(Z), v2 = Z; + } + }, "E1"), ie = c1({}, [...kr, ...Pr, ...dH]), F1 = c1({}, [...Fr, ...CH]), re = /* @__PURE__ */ __name(function(Z) { + let C2 = D(Z); + (!C2 || !C2.tagName) && (C2 = { + namespaceURI: ne, + tagName: "template" + }); + const T2 = Z8(Z.tagName), s1 = Z8(C2.tagName); + return U3[Z.namespaceURI] ? Z.namespaceURI === r1 ? C2.namespaceURI === te ? T2 === "svg" : C2.namespaceURI === K1 ? T2 === "svg" && (s1 === "annotation-xml" || o2[s1]) : !!ie[T2] : Z.namespaceURI === K1 ? C2.namespaceURI === te ? T2 === "math" : C2.namespaceURI === r1 ? T2 === "math" && E2[s1] : !!F1[T2] : Z.namespaceURI === te ? C2.namespaceURI === r1 && !E2[s1] || C2.namespaceURI === K1 && !o2[s1] ? false : !F1[T2] && (k2[T2] || !ie[T2]) : !!(Q2 === "application/xhtml+xml" && U3[Z.namespaceURI]) : false; + }, "re"), ce = /* @__PURE__ */ __name(function(Z) { + A5(e.removed, { + element: Z + }); + try { + D(Z).removeChild(Z); + } catch { + M(Z); + } + }, "ce"), t4 = /* @__PURE__ */ __name(function(Z, C2) { + try { + A5(e.removed, { + attribute: C2.getAttributeNode(Z), + from: C2 + }); + } catch { + A5(e.removed, { + attribute: null, + from: C2 + }); + } + if (C2.removeAttribute(Z), Z === "is") + if (O1 || J3) + try { + ce(C2); + } catch { + } + else + try { + C2.setAttribute(Z, ""); + } catch { + } + }, "t4"), Vt = /* @__PURE__ */ __name(function(Z) { + let C2 = null, T2 = null; + if (we) + Z = "
`
+ };
+ return { Component: o2, VuePlugin: {
+ install(k2) {
+ k2.component("highlightjs", o2);
+ }
+ } };
+ }
+ __name(p3, "p3");
+ const m3 = {
+ "after:highlightElement": /* @__PURE__ */ __name(({ el: Y, result: o2, text: E2 }) => {
+ const k2 = W1(Y);
+ if (!k2.length) return;
+ const Q2 = document.createElement("div");
+ Q2.innerHTML = o2.value, o2.value = Me(k2, W1(Q2), E2);
+ }, "after:highlightElement")
+ };
+ function le(Y) {
+ return Y.nodeName.toLowerCase();
+ }
+ __name(le, "le");
+ function W1(Y) {
+ const o2 = [];
+ return (/* @__PURE__ */ __name(function E2(k2, Q2) {
+ for (let u1 = k2.firstChild; u1; u1 = u1.nextSibling)
+ u1.nodeType === 3 ? Q2 += u1.nodeValue.length : u1.nodeType === 1 && (o2.push({
+ event: "start",
+ offset: Q2,
+ node: u1
+ }), Q2 = E2(u1, Q2), le(u1).match(/br|hr|img|input/) || o2.push({
+ event: "stop",
+ offset: Q2,
+ node: u1
+ }));
+ return Q2;
+ }, "E2"))(Y, 0), o2;
+ }
+ __name(W1, "W1");
+ function Me(Y, o2, E2) {
+ let k2 = 0, Q2 = "";
+ const u1 = [];
+ function I1() {
+ return !Y.length || !o2.length ? Y.length ? Y : o2 : Y[0].offset !== o2[0].offset ? Y[0].offset < o2[0].offset ? Y : o2 : o2[0].event === "start" ? Y : o2;
+ }
+ __name(I1, "I1");
+ function p2(W2) {
+ function E1(ie) {
+ return " " + ie.nodeName + '="' + s(ie.value) + '"';
+ }
+ __name(E1, "E1");
+ Q2 += "<" + le(W2) + [].map.call(W2.attributes, E1).join("") + ">";
+ }
+ __name(p2, "p2");
+ function v2(W2) {
+ Q2 += "" + le(W2) + ">";
+ }
+ __name(v2, "v2");
+ function H2(W2) {
+ (W2.event === "start" ? p2 : v2)(W2.node);
+ }
+ __name(H2, "H2");
+ for (; Y.length || o2.length; ) {
+ let W2 = I1();
+ if (Q2 += s(E2.substring(k2, W2[0].offset)), k2 = W2[0].offset, W2 === Y) {
+ u1.reverse().forEach(v2);
+ do
+ H2(W2.splice(0, 1)[0]), W2 = I1();
+ while (W2 === Y && W2.length && W2[0].offset === k2);
+ u1.reverse().forEach(p2);
+ } else
+ W2[0].event === "start" ? u1.push(W2[0].node) : u1.pop(), H2(W2.splice(0, 1)[0]);
+ }
+ return Q2 + s(E2.substr(k2));
+ }
+ __name(Me, "Me");
+ const $1 = {}, P3 = /* @__PURE__ */ __name((Y) => {
+ console.error(Y);
+ }, "P3"), C4 = /* @__PURE__ */ __name((Y, ...o2) => {
+ console.log(`WARN: ${Y}`, ...o2);
+ }, "C4"), K1 = /* @__PURE__ */ __name((Y, o2) => {
+ $1[`${Y}/${o2}`] || (console.log(`Deprecated as of ${Y}. ${o2}`), $1[`${Y}/${o2}`] = true);
+ }, "K1"), r1 = s, te = l, ne = Symbol("nomatch");
+ var U3 = function(Y) {
+ const o2 = /* @__PURE__ */ Object.create(null), E2 = /* @__PURE__ */ Object.create(null), k2 = [];
+ let Q2 = true;
+ const u1 = /(^(<[^>]+>|\t|)+|\n)/gm, I1 = "Could not find the language '{}', did you forget to load/include a language module?", p2 = { disableAutodetect: true, name: "Plain text", contains: [] };
+ let v2 = {
+ noHighlightRe: /^(no-?highlight)$/i,
+ languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
+ classPrefix: "hljs-",
+ tabReplace: null,
+ useBR: false,
+ languages: null,
+ // beta configuration options, subject to change, welcome to discuss
+ // https://github.com/highlightjs/highlight.js/issues/1086
+ __emitter: p
+ };
+ function H2(d2) {
+ return v2.noHighlightRe.test(d2);
+ }
+ __name(H2, "H2");
+ function W2(d2) {
+ let b2 = d2.className + " ";
+ b2 += d2.parentNode ? d2.parentNode.className : "";
+ const n1 = v2.languageDetectRe.exec(b2);
+ if (n1) {
+ const m1 = s1(n1[1]);
+ return m1 || (C4(I1.replace("{}", n1[1])), C4("Falling back to no-highlight mode for this block.", d2)), m1 ? n1[1] : "no-highlight";
+ }
+ return b2.split(/\s+/).find((m1) => H2(m1) || s1(m1));
+ }
+ __name(W2, "W2");
+ function E1(d2, b2, n1, m1) {
+ let ae = "", n4 = "";
+ typeof b2 == "object" ? (ae = d2, n1 = b2.ignoreIllegals, n4 = b2.language, m1 = void 0) : (K1("10.7.0", "highlight(lang, code, ...args) has been deprecated."), K1("10.7.0", `Please use highlight(code, options) instead.
+https://github.com/highlightjs/highlight.js/issues/2277`), n4 = d2, ae = b2);
+ const Z1 = {
+ code: ae,
+ language: n4
+ };
+ Ie("before:highlight", Z1);
+ const r3 = Z1.result ? Z1.result : ie(Z1.language, Z1.code, n1, m1);
+ return r3.code = Z1.code, Ie("after:highlight", r3), r3;
+ }
+ __name(E1, "E1");
+ function ie(d2, b2, n1, m1) {
+ function ae(M2, F2) {
+ const $2 = i4.case_insensitive ? F2[0].toLowerCase() : F2[0];
+ return Object.prototype.hasOwnProperty.call(M2.keywords, $2) && M2.keywords[$2];
+ }
+ __name(ae, "ae");
+ function n4() {
+ if (!X2.keywords) {
+ _e.addText(D1);
+ return;
+ }
+ let M2 = 0;
+ X2.keywordPatternRe.lastIndex = 0;
+ let F2 = X2.keywordPatternRe.exec(D1), $2 = "";
+ for (; F2; ) {
+ $2 += D1.substring(M2, F2.index);
+ const e1 = ae(X2, F2);
+ if (e1) {
+ const [k1, g4] = e1;
+ if (_e.addText($2), $2 = "", N4 += g4, k1.startsWith("_"))
+ $2 += F2[0];
+ else {
+ const rt = i4.classNameAliases[k1] || k1;
+ _e.addKeyword(F2[0], rt);
+ }
+ } else
+ $2 += F2[0];
+ M2 = X2.keywordPatternRe.lastIndex, F2 = X2.keywordPatternRe.exec(D1);
+ }
+ $2 += D1.substr(M2), _e.addText($2);
+ }
+ __name(n4, "n4");
+ function Z1() {
+ if (D1 === "") return;
+ let M2 = null;
+ if (typeof X2.subLanguage == "string") {
+ if (!o2[X2.subLanguage]) {
+ _e.addText(D1);
+ return;
+ }
+ M2 = ie(X2.subLanguage, D1, true, r4[X2.subLanguage]), r4[X2.subLanguage] = /** @type {CompiledMode} */
+ M2.top;
+ } else
+ M2 = re(D1, X2.subLanguage.length ? X2.subLanguage : null);
+ X2.relevance > 0 && (N4 += M2.relevance), _e.addSublanguage(M2.emitter, M2.language);
+ }
+ __name(Z1, "Z1");
+ function r3() {
+ X2.subLanguage != null ? Z1() : n4(), D1 = "";
+ }
+ __name(r3, "r3");
+ function E3(M2) {
+ return M2.className && _e.openNode(i4.classNameAliases[M2.className] || M2.className), X2 = Object.create(M2, { parent: { value: X2 } }), X2;
+ }
+ __name(E3, "E3");
+ function a3(M2, F2, $2) {
+ let e1 = M(M2.endRe, $2);
+ if (e1) {
+ if (M2["on:end"]) {
+ const k1 = new n(M2);
+ M2["on:end"](F2, k1), k1.isMatchIgnored && (e1 = false);
+ }
+ if (e1) {
+ for (; M2.endsParent && M2.parent; )
+ M2 = M2.parent;
+ return M2;
+ }
+ }
+ if (M2.endsWithParent)
+ return a3(M2.parent, F2, $2);
+ }
+ __name(a3, "a3");
+ function A0(M2) {
+ return X2.matcher.regexIndex === 0 ? (D1 += M2[0], 1) : (it = true, 0);
+ }
+ __name(A0, "A0");
+ function Wt(M2) {
+ const F2 = M2[0], $2 = M2.rule, e1 = new n($2), k1 = [$2.__beforeBegin, $2["on:begin"]];
+ for (const g4 of k1)
+ if (g4 && (g4(M2, e1), e1.isMatchIgnored))
+ return A0(F2);
+ return $2 && $2.endSameAsBegin && ($2.endRe = m(F2)), $2.skip ? D1 += F2 : ($2.excludeBegin && (D1 += F2), r3(), !$2.returnBegin && !$2.excludeBegin && (D1 = F2)), E3($2), $2.returnBegin ? 0 : F2.length;
+ }
+ __name(Wt, "Wt");
+ function gn(M2) {
+ const F2 = M2[0], $2 = b2.substr(M2.index), e1 = a3(X2, M2, $2);
+ if (!e1)
+ return ne;
+ const k1 = X2;
+ k1.skip ? D1 += F2 : (k1.returnEnd || k1.excludeEnd || (D1 += F2), r3(), k1.excludeEnd && (D1 = F2));
+ do
+ X2.className && _e.closeNode(), !X2.skip && !X2.subLanguage && (N4 += X2.relevance), X2 = X2.parent;
+ while (X2 !== e1.parent);
+ return e1.starts && (e1.endSameAsBegin && (e1.starts.endRe = e1.endRe), E3(e1.starts)), k1.returnEnd ? 0 : F2.length;
+ }
+ __name(gn, "gn");
+ function ze() {
+ const M2 = [];
+ for (let F2 = X2; F2 !== i4; F2 = F2.parent)
+ F2.className && M2.unshift(F2.className);
+ M2.forEach((F2) => _e.openNode(F2));
+ }
+ __name(ze, "ze");
+ let y4 = {};
+ function x9(M2, F2) {
+ const $2 = F2 && F2[0];
+ if (D1 += M2, $2 == null)
+ return r3(), 0;
+ if (y4.type === "begin" && F2.type === "end" && y4.index === F2.index && $2 === "") {
+ if (D1 += b2.slice(F2.index, F2.index + 1), !Q2) {
+ const e1 = new Error("0 width match regex");
+ throw e1.languageName = d2, e1.badRule = y4.rule, e1;
+ }
+ return 1;
+ }
+ if (y4 = F2, F2.type === "begin")
+ return Wt(F2);
+ if (F2.type === "illegal" && !n1) {
+ const e1 = new Error('Illegal lexeme "' + $2 + '" for mode "' + (X2.className || "' + (n ? e : Pe(e, true)) + `
+` : "" + (n ? e : Pe(e, true)) + `
+`;
+ }
+ /**
+ * @param {string} quote
+ */
+ blockquote(e) {
+ return `+${e}+`; + } + html(e) { + return e; + } + /** + * @param {string} text + * @param {string} level + * @param {string} raw + * @param {any} slugger + */ + heading(e, t, n, s) { + if (this.options.headerIds) { + const l = this.options.headerPrefix + s.slug(n); + return `
${e}
+`; + } + /** + * @param {string} header + * @param {string} body + */ + table(e, t) { + return t && (t = `${t}`), `${e}`;
+ }
+ br() {
+ return this.options.xhtml ? "
+ ${t[1]}
+ ${t[2]}
+
+ ` : `${i}`;
+ }
+ };
+ U2.setOptions({
+ highlight: /* @__PURE__ */ __name(function(i, e) {
+ if (!e)
+ return f9.highlightAuto(i).value;
+ const t = f9.getLanguage(e) ? e : "plaintext";
+ return f9.highlight(t, i).value;
+ }, "highlight"),
+ breaks: true
+ });
+ U2.use({ renderer: oW });
+ X3 = /* @__PURE__ */ __name((i) => {
+ var t, n, s, l;
+ const e = RH.sanitize(
+ ((t = i.commentObj) == null ? void 0 : t.text) && U2.parse((n = i.commentObj) == null ? void 0 : n.text) || i.comment && U2.parse(i.comment)
+ );
+ return /* @__PURE__ */ S.jsx(
+ "div",
+ {
+ className: z2(
+ "comments text-skin-comment min-w-[100px] flex text-left opacity-50 hover:opacity-100",
+ i.className
+ ),
+ children: /* @__PURE__ */ S.jsx(
+ "div",
+ {
+ dangerouslySetInnerHTML: { __html: e },
+ className: z2((s = i.commentObj) == null ? void 0 : s.commentClassNames),
+ style: (l = i.commentObj) == null ? void 0 : l.commentStyle
+ }
+ )
+ }
+ );
+ }, "X3");
+ d4 = /* @__PURE__ */ __name((i) => j2(gS) ? /* @__PURE__ */ S.jsx("div", { className: "absolute text-xs right-[100%] top-0 pr-1 group-hover:hidden text-gray-500 font-thin", children: i.number }) : null, "d4");
+ b9 = /* @__PURE__ */ __name((i) => /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: z2(
+ "collapsible-header flex w-full justify-between",
+ i.className
+ ),
+ style: i.style,
+ children: [
+ /* @__PURE__ */ S.jsx("label", { className: "mb-0", children: i.label }),
+ i.collapsed ? /* @__PURE__ */ S.jsx(
+ me,
+ {
+ name: "collapse-unexpanded",
+ className: "w-4 h-4 cursor-pointer",
+ onClick: i.onClick
+ }
+ ) : /* @__PURE__ */ S.jsx(
+ me,
+ {
+ name: "collapse-expanded",
+ className: z2(
+ "w-4 h-4 collapse-button cursor-pointer hidden group-[.fragment]:group-hover:inline-block",
+ i.collapsed && "inline-block"
+ ),
+ onClick: i.onClick
+ }
+ )
+ ]
+ }
+ ), "b9");
+ lW = /\b(\w+)\s*==\s*(\w+)\b/g;
+ ic = /* @__PURE__ */ __name((i) => {
+ var L;
+ const e = j2(j4), [t, n] = c4(S9), s = j2(cn), l = ((L = i.condition) == null ? void 0 : L.getFormattedText()) ?? "", c = a6((d) => {
+ var R, b, M, w;
+ d.preventDefault(), d.stopPropagation();
+ const _ = d.target;
+ if (!(_ instanceof HTMLElement)) return;
+ let p = _.innerText.trim() ?? "";
+ if (p === "") {
+ _.innerText = l;
+ return;
+ }
+ en.test(p) && !lW.test(p) && (p = p.replace(/"/g, ""), p = `"${p}"`);
+ const [m, f] = [
+ (b = (R = i.condition) == null ? void 0 : R.start) == null ? void 0 : b.start,
+ (w = (M = i.condition) == null ? void 0 : M.stop) == null ? void 0 : w.stop
+ ];
+ if (m === -1 || f === -1) {
+ console.warn("labelPosition is not set");
+ return;
+ }
+ const h = t.slice(0, m) + p + t.slice(f + 1);
+ n(h), s(h);
+ }, { singleClick: true, showHoverHint: true });
+ return /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
+ /* @__PURE__ */ S.jsx("label", { children: "[" }),
+ /* @__PURE__ */ S.jsx(
+ "label",
+ {
+ title: "Click to edit",
+ className: c.getEditableClasses(
+ "bg-skin-frame opacity-65 condition"
+ ),
+ contentEditable: c.editing && e === K3.Dynamic,
+ suppressContentEditableWarning: true,
+ onClick: c.handleClick,
+ onDoubleClick: c.handleDoubleClick,
+ onMouseEnter: c.handleMouseEnter,
+ onMouseLeave: c.handleMouseLeave,
+ onBlur: c.handleBlur,
+ onKeyUp: c.handleKeyup,
+ onKeyDown: c.handleKeydown,
+ children: l
+ }
+ ),
+ /* @__PURE__ */ S.jsx("label", { children: "]" })
+ ] });
+ }, "ic");
+ cW = /* @__PURE__ */ __name((i) => {
+ var p, m, f, h, R;
+ const {
+ collapsed: e,
+ toggleCollapse: t,
+ paddingLeft: n,
+ fragmentStyle: s,
+ border: l,
+ leftParticipant: c
+ } = Yt(i.context, i.origin), L = i.context.loop(), d = (p = L == null ? void 0 : L.braceBlock()) == null ? void 0 : p.block(), _ = (m = L == null ? void 0 : L.parExpr()) == null ? void 0 : m.condition();
+ return /* @__PURE__ */ S.jsx("div", { className: i.className, children: /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": origin,
+ "data-left-participant": c,
+ "data-frame-padding-left": l.left,
+ "data-frame-padding-right": l.right,
+ className: "group fragment fragment-loop loop border-skin-fragment rounded",
+ style: s,
+ children: [
+ ((f = i.commentObj) == null ? void 0 : f.text) && /* @__PURE__ */ S.jsx(X3, { comment: i.comment, commentObj: i.commentObj }),
+ /* @__PURE__ */ S.jsxs("div", { className: "header text-skin-fragment-header bg-skin-fragment-header leading-4 relative rounded-t", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsx("div", { className: "name font-semibold p-1 border-b", children: /* @__PURE__ */ S.jsxs("label", { className: "p-0 flex items-center gap-0.5", children: [
+ /* @__PURE__ */ S.jsx(me, { name: "loop-fragment" }),
+ /* @__PURE__ */ S.jsx(
+ b9,
+ {
+ label: "Loop",
+ collapsed: e,
+ onClick: t,
+ style: (h = i.commentObj) == null ? void 0 : h.messageStyle,
+ className: z2((R = i.commentObj) == null ? void 0 : R.messageClassNames)
+ }
+ )
+ ] }) })
+ ] }),
+ /* @__PURE__ */ S.jsx("div", { className: z2({ hidden: e }), children: /* @__PURE__ */ S.jsxs("div", { className: "segment", children: [
+ /* @__PURE__ */ S.jsx("div", { className: "text-skin-fragment", children: /* @__PURE__ */ S.jsx(ic, { condition: _ }) }),
+ /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: c,
+ style: { paddingLeft: `${n}px` },
+ context: d,
+ number: `${i.number}.1`,
+ incremental: true
+ }
+ )
+ ] }) })
+ ]
+ }
+ ) });
+ }, "cW");
+ uW = /* @__PURE__ */ __name((i) => {
+ var R, b, M, w, O, D, N, F, U, k, n2;
+ const e = i.context.alt(), t = e == null ? void 0 : e.ifBlock(), n = e == null ? void 0 : e.elseIfBlock(), s = (b = (R = e == null ? void 0 : e.elseBlock()) == null ? void 0 : R.braceBlock()) == null ? void 0 : b.block(), l = (w = (M = e == null ? void 0 : e.ifBlock()) == null ? void 0 : M.braceBlock()) == null ? void 0 : w.block(), c = v.useMemo(() => {
+ const K = [s6(l)];
+ return e != null && e.elseIfBlock() && e.elseIfBlock().forEach((X) => {
+ K.push(K[K.length - 1] + s6(d(X)));
+ }), K;
+ }, [e, l]);
+ function L(K) {
+ var X;
+ return (X = K == null ? void 0 : K.parExpr()) == null ? void 0 : X.condition();
+ }
+ __name(L, "L");
+ function d(K) {
+ var X;
+ return (X = K == null ? void 0 : K.braceBlock()) == null ? void 0 : X.block();
+ }
+ __name(d, "d");
+ const {
+ collapsed: _,
+ toggleCollapse: p,
+ paddingLeft: m,
+ fragmentStyle: f,
+ leftParticipant: h
+ } = Yt(i.context, i.origin);
+ return /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": i.origin,
+ "data-left-participant": i.origin,
+ "data-frame-padding-left": (D = (O = i.commentObj) == null ? void 0 : O.messageStyle) == null ? void 0 : D.paddingLeft,
+ "data-frame-padding-right": (F = (N = i.commentObj) == null ? void 0 : N.messageStyle) == null ? void 0 : F.paddingRight,
+ className: z2(
+ "group fragment fragment-alt alt border-skin-fragment rounded",
+ i.className
+ ),
+ style: f,
+ children: [
+ /* @__PURE__ */ S.jsxs("div", { className: "segment", children: [
+ ((U = i.commentObj) == null ? void 0 : U.text) && /* @__PURE__ */ S.jsx(X3, { comment: i.comment, commentObj: i.commentObj }),
+ /* @__PURE__ */ S.jsxs("div", { className: "header bg-skin-fragment-header text-skin-fragment-header leading-4 rounded-t relative", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsx("div", { className: "name font-semibold p-1 border-b", children: /* @__PURE__ */ S.jsxs("label", { className: "p-0 flex items-center gap-0.5", children: [
+ /* @__PURE__ */ S.jsx(me, { name: "alt-fragment" }),
+ /* @__PURE__ */ S.jsx(
+ b9,
+ {
+ label: "Alt",
+ collapsed: _,
+ onClick: p,
+ style: (k = i.commentObj) == null ? void 0 : k.messageStyle,
+ className: z2((n2 = i.commentObj) == null ? void 0 : n2.messageClassNames)
+ }
+ )
+ ] }) })
+ ] })
+ ] }),
+ /* @__PURE__ */ S.jsxs("div", { className: _ ? "hidden" : "block", children: [
+ /* @__PURE__ */ S.jsxs("div", { className: "segment", children: [
+ /* @__PURE__ */ S.jsx("div", { className: "text-skin-fragment flex", children: /* @__PURE__ */ S.jsx(ic, { condition: L(t) }) }),
+ l && /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: h,
+ style: { paddingLeft: `${m}px` },
+ context: l,
+ number: `${i.number}.1`,
+ incremental: true
+ }
+ )
+ ] }),
+ n.map((K, X) => /* @__PURE__ */ S.jsx(v.Fragment, { children: /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: "segment mt-2 border-t border-solid",
+ children: [
+ /* @__PURE__ */ S.jsxs("div", { className: "text-skin-fragment", children: [
+ /* @__PURE__ */ S.jsx("label", { className: "else-if hidden", children: "else if" }),
+ /* @__PURE__ */ S.jsx(
+ ic,
+ {
+ condition: L(K)
+ }
+ )
+ ] }, X + 1e3),
+ /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: h,
+ style: { paddingLeft: `${m}px` },
+ context: d(K),
+ number: `${i.number}.${c[X] + 1}`,
+ incremental: true
+ },
+ X + 2e3
+ )
+ ]
+ },
+ X + 500
+ ) }, X)),
+ s && /* @__PURE__ */ S.jsx(S.Fragment, { children: /* @__PURE__ */ S.jsxs("div", { className: "segment mt-2 border-t border-solid", children: [
+ /* @__PURE__ */ S.jsx("div", { className: "text-skin-fragment", children: /* @__PURE__ */ S.jsx("label", { className: "p-1", children: "[else]" }) }),
+ /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: h,
+ style: { paddingLeft: `${m}px` },
+ context: s,
+ number: `${i.number}.${c[c.length - 1] + 1}`,
+ incremental: true
+ }
+ )
+ ] }) })
+ ] })
+ ]
+ }
+ );
+ }, "uW");
+ LW = /* @__PURE__ */ __name((i) => {
+ var d, _, p;
+ const {
+ collapsed: e,
+ toggleCollapse: t,
+ paddingLeft: n,
+ fragmentStyle: s,
+ border: l,
+ leftParticipant: c
+ } = Yt(i.context, i.origin), L = i.context.par();
+ return /* @__PURE__ */ S.jsx("div", { className: i.className, children: /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": origin,
+ "data-left-participant": c,
+ "data-frame-padding-left": l.left,
+ "data-frame-padding-right": l.right,
+ className: "group fragment fragment-par par border-skin-fragment rounded",
+ style: s,
+ children: [
+ ((d = i.commentObj) == null ? void 0 : d.text) && /* @__PURE__ */ S.jsx(X3, { comment: i.comment, commentObj: i.commentObj }),
+ /* @__PURE__ */ S.jsxs("div", { className: "header bg-skin-fragment-header text-skin-fragment-header leading-4 rounded-t relative", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsx("div", { className: "name font-semibold p-1 border-b", children: /* @__PURE__ */ S.jsxs("label", { className: "p-0 flex items-center gap-0.5", children: [
+ /* @__PURE__ */ S.jsx(me, { name: "par-fragment" }),
+ /* @__PURE__ */ S.jsx(
+ b9,
+ {
+ label: "Par",
+ collapsed: e,
+ onClick: t,
+ style: (_ = i.commentObj) == null ? void 0 : _.messageStyle,
+ className: z2((p = i.commentObj) == null ? void 0 : p.messageClassNames)
+ }
+ )
+ ] }) })
+ ] }),
+ !!L.braceBlock() && /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: c,
+ className: z2(
+ "[&>.statement-container:not(:first-child)]",
+ e ? "hidden" : ""
+ ),
+ style: { paddingLeft: `${n}px` },
+ context: L.braceBlock().block(),
+ number: `${i.number}.1`,
+ incremental: true
+ }
+ )
+ ]
+ }
+ ) });
+ }, "LW");
+ dW = /* @__PURE__ */ __name((i) => {
+ var d, _, p, m;
+ const e = i.context.opt(), {
+ collapsed: t,
+ toggleCollapse: n,
+ paddingLeft: s,
+ fragmentStyle: l,
+ border: c,
+ leftParticipant: L
+ } = Yt(i.context, i.origin);
+ return /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": origin,
+ "data-left-participant": L,
+ "data-frame-padding-left": c.left,
+ "data-frame-padding-right": c.right,
+ className: z2(
+ "group fragment opt border-skin-fragment rounded",
+ i.className
+ ),
+ style: l,
+ children: [
+ ((d = i.commentObj) == null ? void 0 : d.text) && /* @__PURE__ */ S.jsx(X3, { comment: i.comment, commentObj: i.commentObj }),
+ /* @__PURE__ */ S.jsxs("div", { className: "header bg-skin-fragment-header text-skin-fragment-header leading-4 relative", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsx("div", { className: "name font-semibold p-1 border-b", children: /* @__PURE__ */ S.jsxs("label", { className: "p-0 flex items-center gap-0.5", children: [
+ /* @__PURE__ */ S.jsx(me, { name: "opt-fragment" }),
+ /* @__PURE__ */ S.jsx(
+ b9,
+ {
+ label: "Opt",
+ collapsed: t,
+ onClick: n,
+ style: (_ = i.commentObj) == null ? void 0 : _.textStyle,
+ className: z2((p = i.commentObj) == null ? void 0 : p.classNames)
+ }
+ )
+ ] }) })
+ ] }),
+ /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: L,
+ className: z2({ hidden: t }),
+ style: { paddingLeft: `${s}px` },
+ context: (m = e == null ? void 0 : e.braceBlock()) == null ? void 0 : m.block(),
+ number: `${i.number}.1`,
+ incremental: true
+ }
+ )
+ ]
+ }
+ );
+ }, "dW");
+ CW = /* @__PURE__ */ __name((i) => {
+ if (i.length === 0)
+ return "";
+ const e = i.toLowerCase();
+ return e.substring(0, 1).toUpperCase() + e.substring(1, e.length);
+ }, "CW");
+ _W = /* @__PURE__ */ __name((i) => {
+ var f, h, R, b;
+ const {
+ collapsed: e,
+ toggleCollapse: t,
+ paddingLeft: n,
+ fragmentStyle: s,
+ border: l,
+ leftParticipant: c
+ } = Yt(i.context, i.origin), L = i.context.section(), d = L == null ? void 0 : L.braceBlock(), _ = (f = L == null ? void 0 : L.atom()) == null ? void 0 : f.getFormattedText(), p = d == null ? void 0 : d.block(), m = _ ?? CW("section");
+ return /* @__PURE__ */ S.jsx("div", { className: i.className, children: /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": origin,
+ "data-left-participant": c,
+ "data-frame-padding-left": l.left,
+ "data-frame-padding-right": l.right,
+ className: "group fragment fragment-section section border-skin-fragment rounded",
+ style: s,
+ children: [
+ /* @__PURE__ */ S.jsxs("div", { className: "segment", children: [
+ ((h = i.commentObj) == null ? void 0 : h.text) && /* @__PURE__ */ S.jsx(X3, { comment: i.comment, commentObj: i.commentObj }),
+ /* @__PURE__ */ S.jsxs("div", { className: "header bg-skin-fragment-header text-skin-fragment-header leading-4 rounded-t relative", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsx("div", { className: "name font-semibold p-1 border-b", children: /* @__PURE__ */ S.jsxs("label", { className: "p-0 flex items-center gap-0.5", children: [
+ /* @__PURE__ */ S.jsx(me, { name: "section-fragment" }),
+ /* @__PURE__ */ S.jsx(
+ b9,
+ {
+ label: m,
+ collapsed: e,
+ onClick: t,
+ style: (R = i.commentObj) == null ? void 0 : R.messageStyle,
+ className: z2((b = i.commentObj) == null ? void 0 : b.messageClassNames)
+ }
+ )
+ ] }) })
+ ] })
+ ] }),
+ /* @__PURE__ */ S.jsx("div", { className: e ? "hidden" : "", children: /* @__PURE__ */ S.jsxs("div", { className: "segment", children: [
+ /* @__PURE__ */ S.jsx("div", { className: "text-skin-fragment flex" }),
+ p && /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: c,
+ style: { paddingLeft: `${n}px` },
+ context: p,
+ number: i.number
+ }
+ )
+ ] }) })
+ ]
+ }
+ ) });
+ }, "_W");
+ gW = /* @__PURE__ */ __name((i) => {
+ var f, h, R, b;
+ const {
+ collapsed: e,
+ toggleCollapse: t,
+ paddingLeft: n,
+ fragmentStyle: s,
+ border: l,
+ leftParticipant: c
+ } = Yt(i.context, i.origin), L = i.context.critical(), d = L == null ? void 0 : L.braceBlock(), _ = (f = L == null ? void 0 : L.atom()) == null ? void 0 : f.getFormattedText(), p = d == null ? void 0 : d.block(), m = _ ? `Critical:${_}` : "Critical";
+ return /* @__PURE__ */ S.jsx("div", { className: i.className, children: /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": origin,
+ "data-left-participant": c,
+ "data-frame-padding-left": l.left,
+ "data-frame-padding-right": l.right,
+ className: "group fragment fragment-critical critical border-skin-fragment rounded",
+ style: s,
+ children: [
+ /* @__PURE__ */ S.jsxs("div", { className: "segment", children: [
+ ((h = i.commentObj) == null ? void 0 : h.text) && /* @__PURE__ */ S.jsx(X3, { comment: i.comment, commentObj: i.commentObj }),
+ /* @__PURE__ */ S.jsxs("div", { className: "header bg-skin-fragment-header text-skin-fragment-header leading-4 rounded-t relative", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsx("div", { className: "name font-semibold p-1 border-b", children: /* @__PURE__ */ S.jsxs("label", { className: "p-0 flex items-center gap-0.5", children: [
+ /* @__PURE__ */ S.jsx(me, { name: "critical-fragment" }),
+ /* @__PURE__ */ S.jsx(
+ b9,
+ {
+ label: m,
+ collapsed: e,
+ onClick: t,
+ style: (R = i.commentObj) == null ? void 0 : R.messageStyle,
+ className: z2((b = i.commentObj) == null ? void 0 : b.messageClassNames)
+ }
+ )
+ ] }) })
+ ] })
+ ] }),
+ /* @__PURE__ */ S.jsx("div", { className: e ? "hidden" : "", children: /* @__PURE__ */ S.jsxs("div", { className: "segment", children: [
+ /* @__PURE__ */ S.jsx("div", { className: "text-skin-fragment flex" }),
+ p && /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: c,
+ style: { paddingLeft: `${n}px` },
+ context: p,
+ number: `${i.number}.1`,
+ incremental: true
+ }
+ )
+ ] }) })
+ ]
+ }
+ ) });
+ }, "gW");
+ pW = /* @__PURE__ */ __name((i) => {
+ var h, R, b, M, w, O, D;
+ const {
+ collapsed: e,
+ toggleCollapse: t,
+ paddingLeft: n,
+ fragmentStyle: s,
+ border: l,
+ leftParticipant: c
+ } = Yt(i.context, i.origin), L = /* @__PURE__ */ __name((N) => {
+ var F, U;
+ return (U = (F = N == null ? void 0 : N.invocation()) == null ? void 0 : F.parameters()) == null ? void 0 : U.getFormattedText();
+ }, "L"), d = /* @__PURE__ */ __name((N) => {
+ var F;
+ return (F = N == null ? void 0 : N.braceBlock()) == null ? void 0 : F.block();
+ }, "d"), _ = i.context.tcf(), p = (R = (h = _ == null ? void 0 : _.tryBlock()) == null ? void 0 : h.braceBlock()) == null ? void 0 : R.block(), m = (M = (b = _ == null ? void 0 : _.finallyBlock()) == null ? void 0 : b.braceBlock()) == null ? void 0 : M.block(), f = v.useMemo(() => {
+ const N = [s6(p)];
+ return _ != null && _.catchBlock() && _.catchBlock().forEach((F) => {
+ N.push(N[N.length - 1] + s6(d(F)));
+ }), N;
+ }, [_, p]);
+ return /* @__PURE__ */ S.jsx("div", { className: i.className, children: /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": i.origin,
+ "data-left-participant": c,
+ "data-frame-padding-left": l.left,
+ "data-frame-padding-right": l.right,
+ className: "group fragment fragment-tcf tcf border-skin-fragment rounded",
+ style: s,
+ children: [
+ /* @__PURE__ */ S.jsxs("div", { className: "segment", children: [
+ ((w = i.commentObj) == null ? void 0 : w.text) && /* @__PURE__ */ S.jsx(X3, { comment: i.comment, commentObj: i.commentObj }),
+ /* @__PURE__ */ S.jsxs("div", { className: "header bg-skin-fragment-header text-skin-fragment-header leading-4 rounded-t relative", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsx("div", { className: "name font-semibold p-1 border-b", children: /* @__PURE__ */ S.jsxs("label", { className: "p-0 flex items-center gap-0.5", children: [
+ /* @__PURE__ */ S.jsx(me, { name: "try-catch-fragment" }),
+ /* @__PURE__ */ S.jsx(
+ b9,
+ {
+ label: "Try",
+ collapsed: e,
+ onClick: t,
+ style: (O = i.commentObj) == null ? void 0 : O.messageStyle,
+ className: z2((D = i.commentObj) == null ? void 0 : D.messageClassNames)
+ }
+ )
+ ] }) })
+ ] })
+ ] }),
+ /* @__PURE__ */ S.jsxs("div", { className: e ? "hidden" : "", children: [
+ /* @__PURE__ */ S.jsx("div", { className: "segment", children: p && /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: c,
+ style: { paddingLeft: `${n}px` },
+ context: p,
+ number: `${i.number}.1`,
+ incremental: true
+ }
+ ) }),
+ _.catchBlock().map((N, F) => /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: "segment mt-2 border-t border-solid",
+ children: [
+ /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: "header inline-block bg-skin-frame opacity-65",
+ children: [
+ /* @__PURE__ */ S.jsx("label", { className: "keyword catch p-1", children: "catch" }),
+ /* @__PURE__ */ S.jsx("label", { className: "exception p-1", children: L(N) })
+ ]
+ },
+ F + 1e3
+ ),
+ /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: c,
+ style: { paddingLeft: `${n}px` },
+ context: d(N),
+ number: `${i.number}.${f[F] + 1}`,
+ incremental: true
+ },
+ F + 2e3
+ )
+ ]
+ },
+ F + 500
+ )),
+ m && /* @__PURE__ */ S.jsxs("div", { className: "segment mt-2 border-t border-solid", children: [
+ /* @__PURE__ */ S.jsx("div", { className: "header flex text-skin-fragment finally", children: /* @__PURE__ */ S.jsx("label", { className: "keyword finally bg-skin-frame opacity-65 px-1 inline-block", children: "finally" }) }),
+ /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: c,
+ style: { paddingLeft: `${n}px` },
+ context: m,
+ number: `${i.number}.${f[f.length - 1] + 1}`,
+ incremental: true
+ }
+ )
+ ] })
+ ] })
+ ]
+ }
+ ) });
+ }, "pW");
+ $6 = /* @__PURE__ */ __name((i) => {
+ const e = j2(j4), [t, n] = c4(S9), s = j2(cn), l = aS(i.labelText), L = a6((d) => {
+ d.preventDefault(), d.stopPropagation();
+ const _ = d.target;
+ if (!(_ instanceof HTMLElement)) return;
+ let p = _.innerText.trim() ?? "";
+ if (p === "" || p === i.labelText) {
+ _.innerText = i.labelText;
+ return;
+ }
+ p.includes(" ") && (p = p.replace(/\s+/g, " ")), !i.isAsync && en.test(p) && (p = p.replace(/"/g, ""), p = `"${p}"`, en.lastIndex = 0);
+ const [m, f] = i.labelPosition;
+ if (m === -1 || f === -1) {
+ console.warn("labelPosition is not set");
+ return;
+ }
+ const h = t.slice(0, m) + p + t.slice(f + 1);
+ n(h), s(h);
+ }, {
+ singleClick: true,
+ showHoverHint: true
+ });
+ return /* @__PURE__ */ S.jsx(
+ "label",
+ {
+ title: "Click to edit",
+ className: L.getEditableClasses(
+ z2("px-1 right", i.className)
+ ),
+ style: i.style,
+ contentEditable: L.editing && e === K3.Dynamic,
+ suppressContentEditableWarning: true,
+ onClick: L.handleClick,
+ onDoubleClick: L.handleDoubleClick,
+ onMouseEnter: L.handleMouseEnter,
+ onMouseLeave: L.handleMouseLeave,
+ onBlur: L.handleBlur,
+ onKeyUp: L.handleKeyup,
+ onKeyDown: L.handleKeydown,
+ children: l
+ }
+ );
+ }, "$6");
+ mW = /* @__PURE__ */ __name((i) => {
+ var d, _, p;
+ const { paddingLeft: e, fragmentStyle: t, border: n, leftParticipant: s } = Yt(i.context, i.origin), l = i.context.ref().Content(), c = l == null ? void 0 : l.getFormattedText(), L = [
+ l == null ? void 0 : l.start.start,
+ l == null ? void 0 : l.stop.stop
+ ];
+ return /* @__PURE__ */ S.jsx("div", { className: i.className, children: /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": s,
+ "data-left-participant": s,
+ "data-frame-padding-left": n.left,
+ "data-frame-padding-right": n.right,
+ className: "group fragment fragment-ref bg-skin-frame border-skin-fragment relative rounded min-w-[140px] w-max py-4 px-2 flex justify-center items-center flex-col",
+ style: { ...t, paddingLeft: `${e}px` },
+ children: [
+ /* @__PURE__ */ S.jsxs("div", { className: "header bg-skin-fragment-header text-skin-fragment-header leading-4 rounded-t absolute top-0 left-0", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ ((d = i.commentObj) == null ? void 0 : d.text) && /* @__PURE__ */ S.jsx(
+ X3,
+ {
+ className: "absolute -top-4 left-0",
+ comment: i.comment,
+ commentObj: i.commentObj
+ }
+ ),
+ /* @__PURE__ */ S.jsxs("div", { className: "text-skin-fragment relative w-9 h-8 -top-[1px] -left-[1px]", children: [
+ /* @__PURE__ */ S.jsx("div", { className: "polygon-border absolute inset-0" }),
+ /* @__PURE__ */ S.jsx("div", { className: "polygon-content bg-skin-frame text-skin-fragment-header absolute inset-[1px] flex flex-col items-center justify-center", children: /* @__PURE__ */ S.jsx(
+ "span",
+ {
+ className: `flex items-center justify-center font-semibold ${((_ = i.commentObj) == null ? void 0 : _.messageClassNames) || ""}`,
+ style: (p = i.commentObj) == null ? void 0 : p.messageStyle,
+ children: "Ref"
+ }
+ ) })
+ ] })
+ ] }),
+ /* @__PURE__ */ S.jsx(
+ $6,
+ {
+ className: "text-skin-title mt-3 mb-2",
+ labelText: c,
+ labelPosition: L
+ }
+ )
+ ]
+ }
+ ) });
+ }, "mW");
+ hW = /* @__PURE__ */ __name((i) => {
+ const { fill: e, rtl: t, className: n } = i;
+ return /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: z2(
+ "point text-skin-message-arrow",
+ i.fill ? "filled" : "open",
+ {
+ "right-to-left": i.rtl
+ },
+ n
+ ),
+ children: [
+ !t && e && /* @__PURE__ */ S.jsx(
+ "svg",
+ {
+ className: "arrow stroke-2",
+ height: "10",
+ width: "10",
+ viewBox: "0 0 3 6",
+ children: /* @__PURE__ */ S.jsx(
+ "path",
+ {
+ d: "M4.42834 2.657C4.68727 2.81236 4.68727 3.18764 4.42834 3.343L0.605799 5.63652C0.339189 5.79649 1.66376e-08 5.60444 2.97152e-08 5.29352L2.22651e-07 0.706476C2.35729e-07 0.395559 0.339189 0.203513 0.605799 0.363479L4.42834 2.657Z",
+ fill: "currentColor",
+ stroke: "none"
+ }
+ )
+ }
+ ),
+ !t && !e && /* @__PURE__ */ S.jsx(
+ "svg",
+ {
+ className: "arrow stroke-2",
+ height: "10",
+ width: "10",
+ viewBox: "0 0 2 8.5",
+ children: /* @__PURE__ */ S.jsx(
+ "path",
+ {
+ d: "M1 1L4.14331 4.29299C4.14704 4.2969 4.14699 4.30306 4.1432 4.30691L1 7.5",
+ stroke: "currentColor",
+ strokeLinecap: "round",
+ fill: "none"
+ }
+ )
+ }
+ ),
+ t && e && /* @__PURE__ */ S.jsx(
+ "svg",
+ {
+ className: "arrow stroke-2",
+ height: "10",
+ width: "10",
+ viewBox: "1 0 5 6",
+ children: /* @__PURE__ */ S.jsx(
+ "path",
+ {
+ d: "M0.571662 2.657C0.312726 2.81236 0.312726 3.18764 0.571662 3.343L4.3942 5.63652C4.66081 5.79649 5 5.60444 5 5.29352L5 0.706476C5 0.395559 4.66081 0.203513 4.3942 0.363479L0.571662 2.657Z",
+ fill: "currentColor",
+ stroke: "none"
+ }
+ )
+ }
+ ),
+ t && !e && /* @__PURE__ */ S.jsx(
+ "svg",
+ {
+ className: "arrow stroke-2",
+ height: "10",
+ width: "10",
+ viewBox: "2 0 5 9",
+ children: /* @__PURE__ */ S.jsx(
+ "path",
+ {
+ d: "M4.14844 1L1.00441 4.54711C1.00101 4.55094 1.00106 4.55671 1.00451 4.56049L4.14844 8",
+ stroke: "currentColor",
+ strokeLinecap: "round",
+ fill: "none"
+ }
+ )
+ }
+ )
+ ]
+ }
+ );
+ }, "hW");
+ fW = /* @__PURE__ */ __name((i, e, t) => {
+ var n;
+ if (e === K3.Static) return false;
+ switch (t) {
+ case "sync":
+ case "async":
+ case "return":
+ return true;
+ case "creation":
+ return ((n = i == null ? void 0 : i.isParamValid) == null ? void 0 : n.call(i)) > 0;
+ default:
+ return false;
+ }
+ }, "fW");
+ EW = /* @__PURE__ */ __name((i, e) => {
+ var s, l, c, L;
+ let t = -1, n = -1;
+ switch (e) {
+ case "sync":
+ {
+ const d = (s = i == null ? void 0 : i.messageBody().func()) == null ? void 0 : s.signature()[0];
+ [t, n] = [d == null ? void 0 : d.start.start, d == null ? void 0 : d.stop.stop];
+ }
+ break;
+ case "async":
+ {
+ const d = i == null ? void 0 : i.content();
+ [t, n] = [d == null ? void 0 : d.start.start, d == null ? void 0 : d.stop.stop];
+ }
+ break;
+ case "creation":
+ {
+ const d = (l = i == null ? void 0 : i.creationBody()) == null ? void 0 : l.parameters();
+ [t, n] = [d == null ? void 0 : d.start.start, d == null ? void 0 : d.stop.stop];
+ }
+ break;
+ case "return":
+ if (i instanceof T.MessageContext) {
+ const d = (L = (c = i.messageBody().func()) == null ? void 0 : c.signature()) == null ? void 0 : L[0];
+ [t, n] = [d == null ? void 0 : d.start.start, d == null ? void 0 : d.stop.stop];
+ } else if (i instanceof T.AtomExprContext) {
+ const d = i.atom();
+ [t, n] = [d == null ? void 0 : d.start.start, d == null ? void 0 : d.stop.stop];
+ } else if (i instanceof T.ContentContext)
+ [t, n] = [i.start.start, i.stop.stop];
+ else if (i instanceof T.AssignmentContext) {
+ const d = i.assignee();
+ [t, n] = [d.start.start, d.stop.stop];
+ }
+ break;
+ }
+ return [t, n];
+ }, "EW");
+ f0 = /* @__PURE__ */ __name((i) => {
+ var D;
+ const {
+ context: e,
+ content: t,
+ rtl: n,
+ type: s = "",
+ textStyle: l,
+ className: c,
+ style: L,
+ number: d
+ } = i, _ = j2(j4), p = j2(pu), m = v.useRef(null), f = s === "async", h = fW(e, _, s || ""), R = _ !== K3.Static && ["sync", "async", "return", "creation"].includes(s), b = s === "creation" ? ((D = t.match(/«([^»]+)»/)) == null ? void 0 : D[1]) || "" : t || "", M = EW(e, s || ""), w = {
+ sync: "solid",
+ async: "solid",
+ creation: "dashed",
+ return: "dashed"
+ }[s], O = /* @__PURE__ */ __name(() => {
+ !R || !m.current || p(e, m.current);
+ }, "O");
+ return /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: z2(
+ "message leading-none border-skin-message-arrow border-b-2 flex items-end",
+ {
+ "flex-row-reverse": n,
+ return: s === "return",
+ "right-to-left": n
+ },
+ c
+ ),
+ style: { ...L, borderBottomStyle: w },
+ onClick: O,
+ ref: m,
+ children: [
+ /* @__PURE__ */ S.jsx("div", { className: "name group text-center flex-grow relative", children: /* @__PURE__ */ S.jsx("div", { className: "inline-block static min-h-[1em]", children: /* @__PURE__ */ S.jsx("div", { style: l, children: h ? /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
+ s === "creation" && /* @__PURE__ */ S.jsx("span", { children: "\xAB" }),
+ /* @__PURE__ */ S.jsx(
+ $6,
+ {
+ labelText: b ?? "",
+ labelPosition: M,
+ isAsync: f
+ }
+ ),
+ s === "creation" && /* @__PURE__ */ S.jsx("span", { children: "\xBB" })
+ ] }) : /* @__PURE__ */ S.jsx(S.Fragment, { children: t }) }) }) }),
+ /* @__PURE__ */ S.jsx(
+ hW,
+ {
+ className: "flex-shrink-0 transform translate-y-1/2 -my-px",
+ fill: s === "sync",
+ rtl: !!n
+ }
+ ),
+ /* @__PURE__ */ S.jsx(d4, { number: d })
+ ]
+ }
+ );
+ }, "f0");
+ SW = /* @__PURE__ */ __name((i) => /* @__PURE__ */ S.jsxs("div", { className: "occurrence-collapsible-header w-auto", children: [
+ /* @__PURE__ */ S.jsxs(
+ "svg",
+ {
+ width: "20px",
+ height: "20px",
+ className: z2("collapse-button cursor-pointer", {
+ hidden: i.collapsed,
+ expanded: !i.collapsed
+ }),
+ onClick: i.onClick,
+ viewBox: "0 0 25 25",
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "none",
+ stroke: "currentColor",
+ strokeWidth: "1",
+ strokeLinecap: "round",
+ strokeLinejoin: "miter",
+ children: [
+ /* @__PURE__ */ S.jsx("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
+ /* @__PURE__ */ S.jsx(
+ "g",
+ {
+ id: "SVGRepo_tracerCarrier",
+ strokeLinecap: "round",
+ strokeLinejoin: "round"
+ }
+ ),
+ /* @__PURE__ */ S.jsxs("g", { id: "SVGRepo_iconCarrier", children: [
+ /* @__PURE__ */ S.jsx("line", { x1: "13", y1: "2", x2: "13", y2: "10" }),
+ /* @__PURE__ */ S.jsx("polyline", { points: "9 7 13 11 17 7" }),
+ /* @__PURE__ */ S.jsx("line", { x1: "13", y1: "23", x2: "13", y2: "15" }),
+ /* @__PURE__ */ S.jsx("polyline", { points: "9 19 13 15 17 19" })
+ ] })
+ ]
+ }
+ ),
+ /* @__PURE__ */ S.jsxs(
+ "svg",
+ {
+ width: "20px",
+ height: "20px",
+ className: z2("cursor-pointer", { hidden: !i.collapsed }),
+ onClick: i.onClick,
+ viewBox: "0 0 25 25",
+ xmlns: "http://www.w3.org/2000/svg",
+ fill: "none",
+ stroke: "currentColor",
+ strokeWidth: "1",
+ strokeLinecap: "round",
+ strokeLinejoin: "miter",
+ children: [
+ /* @__PURE__ */ S.jsx("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
+ /* @__PURE__ */ S.jsx(
+ "g",
+ {
+ id: "SVGRepo_tracerCarrier",
+ strokeLinecap: "round",
+ strokeLinejoin: "round"
+ }
+ ),
+ /* @__PURE__ */ S.jsxs("g", { id: "SVGRepo_iconCarrier", children: [
+ /* @__PURE__ */ S.jsx("line", { x1: "13", y1: "1", x2: "13", y2: "9" }),
+ /* @__PURE__ */ S.jsx("polyline", { points: "9 5 13 1 17 5" }),
+ /* @__PURE__ */ S.jsx("line", { x1: "13", y1: "13", x2: "13", y2: "13" }),
+ /* @__PURE__ */ S.jsx("line", { x1: "13", y1: "24", x2: "13", y2: "17" }),
+ /* @__PURE__ */ S.jsx("polyline", { points: "9 20 13 24 17 20" })
+ ] })
+ ]
+ }
+ )
+ ] }), "SW");
+ Cv = /* @__PURE__ */ __name((i) => {
+ const e = j2(j3), [t, n] = v.useState(false), s = localStorage.getItem("zenumlDebug"), l = /* @__PURE__ */ __name(() => {
+ try {
+ return W3(e, i.participant);
+ } catch (d) {
+ return console.error(d), 0;
+ }
+ }, "l"), c = /* @__PURE__ */ __name(() => {
+ var m;
+ const d = i.context.braceBlock();
+ if (!d) return false;
+ const _ = ((m = d.block()) == null ? void 0 : m.stat()) || [], p = _.length;
+ return p > 1 ? true : p === 1 && _[0].ret() == null;
+ }, "c"), L = /* @__PURE__ */ __name(() => {
+ n(!t), V6.emit("participant_set_top");
+ }, "L");
+ return v.useEffect(() => {
+ n(false);
+ }, [i.context]), /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: z2(
+ "occurrence min-h-6 shadow-occurrence border-skin-occurrence bg-skin-occurrence rounded-sm border-2 relative left-full w-[15px] mt-[-2px] pl-[6px]",
+ { "right-to-left left-[-14px]": i.rtl },
+ i.className
+ ),
+ "data-el-type": "occurrence",
+ "data-belongs-to": i.participant,
+ "data-x-offset": 0,
+ "data-debug-center-of": l(),
+ children: [
+ s && /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
+ /* @__PURE__ */ S.jsx("div", { className: "absolute w-full left-0 bg-amber-700 h-3 -top-1 flex justify-center items-center", children: /* @__PURE__ */ S.jsx("div", { className: "w-px h-full bg-black" }) }),
+ /* @__PURE__ */ S.jsx("div", { className: "absolute w-full left-0 bg-amber-700 h-3 -bottom-1 flex justify-center items-center", children: /* @__PURE__ */ S.jsx("div", { className: "w-px h-full bg-black" }) })
+ ] }),
+ c() && /* @__PURE__ */ S.jsx(SW, { collapsed: t, onClick: L }),
+ i.context.braceBlock() && /* @__PURE__ */ S.jsx(
+ I3,
+ {
+ origin: i.participant,
+ context: i.context.braceBlock().block(),
+ number: i.number,
+ collapsed: t
+ }
+ )
+ ]
+ }
+ );
+ }, "Cv");
+ _n = class __n {
+ static {
+ __name(this, "_n");
+ }
+ constructor(e, t, n, s) {
+ h2(this, "start");
+ h2(this, "stop");
+ this.start = { line: e, col: t }, this.stop = { line: n, col: s };
+ }
+ static from(e) {
+ const t = e.start, n = e.stop;
+ return new __n(
+ t.line,
+ t.column,
+ n.line,
+ n.column + n.text.length
+ );
+ }
+ };
+ rc = /* @__PURE__ */ __name((i, e) => i == null ? void 0 : i.getAncestors((t) => ((s) => {
+ const l = s instanceof T.MessageContext, c = s instanceof T.CreationContext;
+ return l || c;
+ })(t) ? t.Owner() === e : false).length, "rc");
+ TW = /* @__PURE__ */ __name((i, e) => {
+ var n;
+ if (!(i instanceof T.StatContext))
+ return 0;
+ const t = (n = i == null ? void 0 : i.children) == null ? void 0 : n[0];
+ return t ? rc(t, e) : 0;
+ }, "TW");
+ K6 = /* @__PURE__ */ __name(({
+ context: i,
+ origin: e,
+ source: t,
+ target: n
+ }) => {
+ const s = j2(j3), l = t === n, c = rc(i, e), L = rc(i, t), d = TW(i, n), _ = new V5(W3(s, e), c), p = new V5(W3(s, t), L), m = new V5(W3(s, n), d), f = Math.abs(p.edgeOffset(m)), h = Iz(s, t, n) < 0, R = _.centerToEdge(
+ h ? m : p
+ );
+ return {
+ isSelf: l,
+ originLayers: c,
+ sourceLayers: L,
+ targetLayers: d,
+ anchor2Origin: _,
+ anchor2Source: p,
+ anchor2Target: m,
+ interactionWidth: f,
+ rightToLeft: h,
+ translateX: R
+ };
+ }, "K6");
+ vW = /* @__PURE__ */ __name((i) => {
+ var M, w, O;
+ const e = v.useRef(null), t = j2(Cu), n = j2(gu), [s, l] = v.useState(0), c = (M = i.context) == null ? void 0 : M.creation(), L = c == null ? void 0 : c.Owner(), d = c == null ? void 0 : c.isCurrent(t), { translateX: _, interactionWidth: p, rightToLeft: m } = K6({
+ context: i.context,
+ origin: i.origin,
+ source: i.origin,
+ target: c == null ? void 0 : c.Owner()
+ }), f = (w = i.commentObj) == null ? void 0 : w.messageStyle, h = (O = i.commentObj) == null ? void 0 : O.messageClassNames, R = v.useMemo(() => {
+ function D(k) {
+ return k && k.getFormattedText() || "";
+ }
+ __name(D, "D");
+ const N = c == null ? void 0 : c.creationBody().assignment();
+ if (!N) return "";
+ const F = D(N.assignee()), U = D(N.type());
+ return F + (U ? ":" + U : "");
+ }, [c]), b = s / 2 - D8 - LS;
+ return v.useEffect(() => {
+ const D = document.querySelector(
+ `[data-participant-id="${L}"]`
+ );
+ if (!D) {
+ console.error(`Could not find participant element for ${L}`), l(0);
+ return;
+ }
+ l(D.getBoundingClientRect().width), console.debug(
+ `Found participant element for ${L}, width: ${s}px`
+ ), V6.emit("participant_set_top"), console.debug(`Init or update message container for ${L}`);
+ }, [L, s]), /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": i.origin,
+ className: z2(
+ "interaction creation sync",
+ {
+ "right-to-left": m,
+ highlight: d
+ },
+ i.className
+ ),
+ onClick: /* @__PURE__ */ __name(() => n(_n.from(i.context)), "onClick"),
+ "data-signature": c == null ? void 0 : c.SignatureText(),
+ style: {
+ transform: "translateX(" + _ + "px)",
+ width: p + "px"
+ },
+ children: [
+ i.comment && /* @__PURE__ */ S.jsx(X3, { commentObj: i.commentObj }),
+ /* @__PURE__ */ S.jsx(
+ "div",
+ {
+ ref: e,
+ "data-type": "creation",
+ className: z2(
+ "message-container pointer-events-none flex items-center h-10 relative",
+ { "flex-row-reverse": m }
+ ),
+ "data-to": L,
+ children: /* @__PURE__ */ S.jsx(
+ f0,
+ {
+ className: z2(
+ "invocation w-full transform -translate-y-1/2 pointer-events-auto",
+ h
+ ),
+ context: c,
+ content: c == null ? void 0 : c.SignatureText(),
+ rtl: m,
+ type: "creation",
+ number: i.number,
+ textStyle: f,
+ style: { width: `calc(100% - ${b}px)` }
+ }
+ )
+ }
+ ),
+ /* @__PURE__ */ S.jsx(
+ Cv,
+ {
+ context: c,
+ className: "pointer-events-auto",
+ participant: L,
+ number: i.number
+ }
+ ),
+ R && /* @__PURE__ */ S.jsx(
+ f0,
+ {
+ className: z2(
+ "return transform -translate-y-full pointer-events-auto",
+ h
+ ),
+ textStyle: f,
+ context: c.creationBody().assignment(),
+ content: R,
+ rtl: !m,
+ type: "return",
+ number: `${i.number}.${c.Statements().length + 1}`
+ }
+ )
+ ]
+ }
+ );
+ }, "vW");
+ RW = /* @__PURE__ */ __name((i) => {
+ var c, L, d;
+ const e = v.useRef(null), t = j2(pu), n = ((L = (c = i.context) == null ? void 0 : c.Assignment()) == null ? void 0 : L.getText()) || "", s = v.useMemo(() => {
+ var p;
+ const _ = (p = i.context) == null ? void 0 : p.messageBody().func();
+ return _ ? [_.start.start, _.stop.stop] : [-1, -1];
+ }, [i.context]), l = /* @__PURE__ */ __name(() => {
+ t(i.context, e.current);
+ }, "l");
+ return /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ ref: e,
+ className: "self-invocation message leading-none self flex items-start flex-col border-none",
+ onClick: l,
+ children: [
+ /* @__PURE__ */ S.jsxs("label", { className: "name text-left group px-px relative min-h-[1em] w-full", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsxs("div", { className: "label", children: [
+ n && /* @__PURE__ */ S.jsxs("span", { children: [
+ /* @__PURE__ */ S.jsx("span", { className: "assignee px-1", children: n }),
+ /* @__PURE__ */ S.jsx("span", { children: "=" })
+ ] }),
+ /* @__PURE__ */ S.jsx(
+ $6,
+ {
+ style: i.textStyle,
+ className: i.classNames,
+ labelText: (d = i.context) == null ? void 0 : d.SignatureText(),
+ labelPosition: s,
+ isSelf: true
+ }
+ )
+ ] })
+ ] }),
+ /* @__PURE__ */ S.jsxs("svg", { className: "arrow text-skin-message-arrow", width: "30", height: "24", children: [
+ /* @__PURE__ */ S.jsx(
+ "polyline",
+ {
+ className: "line stroke-current fill-none stroke-2",
+ stroke: "currentColor",
+ fill: "none",
+ strokeWidth: "2",
+ points: "0,2 28,2 28,15 14,15"
+ }
+ ),
+ /* @__PURE__ */ S.jsx(
+ "polyline",
+ {
+ className: "head stroke-current fill-current stroke-2",
+ stroke: "currentColor",
+ fill: "currentColor",
+ strokeWidth: "2",
+ points: "18,9 8,15 18,21"
+ }
+ )
+ ] })
+ ]
+ }
+ );
+ }, "RW");
+ bW = /* @__PURE__ */ __name((i) => {
+ var O, D, N, F, U, k, n2;
+ const e = j2(Cu), t = (O = i.commentObj) == null ? void 0 : O.messageStyle, n = (D = i.commentObj) == null ? void 0 : D.messageClassNames, s = (N = i.context) == null ? void 0 : N.message(), l = s == null ? void 0 : s.Statements(), c = ((F = s == null ? void 0 : s.Assignment()) == null ? void 0 : F.getText()) || "", L = s == null ? void 0 : s.SignatureText(), d = s == null ? void 0 : s.isCurrent(e), _ = (s == null ? void 0 : s.From()) || Ze, p = ((k = (U = i.context) == null ? void 0 : U.message()) == null ? void 0 : k.Owner()) || Ze, m = _ === p, {
+ translateX: f,
+ interactionWidth: h,
+ originLayers: R,
+ sourceLayers: b,
+ targetLayers: M,
+ rightToLeft: w
+ } = K6({
+ context: i.context,
+ origin: i.origin,
+ source: _,
+ target: p
+ });
+ return /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: z2(
+ "interaction sync inline-block",
+ {
+ highlight: d,
+ self: m,
+ "right-to-left": w
+ },
+ i.className
+ ),
+ onClick: /* @__PURE__ */ __name((K) => K.stopPropagation(), "onClick"),
+ "data-to": p,
+ "data-origin": i.origin,
+ "data-source": _,
+ "data-target": p,
+ "data-origin-layers": R,
+ "data-source-layers": b,
+ "data-target-layers": M,
+ "data-type": "interaction",
+ "data-signature": L,
+ style: {
+ width: m ? void 0 : h + "px",
+ transform: "translateX(" + f + "px)"
+ },
+ children: [
+ ((n2 = i.commentObj) == null ? void 0 : n2.text) && /* @__PURE__ */ S.jsx(X3, { commentObj: i.commentObj }),
+ m ? /* @__PURE__ */ S.jsx(
+ RW,
+ {
+ classNames: n,
+ textStyle: t,
+ context: s,
+ number: i.number
+ }
+ ) : /* @__PURE__ */ S.jsx(
+ f0,
+ {
+ className: z2("text-center", n),
+ textStyle: t,
+ context: s,
+ content: L,
+ rtl: w,
+ number: i.number,
+ type: "sync"
+ }
+ ),
+ /* @__PURE__ */ S.jsx(
+ Cv,
+ {
+ context: s,
+ participant: p,
+ rtl: w,
+ number: i.number
+ }
+ ),
+ c && !m && /* @__PURE__ */ S.jsx(
+ f0,
+ {
+ className: z2(
+ "return transform -translate-y-full",
+ n
+ ),
+ context: s,
+ content: c,
+ rtl: !w,
+ type: "return",
+ number: `${i.number}.${l.length + 1}`,
+ textStyle: t
+ }
+ )
+ ]
+ }
+ );
+ }, "bW");
+ xW = /* @__PURE__ */ __name((i) => {
+ var n;
+ const e = (n = i.context) == null ? void 0 : n.content(), t = /* @__PURE__ */ __name(() => e ? [e.start.start, e.stop.stop] : [-1, -1], "t");
+ return /* @__PURE__ */ S.jsxs("div", { className: "message self flex items-start flex-col !border-none", children: [
+ /* @__PURE__ */ S.jsxs("label", { className: "name group px-px min-h-[1em]", children: [
+ /* @__PURE__ */ S.jsx(d4, { number: i.number }),
+ /* @__PURE__ */ S.jsx(
+ $6,
+ {
+ style: i.textStyle,
+ className: i.classNames,
+ labelText: e == null ? void 0 : e.getFormattedText(),
+ labelPosition: t(),
+ isAsync: true,
+ isSelf: true
+ }
+ )
+ ] }),
+ /* @__PURE__ */ S.jsxs("svg", { className: "arrow text-skin-message-arrow", width: "34", height: "34", children: [
+ /* @__PURE__ */ S.jsx(
+ "polyline",
+ {
+ className: "stroke-current stroke-2 fill-none",
+ stroke: "currentColor",
+ fill: "none",
+ strokeWidth: "2",
+ points: "0,2 28,2 28,25 1,25"
+ }
+ ),
+ /* @__PURE__ */ S.jsx(
+ "polyline",
+ {
+ className: "head stroke-current stroke-2 fill-current",
+ stroke: "currentColor",
+ fill: "currentColor",
+ strokeWidth: "2",
+ points: "11,19 1,25 11,31"
+ }
+ )
+ ] })
+ ] });
+ }, "xW");
+ __name(ml, "ml");
+ wW = /* @__PURE__ */ __name((i) => {
+ var b, M, w, O, D;
+ const e = j2(Cu), t = j2(gu), n = (b = i.context) == null ? void 0 : b.asyncMessage(), s = (M = n == null ? void 0 : n.content()) == null ? void 0 : M.getFormattedText(), c = (n == null ? void 0 : n.ProvidedFrom()) || i.origin, L = (w = n == null ? void 0 : n.to()) == null ? void 0 : w.getFormattedText(), d = c === L, { translateX: _, interactionWidth: p, rightToLeft: m } = K6({
+ context: i.context,
+ origin: i.origin,
+ source: c,
+ target: L
+ }), f = (O = i.commentObj) == null ? void 0 : O.messageClassNames, h = (D = i.commentObj) == null ? void 0 : D.messageStyle, R = /* @__PURE__ */ __name(() => {
+ const N = n.start.start, F = n.stop.stop + 1;
+ return ml(e) || ml(N) || ml(F) ? false : e >= N && e <= F;
+ }, "R");
+ return /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ "data-origin": origin,
+ "data-to": L,
+ "data-source": c,
+ "data-target": L,
+ className: z2(
+ "interaction async",
+ {
+ "left-to-right": !m,
+ "right-to-left": m,
+ highlight: R(),
+ "self-invocation": d
+ },
+ i.className
+ ),
+ onClick: /* @__PURE__ */ __name(() => t(_n.from(i.context)), "onClick"),
+ "data-signature": s,
+ style: {
+ width: p + "px",
+ transform: "translateX(" + _ + "px)"
+ },
+ children: [
+ i.comment && /* @__PURE__ */ S.jsx(X3, { commentObj: i.commentObj }),
+ d ? /* @__PURE__ */ S.jsx(
+ xW,
+ {
+ classNames: z2(f),
+ textStyle: h,
+ context: n,
+ number: i.number
+ }
+ ) : /* @__PURE__ */ S.jsx(
+ f0,
+ {
+ className: z2(f),
+ textStyle: h,
+ context: n,
+ content: s,
+ rtl: m,
+ type: "async",
+ number: i.number
+ }
+ )
+ ]
+ }
+ );
+ }, "wW");
+ MW = [
+ "aliceblue",
+ "antiquewhite",
+ "aqua",
+ "aquamarine",
+ "azure",
+ "beige",
+ "bisque",
+ "black",
+ "blanchedalmond",
+ "blue",
+ "blueviolet",
+ "brown",
+ "burlywood",
+ "cadetblue",
+ "chartreuse",
+ "chocolate",
+ "coral",
+ "cornflowerblue",
+ "cornsilk",
+ "crimson",
+ "cyan",
+ "darkblue",
+ "darkcyan",
+ "darkgoldenrod",
+ "darkgray",
+ "darkgreen",
+ "darkgrey",
+ "darkkhaki",
+ "darkmagenta",
+ "darkolivegreen",
+ "darkorange",
+ "darkorchid",
+ "darkred",
+ "darksalmon",
+ "darkseagreen",
+ "darkslateblue",
+ "darkslategray",
+ "darkslategrey",
+ "darkturquoise",
+ "darkviolet",
+ "deeppink",
+ "deepskyblue",
+ "dimgray",
+ "dimgrey",
+ "dodgerblue",
+ "firebrick",
+ "floralwhite",
+ "forestgreen",
+ "fuchsia",
+ "gainsboro",
+ "ghostwhite",
+ "gold",
+ "goldenrod",
+ "gray",
+ "green",
+ "greenyellow",
+ "grey",
+ "honeydew",
+ "hotpink",
+ "indianred",
+ "indigo",
+ "ivory",
+ "khaki",
+ "lavender",
+ "lavenderblush",
+ "lawngreen",
+ "lemonchiffon",
+ "lightblue",
+ "lightcoral",
+ "lightcyan",
+ "lightgoldenrodyellow",
+ "lightgray",
+ "lightgreen",
+ "lightgrey",
+ "lightpink",
+ "lightsalmon",
+ "lightseagreen",
+ "lightskyblue",
+ "lightslategray",
+ "lightslategrey",
+ "lightsteelblue",
+ "lightyellow",
+ "lime",
+ "limegreen",
+ "linen",
+ "magenta",
+ "maroon",
+ "mediumaquamarine",
+ "mediumblue",
+ "mediumorchid",
+ "mediumpurple",
+ "mediumseagreen",
+ "mediumslateblue",
+ "mediumspringgreen",
+ "mediumturquoise",
+ "mediumvioletred",
+ "midnightblue",
+ "mintcream",
+ "mistyrose",
+ "moccasin",
+ "navajowhite",
+ "navy",
+ "oldlace",
+ "olive",
+ "olivedrab",
+ "orange",
+ "orangered",
+ "orchid",
+ "palegoldenrod",
+ "palegreen",
+ "paleturquoise",
+ "palevioletred",
+ "papayawhip",
+ "peachpuff",
+ "peru",
+ "pink",
+ "plum",
+ "powderblue",
+ "purple",
+ "rebeccapurple",
+ "red",
+ "rosybrown",
+ "royalblue",
+ "saddlebrown",
+ "salmon",
+ "sandybrown",
+ "seagreen",
+ "seashell",
+ "sienna",
+ "silver",
+ "skyblue",
+ "slateblue",
+ "slategray",
+ "slategrey",
+ "snow",
+ "springgreen",
+ "steelblue",
+ "tan",
+ "teal",
+ "thistle",
+ "tomato",
+ "turquoise",
+ "violet",
+ "wheat",
+ "white",
+ "whitesmoke",
+ "yellow",
+ "yellowgreen"
+ ];
+ AW = ["italic", "oblique"];
+ yW = ["bold", "bolder", "lighter"];
+ NW = ["underline", "overline", "line-through"];
+ q5 = /* @__PURE__ */ __name((i) => {
+ const e = {}, t = [];
+ return i.forEach((n) => {
+ switch (true) {
+ case MW.includes(n):
+ e.color = n;
+ break;
+ case AW.includes(n):
+ e.fontStyle = n;
+ break;
+ case yW.includes(n):
+ e.fontWeight = n;
+ break;
+ case NW.includes(n):
+ e.textDecoration = n;
+ break;
+ default:
+ t.push(n);
+ }
+ }), { textStyle: e, classNames: t };
+ }, "q5");
+ OW = /* @__PURE__ */ __name((i) => {
+ const e = j2(M6), t = j2(j3), n = v.useMemo(() => {
+ const L = e.Names().pop();
+ return W3(t, L) + 10;
+ }, [e]), s = W3(t, i.origin), l = i.context.divider().Note(), c = v.useMemo(() => {
+ if (l.trim().indexOf("[") === 0 && l.indexOf("]") !== -1) {
+ const L = l.indexOf("["), d = l.indexOf("]"), [_, p] = [
+ l.slice(L + 1, d),
+ l.slice(d + 1)
+ ];
+ return {
+ style: q5(_.split(",").map((m) => m.trim())),
+ note: p
+ };
+ }
+ return { style: q5([]), note: l };
+ }, [l]);
+ return /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ className: z2("divider", i.className),
+ "data-origin": i.origin,
+ style: {
+ width: n + "px",
+ transform: "translateX(" + (-1 * s + 10) + "px)"
+ },
+ children: [
+ /* @__PURE__ */ S.jsx("div", { className: "left bg-skin-divider" }),
+ /* @__PURE__ */ S.jsx(
+ "div",
+ {
+ style: c.style.textStyle,
+ className: z2("name", c.style.classNames),
+ children: c.note
+ }
+ ),
+ /* @__PURE__ */ S.jsx("div", { className: "right bg-skin-divider" })
+ ]
+ }
+ );
+ }, "OW");
+ IW = /* @__PURE__ */ __name((i) => {
+ var h, R, b, M, w, O, D, N, F, U, k, n2;
+ const e = j2(gu), t = (h = i.context) == null ? void 0 : h.ret(), n = t == null ? void 0 : t.asyncMessage(), s = ((R = n == null ? void 0 : n.content()) == null ? void 0 : R.getFormattedText()) || ((w = (M = (b = i.context) == null ? void 0 : b.ret()) == null ? void 0 : M.expr()) == null ? void 0 : w.getFormattedText()), l = (n == null ? void 0 : n.From()) || (t == null ? void 0 : t.From()) || Ze, c = (
+ // TODO: move this logic to the parser (ReturnTo)
+ ((O = n == null ? void 0 : n.to()) == null ? void 0 : O.getFormattedText()) || ((N = (D = i.context) == null ? void 0 : D.ret()) == null ? void 0 : N.ReturnTo()) || Ze
+ ), L = (n == null ? void 0 : n.content()) || ((U = (F = i.context) == null ? void 0 : F.ret()) == null ? void 0 : U.expr()), { translateX: d, interactionWidth: _, rightToLeft: p, isSelf: m } = K6({
+ context: i.context,
+ origin: i.origin,
+ source: l,
+ target: c
+ }), f = /* @__PURE__ */ __name((K) => {
+ K.stopPropagation(), e(_n.from(i.context));
+ }, "f");
+ return (
+ // .relative to allow left style
+ /* @__PURE__ */ S.jsxs(
+ "div",
+ {
+ onClick: f,
+ "data-type": "return",
+ "data-signature": s,
+ "data-origin": origin,
+ "data-to": c,
+ "data-source": l,
+ "data-target": c,
+ className: z2(
+ "interaction return relative",
+ {
+ "right-to-left": p,
+ highlight: false
+ },
+ i.className
+ ),
+ style: {
+ width: _ + "px",
+ transform: "translateX(" + d + "px)"
+ },
+ children: [
+ i.comment && /* @__PURE__ */ S.jsx(X3, { commentObj: i.commentObj }),
+ m && /* @__PURE__ */ S.jsxs("div", { className: "flex items-center", children: [
+ /* @__PURE__ */ S.jsxs(
+ "svg",
+ {
+ className: "w-3 h-3 flex-shrink-0 fill-current m-1",
+ viewBox: "0 0 512 512",
+ children: [
+ /* @__PURE__ */ S.jsx(
+ "path",
+ {
+ className: "cls-1",
+ d: "M256 0C114.84 0 0 114.84 0 256s114.84 256 256 256 256-114.84 256-256S397.16 0 256 0Zm0 469.33c-117.63 0-213.33-95.7-213.33-213.33S138.37 42.67 256 42.67 469.33 138.37 469.33 256 373.63 469.33 256 469.33Z"
+ }
+ ),
+ /* @__PURE__ */ S.jsx(
+ "path",
+ {
+ className: "cls-1",
+ d: "M288 192h-87.16l27.58-27.58a21.33 21.33 0 1 0-30.17-30.17l-64 64a21.33 21.33 0 0 0 0 30.17l64 64a21.33 21.33 0 0 0 30.17-30.17l-27.58-27.58H288a53.33 53.33 0 0 1 0 106.67h-32a21.33 21.33 0 0 0 0 42.66h32a96 96 0 0 0 0-192Z"
+ }
+ )
+ ]
+ }
+ ),
+ /* @__PURE__ */ S.jsx("span", { className: "name", children: s })
+ ] }),
+ !m && /* @__PURE__ */ S.jsx(
+ f0,
+ {
+ className: z2((k = i.commentObj) == null ? void 0 : k.messageClassNames),
+ textStyle: (n2 = i.commentObj) == null ? void 0 : n2.messageStyle,
+ context: L,
+ content: s,
+ rtl: p,
+ type: "return",
+ number: i.number
+ }
+ )
+ ]
+ }
+ )
+ );
+ }, "IW");
+ __name(DW, "DW");
+ kW = class {
+ static {
+ __name(this, "kW");
+ }
+ // Raw comment contains all spaces and newlines
+ constructor(e) {
+ h2(this, "text", "");
+ h2(this, "classNames", []);
+ h2(this, "textStyle", {});
+ h2(this, "commentStyle", {});
+ h2(this, "messageStyle", {});
+ h2(this, "commentClassNames", []);
+ h2(this, "messageClassNames", []);
+ const t = e.slice(0, -1).split(`
+`), n = t[t.length - 1], [s, l, c, L] = DW(n), { textStyle: d, classNames: _ } = q5(s), { textStyle: p, classNames: m } = q5(l), { textStyle: f, classNames: h } = q5(c);
+ this.text = (t.slice(0, t.length - 1).join(`
+`) + `
+` + L).trim(), this.textStyle = { ...f, ...d, ...p }, this.classNames = [
+ ...h,
+ ..._,
+ ...m
+ ], this.commentStyle = { ...f, ...d }, this.messageStyle = { ...f, ...p }, this.commentClassNames = [...h, ..._], this.messageClassNames = [...h, ...m];
+ }
+ };
+ PW = /* @__PURE__ */ __name((i) => {
+ const e = i.context.getComment() || "", t = new kW(e), n = {
+ className: z2("text-left text-sm text-skin-message", {
+ hidden: i.collapsed && !i.context.ret()
+ }),
+ context: i.context,
+ origin: i.origin,
+ comment: e,
+ commentObj: t,
+ number: i.number
+ };
+ switch (true) {
+ case !!i.context.loop():
+ return /* @__PURE__ */ S.jsx(cW, { ...n });
+ case !!i.context.alt():
+ return /* @__PURE__ */ S.jsx(uW, { ...n });
+ case !!i.context.par():
+ return /* @__PURE__ */ S.jsx(LW, { ...n });
+ case !!i.context.opt():
+ return /* @__PURE__ */ S.jsx(dW, { ...n });
+ case !!i.context.section():
+ return /* @__PURE__ */ S.jsx(_W, { ...n });
+ case !!i.context.critical():
+ return /* @__PURE__ */ S.jsx(gW, { ...n });
+ case !!i.context.tcf():
+ return /* @__PURE__ */ S.jsx(pW, { ...n });
+ case !!i.context.ref():
+ return /* @__PURE__ */ S.jsx(mW, { ...n });
+ case !!i.context.creation():
+ return /* @__PURE__ */ S.jsx(vW, { ...n });
+ case !!i.context.message():
+ return /* @__PURE__ */ S.jsx(bW, { ...n });
+ case !!i.context.asyncMessage():
+ return /* @__PURE__ */ S.jsx(wW, { ...n });
+ case !!i.context.divider():
+ return /* @__PURE__ */ S.jsx(OW, { ...n });
+ case !!i.context.ret():
+ return /* @__PURE__ */ S.jsx(IW, { ...n, className: "text-left text-sm text-skin-message" });
+ }
+ }, "PW");
+ I3 = /* @__PURE__ */ __name((i) => {
+ var n;
+ const e = ((n = i.context) == null ? void 0 : n.stat()) || [], t = /* @__PURE__ */ __name((s) => i.number ? i.incremental ? Pz(i.number, s) : `${i.number}.${s + 1}` : String(s + 1), "t");
+ return /* @__PURE__ */ S.jsx(
+ "div",
+ {
+ className: z2("block", i.className),
+ style: i.style,
+ "data-origin": i.origin,
+ children: e.map((s, l) => /* @__PURE__ */ S.jsx(
+ "div",
+ {
+ className: z2(
+ "statement-container my-4",
+ l === e.length - 1 && "[&>.return]:-mb-4 [&>.return]:bottom-[-1px]"
+ ),
+ "data-origin": i.origin,
+ children: /* @__PURE__ */ S.jsx(
+ PW,
+ {
+ origin: i.origin || "",
+ context: s,
+ collapsed: !!i.collapsed,
+ number: t(l)
+ }
+ )
+ },
+ l
+ ))
+ }
+ );
+ }, "I3");
+ ac = typeof document < "u" ? v.useLayoutEffect : v.useEffect;
+ FW = {
+ ...z8
+ };
+ UW = FW.useInsertionEffect;
+ ZW = UW || ((i) => i());
+ __name(BW, "BW");
+ GW = {
+ ...z8
+ };
+ Hf = false;
+ zW = 0;
+ Yf = /* @__PURE__ */ __name(() => (
+ // Ensure the id is unique with multiple independent versions of Floating UI
+ // on b&&(b=h),k=v*v*w,T=Math.max(b/k,k/x),T>S){v-=h;break}S=T}s.push(u={value:v,dice:m Xi))l.moveTo(0,0);else if(v>K0-Xi)l.moveTo(m*Ph(g),m*El(g)),l.arc(0,0,m,g,y,!x),p>Xi&&(l.moveTo(p*Ph(y),p*El(y)),l.arc(0,0,p,y,g,x));else{var b=g,T=y,S=g,w=y,k=v,C=v,A=s.apply(this,arguments)/2,L=A>Xi&&(n?+n.apply(this,arguments):Bd(p*p+m*m)),I=q5(XD(m-p)/2,+r.apply(this,arguments)),R=I,E=I,_,D;if(L>Xi){var O=jD(L/p*El(A)),N=jD(L/m*El(A));(k-=O*2)>Xi?(O*=x?1:-1,S+=O,w-=O):(k=0,S=w=(g+y)/2),(C-=N*2)>Xi?(N*=x?1:-1,b+=N,T-=N):(C=0,b=T=(g+y)/2)}var P=m*Ph(b),B=m*El(b),F=p*Ph(w),V=p*El(w);if(I>Xi){var $=m*Ph(T),U=m*El(T),j=p*Ph(S),ee=p*El(S),q;if(v "),t.result!==null&&g.kind!==t.kind&&Zt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Zt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||f}function kLe(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Ci(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!Os(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Zt(t,"directive name must not be less than one character in length");s!==0;){for(;Yd(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!bc(s));break}if(bc(s))break;for(r=t.position;s!==0&&!Os(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}s!==0&&i9(t),Xh.call(GQ,n)?GQ[n](t,n,i):BT(t,'unknown document directive "'+n+'"')}if(Ci(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ci(t,!0,-1)):a&&Zt(t,"directives end mark is expected"),wm(t,t.lineIndent-1,PT,!1,!0),Ci(t,!0,-1),t.checkLineBreaks&&oLe.test(t.input.slice(e,t.position))&&BT(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&zT(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ci(t,!0,-1));return}if(t.position ${this.parser.parseInline(t)} An error occurred: ${i.tokens?.map(n).join("")}0;){if(h=cv(s,l,r),h===u)return n[i]=s,n[a]=l,e(n);if(h>0)s=Math.floor(s/h)*h,l=Math.ceil(l/h)*h;else if(h<0)s=Math.ceil(s*h)/h,l=Math.floor(l*h)/h;else break;u=h}return t},t}function Tl(){var t=Ov();return t.copy=function(){return M5(t,Tl())},Mh.apply(t,arguments),d6e(t)}var jY=M(()=>{"use strict";Ch();CD();Iv();XY();o(d6e,"linearish");o(Tl,"linear")});function _D(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a{"use strict";o(_D,"nice")});function En(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return o(i,"interval"),i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),l=i.ceil(a);return a-s0))return u;let h;do u.push(h=new Date(+a)),e(a,l),t(a);while(hEn(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!a(s););else for(;--l>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(DD.setTime(+a),LD.setTime(+s),t(DD),t(LD),Math.floor(r(DD,LD))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var DD,LD,wu=M(()=>{"use strict";DD=new Date,LD=new Date;o(En,"timeInterval")});var uc,QY,RD=M(()=>{"use strict";wu();uc=En(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);uc.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?En(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):uc);QY=uc.range});var io,ZY,ND=M(()=>{"use strict";wu();io=En(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),ZY=io.range});var ku,p6e,I5,m6e,MD=M(()=>{"use strict";wu();ku=En(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),p6e=ku.range,I5=En(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),m6e=I5.range});var Eu,g6e,O5,y6e,ID=M(()=>{"use strict";wu();Eu=En(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),g6e=Eu.range,O5=En(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),y6e=O5.range});var Ro,v6e,Bv,x6e,P5,b6e,OD=M(()=>{"use strict";wu();Ro=En(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),v6e=Ro.range,Bv=En(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),x6e=Bv.range,P5=En(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),b6e=P5.range});function Md(t){return En(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function Id(t){return En(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var wl,Ih,B5,F5,fc,$5,z5,eX,T6e,w6e,k6e,E6e,S6e,C6e,Od,Y0,tX,rX,Oh,nX,iX,aX,A6e,_6e,D6e,L6e,R6e,N6e,PD=M(()=>{"use strict";wu();o(Md,"timeWeekday");wl=Md(0),Ih=Md(1),B5=Md(2),F5=Md(3),fc=Md(4),$5=Md(5),z5=Md(6),eX=wl.range,T6e=Ih.range,w6e=B5.range,k6e=F5.range,E6e=fc.range,S6e=$5.range,C6e=z5.range;o(Id,"utcWeekday");Od=Id(0),Y0=Id(1),tX=Id(2),rX=Id(3),Oh=Id(4),nX=Id(5),iX=Id(6),aX=Od.range,A6e=Y0.range,_6e=tX.range,D6e=rX.range,L6e=Oh.range,R6e=nX.range,N6e=iX.range});var Su,M6e,G5,I6e,BD=M(()=>{"use strict";wu();Su=En(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),M6e=Su.range,G5=En(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),I6e=G5.range});var ao,O6e,kl,P6e,FD=M(()=>{"use strict";wu();ao=En(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());ao.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:En(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});O6e=ao.range,kl=En(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());kl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:En(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});P6e=kl.range});function oX(t,e,r,n,i,a){let s=[[io,1,1e3],[io,5,5*1e3],[io,15,15*1e3],[io,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function l(h,f,d){let p=f{"use strict";Ch();RD();ND();MD();ID();OD();PD();BD();FD();o(oX,"ticker");[F6e,$6e]=oX(kl,G5,Od,P5,O5,I5),[$D,zD]=oX(ao,Su,wl,Ro,Eu,ku)});var V5=M(()=>{"use strict";RD();ND();MD();ID();OD();PD();BD();FD();lX()});function GD(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function VD(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Fv(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function UD(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,l=t.months,u=t.shortMonths,h=$v(i),f=zv(i),d=$v(a),p=zv(a),m=$v(s),g=zv(s),y=$v(l),v=zv(l),x=$v(u),b=zv(u),T={a:P,A:B,b:F,B:V,c:null,d:pX,e:pX,f:lCe,g:vCe,G:bCe,H:aCe,I:sCe,j:oCe,L:xX,m:cCe,M:uCe,p:$,q:U,Q:yX,s:vX,S:hCe,u:fCe,U:dCe,V:pCe,w:mCe,W:gCe,x:null,X:null,y:yCe,Y:xCe,Z:TCe,"%":gX},S={a:j,A:ee,b:q,B:oe,c:null,d:mX,e:mX,f:SCe,g:OCe,G:BCe,H:wCe,I:kCe,j:ECe,L:TX,m:CCe,M:ACe,p:Q,q:ue,Q:yX,s:vX,S:_Ce,u:DCe,U:LCe,V:RCe,w:NCe,W:MCe,x:null,X:null,y:ICe,Y:PCe,Z:FCe,"%":gX},w={a:I,A:R,b:E,B:_,c:D,d:fX,e:fX,f:tCe,g:hX,G:uX,H:dX,I:dX,j:Q6e,L:eCe,m:K6e,M:Z6e,p:L,q:j6e,Q:nCe,s:iCe,S:J6e,u:H6e,U:q6e,V:W6e,w:U6e,W:Y6e,x:O,X:N,y:hX,Y:uX,Z:X6e,"%":rCe};T.x=k(r,T),T.X=k(n,T),T.c=k(e,T),S.x=k(r,S),S.X=k(n,S),S.c=k(e,S);function k(te,re){return function(J){var K=[],ae=-1,Z=0,de=te.length,ne,Te,W;for(J instanceof Date||(J=new Date(+J));++ae{"use strict";ym();lm();o(V8e,"copyObject");$o=V8e});function U8e(t,e){for(var r=-1,n=Array(t);++r
"},r),tt.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,l)=>{let u=Zi(`${s} `,r),h=Zi(a,r);if(u>e){let{hyphenatedStrings:p,remainingWord:m}=L_e(s,e,"-",r);i.push(a,...p),a=m}else h+u>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");l+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),L_e=am((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((l,u)=>{let h=`${s}${l}`;if(Zi(h,n)>=e){let d=u+1,p=i.length===d,m=`${h}${r}`;a.push(p?h:m),s=""}else s=h}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);o(LT,"calculateTextHeight");o(Zi,"calculateTextWidth");HL=am((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=vc(r),s=["sans-serif",n],l=t.split(tt.lineBreakRegex),u=[],h=qe("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let f=h.append("svg");for(let p of s){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let v=__e();v.text=y||BL;let x=D_e(f,v).style("font-size",a).style("font-weight",i).style("font-family",p),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),m=Math.round(b.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}f.remove();let d=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),PL=class{constructor(e=!1,r){this.count=0;this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{o(this,"InitIDGenerator")}},R_e=o(function(t){return DT=DT||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),DT.innerHTML=t,unescape(DT.textContent)},"entityDecode");o(qL,"isDetailedError");N_e=o((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),vc=o(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");o(Vn,"cleanAndMerge");qt={assignWithDepth:Rn,wrapLabel:UL,calculateTextHeight:LT,calculateTextWidth:Zi,calculateTextDimensions:HL,cleanAndMerge:Vn,detectInit:x_e,detectDirective:wQ,isSubstringInArray:b_e,interpolateToCurve:FL,calcLabelPosition:E_e,calcCardinalityPosition:S_e,calcTerminalLabelPosition:C_e,formatUrl:T_e,getStylesFromArray:zL,generateId:GL,random:VL,runFunc:w_e,entityDecode:R_e,insertTitle:N_e,isLabelCoordinateInPath:M_e,parseFontSize:vc,InitIDGenerator:PL},SQ=o(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),Ji=o(function(t){return t.replace(/fl°°/g,"").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),xc=o((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");o(Cn,"handleUndefinedAttr");o(M_e,"isLabelCoordinateInPath")});function Ll(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=UL(e[t].text,i,n),e[t].textLines=e[t].text.split(tt.lineBreakRegex).length,e[t].width=i,e[t].height=LT(e[t].text,n);else{let a=e[t].text.split(tt.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let l of a)e[t].width=Math.max(Zi(l,n),e[t].width),s=LT(l,n),e[t].height=e[t].height+s}}function LQ(t,e,r,n,i){let a=new IT(i);a.data.widthLimit=r.data.widthLimit/Math.min(WL,n.length);for(let[s,l]of n.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&Wt.wrap,f=RT(Wt);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Ll("label",l,h,f,a.data.widthLimit),l.label.Y=u+8,u=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let g=RT(Wt);Ll("type",l,h,g,a.data.widthLimit),l.type.Y=u+5,u=l.type.Y+l.type.height}if(l.descr&&l.descr.text!==""){let g=RT(Wt);g.fontSize=g.fontSize-2,Ll("descr",l,h,g,a.data.widthLimit),l.descr.Y=u+20,u=l.descr.Y+l.descr.height}if(s==0||s%WL===0){let g=r.data.startx+Wt.diagramMarginX,y=r.data.stopy+Wt.diagramMarginY+u;a.setData(g,g,y,y)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+Wt.diagramMarginX:a.data.startx,y=a.data.starty;a.setData(g,g,y,y)}a.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),p=i.db.getC4ShapeKeys(l.alias);p.length>0&&DQ(a,t,d,p),e=l.alias;let m=i.db.getBoundaries(e);m.length>0&&LQ(t,e,a,m,i),l.alias!=="global"&&_Q(t,l,a),r.data.stopy=Math.max(a.data.stopy+Wt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Wt.c4ShapeMargin,r.data.stopx),NT=Math.max(NT,r.data.stopx),MT=Math.max(MT,r.data.stopy)}}var NT,MT,AQ,WL,Wt,IT,YL,y2,RT,I_e,_Q,DQ,Ms,CQ,O_e,P_e,B_e,XL,RQ=M(()=>{"use strict";yr();Cj();pt();RA();gr();GA();Xt();v0();tr();Ei();NT=0,MT=0,AQ=4,WL=2;rv.yy=lv;Wt={},IT=class{static{o(this,"Bounds")}constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,YL(e.db.getConfig())}setData(e,r,n,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(e,r,n,i){e[r]===void 0?e[r]=n:e[r]=i(n,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,i=this.nextData.starty+e.margin*2,a=i+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>AQ)&&(r=this.nextData.startx+e.margin+Wt.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},YL(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},YL=o(function(t){Rn(Wt,t),t.fontFamily&&(Wt.personFontFamily=Wt.systemFontFamily=Wt.messageFontFamily=t.fontFamily),t.fontSize&&(Wt.personFontSize=Wt.systemFontSize=Wt.messageFontSize=t.fontSize),t.fontWeight&&(Wt.personFontWeight=Wt.systemFontWeight=Wt.messageFontWeight=t.fontWeight)},"setConf"),y2=o((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),RT=o(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),I_e=o(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");o(Ll,"calcC4ShapeTextWH");_Q=o(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Wt.c4ShapeMargin-35;let n=e.wrap&&Wt.wrap,i=RT(Wt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=Zi(e.label.text,i);Ll("label",e,n,i,a),Al.drawBoundary(t,e,Wt)},"drawBoundary"),DQ=o(function(t,e,r,n){let i=0;for(let a of n){i=0;let s=r[a],l=y2(Wt,s.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,s.typeC4Shape.width=Zi("\xAB"+s.typeC4Shape.text+"\xBB",l),s.typeC4Shape.height=l.fontSize+2,s.typeC4Shape.Y=Wt.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let u=s.wrap&&Wt.wrap,h=Wt.width-Wt.c4ShapePadding*2,f=y2(Wt,s.typeC4Shape.text);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Ll("label",s,u,f,h),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let m=y2(Wt,s.typeC4Shape.text);Ll("type",s,u,m,h),s.type.Y=i+5,i=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let m=y2(Wt,s.techn.text);Ll("techn",s,u,m,h),s.techn.Y=i+5,i=s.techn.Y+s.techn.height}let d=i,p=s.label.width;if(s.descr&&s.descr.text!==""){let m=y2(Wt,s.typeC4Shape.text);Ll("descr",s,u,m,h),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,p=Math.max(s.label.width,s.descr.width),d=i-s.descr.textLines*5}p=p+Wt.c4ShapePadding,s.width=Math.max(s.width||Wt.width,p,Wt.width),s.height=Math.max(s.height||Wt.height,d,Wt.height),s.margin=s.margin||Wt.c4ShapeMargin,t.insert(s),Al.drawC4Shape(e,s,Wt)}t.bumpLastMargin(Wt.c4ShapeMargin)},"drawC4ShapeArray"),Ms=class{static{o(this,"Point")}constructor(e,r){this.x=e,this.y=r}},CQ=o(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,l=n+t.height/2,u=Math.abs(r-i),h=Math.abs(n-a),f=h/u,d=t.height/t.width,p=null;return n==a&&ri?p=new Ms(r,l):r==i&&na&&(p=new Ms(s,n)),r>i&&n=f?p=new Ms(r,l+f*t.width/2):p=new Ms(s-u/h*t.height/2,n+t.height):r=f?p=new Ms(r+t.width,l+f*t.width/2):p=new Ms(s+u/h*t.height/2,n+t.height):ra?d>=f?p=new Ms(r+t.width,l-f*t.width/2):p=new Ms(s+t.height/2*u/h,n):r>i&&n>a&&(d>=f?p=new Ms(r,l-t.width/2*f):p=new Ms(s-t.height/2*u/h,n)),p},"getIntersectPoint"),O_e=o(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=CQ(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=CQ(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),P_e=o(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&Wt.wrap,l=I_e(Wt);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let h=Zi(a.label.text,l);Ll("label",a,s,l,h),a.techn&&a.techn.text!==""&&(h=Zi(a.techn.text,l),Ll("techn",a,s,l,h)),a.descr&&a.descr.text!==""&&(h=Zi(a.descr.text,l),Ll("descr",a,s,l,h));let f=r(a.from),d=r(a.to),p=O_e(f,d);a.startPoint=p.startPoint,a.endPoint=p.endPoint}Al.drawRels(t,e,Wt)},"drawRels");o(LQ,"drawInsideBoundary");B_e=o(function(t,e,r,n){Wt=ge().c4;let i=ge().securityLevel,a;i==="sandbox"&&(a=qe("#i"+e));let s=i==="sandbox"?qe(a.nodes()[0].contentDocument.body):qe("body"),l=n.db;n.db.setWrap(Wt.wrap),AQ=l.getC4ShapeInRow(),WL=l.getC4BoundaryInRow(),X.debug(`C:${JSON.stringify(Wt,null,2)}`);let u=i==="sandbox"?s.select(`[id="${e}"]`):qe(`[id="${e}"]`);Al.insertComputerIcon(u),Al.insertDatabaseIcon(u),Al.insertClockIcon(u);let h=new IT(n);h.setData(Wt.diagramMarginX,Wt.diagramMarginX,Wt.diagramMarginY,Wt.diagramMarginY),h.data.widthLimit=screen.availWidth,NT=Wt.diagramMarginX,MT=Wt.diagramMarginY;let f=n.db.getTitle(),d=n.db.getBoundaries("");LQ(u,"",h,d,n),Al.insertArrowHead(u),Al.insertArrowEnd(u),Al.insertArrowCrossHead(u),Al.insertArrowFilledHead(u),P_e(u,n.db.getRels(),n.db.getC4Shape,n),h.data.stopx=NT,h.data.stopy=MT;let p=h.data,g=p.stopy-p.starty+2*Wt.diagramMarginY,v=p.stopx-p.startx+2*Wt.diagramMarginX;f&&u.append("text").text(f).attr("x",(p.stopx-p.startx)/2-4*Wt.diagramMarginX).attr("y",p.starty+Wt.diagramMarginY),mn(u,g,v,Wt.useMaxWidth);let x=f?60:0;u.attr("viewBox",p.startx-Wt.diagramMarginX+" -"+(Wt.diagramMarginY+x)+" "+v+" "+(g+x)),X.debug("models:",p)},"draw"),XL={drawPersonOrSystemArray:DQ,drawBoundary:_Q,setConf:YL,draw:B_e}});var F_e,NQ,MQ=M(()=>{"use strict";F_e=o(t=>`.person {
+ stroke: ${t.personBorder};
+ fill: ${t.personBkg};
+ }
+`,"getStyles"),NQ=F_e});var IQ={};dr(IQ,{diagram:()=>$_e});var $_e,OQ=M(()=>{"use strict";RA();GA();RQ();MQ();$_e={parser:sH,db:lv,renderer:XL,styles:NQ,init:o(({c4:t,wrap:e})=>{XL.setConf(t),lv.setWrap(e)},"init")}});function ZQ(t){return typeof t>"u"||t===null}function U_e(t){return typeof t=="object"&&t!==null}function H_e(t){return Array.isArray(t)?t:ZQ(t)?[]:[t]}function q_e(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;r"u"&&Nu(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function KQ(t,e,r,n){var i="",a=t.tag,s,l,u;for(s=0,l=r.length;s tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}function Nu(t,e,r,n,i,a,s){t.tag=null,t.dump=r,QQ(t,r,!1)||QQ(t,r,!0);var l=dZ.call(t.dump),u=n,h;n&&(n=t.flowLevel<0||t.flowLevel>e);var f=l==="[object Object]"||l==="[object Array]",d,p;if(f&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(i=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(f&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),l==="[object Object]")n&&Object.keys(t.dump).length!==0?(a9e(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(i9e(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?KQ(t,e-1,t.dump,i):KQ(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(n9e(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&e9e(t,t.dump,e,a,u);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Is("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}function s9e(t,e){var r=[],n=[],i,a;for(r9(t,r,n),i=0,a=n.length;i{"use strict";o(ZQ,"isNothing");o(U_e,"isObject");o(H_e,"toArray");o(q_e,"extend");o(W_e,"repeat");o(Y_e,"isNegativeZero");X_e=ZQ,j_e=U_e,K_e=H_e,Q_e=W_e,Z_e=Y_e,J_e=q_e,Pi={isNothing:X_e,isObject:j_e,toArray:K_e,repeat:Q_e,isNegativeZero:Z_e,extend:J_e};o(JQ,"formatError");o(x2,"YAMLException$1");x2.prototype=Object.create(Error.prototype);x2.prototype.constructor=x2;x2.prototype.toString=o(function(e){return this.name+": "+JQ(this,e)},"toString");Is=x2;o(jL,"getLine");o(KL,"padStart");o(eDe,"makeSnippet");tDe=eDe,rDe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],nDe=["scalar","sequence","mapping"];o(iDe,"compileStyleAliases");o(aDe,"Type$1");Ia=aDe;o(BQ,"compileList");o(sDe,"compileMap");o(ZL,"Schema$1");ZL.prototype.extend=o(function(e){var r=[],n=[];if(e instanceof Ia)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Is("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Ia))throw new Is("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Is("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Is("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Ia))throw new Is("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(ZL.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=BQ(i,"implicit"),i.compiledExplicit=BQ(i,"explicit"),i.compiledTypeMap=sDe(i.compiledImplicit,i.compiledExplicit),i},"extend");oDe=ZL,lDe=new Ia("tag:yaml.org,2002:str",{kind:"scalar",construct:o(function(t){return t!==null?t:""},"construct")}),cDe=new Ia("tag:yaml.org,2002:seq",{kind:"sequence",construct:o(function(t){return t!==null?t:[]},"construct")}),uDe=new Ia("tag:yaml.org,2002:map",{kind:"mapping",construct:o(function(t){return t!==null?t:{}},"construct")}),hDe=new oDe({explicit:[lDe,cDe,uDe]});o(fDe,"resolveYamlNull");o(dDe,"constructYamlNull");o(pDe,"isNull");mDe=new Ia("tag:yaml.org,2002:null",{kind:"scalar",resolve:fDe,construct:dDe,predicate:pDe,represent:{canonical:o(function(){return"~"},"canonical"),lowercase:o(function(){return"null"},"lowercase"),uppercase:o(function(){return"NULL"},"uppercase"),camelcase:o(function(){return"Null"},"camelcase"),empty:o(function(){return""},"empty")},defaultStyle:"lowercase"});o(gDe,"resolveYamlBoolean");o(yDe,"constructYamlBoolean");o(vDe,"isBoolean");xDe=new Ia("tag:yaml.org,2002:bool",{kind:"scalar",resolve:gDe,construct:yDe,predicate:vDe,represent:{lowercase:o(function(t){return t?"true":"false"},"lowercase"),uppercase:o(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:o(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});o(bDe,"isHexCode");o(TDe,"isOctCode");o(wDe,"isDecCode");o(kDe,"resolveYamlInteger");o(EDe,"constructYamlInteger");o(SDe,"isInteger");CDe=new Ia("tag:yaml.org,2002:int",{kind:"scalar",resolve:kDe,construct:EDe,predicate:SDe,represent:{binary:o(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:o(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:o(function(t){return t.toString(10)},"decimal"),hexadecimal:o(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ADe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");o(_De,"resolveYamlFloat");o(DDe,"constructYamlFloat");LDe=/^[-+]?[0-9]+e/;o(RDe,"representYamlFloat");o(NDe,"isFloat");MDe=new Ia("tag:yaml.org,2002:float",{kind:"scalar",resolve:_De,construct:DDe,predicate:NDe,represent:RDe,defaultStyle:"lowercase"}),eZ=hDe.extend({implicit:[mDe,xDe,CDe,MDe]}),IDe=eZ,tZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),rZ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");o(ODe,"resolveYamlTimestamp");o(PDe,"constructYamlTimestamp");o(BDe,"representYamlTimestamp");FDe=new Ia("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ODe,construct:PDe,instanceOf:Date,represent:BDe});o($De,"resolveYamlMerge");zDe=new Ia("tag:yaml.org,2002:merge",{kind:"scalar",resolve:$De}),n9=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
+\r`;o(GDe,"resolveYamlBinary");o(VDe,"constructYamlBinary");o(UDe,"representYamlBinary");o(HDe,"isBinary");qDe=new Ia("tag:yaml.org,2002:binary",{kind:"scalar",resolve:GDe,construct:VDe,predicate:HDe,represent:UDe}),WDe=Object.prototype.hasOwnProperty,YDe=Object.prototype.toString;o(XDe,"resolveYamlOmap");o(jDe,"constructYamlOmap");KDe=new Ia("tag:yaml.org,2002:omap",{kind:"sequence",resolve:XDe,construct:jDe}),QDe=Object.prototype.toString;o(ZDe,"resolveYamlPairs");o(JDe,"constructYamlPairs");eLe=new Ia("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ZDe,construct:JDe}),tLe=Object.prototype.hasOwnProperty;o(rLe,"resolveYamlSet");o(nLe,"constructYamlSet");iLe=new Ia("tag:yaml.org,2002:set",{kind:"mapping",resolve:rLe,construct:nLe}),nZ=IDe.extend({implicit:[FDe,zDe],explicit:[qDe,KDe,eLe,iLe]}),Xh=Object.prototype.hasOwnProperty,OT=1,iZ=2,aZ=3,PT=4,QL=1,aLe=2,FQ=3,sLe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oLe=/[\x85\u2028\u2029]/,lLe=/[,\[\]\{\}]/,sZ=/^(?:!|!!|![a-z\-]+!)$/i,oZ=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;o($Q,"_class");o(bc,"is_EOL");o(Yd,"is_WHITE_SPACE");o(Os,"is_WS_OR_EOL");o(bm,"is_FLOW_INDICATOR");o(cLe,"fromHexCode");o(uLe,"escapedHexLen");o(hLe,"fromDecimalCode");o(zQ,"simpleEscapeSequence");o(fLe,"charFromCodepoint");lZ=new Array(256),cZ=new Array(256);for(Wd=0;Wd<256;Wd++)lZ[Wd]=zQ(Wd)?1:0,cZ[Wd]=zQ(Wd);o(dLe,"State$1");o(uZ,"generateError");o(Zt,"throwError");o(BT,"throwWarning");GQ={YAML:o(function(e,r,n){var i,a,s;e.version!==null&&Zt(e,"duplication of %YAML directive"),n.length!==1&&Zt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Zt(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&Zt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&BT(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:o(function(e,r,n){var i,a;n.length!==2&&Zt(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],sZ.test(i)||Zt(e,"ill-formed tag handle (first argument) of the TAG directive"),Xh.call(e.tagMap,i)&&Zt(e,'there is a previously declared suffix for "'+i+'" tag handle'),oZ.test(a)||Zt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Zt(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};o(Yh,"captureSegment");o(VQ,"mergeMappings");o(Tm,"storeMappingPair");o(i9,"readLineBreak");o(Ci,"skipSeparationSpace");o(zT,"testDocumentSeparator");o(a9,"writeFoldedLines");o(pLe,"readPlainScalar");o(mLe,"readSingleQuotedScalar");o(gLe,"readDoubleQuotedScalar");o(yLe,"readFlowCollection");o(vLe,"readBlockScalar");o(UQ,"readBlockSequence");o(xLe,"readBlockMapping");o(bLe,"readTagProperty");o(TLe,"readAnchorProperty");o(wLe,"readAlias");o(wm,"composeNode");o(kLe,"readDocument");o(hZ,"loadDocuments");o(ELe,"loadAll$1");o(SLe,"load$1");CLe=ELe,ALe=SLe,fZ={loadAll:CLe,load:ALe},dZ=Object.prototype.toString,pZ=Object.prototype.hasOwnProperty,s9=65279,_Le=9,b2=10,DLe=13,LLe=32,RLe=33,NLe=34,JL=35,MLe=37,ILe=38,OLe=39,PLe=42,mZ=44,BLe=45,FT=58,FLe=61,$Le=62,zLe=63,GLe=64,gZ=91,yZ=93,VLe=96,vZ=123,ULe=124,xZ=125,Oa={};Oa[0]="\\0";Oa[7]="\\a";Oa[8]="\\b";Oa[9]="\\t";Oa[10]="\\n";Oa[11]="\\v";Oa[12]="\\f";Oa[13]="\\r";Oa[27]="\\e";Oa[34]='\\"';Oa[92]="\\\\";Oa[133]="\\N";Oa[160]="\\_";Oa[8232]="\\L";Oa[8233]="\\P";HLe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],qLe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;o(WLe,"compileStyleMap");o(YLe,"encodeHex");XLe=1,T2=2;o(jLe,"State");o(HQ,"indentString");o(e9,"generateNextLine");o(KLe,"testImplicitResolving");o($T,"isWhitespace");o(w2,"isPrintable");o(qQ,"isNsCharOrWhitespace");o(WQ,"isPlainSafe");o(QLe,"isPlainSafeFirst");o(ZLe,"isPlainSafeLast");o(v2,"codePointAt");o(bZ,"needIndentIndicator");TZ=1,t9=2,wZ=3,kZ=4,xm=5;o(JLe,"chooseScalarStyle");o(e9e,"writeScalar");o(YQ,"blockHeader");o(XQ,"dropEndingNewline");o(t9e,"foldString");o(jQ,"foldLine");o(r9e,"escapeString");o(n9e,"writeFlowSequence");o(KQ,"writeBlockSequence");o(i9e,"writeFlowMapping");o(a9e,"writeBlockMapping");o(QQ,"detectType");o(Nu,"writeNode");o(s9e,"getDuplicateReferences");o(r9,"inspectNode");o(o9e,"dump$1");l9e=o9e,c9e={dump:l9e};o(o9,"renamed");jh=eZ,Kh=fZ.load,N6t=fZ.loadAll,M6t=c9e.dump,I6t=o9("safeLoad","load"),O6t=o9("safeLoadAll","loadAll"),P6t=o9("safeDump","dump")});function h9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function DZ(t){jd=t}function on(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:o((i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(as.caret,"$1"),r=r.replace(i,s),n},"replace"),getRegex:o(()=>new RegExp(r,e),"getRegex")};return n}function Tc(t,e){if(e){if(as.escapeTest.test(t))return t.replace(as.escapeReplace,SZ)}else if(as.escapeTestNoEncode.test(t))return t.replace(as.escapeReplaceNoEncode,SZ);return t}function CZ(t){try{t=encodeURI(t).replace(as.percentDecode,"%")}catch{return null}return t}function AZ(t,e){let r=t.replace(as.findPipe,(a,s,l)=>{let u=!1,h=s;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=r.split(as.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length
+`:"'+(r?i:Tc(i,!0))+`
+`}blockquote({tokens:t}){return`"+(r?i:Tc(i,!0))+`
+${this.parser.parse(t)}
+`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`
+`}list(t){let e=t.ordered,r=t.start,n="";for(let s=0;s
+
+`+e+`
+`+n+`
+`}tablerow({text:t}){return`
+${t}
+`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`${r}>
+`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Tc(t,!0)}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=CZ(t);if(i===null)return n;t=i;let a='"+n+"",a}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=CZ(t);if(i===null)return Tc(r);t=i;let a=`",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Tc(t.text)}},x9=class{static{o(this,"$")}strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Iu=class u9{static{o(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||jd,this.options.renderer=this.options.renderer||new qT,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new x9}static parse(e,r){return new u9(r).parse(e)}static parseInline(e,r){return new u9(r).parseInline(e)}parse(e,r=!0){let n="";for(let i=0;i
"+Tc(r.message+"",!0)+"
";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Xd=new q9e;o(nn,"d");nn.options=nn.setOptions=function(t){return Xd.setOptions(t),nn.defaults=Xd.defaults,DZ(nn.defaults),nn};nn.getDefaults=h9;nn.defaults=jd;nn.use=function(...t){return Xd.use(...t),nn.defaults=Xd.defaults,DZ(nn.defaults),nn};nn.walkTokens=function(t,e){return Xd.walkTokens(t,e)};nn.parseInline=Xd.parseInline;nn.Parser=Iu;nn.parser=Iu.parse;nn.Renderer=qT;nn.TextRenderer=x9;nn.Lexer=Mu;nn.lexer=Mu.lex;nn.Tokenizer=HT;nn.Hooks=C2;nn.parse=nn;F6t=nn.options,$6t=nn.setOptions,z6t=nn.use,G6t=nn.walkTokens,V6t=nn.parseInline,U6t=Iu.parse,H6t=Mu.lex});function W9e(t,{markdownAutoWrap:e}){let n=t.replace(/
/g,`
+`).replace(/\n{2,}/g,`
+`),i=B3(n);return e===!1?i.replace(/ /g," "):i}function GZ(t,e={}){let r=W9e(t,e),n=nn.lexer(r),i=[[]],a=0;function s(l,u="normal"){l.type==="text"?l.text.split(`
+`).forEach((f,d)=>{d!==0&&(a++,i.push([])),f.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&i[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{s(h,l.type)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}return o(s,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{s(u)}):l.type==="html"?i[a].push({content:l.text,type:"normal"}):i[a].push({content:l.raw,type:"normal"})}),i}function VZ(t,{markdownAutoWrap:e}={}){let r=nn.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g,"
").replace(/ /g," "):i.text.replace(/\n */g,"
"):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`
/g,"
"),d=GZ(f.replace("
","
"),h),p=Q9e(l,t,d,e?u:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");qe(p).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");qe(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");qe(p).select("text").attr("style",g)}return p}},"createText")});function Vt(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function Go(t,e,r,n,i,a){let s=[],u=r-t,h=n-e,f=u/a,d=2*Math.PI/f,p=e+h/2;for(let m=0;m<=50;m++){let g=m/50,y=t+g*u,v=p+i*Math.sin(d*(y-t));s.push({x:y,y:v})}return s}function Kd(t,e,r,n,i,a){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;d]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=ge().fontSize?ge().fontSize:window.getComputedStyle(document.body).fontSize,T=5,[S=ur.fontSize]=vc(b),w=S*T+"px";y.style.minWidth=w,y.style.maxWidth=w}else y.style.width="100%";v(y)}o(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}return i?s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):s.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:f,label:s}},"labelHelper"),XT=o(async(t,e,r)=>{let n=r.useHtmlLabels||vr(ge()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await di(i,sr(Ji(e),ge()),{useHtmlLabels:n,width:r.width||ge()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),l=r.padding/2;if(vr(ge()?.flowchart?.htmlLabels)){let u=a.children[0],h=qe(a);s=u.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:l,label:i}},"insertLabel"),Qe=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),st=o((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");o(Vt,"createPathFromPoints");o(Go,"generateFullSineWavePoints");o(Kd,"generateCirclePoints")});function Z9e(t,e){return t.intersect(e)}var jZ,KZ=M(()=>{"use strict";o(Z9e,"intersectNode");jZ=Z9e});function J9e(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/u);n.x{"use strict";o(J9e,"intersectEllipse");jT=J9e});function eRe(t,e,r){return jT(t,e,e,r)}var QZ,ZZ=M(()=>{"use strict";E9();o(eRe,"intersectCircle");QZ=eRe});function tRe(t,e,r,n){{let i=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,l=i*r.x+a*r.y+s,u=i*n.x+a*n.y+s,h=1e-6;if(l!==0&&u!==0&&JZ(l,u))return;let f=n.y-r.y,d=r.x-n.x,p=n.x*r.y-r.x*n.y,m=f*t.x+d*t.y+p,g=f*e.x+d*e.y+p;if(Math.abs(m)
"),X.info("vertexText"+i);let a={isNode:n,label:Ji(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>``),labelStyle:e&&e.replace("fill:","color:")};return await kRe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|
/gi):Array.isArray(i)?s=i:s=[];for(let l of s){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),a.appendChild(u)}return a}},"createLabel"),kc=ERe});async function Pee(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,f=l.node().appendChild(await kc(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(vr(ge()?.flowchart?.htmlLabels)){let A=f.children[0],L=qe(f);d=A.getBoundingClientRect(),L.attr("width",d.width),L.attr("height",d.height)}X.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await kc(p.join?p.join("
"):p,e.labelStyle,!0,!0)),y=g.children[0],v=qe(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height);let x=(e.padding||0)/2;qe(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+x+5)+")"),qe(f).attr("transform","translate( "+(d.width
").length,d.innerHTML.includes("")&&(f+=d.innerHTML.split("]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,S=parseInt(b,10)*5+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";v(y)}o(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{n.includes("font-weight: bolder")&&qe(u).selectAll("tspan").attr("font-weight",""),f=u.children.length;let d=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(d.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=u.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*f)+r)+")"),h.height}var Ete=M(()=>{"use strict";yr();qn();It();tr();Xt();zo();gr();o(kte,"textHelper");o(lw,"addText")});async function Ste(t,e){let r=ge(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??vr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:l,bbox:u}=await kte(t,e,r,a,i),{labelStyles:h,nodeStyles:f}=je(e);e.labelStyle=h,e.cssStyles=s.styles||"";let d=s.styles?.join(";")||f||"";e.cssStyles||(e.cssStyles=d.replaceAll("!important","").split(";"));let p=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,m=Ze.svg(l),g=Je(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=u.width,v=u.height;s.members.length===0&&s.methods.length===0?v+=i:s.members.length>0&&s.methods.length===0&&(v+=i*2);let x=-y/2,b=-v/2,T=m.rectangle(x-n,b-n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0),y+2*n,v+2*n+(p?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),S=l.insert(()=>T,":first-child");S.attr("class","basic label-container");let w=S.node().getBBox();l.selectAll(".text").each((L,I,R)=>{let E=qe(R[I]),_=E.attr("transform"),D=0;if(_){let B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(_);B&&(D=parseFloat(B[2]))}let O=D+b+n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(O-=4);let N=x;(E.attr("class").includes("label-group")||E.attr("class").includes("annotation-group"))&&(N=-E.node()?.getBBox().width/2||0,l.selectAll("text").each(function(P,B,F){window.getComputedStyle(F[B]).textAnchor==="middle"&&(N=0)})),E.attr("transform",`translate(${N}, ${O})`)});let k=l.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,C=l.select(".label-group").node().getBBox().height-(p?n/2:0)||0,A=l.select(".members-group").node().getBBox().height-(p?n/2:0)||0;if(s.members.length>0||s.methods.length>0||p){let L=m.line(w.x,k+C+b+n,w.x+w.width,k+C+b+n,g);l.insert(()=>L).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){let L=m.line(w.x,k+C+A+b+i*2+n,w.x+w.width,k+C+A+b+n+i*2,g);l.insert(()=>L).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&l.selectAll("path").attr("style",d),S.select(":nth-child(2)").attr("style",d),l.selectAll(".divider").select("path").attr("style",d),e.labelStyle?l.selectAll("span").attr("style",e.labelStyle):l.selectAll("span").attr("style",d),!a){let L=RegExp(/color\s*:\s*([^;]*)/),I=L.exec(d);if(I){let R=I[0].replace("color","fill");l.selectAll("tspan").attr("style",R)}else if(h){let R=L.exec(h);if(R){let E=R[0].replace("color","fill");l.selectAll("tspan").attr("style",E)}}}return Qe(e,S),e.intersect=function(L){return Xe.rect(e,L)},l}var Cte=M(()=>{"use strict";It();Xt();yr();Ht();$t();Ut();Ete();gr();o(Ste,"classBox")});async function Ate(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let i=e,a=e,s=20,l=20,u="verifyMethod"in e,h=st(e),f=t.insert("g").attr("class",h).attr("id",e.domId??e.id),d;u?d=await Ou(f,`<<${i.type}>>`,0,e.labelStyle):d=await Ou(f,"<<Element>>",0,e.labelStyle);let p=d,m=await Ou(f,i.name,p,e.labelStyle+"; font-weight: bold;");if(p+=m+l,u){let k=await Ou(f,`${i.requirementId?`ID: ${i.requirementId}`:""}`,p,e.labelStyle);p+=k;let C=await Ou(f,`${i.text?`Text: ${i.text}`:""}`,p,e.labelStyle);p+=C;let A=await Ou(f,`${i.risk?`Risk: ${i.risk}`:""}`,p,e.labelStyle);p+=A,await Ou(f,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,p,e.labelStyle)}else{let k=await Ou(f,`${a.type?`Type: ${a.type}`:""}`,p,e.labelStyle);p+=k,await Ou(f,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,p,e.labelStyle)}let g=(f.node()?.getBBox().width??200)+s,y=(f.node()?.getBBox().height??200)+s,v=-g/2,x=-y/2,b=Ze.svg(f),T=Je(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=b.rectangle(v,x,g,y,T),w=f.insert(()=>S,":first-child");if(w.attr("class","basic label-container").attr("style",n),f.selectAll(".label").each((k,C,A)=>{let L=qe(A[C]),I=L.attr("transform"),R=0,E=0;if(I){let N=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);N&&(R=parseFloat(N[1]),E=parseFloat(N[2]))}let _=E-y/2,D=v+s/2;(C===0||C===1)&&(D=R),L.attr("transform",`translate(${D}, ${_+s})`)}),p>d+m+l){let k=b.line(v,x+d+m+l,v+g,x+d+m+l,T);f.insert(()=>k).attr("style",n)}return Qe(e,w),e.intersect=function(k){return Xe.rect(e,k)},f}async function Ou(t,e,r,n=""){if(e==="")return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=ge(),s=a.htmlLabels??!0,l=await di(i,av(Ji(e)),{width:Zi(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),u;if(s){let h=l.children[0],f=qe(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{let h=l.children[0];for(let f of h.children)f.textContent=f.textContent.replaceAll(">",">").replaceAll("<","<"),n&&f.setAttribute("style",n);u=l.getBBox(),u.height+=6}return i.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}var _te=M(()=>{"use strict";It();Ut();$t();Ht();tr();Xt();zo();yr();o(Ate,"requirementBox");o(Ou,"addText")});async function Dte(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=je(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await ut(t,e,st(e)),f=e.padding||10,d="",p;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));let m={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await XT(p,"ticket"in e&&e.ticket||"",m):{label:g,bbox:y}=await XT(l,"ticket"in e&&e.ticket||"",m);let{label:v,bbox:x}=await XT(l,"assigned"in e&&e.assigned||"",m);e.width=s;let b=10,T=e?.width||0,S=Math.max(y.height,x.height)/2,w=Math.max(u.height+b*2,e?.height||0)+S,k=-T/2,C=-w/2;h.attr("transform","translate("+(f-T/2)+", "+(-S-u.height/2)+")"),g.attr("transform","translate("+(f-T/2)+", "+(-S+u.height/2)+")"),v.attr("transform","translate("+(f+T/2-x.width-2*a)+", "+(-S+u.height/2)+")");let A,{rx:L,ry:I}=e,{cssStyles:R}=e;if(e.look==="handDrawn"){let E=Ze.svg(l),_=Je(e,{}),D=L||I?E.path(Fs(k,C,T,w,L||0),_):E.rectangle(k,C,T,w,_);A=l.insert(()=>D,":first-child"),A.attr("class","basic label-container").attr("style",R||null)}else{A=l.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",i).attr("rx",L??5).attr("ry",I??5).attr("x",k).attr("y",C).attr("width",T).attr("height",w);let E="priority"in e&&e.priority;if(E){let _=l.append("line"),D=k+2,O=C+Math.floor((L??0)/2),N=C+w-Math.floor((L??0)/2);_.attr("x1",D).attr("y1",O).attr("x2",D).attr("y2",N).attr("stroke-width","4").attr("stroke",_Re(E))}}return Qe(e,A),e.height=w,e.intersect=function(E){return Xe.rect(e,E)},l}var _Re,Lte=M(()=>{"use strict";It();Ut();Zd();$t();Ht();_Re=o(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");o(Dte,"kanbanItem")});async function Rte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ut(t,e,st(e)),u=a.width+10*s,h=a.height+8*s,f=.15*u,{cssStyles:d}=e,p=a.width+20,m=a.height+20,g=Math.max(u,p),y=Math.max(h,m);l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let v,x=`M0 0
+ a${f},${f} 1 0,0 ${g*.25},${-1*y*.1}
+ a${f},${f} 1 0,0 ${g*.25},0
+ a${f},${f} 1 0,0 ${g*.25},0
+ a${f},${f} 1 0,0 ${g*.25},${y*.1}
+
+ a${f},${f} 1 0,0 ${g*.15},${y*.33}
+ a${f*.8},${f*.8} 1 0,0 0,${y*.34}
+ a${f},${f} 1 0,0 ${-1*g*.15},${y*.33}
+
+ a${f},${f} 1 0,0 ${-1*g*.25},${y*.15}
+ a${f},${f} 1 0,0 ${-1*g*.25},0
+ a${f},${f} 1 0,0 ${-1*g*.25},0
+ a${f},${f} 1 0,0 ${-1*g*.25},${-1*y*.15}
+
+ a${f},${f} 1 0,0 ${-1*g*.1},${-1*y*.33}
+ a${f*.8},${f*.8} 1 0,0 0,${-1*y*.34}
+ a${f},${f} 1 0,0 ${g*.1},${-1*y*.33}
+ H0 V0 Z`;if(e.look==="handDrawn"){let b=Ze.svg(i),T=Je(e,{}),S=b.path(x,T);v=i.insert(()=>S,":first-child"),v.attr("class","basic label-container").attr("style",Cn(d))}else v=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",x);return v.attr("transform",`translate(${-g/2}, ${-y/2})`),Qe(e,v),e.calcIntersect=function(b,T){return Xe.rect(b,T)},e.intersect=function(b){return X.info("Bang intersect",e,b),Xe.rect(e,b)},i}var Nte=M(()=>{"use strict";pt();It();Ut();$t();Ht();tr();o(Rte,"bang")});async function Mte(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ut(t,e,st(e)),u=a.width+2*s,h=a.height+2*s,f=.15*u,d=.25*u,p=.35*u,m=.2*u,{cssStyles:g}=e,y,v=`M0 0
+ a${f},${f} 0 0,1 ${u*.25},${-1*u*.1}
+ a${p},${p} 1 0,1 ${u*.4},${-1*u*.1}
+ a${d},${d} 1 0,1 ${u*.35},${u*.2}
+
+ a${f},${f} 1 0,1 ${u*.15},${h*.35}
+ a${m},${m} 1 0,1 ${-1*u*.15},${h*.65}
+
+ a${d},${f} 1 0,1 ${-1*u*.25},${u*.15}
+ a${p},${p} 1 0,1 ${-1*u*.5},0
+ a${f},${f} 1 0,1 ${-1*u*.25},${-1*u*.15}
+
+ a${f},${f} 1 0,1 ${-1*u*.1},${-1*h*.35}
+ a${m},${m} 1 0,1 ${u*.1},${-1*h*.65}
+ H0 V0 Z`;if(e.look==="handDrawn"){let x=Ze.svg(i),b=Je(e,{}),T=x.path(v,b);y=i.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",Cn(g))}else y=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",v);return l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),Qe(e,y),e.calcIntersect=function(x,b){return Xe.rect(x,b)},e.intersect=function(x){return X.info("Cloud intersect",e,x),Xe.rect(e,x)},i}var Ite=M(()=>{"use strict";Ht();pt();tr();Ut();$t();It();o(Mte,"cloud")});async function Ote(t,e){let{labelStyles:r,nodeStyles:n}=je(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ut(t,e,st(e)),u=a.width+8*s,h=a.height+2*s,f=5,d=`
+ M${-u/2} ${h/2-f}
+ v${-h+2*f}
+ q0,-${f} ${f},-${f}
+ h${u-2*f}
+ q${f},0 ${f},${f}
+ v${h-2*f}
+ q0,${f} -${f},${f}
+ h${-u+2*f}
+ q-${f},0 -${f},-${f}
+ Z
+ `,p=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",d);return i.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>l.node()),Qe(e,p),e.calcIntersect=function(m,g){return Xe.rect(m,g)},e.intersect=function(m){return Xe.rect(e,m)},i}var Pte=M(()=>{"use strict";Ut();$t();It();o(Ote,"defaultMindmapNode")});async function Bte(t,e){let r={padding:e.padding??0};return aw(t,e,r)}var Fte=M(()=>{"use strict";U9();o(Bte,"mindmapCircle")});function $te(t){return t in q9}var DRe,LRe,q9,W9=M(()=>{"use strict";bJ();kJ();SJ();AJ();U9();DJ();RJ();MJ();OJ();BJ();$J();GJ();UJ();qJ();YJ();jJ();QJ();JJ();tee();nee();aee();oee();cee();hee();dee();mee();yee();xee();Tee();kee();See();Aee();Dee();Ree();Mee();Oee();Bee();$ee();Gee();Uee();qee();Yee();jee();Qee();Jee();tte();nte();ate();ote();cte();hte();dte();mte();yte();xte();Tte();wte();Cte();_te();Lte();Nte();Ite();Pte();Fte();DRe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Hee},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Fee},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Wee},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ete},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:FJ},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:aw},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Rte},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Mte},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Nee},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ZJ},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:vee},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:gee},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ute},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:fee},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:VJ},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ste},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:EJ},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:zee},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Zee},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Kee},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:XJ},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:eee},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:LJ},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:NJ},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:IJ},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:bee},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:gte},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:KJ},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:lte},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:wee},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:PJ},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:zJ},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:pte},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:bte},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:HJ},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:fte},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:WJ},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Vee},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:_ee},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Cee},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:wJ},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:_J},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ite},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:rte},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:vte},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Iee},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Eee}],LRe=o(()=>{let e=[...Object.entries({state:Xee,choice:CJ,note:Lee,rectWithTitle:Pee,labelRect:pee,iconSquare:lee,iconCircle:iee,icon:ree,iconRounded:see,imageSquare:uee,anchor:xJ,kanbanItem:Dte,mindmapCircle:Bte,defaultMindmapNode:Ote,classBox:Ste,erBox:H9,requirementBox:Ate}),...DRe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),q9=LRe();o($te,"isValidShape")});var RRe,cw,zte=M(()=>{"use strict";yr();k2();Xt();pt();W9();tr();gr();ci();RRe="flowchart-",cw=class{constructor(){this.vertexCounter=0;this.config=ge();this.vertices=new Map;this.edges=[];this.classes=new Map;this.subGraphs=[];this.subGraphLookup=new Map;this.tooltips=new Map;this.subCount=0;this.firstGraphFlag=!0;this.secCount=-1;this.posCrossRef=[];this.funs=[];this.setAccTitle=Rr;this.setAccDescription=Ir;this.setDiagramTitle=$r;this.getAccTitle=Mr;this.getAccDescription=Or;this.getDiagramTitle=Pr;this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{o(this,"FlowDB")}sanitizeText(e){return tt.sanitizeText(e,this.config)}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return r.domId;return e}addVertex(e,r,n,i,a,s,l={},u){if(!e||e.trim().length===0)return;let h;if(u!==void 0){let m;u.includes(`
+`)?m=u+`
+`:m=`{
+`+u+`
+}`,h=Kh(m,{schema:jh})}let f=this.edges.find(m=>m.id===e);if(f){let m=h;m?.animate!==void 0&&(f.animate=m.animate),m?.animation!==void 0&&(f.animation=m.animation),m?.curve!==void 0&&(f.interpolate=m.curve);return}let d,p=this.vertices.get(e);if(p===void 0&&(p={id:e,labelType:"text",domId:RRe+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,r!==void 0?(this.config=ge(),d=this.sanitizeText(r.text.trim()),p.labelType=r.type,d.startsWith('"')&&d.endsWith('"')&&(d=d.substring(1,d.length-1)),p.text=d):p.text===void 0&&(p.text=e),n!==void 0&&(p.type=n),i?.forEach(m=>{p.styles.push(m)}),a?.forEach(m=>{p.classes.push(m)}),s!==void 0&&(p.dir=s),p.props===void 0?p.props=l:l!==void 0&&Object.assign(p.props,l),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!$te(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=h?.shape}h?.label&&(p.text=h?.label),h?.icon&&(p.icon=h?.icon,!h.label?.trim()&&p.text===e&&(p.text="")),h?.form&&(p.form=h?.form),h?.pos&&(p.pos=h?.pos),h?.img&&(p.img=h?.img,!h.label?.trim()&&p.text===e&&(p.text="")),h?.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h))}}addSingleLink(e,r,n,i){let l={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};X.info("abc78 Got edge...",l);let u=n.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=u.type),n!==void 0&&(l.type=n.type,l.stroke=n.stroke,l.length=n.length>10?10:n.length),i&&!this.edges.some(h=>h.id===i))l.id=i,l.isUserDefinedId=!0;else{let h=this.edges.filter(f=>f.start===l.start&&f.end===l.end);h.length===0?l.id=xc(l.start,l.end,{counter:0,prefix:"L"}):l.id=xc(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))X.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
+
+Initialize mermaid with maxEdges set to a higher number to allow more edges.
+You cannot set this config via configuration inside the diagram as it is a secure config.
+You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;X.info("addLink",e,r,i);for(let a of e)for(let s of r){let l=a===e[e.length-1],u=s===r[0];l&&u?this.addSingleLink(a,s,n,i):this.addSingleLink(a,s,n,void 0)}}updateLinkInterpolate(e,r){e.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(e,r){e.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(e,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(i=>{let a=this.classes.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},this.classes.set(i,a)),n?.forEach(s=>{if(/color/.exec(s)){let l=s.replace("fill","bgFill");a.textStyles.push(l)}a.styles.push(s)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,r){for(let n of e.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let a=this.edges.find(l=>l.id===n);a&&a.classes.push(r);let s=this.subGraphLookup.get(n);s&&s.classes.push(r)}}setTooltip(e,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(e,r,n){let i=this.lookUpDomId(e);if(ge().securityLevel!=="loose"||r===void 0)return;let a=[];if(typeof n=="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l
")),s.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),qe(a.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=ge(),Sr()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n){let i=e.text.trim(),a=n.text;e===n&&/\s/.exec(n.text)&&(i=void 0);let l=o(p=>{let m={boolean:{},number:{},string:{}},g=[],y;return{nodeList:p.filter(function(x){let b=typeof x;return x.stmt&&x.stmt==="dir"?(y=x.value,!1):x.trim()===""?!1:b in m?m[b].hasOwnProperty(x)?!1:m[b][x]=!0:g.includes(x)?!1:g.push(x)}),dir:y}},"uniq")(r.flat()),u=l.nodeList,h=l.dir,f=ge().flowchart??{};if(h=h??(f.inheritDir?this.getDirection()??ge().direction??void 0:void 0),this.version==="gen-1")for(let p=0;p